Archive for the Kids Category

morning run [jatp]

Posted in Kids, Mountains, pictures, Running, Travel, Wines with tags , , , , , , , , on April 30, 2017 by xi'an

Camembert day?!

Posted in Kids, pictures, Wines with tags , , , , on April 28, 2017 by xi'an

Google France is celebrating the 256th anniversary of the birth of Marie Harel, who, according to local legend, invented Camembert cheese. Enjoy (if you can!).

a secretary problem with maximum ability

Posted in Kids, R with tags , , , , on April 28, 2017 by xi'an

The Riddler of today has a secretary problem, where one measures sequentially N random variables until one deems the current variable to be the largest of the whole sample. The classical secretary problem has a counter-intuitive solution where one first measures N/e random variables without taking any decision and then and only then picks the first next outcome larger than the largest in the first group. (For large values of N.) The added information in the current riddle is that the distribution of those iid random variables is set to be uniform on {1,…,M}, which begs for a modification in the algorithm. As for instance when observing M on the current draw.

The approach I devised is certainly suboptimal, as I decided to pick the currently observed value if the (conditional) probability it is the largest is larger than the probability subsequent draws. This translates into the following R code:

M=100 #maximum value
N=10  #total number of draws
hyprob=function(m){
# m is sequence of draws so far
n=length(m);mmax=max(m)
if ((m[n]<mmax)||(mmax-n<N-n)){prob=0
  }else{
  prob=prod(sort((1:mmax)[-m],dec=TRUE)
   [1:(N-n)]/((M-n):(M-N+1))}
return(prob)}

decision=function(draz=sample(1:M,N)){
  i=0
  keepgoin=TRUE
  while ((keepgoin)&(i<N)){
   i=i+1
   keepgoin=(hyprob(draz[1:i])<0.5)}
  return(c(i,draz[i],(draz[i]<max(draz))))}

which produces a winning rate of around 62% when N=10 and M=100, hence much better than the expected performances of the (asymptotic) secretary algorithm, with a winning frequency of 1/e. (For N=10 and M=100, the winning frequency is only 27%.)

air static

Posted in Kids, Travel with tags , , , , , , , , on April 27, 2017 by xi'an

[On an Air France flight for Birmingham, two young French students apparently studying in Warwick kept blathering the entire time, with an utter lack of concern for their surroundings. Note: Les Marseillais is a particularly idiotic reality show on French TV.]

  •  …j’ai arrêté de regarder les Marseillais, c’est même pas conscient, tu vois…
  • …grave, c’est sûr, moi aussi j’ai arrêté, j’avais trop d’épisodes à rattraper…

Gregynog #2 [jatp]

Posted in Kids, pictures, Running, Statistics, Travel, University life with tags , , , , , , , , , , , , , on April 26, 2017 by xi'an

ABC postdoc in Olso

Posted in Kids, Mountains, pictures, Travel, University life with tags , , , , , , , , on April 26, 2017 by xi'an

Jukka Corander sent me the announcement that he is opening a 3 year postdoctoral position at the University of Oslo, to work with him and his team on ABC projects. This sounds quite an exciting offer, plus gives the nominee the opportunity to live in the most enjoyable city of Oslo for several years in fairly comfy conditions! The deadline is May 31. (If I was at a stage of my career where applying made sense, I would definitely candidate. Not even waiting for the outcome of the French elections on May 7!)

today, 7.7 millions French voters voted for a xenophobic, populist, leader of an extreme-right party

Posted in Kids, pictures with tags , , on April 24, 2017 by xi'an