Archive for Fermat

Casanova’s Lottery [book review]

Posted in Books, Statistics, University life with tags , , , , , , , , , , , , , , , , , , , , , , , , , , , , , on January 12, 2023 by xi'an

This “history of a revolutionary game of chance” is the latest book by Stephen Stigler and is indeed of an historical nature, following the French Lottery from its inception as Loterie royale in 1758 to the Loterie Nationale in 1836 (with the intermediate names of Loterie de France, Loterie Nationale, Loterie impériale, Loterie royale reflecting the agitated history of the turn of that Century!).

The incentive for following this State lottery is that it is exceptional by its mathematical foundations. Contrary to other lotteries of the time, it was indeed grounded on the averaging of losses and gains on the long run (for the State). The French (Royal) State thus accepted the possibility of huge losses at some draws since they would be compensated by even larger gains. The reasoning proved most correct since the Loterie went providing as far as 4% of the overall State budget, despite the running costs of maintaining a network of betting places and employees, who had to be mathematically savy in order to compute the exact gains of the winners.This is rather amazing as the understanding of the Law of Large Numbers was quite fresh (on an historical scale) thanks to the considerable advances made by Pascal, Fermat, (Jakob) Bernoulli and a few others. (The book mentions the Encyclopedist and mathematician Jean d’Alembert as being present at the meeting that decided of the creation of the Loterie in 1757.)

One may wonder why Casanova gets the credit for this lottery. In true agreement with Stigler’s Law, it is directly connected with the Genoan lottery and subsequent avatars in some Italian cities, including Casanova’s Venezia. But jack-of-all-trades Casanova was instrumental in selling the notion to the French State, having landed in Paris after a daring flight from the Serenissima’s jails. After succeeding in convincing the King’s officers to launch the scheme crafted by a certain Ranieri (de’) Calzabig—not to be confused with the much maligned Salieri!—who would later collaborate with Gluck on Orfeo ed Eurydice and Alceste, Casanova received a salary from the Loterie administration and further run several betting offices. Until he left Paris for further adventures! Including an attempt to reproduce the lottery in Berlin, where Frederick II proved less receptive than Louis XIV. (Possibly due to Euler’s cautionary advice.) The final sentence of the book stands by its title: “It was indeed Casanova’s lottery” (p.210).

Unsurprisingly, given Stephen’s fascination for Pierre-Simon Laplace, the great man plays a role in the history, first by writing in 1774 one of his earliest papers on a lottery problem, namely the distribution of the number of draws needed for all 90 numbers to appear. His (correct) solution is an alternating sum whose derivation proved a numerical challenge. Thirty years later, Laplace came up with a good and manageable approximation (see Appendix Two). Laplace also contributed to the end of the Loterie by arguing on moral grounds against this “voluntary” tax, along Talleyrand, a fellow in perpetually adapting to the changing political regimes. It is a bit of a surprise to read that this rather profitable venture ended up in 1836, more under bankers’ than moralists´ pressure. (A new national lottery—based on printed tickets rather than bets on results—was created a century later, in 1933 and survived the second World War, with the French Loto appearing in 1974 as a direct successor to Casanova’s lottery.)

The book covers many fascinating aspects, from the daily run of the Loterie, to the various measures (successfully) taken against fraud, to the survival during the Révolution and its extension through (the Napoleonic) Empire, to tests for fairness thanks to numerous data from almanacs, to the behaviour of bettors and the sale of “helping” books. to (Daniel) Bernoulli, Buffon, Condorcet, and Laplace modelling rewards and supporting decreasing marginal utility. Note that there are hardly any mathematical formula, except for an appendix on the probabilities of wins and the returns, as well as Laplace’s (and Legendre’s) derivations. Which makes the book eminently suited for a large audience, the more thanks to Stephen Stigler’s perfect style.

This (paperback) book is also very pleasantly designed by the University of Chicago Press, with a plesant font (Adobe Calson Pro) and a very nice cover involving Laplace undercover, taken from a painting owned by the author. The many reproductions of epoch documents are well-done and easily readable. And, needless to say given the scholarship of Stephen, the reference list is impressive.

The book is testament to the remarkable skills of Stephen who searched for material over thirty years, from Parisian specialised booksellers to French, English, and American archives. He manages to bring into the story a wealth of connections and characters, as for instance Voltaire’s scheme to take advantage of an earlier French State lottery aimed at reimbursing State debtors. (Voltaire actually made a fortune of several millions francs out of this poorly designed lottery.) For my personal instructions, the book also put life to several Métro stations like Pereire and Duverney. But the book‘s contents will prove fascinating way beyond Parisian locals and francophiles. Enjoy!

[Disclaimer about potential self-plagiarism: this post or an edited version will eventually appear in my Books Review section in CHANCE. As appropriate for a book about capitalising on chance beliefs!]

linear Diophantine equations

Posted in Statistics with tags , , , , , , on May 10, 2018 by xi'an

When re-expressed in maths terms, the current Riddler is about finding a sequence x⁰,x¹,…,x⁷ of integers such that

x⁰=7x¹+1
6x¹=7x²+1

6x⁶=7x⁷+1
6x⁷=7x⁸

which turns into a linear equation with integer valued solutions, or a system of linear Diophantine equation. Which can be easily solved by brute-force R coding:

A=matrix(0,7,7)
for (i in 1:7) A[i,i]=6
for (i in 1:6) A[i,i+1]=-7
for (x in 1:1e6){
  zol=solve(a=A,b=c(rep(1,6),7*x))
  if (max(abs(zol-round(zol)))<1e-3) print(x)}
x=39990 #x8=5.6.31.43
7*solve(a=A,b=c(rep(1,6),7*x))[1]+1 #x0

which produces x⁰=823537. But it would be nicer to directly solve the linear system under the constraint. For instance, the inverse of the matrix A above is an upper triangular matrix with (upper-)diagonals

1/6, 7/6², 7²/6³,…,7⁶/6⁷

but this does not help considerably, except for x⁸ to be solutions to 7 equations involving powers of 6 and 7… This system of equations can be solved by successive substitutions but this still feels very pedestrian!

 

editor’s nightmare

Posted in Books, Kids, pictures, University life with tags , , , , , on June 24, 2014 by xi'an

paradoxes in scientific inference

Posted in Books, Statistics, University life with tags , , , , , , , , , , , , , on November 23, 2012 by xi'an

This CRC Press book was sent to me for review in CHANCE: Paradoxes in Scientific Inference is written by Mark Chang, vice-president of AMAG Pharmaceuticals. The topic of scientific paradoxes is one of my primary interests and I have learned a lot by looking at Lindley-Jeffreys and Savage-Dickey paradoxes. However, I did not find a renewed sense of excitement when reading the book. The very first (and maybe the best!) paradox with Paradoxes in Scientific Inference is that it is a book from the future! Indeed, its copyright year is 2013 (!), although I got it a few months ago. (Not mentioning here the cover mimicking Escher’s “paradoxical” pictures with dices. A sculpture due to Shigeo Fukuda and apparently not quoted in the book. As I do not want to get into another dice cover polemic, I will abstain from further comments!)

Now, getting into a deeper level of criticism (!), I find the book very uneven and overall quite disappointing. (Even missing in its statistical foundations.) Esp. given my initial level of excitement about the topic!

First, there is a tendency to turn everything into a paradox: obviously, when writing a book about paradoxes, everything looks like a paradox! This means bringing into the picture every paradox known to man and then some, i.e., things that are either un-paradoxical (e.g., Gödel’s incompleteness result) or uninteresting in a scientific book (e.g., the birthday paradox, which may be surprising but is far from a paradox!). Fermat’s theorem is also quoted as a paradox, even though there is nothing in the text indicating in which sense it is a paradox. (Or is it because it is simple to express, hard to prove?!) Similarly, Brownian motion is considered a paradox, as “reconcil[ing] the paradox between two of the greatest theories of physics (…): thermodynamics and the kinetic theory of gases” (p.51) For instance, the author considers the MLE being biased to be a paradox (p.117), while omitting the much more substantial “paradox” of the non-existence of unbiased estimators of most parameters—which simply means unbiasedness is irrelevant. Or the other even more puzzling “paradox” that the secondary MLE derived from the likelihood associated with the distribution of a primary MLE may differ from the primary. (My favourite!)

When the null hypothesis is rejected, the p-value is the probability of the type I error.Paradoxes in Scientific Inference (p.105)

The p-value is the conditional probability given H0.” Paradoxes in Scientific Inference (p.106)

Second, the depth of the statistical analysis in the book is often found missing. For instance, Simpson’s paradox is not analysed from a statistical perspective, only reported as a fact. Sticking to statistics, take for instance the discussion of Lindley’s paradox. The author seems to think that the problem is with the different conclusions produced by the frequentist, likelihood, and Bayesian analyses (p.122). This is completely wrong: Lindley’s (or Lindley-Jeffreys‘s) paradox is about the lack of significance of Bayes factors based on improper priors. Similarly, when the likelihood ratio test is introduced, the reference threshold is given as equal to 1 and no mention is later made of compensating for different degrees of freedom/against over-fitting. The discussion about p-values is equally garbled, witness the above quote which (a) conditions upon the rejection and (b) ignores the dependence of the p-value on a realized random variable. Continue reading

the universe in zero words

Posted in Books, Kids, Statistics, University life with tags , , , , , , , , , , , , , , , , on May 30, 2012 by xi'an

The universe in zero words: The story of mathematics as told through equations is a book with a very nice cover: in case you cannot see the details on the picture, what looks like stars on a bright night sky are actually equations discussed in the book (plus actual stars!)…

The universe in zero words is written by Dana Mackenzie (check his website!) and published by Princeton University Press. (I received it in the mail from John Wiley for review, prior to its publication on May 16, nice!) It reads well and quick: I took it with me in the métro one morning and was half-way through it the same evening, as the universe in zero words remains on the light side, esp. for readers with a high-school training in math. The book strongly reminded me (at times) of my high school years and of my fascination for Cardano’s formula and the non-Euclidean geometries. I was also reminded of studying quaternions for a short while as an undergraduate by the (arguably superfluous) chapter on Hamilton. So a pleasant if unsurprising read, with a writing style that is not always at its best, esp. after reading Bill Bryson’s “Seeing Further: The Story of Science, Discovery, and the Genius of the Royal Society“, and a book unlikely to bring major epiphanies to the mathematically inclined. If well-documented, free of typos, and engaging into some mathematical details (accepting to go against the folk rule that “For every equation you put in, you will lose half of your audience.” already mentioned in Diaconis and Graham’s book). With alas a fundamental omission: no trace is found therein of Bayes’ formula! (The very opposite of Bryson’s introduction, who could have arguably stayed away from it.) The closest connection with statistics is the final chapter on the Black-Scholes equation, which does not say much about probability…. It is of course the major difficulty with the exercise of picking 24 equations out of the history of maths and physics that some major and influential equations had to be set aside… Maybe the error was in covering (or trying to cover) formulas from physics as well as from maths. Now, rather paradoxically (?) I learned more from the physics chapters: for instance, the chapters on Maxwell’s, Einstein’s, and Dirac’s formulae are very well done. The chapter on the fundamental theorem of calculus is also appreciable.

Continue reading

%d bloggers like this: