Archive for Le Monde

“In short, the French presidential election is a mess”

Posted in Statistics with tags , , , , , , on April 23, 2017 by xi'an

Harry Enten (and not Nate Silver as reported by Le Monde) published yesterday a post on Five-Thirty-Eight about the unpredictability of the French elections. Which essentially states the obvious, namely that the four major candidates all stand a chance to make it to the runoff. (The post classifies Macron as a former left-wing socialist, which shows a glaring misunderstanding of the candidate or a massive divergence of what left-wing means between France and the USA.) The tribune states both that the polls could exhibit a bigger mistake than in the previous elections and that Le Pen score is unlikely to be underestimated, because voters are no longer shy to acknowledge they vote for a fascist candidate. One argument for the error in the polls is attributed to pollsters “herding” their results, i.e., shrinking the raw figures towards the global average taken over previous polls. A [rather reasonable] correction dismissed by Le Monde and French pollsters. While Enten argues that the variability of the percentages over fifty polls is too small to be plausible, assuming a Normal distribution that may not hold because French pollsters use quotas to build their polling population. In any case, this analysis, while cautious and reasonably so!, does not elaborate on the largest question mark, the elephant in the room, namely the percentage of abstentions today and their distribution among the political spectrum, which may eventually make the difference tonight. Indeed, “the bottom line is that we don’t know what’s going to happen on Sunday.” And it is definitely frightening!

Le Monde puzzle [#1003]

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

A purely arithmetic Le Monde mathematical puzzle:

Find the four integers w, x, y, z such that the four smallest pairwise sums among the six pairwise sums are 59, 65, 66, and 69. Similarly, find the four smallest of the five integers v, x, y, z such that the five smallest pairwise sums among the ten pairwise sums are 56, 64 , 66, 69 and 70.

The first question is rather straightforward since there are only two possible orderings when x≤y≤z≤w :

x+y≤x+z≤x+w≤y+z≤y+w≤z+w and x+y≤x+z≤y+z≤x+w≤y+w≤z+w

which means

x+y=59, x+z=65, x+w=66, y+z=69, and x+y=59, x+z=65, y+z=66, x+w=69

but since the first system does not allow for an integer solution, the only possibility is the second system, with solution (x,y,z,w)=(29,30,36,40). And the second question is of the same complexity, with, when x≤y≤z≤w≤v :

x+y=56, x+z=64, y+z=66, x+w=69, x+v=70 or x+y=56, x+z=64, x+w=66, x+v=69, y+z=70

with solutions (x,y,z,w,v)=(27,29,37,42,43) and (x,y,z,w,v)=(25,31,39,41,44).

Le Monde puzzle [#1002]

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

For once and only because it is part of this competition, a geometric Le Monde mathematical puzzle:

Given both diagonals of lengths p=105 and q=116, what is the parallelogram with the largest area? and when the perimeter is furthermore constrained to be L=290?

This made me jump right away to the quadrilateral page on Wikipedia, which reminds us that the largest area occurs when the diagonals are orthogonal, in which case it is A=½pq. Only the angle between the diagonals matters. Imposing the perimeter 2s in addition is not solved there, so I wrote an R code looking at all the integer solutions, based on one of the numerous formulae for the area, like ½pq sin(θ), where θ is the angle between both diagonals, and discretising in terms of the fractions of both diagonals at the intersection, and of the angle θ:

for (alpha in (1:500)/1000){
 for (beta in (1:999)/1000){
  for (teta in (1:9999)*pi/10000){
   if (abs(a+b+c+d-2*s)<.01){
     if (p*q*sin(teta)<2*maxur){

This code returned an area of 4350, to compare with the optimal 6090 (which is recovered by the above R code when the diagonal lengths are identical and the perimeter is the one of the associated square). (As Jean-Louis Foulley pointed out to me, this area can be found directly by assuming the quadrilateral is a parallelogram and maximising in the length of one side.)

Le Monde puzzle [#1000…1025]

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

Le Monde mathematical puzzle launched a competition to celebrate its 1000th puzzle! A fairly long-term competition as it runs over the 25 coming puzzles (and hence weeks). Starting with puzzle #1001. Here is the 1000th puzzle, not part of the competition:

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?

Le Monde puzzle [#1001]

Posted in Kids, R with tags , , , , on March 27, 2017 by xi'an

After a long lag (due to my missing the free copies distributed at Paris-Dauphine!), here is a Sudoku-like Le Monde mathematical puzzle:

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?

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


targ=function(mat){ #check constraints
  for (i in (1:(N*N))[mat>1]){

for (t in 1:1e6){
  if (10*log(runif(1))/t<cur-d){ 
  if ((d==0)&(max(prop)>goal)){

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:

for (v in 1:1e6){
  #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]){
    if ((max(mat[-r,c])>0)&(max(mat[r,-c])>0)){
    if (goal<max(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

Continue reading

the other end of statistics

Posted in Books, pictures, Statistics with tags , , , , , , on February 8, 2017 by xi'an

A coincidence [or not] saw very similar papers appear in Le Monde and The Guardian within days. I already reported on the Doomsday tone of The Guardian tribune. The point of the other paper is essentially the same, namely that the public has lost trust in quantitative arguments, from the explosion of statistical entries in political debates, to the general defiance against experts, media, government, and parties, including the Institute of Official Statistics (INSEE), to a feeling of disconnection between statistical entities and the daily problems of the average citizen, to the lack of guidance and warnings in the publication of such statistics, to the rejection of anything technocratic… With the missing addendum that politicians and governments too readily correlate good figures with their policies and poor ones with their opponents’. (Just no blame for big data analytics in this case.)

career advices by Cédric Villani

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

Le Monde has launched a series of tribunes proposing career advices from 35 personalities, among whom this week (Jan. 4, 2017) Cédric Villani. His suggestion for younger generations is to invest in artificial intelligence and machine learning. While acknowledging this still is a research  topic, then switching to robotics [although this is mostly a separate. The most powerful advice in this interview is to start with a specialisation when aiming at a large spectrum of professional opportunities, gaining the opening from exchanges with people and places. And cultures. Concluding with a federalist statement I fully share.