Archive for the Statistics Category

Sceaux snapshot [jatp]

Posted in Statistics with tags , , , , , , on April 22, 2018 by xi'an

extra glass of wine? 30mn, please…

Posted in pictures, Statistics, Wines with tags , , , , , on April 20, 2018 by xi'an

As I was reading The Guardian early today, I came across this entry on how an extra glass (17.5cl) glass of wine was equivalent to 30mn less of life (expectancy), above the recommended maximum of five glass a week. As explained by Prof of Risk David Spiegelhalter himself! The Lancet study behind this analysis stated that “early deaths rose when more than 100g per week, which is five to six glasses of wine or pints of beer, was consumed.” So be careful!!!

fiducial simulation

Posted in Books, Kids, pictures, Statistics, Travel, University life with tags , , , , , , , , , , , on April 19, 2018 by xi'an

While reading Confidence, Likelihood, Probability), by Tore Schweder and Nils Hjort, in the train from Oxford to Warwick, I came upon this unexpected property shown by Lindqvist and Taraldsen (Biometrika, 2005) that to simulate a sample y conditional on the realisation of a sufficient statistic, T(y)=t⁰, it is sufficient (!!!) to simulate the components of  y as y=G(u,θ), with u a random variable with fixed distribution, e.g., a U(0,1), and to solve in θ the fixed point equation T(y)=t⁰. Assuming there exists a single solution. Brilliant (like an aurora borealis)! To borrow a simple example from the authors, take an exponential sample to be simulated given the sum statistics. As it is well-known, the conditional distribution is then a (rescaled) Beta and the proposed algorithm ends up being a standard Beta generator. For the method to work in general, T(y) must factorise through a function of the u’s, a so-called pivotal condition which brings us back to my post title. If this condition does not hold, the authors once again brilliantly introduce a pseudo-prior distribution on the parameter θ to make it independent from the u’s conditional on T(y)=t⁰. And discuss the choice of the Jeffreys prior as optimal in this setting even when this prior is improper. While the setting is necessarily one of exponential families and of sufficient conditioning statistics, I find it amazing that this property is not more well-known [at least by me!]. And wonder if there is an equivalent outside exponential families, for instance for simulating a t sample conditional on the average of this sample.

guess what..?! Yet another worskhop in the endless summer Bayesian series!

Posted in Mountains, pictures, Running, Statistics, Travel, University life with tags , , , , , , , , , on April 18, 2018 by xi'an

Dennis Prangle pointed to me the perfectly timed i-like workshop taking place in Newcastle, on the days priors to ABC in Edinburgh and ISBA (similarly in Edinburgh!). (Note that Warwick is also part of the i-like network. Actually, the first i-like workshop was my first trip abroad after the Accident!) I may sound negative about these workshops, but on the opposite am quite a fan of them, just regretting that the main event did not take advantage of them all to reduce the volume of talks there. As I suggested, it could have been feasible to label these satellites as part of the main conference towards making speakers at these officially speakers at ISBA 2018 in case talks were required for support…

The i-like workshop 2018 is the sixth edition of a yearly series of workshops dedicated to the topic of intractable likelihoods, hosted by Newcastle University. The workshop will take place from Wednesday 20 June 2018 – Friday 22 June 2018 in Room 2.98, Armstrong Building, Newcastle upon Tyne. Registration is free and mandatory!

I spent a few days in Newcastle at the RSS meeting of 2013, with my friends Jim Hobert and Elias Moreno. Enjoying very much the city, its surroundings, the great meadow north of the city in a glorious sunset (I still bemoan not catching on camera!). And it is just in the vicinity of Hadrian’s Wall, just on the other side of the Borders, very close to Edinburgh in fact.

Le Monde puzzle [#1049]

Posted in Books, Kids, R with tags , , , on April 18, 2018 by xi'an

An algorithmic Le Monde mathematical puzzle with a direct

Alice and Bob play a game by picking alternatively one of the remaining digits between 1 and 10 and putting it in either one of two available stacks, 1 or 2. Their respective gains are the products of the piles (1 for Alice and 2 for Bob).

The problem is manageable by a recursive function

facten=factorial(10)
pick=function(play=1,remz=matrix(0,2,5)){
 if ((min(remz[1,])>0)||(min(remz[2,])>0)){#finale
  remz[remz==0]=(1:10)[!(1:10)%in%remz]
  return(prod(remz[play,]))
  }else{
   gainz=0
   for (i in (1:10)[!(1:10)%in%remz]){
     propz=rbind(c(remz[1,remz[1,]>0],i,
     rep(0,sum(remz[1,]==0)-1)),remz[2,])
     gainz=max(gainz,facten/pick(3-play,remz=propz))}
   for (i in (1:10)[!(1:10)%in%remz]){
     propz=rbind(remz[1,],c(remz[2,remz[2,]>0],i,
     rep(0,sum(remz[2,]==0)-1)))
     gainz=max(gainz,facten/pick(3-play,remz=propz))}
return(gainz)}}

that shows the optimal gain for Alice is 3360=2x5x6x7x 8, versus Bob getting 1080=1x3x4x9x10. The moves ensuring the gain are 2-10-…

an endless summer of Bayesian conferences

Posted in Statistics with tags , , , , on April 17, 2018 by xi'an

Another Bayesian conference that could fit the schedule of a few remaining readers of this blog, despite the constant flow of proposals! The 2018 Rimini Bayesian Econometrics Workshop will take place in Rimini, on the Italian Adriatic Sea, on 14-15 June, 2018. With Mike West as the plenary speaker. I attended this conference a few years ago and quite enjoyed its relaxed atmosphere.

a [Gregorian] calendar riddle

Posted in R with tags , , , , , on April 17, 2018 by xi'an

A simple riddle express this week on The Riddler, about finding the years between 2001 and 2099 with the most cases when day x month = year [all entries with two digits]. For instance, this works for 1 January, 2001 since 01=01 x 01. The only difficulty in writing an R code for this question is to figure out the number of days in a given month of a given year (in order to include leap years).

The solution was however quickly found on Stack Overflow and the resulting code is

#safer beta quantile
numOD <- function(date) {
    m <- format(date, format="%m")
    while (format(date, format="%m") == m) date <- date + 1
    return(as.integer(format(date - 1, format="%d")))
}
dayz=matrix(31,12,99)
for (i in 2001:2099)
for (j in 2:11)
  dayz[j,i-2000]=numOD(as.Date(
  paste(i,"-",j,"-1",sep=""),"%Y-%m-%d"))

monz=rep(0,99)
for (i in 1:99){
for (j in 1:12)
  if ((i==(i%/%j)*j)&((i%/%j)<=dayz[j,i])) 
    monz[i]=monz[i]+1}

The best year in this respect being 2024, with 7 occurrences of the year being the product of a month and a day…