Publications by xi'an
Le Monde puzzle [#1119]
A digit puzzle as Le weekly Monde current mathematical puzzle that sounds close to some earlier versions: Perfect squares are pairs (a²,b²) with the same number of digits such that a²b² is itself a square. What is the pair providing a²b² less than 10⁶? Is there a solution with both integers enjoying ten digits? The run of a brute force ...
963 sym R (307 sym/2 pcs) 2 img
sampling the mean
A challenge found on the board of the coffee room at CEREMADE, Université Paris Dauphine: When sampling with replacement three numbers in {0,1,…,N}, what is the probability that their average is (at least) one of the three? With a (code-golfed!) brute force solution of mean(!apply((a<-sample(0:n,3e6,rep=T),3)),2,mean)-apply(a,2,median)) pro...
773 sym R (69 sym/1 pcs) 2 img
an arithmetic mean identity
A 2017 paper by Ana Pajor published in Bayesian Analysis addresses my favourite problem [of computing the marginal likelihood] and which I discussed on the ‘Og, linking with another paper by Lenk published in 2012 in JCGS. That I already discussed here last year. Lenk’s (2009) paper is actually using a technique related to the harmonic mean c...
2637 sym R (78 sym/1 pcs) 2 img
riddle on a circle
The Riddler’s riddle this week provides another opportunity to resort to brute-force simulated annealing! Given a Markov chain defined on the torus {1,2,…,100} with only moves a drift to the right (modulo 100) and a uniformely random jump, find the optimal transition matrix to reach 42 in a minimum (average) number of moves. Which I coded i...
1155 sym R (280 sym/1 pcs)
postdoc in Bayesian machine learning in Berlin [reposted]
The working group of Statistics at Humboldt University of Berlin invites applications for one Postdoctoral research fellow (full-time employment, 3 years with extension possible) to contribute to the research on mathematical and statistical aspects of (Bayesian) learning approaches. The research positions are associated with the Emmy Noether grou...
3533 sym 2 img
Le Monde puzzle [#1124]
A prime number challenge [or rather two!] as Le weekly Monde current mathematical puzzle: When considering the first two integers, 1 and 2, their sum is 3, a prime number. For the first four integers, 1,2,3,4, it is again possible to sum them pairwise to obtain two prime numbers, eg 3 and 7. Up to which limit is this operation feasible? And how ...
1129 sym R (127 sym/2 pcs) 2 img
Metropolis in 95 characters
Here is an R function that produces a Metropolis-Hastings sample for the univariate log-target f when the later is defined outside as another function. And when using a Gaussian random walk with scale one as proposal. (Inspired from a X validated question.) m<-function(T,y=rnorm(1))ifelse(rep(T>1,T), c(y*{f({z<-m(T-1)}[1])-f(y+z[1])<rexp(1)}+z...
922 sym R (101 sym/1 pcs) 2 img
postdoc at Warwick on robust SMC [call]
Here is a call for a research fellow at the University of Warwick to work with Adam Johansen and Théo Damoulas on the EPSRC and Lloyds Register Foundaton funded project “Robust Scalable Sequential Monte Carlo with application to Urban Air Quality”. To quote The position will be based primarily at the Department of Statistics of the Universit...
1261 sym 2 img
Le Monde puzzle [#1120]
A board game as Le weekly Monde current mathematical puzzle: 11 players in a circle and 365 tokens first owned by a single player. Players with at least two tokens can either remove one token and give another one left or move two right and one left. How quickly does the game stall, how many tokens are left, and where are they? The run of a R si...
939 sym R (281 sym/2 pcs) 4 img
an elegant sampler
Following an X validated question on how to simulate a multinomial with fixed average, W. Huber produced a highly elegant and efficient resolution with the compact R code tabulate(sample.int((k-1)*n, s-n) %% n + 1, n) + 1 where k is the number of classes, n the number of draws, and s equal to n times the fixed average. The R function sample.int...
1401 sym R (78 sym/2 pcs) 2 img