Archive for Fermat

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

le théorème de l’engambi

Posted in Books, Statistics with tags , , , , , , , on May 20, 2011 by xi'an

When I climbed in Luminy last year, one of the ways was called le théorème de l’engambi. Looking on the internet, I found this was the title of a book written by a local, Maurice Gouiran. The other evening, at the airport, the book was on sale in the bookstore, so I bought it and read it in the plane back to Paris. It is a local crime novel with highly local characters (to the point I do not understand all they say), local places like l’Estaque, the OM football club, La Gineste, Luminy, and what is apparently the most appealing theorem in novels, Fermat’s last theorem! (Engambi means messy affair in local dialect.) Overall the book is more pleasant to read for the local flavour than for the crime enquiry per se, especially because it involves scenes that take place in CIRM itself (including the restaurant and the terrace outside under the old oaks!). There is of course no indication on the nature of the three page proof produced by the first corpse of the book, but the description of the mathematical community is rather accurate, overall. The author mentions in a postnote that he is aware of Wiles’ proof, but believes (as a poet) in an alternative proof that Fermat had really found. (This book is not to be confused with Guedj’s parrot theorem, which is a novelesque story of mathematics, even though it ends up on the same premise that a parrot could recite Fermat’s proof…)

The Millennium Trilogy (tome 3)

Posted in Books with tags , , , , on June 26, 2010 by xi'an

“Trinity and Bob the Dog devoted the best part of a week to identifying and separating out Ekström’s mobile from the background noise of about 200,000 other mobile telephones. They used a technique called Random Frequency Tracking System.” Stieg Larsson, The Girl who kicked the hornets’ nest

While I was reading the second volume of The Millennium Trilogy, I [addictedly!] ordered the third volume , The Girl who kicked the hornets’ nest, and found it in my mailbox on my return from Padova. I started reading it on Saturday night and [addictedly!] kept reading and reading till it was over, on Monday early morning! The conclusion is that…The Millennium Trilogy is indeed truly addictive, although not very well-written nor even altogether convincing. In somewhat of a contradiction with several of my friends, I actually preferred the second volume of the series, the first one being too brutal and the last one too predictable.

Plague ran Ekström’s digitized voice through a program called V.P.R.. When he had five separate examples of a word, he charted it with respect to the time it took to speak the word, what tone of voice and frequency range it took to speak the word, and a dozen other markers. The result was a graph.” Stieg Larsson, The Girl who kicked the hornets’ nest

This last novel has several interesting literary features but still shares many of the defects of the previous volumes. For instance, the poor habit of launching into useless descriptions. This time, instead of the unabridged Ikea catalog, we are given the complete tour of the home protection company… Similarly, the sudden relation of Blomkvist with a policewoman has been announced by red flags for dozens of pages in advance (even though it is quite a hilarious tryst!). The gun-battle in the restaurant is rather implausible, even though its role in the plot is meaningful. Maybe the least convincing part of this plot is the counterstrike at the secret cell within the National Security Agency, S.I.S., coming from the same agency but from “good” agents, as they manage to dismantle a well-organised if small secret unit that has been operated for fifty years in complete anonymity. The pace at which this reaction of the legal side takes place is gripping and helps very much at making the book addictive!, but I feel the story is stretched quite thin at this stage. The [bad] secret [secret] agents are also a bit too stupid to have survived fifty years of this regime, while Blomkvist’ lawyer sister is [again] too smart for the defence of Salander (even thought the availability of hard proofs like Burjman’s video are a big help!)…

“She opened the door wide and let him into her life again.” Stieg Larsson, The Girl who kicked the hornets’ nest

On the positive side, I appreciate the return to the main characters Blomkvist and Berger acting as engaged journalists. The passage of Berger at the main Swedish daily, Svenske Morgon-Posten, is quite convincing, both in terms of handling a large team of professionals with short-term goals and of facing antagonism from male colleagues (and the resolution of the stalking sub-story is quite surprising!). The most appealing part of the book is the unité de lieu imposed on Salander by her stay in the hospital as this forces the author to focus on psychological descriptions of Salander rather than detailing her grocery bills… The trick imagined to get her to communicate with the outside world (incl. Blomkvist and Berger) is quite good and the connection she builds with the neurosurgeon is also believable. I also loved discovering the fact that Paolo Roberto is a real boxer (who also plays his own role in the movies!) while the book was making fun of a reverse situation where Blomkvist runs into an actor who plays the role of a detective. (I am not sure I am clear enough there!) The death of Salander’s father comes as a complete surprise (even though we have to surmise that the old security agent is deeply sick). And involving the Prime Minister is also a nice move by Stieg Larssen! At last, the final battle of Salander and Niederman is nailed down in the most original (if gory) manner! Even Fermat’s last theorem comes back with a twist that makes me reconsider the second volume in a much more positive manner. I thus [reluctantly] conclude at a good readable fast-paced story with the shortcomings of the genre (not only the inconsistencies, and the too many coincidences, but also the perturbing fact that the main characters have this vigilante impulse to make justice outside the legal system)… A perfect book for a long plane ride.