Filed under: Books, pictures, Statistics, Travel, University life, Wines Tagged: Bayesian Analysis, Cambridge, Error-Statistical philosophy, foundations, Harvard University, Philosophy of Science, snow, Statistics done wrong ]]>

Filed under: Statistics Tagged: Amazon, Berlin, Germany, jatp, OxWaSP, Stadtmitte ]]>

Alice & Bob spend five (identical) vouchers in five different shops, each time buying the maximum number of items to get close to the voucher value. In these five shops, they buy sofas at 421 euros each, beds at 347 euros each, kitchen appliances at 289 euros each, tables at 251 euros each and bikes at 211 euros each, respectively. Once the buying frenzy is over, they realise that within a single shop, they would have spent exactly four vouchers for the same products. What is the value of a voucher?

Filed under: Kids, R Tagged: Alice and Bob, arithmetics, competition, Le Monde, mathematical puzzle, R, Tangente ]]>

Filed under: Statistics Tagged: flowers, gardening, jatp, Spring ]]>

A grid of size (n,n)holds integer values such that any entry larger than 1 is the sum of one term in the same column and one term in the same row. What is the maximal possible value observed in such a grid when n=3,4?

**T**his can be solved in R by a random exploration of such possible grids in a simulated annealing spirit:

mat=matrix(1,N,N) goal=1 targ=function(mat){ #check constraints d=0 for (i in (1:(N*N))[mat>1]){ r=(i-1)%%N+1;c=(i-1)%/%N+1 d=d+(min(abs(mat[i]-outer(mat[-r,c],mat[r,-c],"+")))>0)} return(d)} cur=0 for (t in 1:1e6){ i=sample(1:(N*N),1);prop=mat prop[i]=sample(1:(2*goal),1) d=targ(prop) if (10*log(runif(1))/t<cur-d){ mat=prop;cur=d} if ((d==0)&(max(prop)>goal)){ goal=max(prop);maxx=prop}}

returning a value of 8 for n=3 and 37 for n=4. However, the method is quite myopic and I tried instead a random filling of the grid, using each time the maximum possible sum for empty cells:

goal=1 for (v in 1:1e6){ mat=matrix(0,N,N) #one 1 per row/col for (i in 1:N) mat[i,sample(1:N,1)]=1 for (i in 1:N) if (max(mat[,i])==0) mat[sample(1:N,1),i]=1 while (min(mat)==0){ parm=sample(1:(N*N)) #random order for (i in parm[mat[parm]==0]){ r=(i-1)%%N+1;c=(i-1)%/%N+1 if ((max(mat[-r,c])>0)&(max(mat[r,-c])>0)){ mat[i]=max(mat[-r,c])+max(mat[r,-c]) break()}}} if (goal<max(mat)){ goal=max(mat);maxx=mat}}

which recovered a maximum of 8 for n=3, but reached 48 for n=4. And 211 for n=5, 647 for n=6… For instance, here is the solution for n=4:

[1,] 1 5 11 10 [2,] 2 4 1 5 [3,] 48 2 24 1 [4,] 24 1 22 11

While the update in the above is random and associated with the first term in the permutation, it may be preferable to favour the largest possible term at each iteration, which I tried as

while (min(mat)==0){ parm=sample(1:(N*N)) val=0*parm for (i in parm[mat[parm]==0]){ r=(i-1)%%N+1;c=(i-1)%/%N+1 if ((max(mat[-r,c])>0)&(max(mat[r,-c])>0)){ val[i]=max(mat[-r,c])+max(mat[r,-c])} } #largest term i=order(-val)[1];mat[i]=val[i]}

For n=4, I did not recover the maximal value 48, but achieved larger values for n=5 (264) and n=6 (2256).

As an aside, the R code sometimes led to a strange error message linked with the function sample(), which is that too large a bound in the range produces the following

> sample(1:1e10,1) Error: cannot allocate vector of size 74.5 Gb

meaning that 1:1e10 first creates a vector for all the possible values. The alternative

> sample.int(1e10,1) [1] 7572058778

works, however. And only breaks down for 10¹².

Filed under: Kids, R Tagged: Le Monde, mathematical puzzle, R, sample, sudoku ]]>

**N**ext June, I will spend the day in Rouen for a conference celebrating the career and dedication of Gérard Grancher to mathematics and the maths department there. (When I got invited I had not realised I was to give *the* research talk of the day!) Gérard Granger is a CNRS engineer and a statistician who is indissociable from the maths department in Rouen, where he spent his whole career, now getting quite close to [mandatory] retirement! I am very happy to take part in this celebration as Gérard has always been an essential component of the department there, driving the computer structure, reorganising the library, disseminating the fun of doing maths to high schools around and to the general public, and always a major presence in the department, whom I met when I started my PhD there (!) Working on the local computers in Pascal and typing my thesis with scientific word (!!)

Filed under: Kids, pictures, Statistics, Travel, University life Tagged: Cédric Villani, CNRS, conference, fractals, France, Gérard Granger, GG Day, Madrillet, Pascal, Raphaël Salem, retirement, Rouen, scientific word ]]>

Filed under: Kids, pictures Tagged: better together, EU, European Union, March 25 1957, Rome Treaty ]]>

Filed under: Books, Kids, Travel Tagged: Banff, Ben Aaronovitch, England, English magic, Hyde Park, London, Rivers of London, Thames ]]>

*“The paper defines a new solution to the problem of defining a suitable parameter space for mixture models.”*

**W**hen I received the table of contents of the incoming Statistics & Computing and saw a paper by V. Maroufy and P. Marriott about the above, I was quite excited about a new approach to mixture parameterisation. Especially after our recent reposting of the weakly informative reparameterisation paper. Alas, after reading the paper, I fail to see the (statistical) point of the whole exercise.

Starting from the basic fact that mixtures face many identifiability issues, not only invariance by component permutation, but the possibility to add spurious components as well, the authors move to an entirely different galaxy by defining mixtures of so-called local mixtures. Developed by one of the authors. The notion is just incomprehensible for me: the object is a weighted sum of the basic component of the original mixture, e.g., a Normal density, and of k of its derivatives wrt its mean, a sort of parameterised Taylor expansion. Which implies the parameter is unidimensional, incidentally. The weights of this strange mixture are furthermore constrained by the positivity of the resulting mixture, a constraint that seems impossible to satisfy in the Normal case when the number of derivatives is odd. And hard to analyse in any case since possibly negative components do not enjoy an interpretation as a probability density. In exponential families, the local mixture is the original exponential family density multiplied by a polynomial. The current paper moves one step further [from the reasonable] by considering mixtures [in the standard sense] of such objects. Which components are parameterised by their mean parameter and a collection of weights. The authors then restrict the mean parameters to belong to a finite and fixed set, which elements are coerced by a maximum error rate on any compound distribution derived from this exponential family structure. The remainder of the paper discusses of the choice of the mean parameters and of an EM algorithm to estimate the parameters, with a confusing lower bound on the mixture weights that impacts the estimation of the weights. And no mention made of the positivity constraint. I remain completely bemused by the paper and its purpose: I do not even fathom how this qualifies as a mixture.

Filed under: Statistics, University life Tagged: mixtures of distributions, reparameterisation, Statistics and Computing, Taylor expansion ]]>

*“Trump wants us to associate immigrants with criminality. That is the reason behind a weekly published list of immigrant crimes – the first of which was made public on Monday. Singling out the crimes of undocumented immigrants has one objective: to make people view them as deviant, dangerous and fundamentally undesirable. ” *The Guardian, March 22, 2017

*“`I didn’t want this job. I didn’t seek this job,’ Tillerson told the Independent Journal Review (IJR), in an interview (…) `My wife told me I’m supposed to do this.'”* The Guardian, March 22, 2017

*“…under the GOP plan, it estimated that 24 million people of all ages would lose coverage over 10 years (…) Trump’s plan, for instance, would cut $5.8 billion from the National Institutes of Health, an 18 percent drop for the $32 billion agency that funds much of the nation’s research into what causes different diseases and what it will take to treat them.”* The New York Times, March 5, 2017

Filed under: Kids, pictures, Travel, University life Tagged: Donald Trump, GOP, ice, immigration, NIH, The Guardian, The New York Times, trumpism, US politics ]]>