Archive for the R Category

Round-robin (with Claude)

Posted in Books, Kids, R, Statistics, Wines with tags , , , , , , , , , , , , on August 15, 2026 by xi'an

A few days ago I had a coffee in Paris with my long-time friend (and former Statistics & Computing editor) Gilles Celeux, and he mentioned me stopping solving and posting maths puzzles like those weekly published by Le Monde. They have indeed vanished with the retirement of the authors, but Gilles added that the arrival of LLMs would have made the exercise moot. I disagreed as (i) the fun of solving the puzzle on my own  has not gone away and (ii) the pedagogical appeal of the puzzle and its resolution remains. As the next Fiddler puzzle arrived in my mailbox, my resolution was put to the test (contrariwise to the previous entry, which did not require massive computations):

The Fiddler League consists of two teams. Over a season, they play each other 162 times. Each team has an equal chance of winning each game, and the results of games are independent. Over the season, on average, how many games would you expect the team with the better record to have won?

I started on the wrong foot with E[X|X≥81] when X is Bin(162,½), equal to 85.77 (either directly or with a Normal approximation), which differs from my second thought, E[max(X,162-X)]=86.07 (either directly or with a Normal approximation), which is larger because of the reflection produced by max. While the first computation was manageable, the second one seemed to involve simulation and I caved in prompting Claude, which provided the answer along with the connection

E[max(X,162−X)]=E[X∣X≥81](1+p81​)−81p81

After some expansion, the League boasts 30 teams. Over a season, each team plays each other team five times. (Each team plays a total of 145 games.) Again, each team has an equal chance of winning each game, and the results of games are independent. Over the season, on average, how many games would you expect the team with the best record to have won?

The best record is max(Xi) with each of the 30 Xi‘s a sum of 29 Yij and the Yij=5-Yji distributed as Bin(5,½). The Xi‘s are thus Bin (145,½) but dependent. While I could not figure out a closed form answer for the expectation, a direct Monte Carlo resolution is obviously feasible, with Claude (rather than me) running it over 400 million repetitions, but a 30 dimensional Normal approximation exploiting the correlation of 1/29 between the components leads to roughly 85 as the expected value. (Again computed by a Claudicant simulation.)

While the conclusion that the Normal approximation is pretty accurate with so many terms in the Binomial variates is quite unsurprising, Claude saves me coding time without ruining the puzzle altogether. (And Gemini made me aware that the name of the café where Gilles and I regularly meet, L’Écir, is an Auvergne noun for a local, dangerous, mountain blizzard! Thus linking the place to the foundation of the café by Auvergne expatriates…)

R’ousseeuw²⁶ prize!

Posted in R, Statistics, University life with tags , , , , , , , , , , on June 29, 2026 by xi'an

Great news that a major Statistics prize like the Rousseeuw Prize goes to the R Core Team, esp. Brian Ripley (University of Oxford), Martin Mächler (ETH Zürich), Kurt Hornik (WU Wien), Peter Dalgaard (Copenhagen Business School), and Luke Tierney (University of Iowa). R is indeed a unique phenomenon, where open-source and open-access has been developed by and for the statistics community. Which is about to release R version 4.6.1 (Happy Hop) version.

Thanks to the R Core Team (and congrats!). Half of the Prize goes to the other members of the Team.

“The international and independent jury, appointed by the King Baudouin Foundation, has recognised the groundbreaking work of five members of the R Core Team who have been awarded the Rousseeuw Prize for Statistics. The international award, which recognises major contributions to statistical research, honours their nearly three decades of unpaid work building R, the open-source language that has become the common foundation of modern statistical computing.

Statistics is everywhere. It determines whether a new medicine is safe enough to reach patients, monitors risk in financial markets, and tracks how diseases spread. R is the tool that made it accessible to everyone. The language that the R Core Team built is trusted by institutions including the US Food and Drug Administration, the European Central Bank, the Bank of England, and major pharmaceutical companies worldwide.”

Bayesian Workflow [cover]

Posted in Books, pictures, R, Statistics, University life with tags , , , , , , , , , , , , , , , , , , , , on April 25, 2026 by xi'an

Ah great, the new book on Bayesian workflow by Andrew Gelman, Aki Vehtari, Richard McElreath I knew they were working on is about to appear!  With entries from several coauthors and half of the chapters on case studies. I have not (yet) looked at its contents in detail…

“Approximating evidence via bounded harmonic means” is out! [in Statistics and Computing]

Posted in Books, R, Statistics, University life with tags , , , , , , , , , , , on April 24, 2026 by xi'an

ECMLE on CRAN

Posted in R, Statistics, University life with tags , , , , , , , , , , on March 27, 2026 by xi'an

x