Publications by xi'an

Le Monde puzzle [#887]

14.11.2014

A simple combinatorics Le Monde mathematical puzzle: N is a golden number if the sequence {1,2,…,N} can be reordered so that the sum of any consecutive pair is a perfect square. What are the golden numbers between 1 and 25? Indeed, from an R programming point of view, all I have to do is to go over all possible permutations of {1,2,..,N} unti...

2295 sym R (1142 sym/3 pcs) 6 img

Le Monde puzzle [#887bis]

15.11.2014

As mentioned in the previous post, an alternative consists in filling the permutation of {1,…,N} by adding squares left and right until the permutation is complete or no solution is available. While this sounds like the dual of the initial solution, it brings a considerable increase in computing time, as shown below. I thus redefined the constr...

1513 sym R (717 sym/4 pcs) 6 img

an ABC experiment

23.11.2014

In a cross-validated forum exchange, I used the code below to illustrate the working of an ABC algorithm: #normal data with 100 observations n=100 x=rnorm(n) #observed summaries sumx=c(median(x),mad(x)) #normal x gamma prior priori=function(N){ return(cbind(rnorm(N,sd=10), 1/sqrt(rgamma(N,shape=2,scale=5)))) } ABC=function(N,alpha=.05){ p...

1866 sym R (643 sym/1 pcs) 8 img

Le Monde puzzle [#887quater]

27.11.2014

And yet another resolution of this combinatorics Le Monde mathematical puzzle: that puzzle puzzled many more people than usual! This solution is by Marco F, using a travelling salesman representation and existing TSP software. N is a golden number if the sequence {1,2,…,N} can be reordered so that the sum of any consecutive pair is a perfect ...

1349 sym R (997 sym/4 pcs) 6 img

the Grumble distribution and an ODE

02.12.2014

As ‘Og’s readers may have noticed, I paid some recent visits to Cross Validated (although I find this too addictive to be sustainable on a long term basis!, and as already reported a few years ago frustrating at several levels from questions asked without any preliminary personal effort, to a lack of background material to understand hints to...

1921 sym R (356 sym/1 pcs) 12 img

amazonish thanks (& repeated warning)

08.12.2014

As in previous years, at about this time, I want to (re)warn unaware ‘Og readers that all links to Amazon.com and more rarely to Amazon.fr found on this blog are actually susceptible to earn me an advertising percentage if a purchase is made by the reader in the 24 hours following the entry on Amazon through this link, thanks to the “Amazon S...

1816 sym 4 img

top posts for 2014

29.12.2014

Here are the most popular entries for 2014: 17 equations that changed the World (#2) 995 Le Monde puzzle [website] 992 “simply start over and build something better” 991 accelerating MCMC via parallel predictive prefetching 990 Bayesian p-values 960 posterior predictive p-values 849 Bayesian Data Analysis [BDA3] 846 Bayesian pr...

866 sym 4 img 1 tbl

simulation by inverse cdf

13.01.2015

Another Cross Validated forum question that led me to an interesting (?) reconsideration of certitudes! When simulating from a normal distribution, is Box-Muller algorithm better or worse than using the inverse cdf transform? My first reaction was to state that Box-Muller was exact while the inverse cdf relied on the coding of the inverse cdf, l...

1941 sym R (412 sym/2 pcs) 8 img

Sequential Monte Carlo 2015 workshop

22.01.2015

An announcement for the SMC 2015 workshop: Sequential Monte Carlo methods (also known as particle filters) have revolutionized the on-line and off-line analysis of data in fields as diverse as target tracking, computer vision, financial modelling, brain imagery, or population ecology. Their popularity stems from the fact that they have made pos...

1410 sym 6 img

the density that did not exist…

26.01.2015

On Cross Validated, I had a rather extended discussion with a user about a probability density as I thought it could be decomposed in two manageable conditionals and simulated by Gibbs sampling. The first component led to a Gumbel like density wirh y being restricted to either (0,1) or (1,∞) depending on β. The density is bounded and can be ...

1674 sym 10 img