Publications by xi'an

Le Monde puzzle [#928]

09.09.2015

A combinatorics Le Monde mathematical puzzle: How many distinct integers between 0 and 16 can one pick so that all positive differences are distinct? If k is the number of distinct integers, the number of positive differences is 1+2+…+(k-1) = k(k-1)/2, which cannot exceed 16, meaning k cannot exceed 6. From there, picking 6 integers at random...

1199 sym R (171 sym/2 pcs) 6 img

Le Monde puzzle [#929]

28.09.2015

A combinatorics Le Monde mathematical puzzle: In the set {1,…,12}, numbers adjacent to i are called friends of i. How many distinct subsets of size 5 can be chosen under the constraint that each number in the subset has at least a friend with him? In a brute force approach, I tried a quintuple loop to check all possible cases: case=0 for (a i...

1166 sym R (189 sym/1 pcs) 8 img

Think Bayes: Bayesian Statistics Made Simple

26.10.2015

By some piece of luck, I came upon the book Think Bayes: Bayesian Statistics Made Simple, written by Allen B. Downey and published by Green Tea Press [which I could relate to No Starch Press, focussing on coffee!, which published Statistics Done Wrong that I reviewed a while ago] which usually publishes programming books with fun covers. The book...

3940 sym 8 img

Le Monde puzzle [#937]

10.11.2015

A combinatoric Le Monde mathematical puzzle that resembles many earlier ones: Given a pool of 30 interns allocated to three person night-shifts, is it possible to see 31 consecutive nights such that (a) all the shifts differ and (b) there are no pair of shifts with a single common intern? In fact, the constraint there is very strong: two pairs ...

1362 sym R (1409 sym/2 pcs) 6 img

importance sampling with infinite variance

12.11.2015

“In this article it is shown that in a fairly general setting, a sample of size approximately exp(D(μ|ν)) is necessary and sufficient for accurate estimation by importance sampling.” Sourav Chatterjee and Persi Diaconis arXived yesterday an exciting paper where they study the proper sample size in an importance sampling setting with no var...

4096 sym 12 img

Paret’oothed importance sampling and infinite variance [guest post]

16.11.2015

[Here are some comments sent to me by Aki Vehtari in the sequel of the previous posts.] The following is mostly based on our arXived paper with Andrew Gelman and the references mentioned  there. Koopman, Shephard, and Creal (2009) proposed to make a sample based estimate of the existence of the moments using generalized Pareto distribution fitte...

3758 sym 10 img

Sunday morning puzzle

21.11.2015

A question from X validated that took me quite a while to fathom and then the solution suddenly became quite obvious: If a sample taken from an arbitrary distribution on {0,1}⁶ is censored from its (0,0,0,0,0,0) elements, and if the marginal probabilities are know for all six components of the random vector, what is an estimate of the proporti...

1462 sym R (248 sym/1 pcs) 4 img

a programming bug with weird consequences

24.11.2015

One student of mine coded by mistake an independent Metropolis-Hastings algorithm with too small a variance in the proposal when compared with the target variance. Here is the R code of this implementation: #target is N(0,1) #proposal is N(0,.01) T=1e5 prop=x=rnorm(T,sd=.01) ratop=dnorm(prop,log=TRUE)-dnorm(prop,sd=.01,log=TRUE) ratav=ratop[1] lo...

1648 sym R (256 sym/1 pcs) 10 img

Le Monde puzzle [#939]

10.12.2015

A Le Monde mathematical puzzle about special integers: Find all integers with less than 11 digits that are perfect squares and can be written as a(a+6), a being an integer. Eleven digits being too much for a brute force exploration of the form `for (t in 1:1e11)`…, some preliminary  analysis is needed, but I could not figure out a reason why...

1666 sym R (382 sym/4 pcs) 6 img

Le Monde puzzle [#939bis]

17.12.2015

If you remember the previous post, I had two interpretations about Le Monde mathematical puzzle #639: Find all integers with less than 11 digits that are perfect squares and can be written as a(a+6), a being an integer. and: Find all integers with less than 11 digits that are perfect squares and can be written as x concatenated with (x+6), x b...

1604 sym R (576 sym/4 pcs) 6 img