SlideShare a Scribd company logo
1 of 19
Download to read offline
“R”goestothecasino
The m
a
gic of the d’Alembert (*)
Rich
a
rd Gill, 3 M
a
y 2021
(*) subtitle borrowed from Crane and Shafer (2020)
Jean-Baptiste le Rond d’Alembert
(1717 – 1783).
French mathematician, mechanician,
physicist, philosopher, and music
theorist.
Together with Denis Diderot, a co-
editor of the Encyclopédie.
D'Alembert's formula for obtaining
solutions to the wave equation is
named after him.
The wave equation is sometimes
referred to as d'Alembert's equation.
The Fundamental theorem of
algebra is named after d'Alembert in
French.
d’Alembert’s principle was due to
Lagrange.
d’Alembert wrote the articles on
probability in the Encyclopédie. And is
famous for giving the wrong answer to
a simple problem … (!?)
Diderot and d’Alembert (1751)


Encyclopédie
NB: this is after Christiaan Huygens, Jacob Bernoulli,


Abraham de Moivre; before Laplace.
Denis Diderot
Encyclopédie:Croixoupile
Annexe I
Extrait commenté de l’Article “Croix ou Pile”
écrit pour l’Encyclopédie par D’ALEMBERT.
CROIX OU PILE, (analyse des hasards). Ce jeu, qui est très connu, & qui n’a
pas besoin de définition, nous fournira les réflexions suivantes. On demande
combien il y a à parier qu’on amènera croix en jouant deux coups consécutifs.
La réponse qu’on trouvera dans les auteurs, & suivant les principes
ordinaires, est celle-ci. Il y a quatre combinaisons.
Premier coup. Deuxième coup.
Croix. Croix.
Pile. Croix.
Croix. Pile.
Pile. Pile.
De ces quatre combinaisons, une seule fait perdre & trois font gagner,
il y a donc 3 contre 1 à parier en faveur du joueur qui jette la pièce. S’il pariait
en trois coups, on trouveroit huit combinaisons, dont une seule fait perdre, &
sept font gagner ; ainsi, il y aurait 7 contre 1 à parier. Voyez COMBINAISON &
AVANTAGE. Cependant cela est-il bien exact ?43
Car, pour ne prendre ici que
le cas de deux coups, ne faut-il pas réduire à une les deux combinaisons qui
donnent croix au premier coup ? Car, dès qu’une fois croix est venu, le jeu est
fini, & le second coup est compté pour rien. Ainsi, il n’y a proprement que
trois combinaisons de possibles :
Croix, premier coup
Pile, Croix, premier & second coup.
Pile, pile, premier & second coup.
Donc il n’y a que 2 contre 1 à parier. De même, dans le cas de trois
coups, on trouvera :
Croix
Pile, croix.
pile, pile, croix.
Pile, pile, pile.
Donc il n’y a que 3 contre 1 à parier. Ceci est digne, ce me semble, de
l’attention des calculateurs, & irait à réformer bien des règles
unanimement reçues sur les jeux de hasard43
.
Toss a coin a maximum of three times,


stop at the
f
irst “heads”.


What is the probability of seeing heads?


d’Alembert’s answer:


there are four possible outcomes,


three ending in heads, one not.


So the chance is 3/4
I think d’Alembert was not stupid.


I think he deliberately shows


that blindly counting


# favourable and # unfavourable


outcomes can be dumb.


You *must* also argue why


those outcomes are equally likely.
•One of the oldest casino betting systems is the one that calls for the player to begin with a unit
bet, increase the size of the bet by one unit after every loss, and decrease it by one unit, except
when it is already only one unit, after every win. Since the late 19th century, this system has been
called the d’Alembert, on the erroneous theory that it was invented by the mathematician Jean Le
Rond d’Alembert. Whatever its origin, the d’Alembert was already one of the most popular systems by
the 1790s.


•As Bertrand reported in 1798, admirers of the d’Alembert thought it was bound to succeed because the
numbers of wins and losses will eventually equalize. Consider what happens when you play the
d’Alembert after having bet one unit and lost. Whenever the number of subsequent wins and
losses, including this
f
irst loss, are equal, your net gain will be equal to the number of wins (or,
equivalently, equal to one-half the number of rounds played).


•The flaw in this venerable argument for the d’Alembert is that you may run out of money before your
wins and losses equalize. But as Jacques-Joseph Boreux explained in 1820, the system often appears to
work in practice. If you set a modest goal and play the d’Alembert repeatedly, playing each time until
the goal is reached or you are forced to stop (because you run out of money, the séance is over, or your
proposed bet exceeds the house limit), you can expect a string of relatively quick successes before you
ever fail, and the successes will not usually require taking too much money out of your pocket.
Bettingsystems
Risk is r
a
ndom: The m
a
gic of the d’Alembert


H
a
rry Cr
a
ne
a
nd Glenn Sh
a
fer (2020)


https://rese
a
rchers.one/
a
rticles/20.08.00007
• Lawyer: lawyer’s client is accused of laundering money


• Client claims in each of 5 successive years to have won close to
€10.000,– playing red/black and low/high at roulette at Holland Casino


• Client pays no income tax on his winnings, since Holland Casino pays
the income tax on behalf of all players


• No capital-gains tax had to be paid because below threshold
(client submitted proof of his gains to the tax inspector)


• The prosecution says this is impossible, and anyway would take much
too much time


• Client says he used the d’Alembert system
Animaginaryconsultationproject
Im
a
gine, my client is
a
crimin
a
l defence l
a
wyer
• Two simultaneous games are played: red/black and low/high


• Initial bet in each game = 1 unit (€50.–)


• Initial capital = 25 units for each game


• Maximum number of rounds = 21


• Quit either game if game capital falls below 16 units


• Roulette at Holland Casino has 36 numbered slots and one
“zero”; if zero comes up, then stakes on even odds bets are
shared 50/50 between player and house


• To avoid working with half units and dependence between the
two games I’ll pretend two independent games each with actual
odds 36:37 in favour of the house
Client’sstrategy
startKapitaal <- 25
eersteInzet <- 1
noodstopKapitaal <- 16
aantalBeurten <- 21 # Aantal beurten in een spel
set.seed(12345)
boxes <- rep(0, 51)
J <- 100000
Capitals <- 0:50
for (j in (1:J)) {
huidigeKapitaal <- startKapitaal
huidigeInzet <- eersteInzet
spelVerloop <- rep(0, aantalBeurten)
for(i in 1:aantalBeurten) {
uitkomst <- sample(x = c(-1, +1), prob = c(37, 36), size = 1)
if(huidigeInzet > 0){
stap <- uitkomst * huidigeInzet
huidigeKapitaal <- huidigeKapitaal + stap
huidigeInzet <- max(1, huidigeInzet - uitkomst)
if(huidigeKapitaal < noodstopKapitaal) huidigeInzet <- 0
}
spelVerloop[i] <- huidigeKapitaal
}
boxes[huidigeKapitaal + 1] <- boxes[huidigeKapitaal + 1] + 1
}
Rsimulations
Core code
0 3 6 9 12 16 20 24 28 32 36 40 44 48
Percent chance of final capital
Simulation with N = 100,000
Capital at end of game
Probability
(percent)
0
2
4
6
8
10
Data: 100,000 simulated games
Rmovie(100games)
library(animation)
ani.options(interval = 0.2, nmax = 101)
options(warn=-1)
startKapitaal <- 25
eersteInzet <- 1
noodstopKapitaal <- 16
aantalBeurten <- 21
dalembert <- function () {
nmax = ani.options("nmax")
for (J in 0:(nmax - 1)) {
plot(x = -2, y = -1, ylim = c(5, 45), xlim = c(0, 23),
xlab = "Round", ylab = "Capital (in game units)”}
if (J > 0) {
set.seed(12345)
boxes <- rep(0, 51)
for (j in (1:J)) {
####
####
#### Earlier code to simulate one game…
####
####
}
}
ani.pause()
}
}
saveGIF({
ani.options(nmax = 101)
dalembert()},
interval = 0.2, movie.name = 'dalembert.gif', ani.width = 800, ani.height = 600)
saveVideo({
ani.options(interval = 0.2, nmax = 101)
dalembert()}, video.name = "dalembert.mp4", ani.width = 800, ani.height = 600,
other.opts = "-pix_fmt yuv420p -b 300k")
• Markov process with states: (Capital, Stake)


• State space = {0, 1, …, 49} × {0, 1, …, 9}


• Initial state = (25, 1) ; 21 time steps.


• Possible moves: for s > 0


“Up”: (c, s) → ( (c + s) ∧ 49) , (s – 1) ∨ 1 )


“Down”: (c, s) → ( (c – s) ∨ 0), (s + 1) ∧ 9)) ,


unless c – s < 16, in which case new state is ((c – s) ∨ 0, 0)


“Stopped”: (c, 0) → (c, 0)


• “Up” and “Down” probabilities are 36 / 73 and 37 / 73 respectively
Whysimulate?
Capitals <- 0:49
Stakes <- 0:9
Stop <- 16
nCaps <- length(Capitals)
nStakes <- length(Stakes)
nStates <- nCaps*nStakes
P <- array(0, dim = c(nCaps, nStakes, nCaps, nStakes))
for (i in 1:nCaps) {
for (j in 2:nStakes) {
P[i, j, min(i + j - 1, nCaps), max(2, j-1)] <- +36
newCapIndex <- max(i - Stakes[j], 1)
if (Capitals[newCapIndex] < Stop) {newStakeIndex <- 1} else
{newStakeIndex <- min(j+1, nStakes)}
P[i, j, newCapIndex, newStakeIndex] <- +37}
P[i, 1, i, 1] <- 73}
Pmat <- array(P, dim = c(nStates, nStates))
Pmat <- Pmat/73
stateMat <- array(0, dim = c(nCaps, nStakes))
stateMat[(1:nCaps)[Capitals==25], (1:nStakes)[Stakes==1]] <- 1
state <- array(stateMat, dim = c(1, nStates))
for (i in (1:21)) {state <- state%*%Pmat}
stateMat <- array(state, dim = c(nCaps, nStakes))
finalCapState <- apply(stateMat, 1, sum)
R trick:


same vector of numbers can be seen as a


50 x 10 x 50 x 10 array and as a


500 x 500 matrix
Computing
f
inalstate


probabilities
0 3 6 9 12 16 20 24 28 32 36 40 44 48
Percent chance of final capital
Capital at end of game
Probability
(percent)
0
2
4
6
8
10
Theory:


Compute
𝜋
P
21
P is a 500 × 500 matrix,


𝜋
is a row vector of length 500.


Group states according to capital
• Chances of loss/gain about 50-50


• Mean gain is 9.5 if there’s a gain


• Mean loss is 10.5 if there’s a loss


• One loses on average (10.5 – 9.5)/2 = 0.5 per game (that’s 2% of initial capital)


• [mean net gain = –0.53, standard deviation 10.68]


• You may as well pay half a unit to the bank and bet 10 units at even odds, i.e., win
10 or lose 10 with probabilities 50-50


• Play 40 games, win about 20, winnings = about 200 units, at €50,– Euro per unit
that’s about €10.000,–


• Playing two games simultaneously, twice an evening only needs 10 visits to the
casino
Thenumbers
In round numbers
• The lawyer’s client’s assertions would, at face value, have been
plausible


• He would most likely have lost more money than he gained


• The chance of a net gain of 200 units (or more) in 40 games
(that’s €10.000,– in €50,– units) is about 0.0005


• The chance of doing this year after year for
f
ive years is, for
practical purposes, nihil


• It is a bit cheaper and takes less time, but would be more
noticeable, to bet 10 units just once in each game [Why?]
Conclusions
•The lawyer could cherry-pick from my
f
indings


•I would charge the lawyer (and hence his client) for my work


•In forensic statistics the current dogma is “we should report
a likelihood ratio” (or a Bayes factor?); p-values are out!


•Is this a good way to launder money?


•We want a simple and fast game-plan with low costs
and a big chance of netto gain per game
Questions
Ethic
a
l, principle, m
a
them
a
tic
a
l
Sources
www.researchers.one/article/2020-08-32
Risk is random:
The magic of the d’Alembert
Harry Crane and Glenn Shafer
Rutgers University
August 23, 2020
Abstract
The most common bets in 19th-century casinos were even-money bets on red or
black in Roulette or Trente et Quarante. Many casino gamblers allowed themselves
to be persuaded that they could make money for sure in these games by following
betting systems such as the d’Alembert. What made these systems so seductive?
Part of the answer is that some of the systems, including the d’Alembert, can give
bettors a very high probability of winning a small or moderate amount. But there
is also a more subtle aspect of the seduction. When the systems do win, their return
on investment — the gain relative to the amount of money the bettor has to take
out of their pocket and put on the table to cover their bets — can be astonishingly
high. Systems such as le tiers et le tout, which offer a large gain when they do
win rather than a high probability of winning, also typically have a high upside
return on investment. In order to understand these high returns on investment, we
need to recognize that the denominator — the amount invested — is random, as it
depends on how successive bets come out.
In this article, we compare some systems on their return on investment and
their success in hiding their pitfalls. Systems that provide a moderate gain with a
very high probability seem to accomplish this by stopping when they are ahead and
more generally by betting less when they are ahead or at least have just won, while
betting more when they are behind or have just lost. For historical reasons, we
call this martingaling. Among martingales, the d’Alembert seems especially good
at making an impressive return on investment quickly, encouraging gamblers’ hope
that they can use it so gingerly as to avoid the possible large losses, and this may
explain why its popularity was so durable.
We also discuss the lessons that this aspect of gambling can have for evaluating
success in business and finance and for evaluating the results of statistical testing.
https://www.gsimulator.net/dalembert

More Related Content

Similar to Dalembert

44 randomized-algorithms
44 randomized-algorithms44 randomized-algorithms
44 randomized-algorithmsAjitSaraf1
 
ch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.pptch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.pptMahyuddin8
 
Kelly Quant (intro)
Kelly Quant (intro)Kelly Quant (intro)
Kelly Quant (intro)Jake Vestal
 
Bandit Algorithms
Bandit AlgorithmsBandit Algorithms
Bandit AlgorithmsSC5.io
 
Introduction to Recursion (Python)
Introduction to Recursion (Python)Introduction to Recursion (Python)
Introduction to Recursion (Python)Thai Pangsakulyanont
 
functions2-200924082810.pdf
functions2-200924082810.pdffunctions2-200924082810.pdf
functions2-200924082810.pdfpaijitk
 
Undecidability in partially observable deterministic games
Undecidability in partially observable deterministic gamesUndecidability in partially observable deterministic games
Undecidability in partially observable deterministic gamesOlivier Teytaud
 
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docxerror 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docxSALU18
 
Learning Rule Based Programming using Games @DecisionCamp 2016
Learning Rule Based Programming using Games @DecisionCamp 2016Learning Rule Based Programming using Games @DecisionCamp 2016
Learning Rule Based Programming using Games @DecisionCamp 2016Mark Proctor
 
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]vikram mahendra
 
[Maths] arithmetic
[Maths] arithmetic[Maths] arithmetic
[Maths] arithmeticOurutopy
 
Using BigDecimal and double
Using BigDecimal and doubleUsing BigDecimal and double
Using BigDecimal and doublePeter Lawrey
 

Similar to Dalembert (20)

44 randomized-algorithms
44 randomized-algorithms44 randomized-algorithms
44 randomized-algorithms
 
Casino Mathematics
Casino MathematicsCasino Mathematics
Casino Mathematics
 
Python Tidbits
Python TidbitsPython Tidbits
Python Tidbits
 
ch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.pptch05-program-logic-indefinite-loops.ppt
ch05-program-logic-indefinite-loops.ppt
 
Kelly Quant (intro)
Kelly Quant (intro)Kelly Quant (intro)
Kelly Quant (intro)
 
Game Theory
Game TheoryGame Theory
Game Theory
 
Bandit Algorithms
Bandit AlgorithmsBandit Algorithms
Bandit Algorithms
 
Daa notes 2
Daa notes 2Daa notes 2
Daa notes 2
 
Introduction to Recursion (Python)
Introduction to Recursion (Python)Introduction to Recursion (Python)
Introduction to Recursion (Python)
 
Game theory
Game theoryGame theory
Game theory
 
S 3
S 3S 3
S 3
 
functions2-200924082810.pdf
functions2-200924082810.pdffunctions2-200924082810.pdf
functions2-200924082810.pdf
 
Undecidability in partially observable deterministic games
Undecidability in partially observable deterministic gamesUndecidability in partially observable deterministic games
Undecidability in partially observable deterministic games
 
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docxerror 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
error 2.pdf101316, 6(46 PM01_errorPage 1 of 5http.docx
 
Computer Science Homework Help
Computer Science Homework HelpComputer Science Homework Help
Computer Science Homework Help
 
Learning Rule Based Programming using Games @DecisionCamp 2016
Learning Rule Based Programming using Games @DecisionCamp 2016Learning Rule Based Programming using Games @DecisionCamp 2016
Learning Rule Based Programming using Games @DecisionCamp 2016
 
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]FUNCTIONS IN PYTHON[RANDOM FUNCTION]
FUNCTIONS IN PYTHON[RANDOM FUNCTION]
 
Minimax
MinimaxMinimax
Minimax
 
[Maths] arithmetic
[Maths] arithmetic[Maths] arithmetic
[Maths] arithmetic
 
Using BigDecimal and double
Using BigDecimal and doubleUsing BigDecimal and double
Using BigDecimal and double
 

More from Richard Gill

A tale of two Lucys - Delft lecture - March 4, 2024
A tale of two Lucys - Delft lecture - March 4, 2024A tale of two Lucys - Delft lecture - March 4, 2024
A tale of two Lucys - Delft lecture - March 4, 2024Richard Gill
 
A tale of two Lucies (long version)
A tale of two Lucies (long version)A tale of two Lucies (long version)
A tale of two Lucies (long version)Richard Gill
 
A tale of two Lucies.pdf
A tale of two Lucies.pdfA tale of two Lucies.pdf
A tale of two Lucies.pdfRichard Gill
 
A tale of two Lucy’s (as given)
A tale of two Lucy’s (as given)A tale of two Lucy’s (as given)
A tale of two Lucy’s (as given)Richard Gill
 
A tale of two Lucy’s
A tale of two Lucy’sA tale of two Lucy’s
A tale of two Lucy’sRichard Gill
 
Breed, BOAS, CFR.pdf
Breed, BOAS, CFR.pdfBreed, BOAS, CFR.pdf
Breed, BOAS, CFR.pdfRichard Gill
 
Bell mini conference RDG.pptx
Bell mini conference RDG.pptxBell mini conference RDG.pptx
Bell mini conference RDG.pptxRichard Gill
 
herring_copenhagen.pdf
herring_copenhagen.pdfherring_copenhagen.pdf
herring_copenhagen.pdfRichard Gill
 
Schrödinger’s cat meets Occam’s razor
Schrödinger’s cat meets Occam’s razorSchrödinger’s cat meets Occam’s razor
Schrödinger’s cat meets Occam’s razorRichard Gill
 
optimizedBell.pptx
optimizedBell.pptxoptimizedBell.pptx
optimizedBell.pptxRichard Gill
 
optimizedBell.pptx
optimizedBell.pptxoptimizedBell.pptx
optimizedBell.pptxRichard Gill
 

More from Richard Gill (20)

A tale of two Lucys - Delft lecture - March 4, 2024
A tale of two Lucys - Delft lecture - March 4, 2024A tale of two Lucys - Delft lecture - March 4, 2024
A tale of two Lucys - Delft lecture - March 4, 2024
 
liverpool_2024
liverpool_2024liverpool_2024
liverpool_2024
 
A tale of two Lucies (long version)
A tale of two Lucies (long version)A tale of two Lucies (long version)
A tale of two Lucies (long version)
 
A tale of two Lucies.pdf
A tale of two Lucies.pdfA tale of two Lucies.pdf
A tale of two Lucies.pdf
 
A tale of two Lucy’s (as given)
A tale of two Lucy’s (as given)A tale of two Lucy’s (as given)
A tale of two Lucy’s (as given)
 
A tale of two Lucy’s
A tale of two Lucy’sA tale of two Lucy’s
A tale of two Lucy’s
 
vaxjo2023rdg.pdf
vaxjo2023rdg.pdfvaxjo2023rdg.pdf
vaxjo2023rdg.pdf
 
vaxjo2023rdg.pdf
vaxjo2023rdg.pdfvaxjo2023rdg.pdf
vaxjo2023rdg.pdf
 
vaxjo2023rdg.pdf
vaxjo2023rdg.pdfvaxjo2023rdg.pdf
vaxjo2023rdg.pdf
 
Apeldoorn.pdf
Apeldoorn.pdfApeldoorn.pdf
Apeldoorn.pdf
 
LundTalk2.pdf
LundTalk2.pdfLundTalk2.pdf
LundTalk2.pdf
 
LundTalk.pdf
LundTalk.pdfLundTalk.pdf
LundTalk.pdf
 
Breed, BOAS, CFR.pdf
Breed, BOAS, CFR.pdfBreed, BOAS, CFR.pdf
Breed, BOAS, CFR.pdf
 
Bell mini conference RDG.pptx
Bell mini conference RDG.pptxBell mini conference RDG.pptx
Bell mini conference RDG.pptx
 
herring_copenhagen.pdf
herring_copenhagen.pdfherring_copenhagen.pdf
herring_copenhagen.pdf
 
Nobel.pdf
Nobel.pdfNobel.pdf
Nobel.pdf
 
Nobel.pdf
Nobel.pdfNobel.pdf
Nobel.pdf
 
Schrödinger’s cat meets Occam’s razor
Schrödinger’s cat meets Occam’s razorSchrödinger’s cat meets Occam’s razor
Schrödinger’s cat meets Occam’s razor
 
optimizedBell.pptx
optimizedBell.pptxoptimizedBell.pptx
optimizedBell.pptx
 
optimizedBell.pptx
optimizedBell.pptxoptimizedBell.pptx
optimizedBell.pptx
 

Recently uploaded

Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfSwapnil Therkar
 
The Black hole shadow in Modified Gravity
The Black hole shadow in Modified GravityThe Black hole shadow in Modified Gravity
The Black hole shadow in Modified GravitySubhadipsau21168
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.aasikanpl
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxAleenaTreesaSaji
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |aasikanpl
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...RohitNehra6
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)DHURKADEVIBASKAR
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Sérgio Sacani
 
Luciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxLuciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxAleenaTreesaSaji
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...anilsa9823
 
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.PraveenaKalaiselvan1
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trssuser06f238
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxUmerFayaz5
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett SquareIsiahStephanRadaza
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...Sérgio Sacani
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​kaibalyasahoo82800
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real timeSatoshi NAKAHIRA
 
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaDashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaPraksha3
 

Recently uploaded (20)

Analytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdfAnalytical Profile of Coleus Forskohlii | Forskolin .pdf
Analytical Profile of Coleus Forskohlii | Forskolin .pdf
 
The Black hole shadow in Modified Gravity
The Black hole shadow in Modified GravityThe Black hole shadow in Modified Gravity
The Black hole shadow in Modified Gravity
 
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
Call Girls in Mayapuri Delhi 💯Call Us 🔝9953322196🔝 💯Escort.
 
GFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptxGFP in rDNA Technology (Biotechnology).pptx
GFP in rDNA Technology (Biotechnology).pptx
 
The Philosophy of Science
The Philosophy of ScienceThe Philosophy of Science
The Philosophy of Science
 
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
Call Us ≽ 9953322196 ≼ Call Girls In Mukherjee Nagar(Delhi) |
 
Biopesticide (2).pptx .This slides helps to know the different types of biop...
Biopesticide (2).pptx  .This slides helps to know the different types of biop...Biopesticide (2).pptx  .This slides helps to know the different types of biop...
Biopesticide (2).pptx .This slides helps to know the different types of biop...
 
Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)Recombinant DNA technology( Transgenic plant and animal)
Recombinant DNA technology( Transgenic plant and animal)
 
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
Discovery of an Accretion Streamer and a Slow Wide-angle Outflow around FUOri...
 
Luciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptxLuciferase in rDNA technology (biotechnology).pptx
Luciferase in rDNA technology (biotechnology).pptx
 
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
Lucknow 💋 Russian Call Girls Lucknow Finest Escorts Service 8923113531 Availa...
 
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
 
Neurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 trNeurodevelopmental disorders according to the dsm 5 tr
Neurodevelopmental disorders according to the dsm 5 tr
 
Animal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptxAnimal Communication- Auditory and Visual.pptx
Animal Communication- Auditory and Visual.pptx
 
Module 4: Mendelian Genetics and Punnett Square
Module 4:  Mendelian Genetics and Punnett SquareModule 4:  Mendelian Genetics and Punnett Square
Module 4: Mendelian Genetics and Punnett Square
 
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
PossibleEoarcheanRecordsoftheGeomagneticFieldPreservedintheIsuaSupracrustalBe...
 
Nanoparticles synthesis and characterization​ ​
Nanoparticles synthesis and characterization​  ​Nanoparticles synthesis and characterization​  ​
Nanoparticles synthesis and characterization​ ​
 
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
9953056974 Young Call Girls In Mahavir enclave Indian Quality Escort service
 
Grafana in space: Monitoring Japan's SLIM moon lander in real time
Grafana in space: Monitoring Japan's SLIM moon lander  in real timeGrafana in space: Monitoring Japan's SLIM moon lander  in real time
Grafana in space: Monitoring Japan's SLIM moon lander in real time
 
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tantaDashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
Dashanga agada a formulation of Agada tantra dealt in 3 Rd year bams agada tanta
 

Dalembert

  • 1. “R”goestothecasino The m a gic of the d’Alembert (*) Rich a rd Gill, 3 M a y 2021 (*) subtitle borrowed from Crane and Shafer (2020)
  • 2. Jean-Baptiste le Rond d’Alembert (1717 – 1783). French mathematician, mechanician, physicist, philosopher, and music theorist. Together with Denis Diderot, a co- editor of the Encyclopédie. D'Alembert's formula for obtaining solutions to the wave equation is named after him. The wave equation is sometimes referred to as d'Alembert's equation. The Fundamental theorem of algebra is named after d'Alembert in French. d’Alembert’s principle was due to Lagrange. d’Alembert wrote the articles on probability in the Encyclopédie. And is famous for giving the wrong answer to a simple problem … (!?)
  • 3. Diderot and d’Alembert (1751) Encyclopédie NB: this is after Christiaan Huygens, Jacob Bernoulli, Abraham de Moivre; before Laplace. Denis Diderot
  • 4. Encyclopédie:Croixoupile Annexe I Extrait commenté de l’Article “Croix ou Pile” écrit pour l’Encyclopédie par D’ALEMBERT. CROIX OU PILE, (analyse des hasards). Ce jeu, qui est très connu, & qui n’a pas besoin de définition, nous fournira les réflexions suivantes. On demande combien il y a à parier qu’on amènera croix en jouant deux coups consécutifs. La réponse qu’on trouvera dans les auteurs, & suivant les principes ordinaires, est celle-ci. Il y a quatre combinaisons. Premier coup. Deuxième coup. Croix. Croix. Pile. Croix. Croix. Pile. Pile. Pile. De ces quatre combinaisons, une seule fait perdre & trois font gagner, il y a donc 3 contre 1 à parier en faveur du joueur qui jette la pièce. S’il pariait en trois coups, on trouveroit huit combinaisons, dont une seule fait perdre, & sept font gagner ; ainsi, il y aurait 7 contre 1 à parier. Voyez COMBINAISON & AVANTAGE. Cependant cela est-il bien exact ?43 Car, pour ne prendre ici que le cas de deux coups, ne faut-il pas réduire à une les deux combinaisons qui donnent croix au premier coup ? Car, dès qu’une fois croix est venu, le jeu est fini, & le second coup est compté pour rien. Ainsi, il n’y a proprement que trois combinaisons de possibles : Croix, premier coup Pile, Croix, premier & second coup. Pile, pile, premier & second coup. Donc il n’y a que 2 contre 1 à parier. De même, dans le cas de trois coups, on trouvera : Croix Pile, croix. pile, pile, croix. Pile, pile, pile. Donc il n’y a que 3 contre 1 à parier. Ceci est digne, ce me semble, de l’attention des calculateurs, & irait à réformer bien des règles unanimement reçues sur les jeux de hasard43 . Toss a coin a maximum of three times, stop at the f irst “heads”. What is the probability of seeing heads? d’Alembert’s answer: there are four possible outcomes, three ending in heads, one not. So the chance is 3/4 I think d’Alembert was not stupid. I think he deliberately shows that blindly counting # favourable and # unfavourable outcomes can be dumb. You *must* also argue why those outcomes are equally likely.
  • 5. •One of the oldest casino betting systems is the one that calls for the player to begin with a unit bet, increase the size of the bet by one unit after every loss, and decrease it by one unit, except when it is already only one unit, after every win. Since the late 19th century, this system has been called the d’Alembert, on the erroneous theory that it was invented by the mathematician Jean Le Rond d’Alembert. Whatever its origin, the d’Alembert was already one of the most popular systems by the 1790s. •As Bertrand reported in 1798, admirers of the d’Alembert thought it was bound to succeed because the numbers of wins and losses will eventually equalize. Consider what happens when you play the d’Alembert after having bet one unit and lost. Whenever the number of subsequent wins and losses, including this f irst loss, are equal, your net gain will be equal to the number of wins (or, equivalently, equal to one-half the number of rounds played). •The flaw in this venerable argument for the d’Alembert is that you may run out of money before your wins and losses equalize. But as Jacques-Joseph Boreux explained in 1820, the system often appears to work in practice. If you set a modest goal and play the d’Alembert repeatedly, playing each time until the goal is reached or you are forced to stop (because you run out of money, the séance is over, or your proposed bet exceeds the house limit), you can expect a string of relatively quick successes before you ever fail, and the successes will not usually require taking too much money out of your pocket. Bettingsystems Risk is r a ndom: The m a gic of the d’Alembert H a rry Cr a ne a nd Glenn Sh a fer (2020) https://rese a rchers.one/ a rticles/20.08.00007
  • 6. • Lawyer: lawyer’s client is accused of laundering money • Client claims in each of 5 successive years to have won close to €10.000,– playing red/black and low/high at roulette at Holland Casino • Client pays no income tax on his winnings, since Holland Casino pays the income tax on behalf of all players • No capital-gains tax had to be paid because below threshold (client submitted proof of his gains to the tax inspector) • The prosecution says this is impossible, and anyway would take much too much time • Client says he used the d’Alembert system Animaginaryconsultationproject Im a gine, my client is a crimin a l defence l a wyer
  • 7. • Two simultaneous games are played: red/black and low/high • Initial bet in each game = 1 unit (€50.–) • Initial capital = 25 units for each game • Maximum number of rounds = 21 • Quit either game if game capital falls below 16 units • Roulette at Holland Casino has 36 numbered slots and one “zero”; if zero comes up, then stakes on even odds bets are shared 50/50 between player and house • To avoid working with half units and dependence between the two games I’ll pretend two independent games each with actual odds 36:37 in favour of the house Client’sstrategy
  • 8. startKapitaal <- 25 eersteInzet <- 1 noodstopKapitaal <- 16 aantalBeurten <- 21 # Aantal beurten in een spel set.seed(12345) boxes <- rep(0, 51) J <- 100000 Capitals <- 0:50 for (j in (1:J)) { huidigeKapitaal <- startKapitaal huidigeInzet <- eersteInzet spelVerloop <- rep(0, aantalBeurten) for(i in 1:aantalBeurten) { uitkomst <- sample(x = c(-1, +1), prob = c(37, 36), size = 1) if(huidigeInzet > 0){ stap <- uitkomst * huidigeInzet huidigeKapitaal <- huidigeKapitaal + stap huidigeInzet <- max(1, huidigeInzet - uitkomst) if(huidigeKapitaal < noodstopKapitaal) huidigeInzet <- 0 } spelVerloop[i] <- huidigeKapitaal } boxes[huidigeKapitaal + 1] <- boxes[huidigeKapitaal + 1] + 1 } Rsimulations Core code
  • 9. 0 3 6 9 12 16 20 24 28 32 36 40 44 48 Percent chance of final capital Simulation with N = 100,000 Capital at end of game Probability (percent) 0 2 4 6 8 10 Data: 100,000 simulated games
  • 10. Rmovie(100games) library(animation) ani.options(interval = 0.2, nmax = 101) options(warn=-1) startKapitaal <- 25 eersteInzet <- 1 noodstopKapitaal <- 16 aantalBeurten <- 21 dalembert <- function () { nmax = ani.options("nmax") for (J in 0:(nmax - 1)) { plot(x = -2, y = -1, ylim = c(5, 45), xlim = c(0, 23), xlab = "Round", ylab = "Capital (in game units)”} if (J > 0) { set.seed(12345) boxes <- rep(0, 51) for (j in (1:J)) { #### #### #### Earlier code to simulate one game… #### #### } } ani.pause() } } saveGIF({ ani.options(nmax = 101) dalembert()}, interval = 0.2, movie.name = 'dalembert.gif', ani.width = 800, ani.height = 600) saveVideo({ ani.options(interval = 0.2, nmax = 101) dalembert()}, video.name = "dalembert.mp4", ani.width = 800, ani.height = 600, other.opts = "-pix_fmt yuv420p -b 300k")
  • 11.
  • 12. • Markov process with states: (Capital, Stake) • State space = {0, 1, …, 49} × {0, 1, …, 9} • Initial state = (25, 1) ; 21 time steps. • Possible moves: for s > 0 “Up”: (c, s) → ( (c + s) ∧ 49) , (s – 1) ∨ 1 ) “Down”: (c, s) → ( (c – s) ∨ 0), (s + 1) ∧ 9)) , unless c – s < 16, in which case new state is ((c – s) ∨ 0, 0) “Stopped”: (c, 0) → (c, 0) • “Up” and “Down” probabilities are 36 / 73 and 37 / 73 respectively Whysimulate?
  • 13. Capitals <- 0:49 Stakes <- 0:9 Stop <- 16 nCaps <- length(Capitals) nStakes <- length(Stakes) nStates <- nCaps*nStakes P <- array(0, dim = c(nCaps, nStakes, nCaps, nStakes)) for (i in 1:nCaps) { for (j in 2:nStakes) { P[i, j, min(i + j - 1, nCaps), max(2, j-1)] <- +36 newCapIndex <- max(i - Stakes[j], 1) if (Capitals[newCapIndex] < Stop) {newStakeIndex <- 1} else {newStakeIndex <- min(j+1, nStakes)} P[i, j, newCapIndex, newStakeIndex] <- +37} P[i, 1, i, 1] <- 73} Pmat <- array(P, dim = c(nStates, nStates)) Pmat <- Pmat/73 stateMat <- array(0, dim = c(nCaps, nStakes)) stateMat[(1:nCaps)[Capitals==25], (1:nStakes)[Stakes==1]] <- 1 state <- array(stateMat, dim = c(1, nStates)) for (i in (1:21)) {state <- state%*%Pmat} stateMat <- array(state, dim = c(nCaps, nStakes)) finalCapState <- apply(stateMat, 1, sum) R trick: same vector of numbers can be seen as a 50 x 10 x 50 x 10 array and as a 500 x 500 matrix Computing f inalstate probabilities
  • 14. 0 3 6 9 12 16 20 24 28 32 36 40 44 48 Percent chance of final capital Capital at end of game Probability (percent) 0 2 4 6 8 10 Theory: Compute 𝜋 P 21 P is a 500 × 500 matrix, 𝜋 is a row vector of length 500. Group states according to capital
  • 15.
  • 16. • Chances of loss/gain about 50-50 • Mean gain is 9.5 if there’s a gain • Mean loss is 10.5 if there’s a loss • One loses on average (10.5 – 9.5)/2 = 0.5 per game (that’s 2% of initial capital) • [mean net gain = –0.53, standard deviation 10.68] • You may as well pay half a unit to the bank and bet 10 units at even odds, i.e., win 10 or lose 10 with probabilities 50-50 • Play 40 games, win about 20, winnings = about 200 units, at €50,– Euro per unit that’s about €10.000,– • Playing two games simultaneously, twice an evening only needs 10 visits to the casino Thenumbers In round numbers
  • 17. • The lawyer’s client’s assertions would, at face value, have been plausible • He would most likely have lost more money than he gained • The chance of a net gain of 200 units (or more) in 40 games (that’s €10.000,– in €50,– units) is about 0.0005 • The chance of doing this year after year for f ive years is, for practical purposes, nihil • It is a bit cheaper and takes less time, but would be more noticeable, to bet 10 units just once in each game [Why?] Conclusions
  • 18. •The lawyer could cherry-pick from my f indings •I would charge the lawyer (and hence his client) for my work •In forensic statistics the current dogma is “we should report a likelihood ratio” (or a Bayes factor?); p-values are out! •Is this a good way to launder money? •We want a simple and fast game-plan with low costs and a big chance of netto gain per game Questions Ethic a l, principle, m a them a tic a l
  • 19. Sources www.researchers.one/article/2020-08-32 Risk is random: The magic of the d’Alembert Harry Crane and Glenn Shafer Rutgers University August 23, 2020 Abstract The most common bets in 19th-century casinos were even-money bets on red or black in Roulette or Trente et Quarante. Many casino gamblers allowed themselves to be persuaded that they could make money for sure in these games by following betting systems such as the d’Alembert. What made these systems so seductive? Part of the answer is that some of the systems, including the d’Alembert, can give bettors a very high probability of winning a small or moderate amount. But there is also a more subtle aspect of the seduction. When the systems do win, their return on investment — the gain relative to the amount of money the bettor has to take out of their pocket and put on the table to cover their bets — can be astonishingly high. Systems such as le tiers et le tout, which offer a large gain when they do win rather than a high probability of winning, also typically have a high upside return on investment. In order to understand these high returns on investment, we need to recognize that the denominator — the amount invested — is random, as it depends on how successive bets come out. In this article, we compare some systems on their return on investment and their success in hiding their pitfalls. Systems that provide a moderate gain with a very high probability seem to accomplish this by stopping when they are ahead and more generally by betting less when they are ahead or at least have just won, while betting more when they are behind or have just lost. For historical reasons, we call this martingaling. Among martingales, the d’Alembert seems especially good at making an impressive return on investment quickly, encouraging gamblers’ hope that they can use it so gingerly as to avoid the possible large losses, and this may explain why its popularity was so durable. We also discuss the lessons that this aspect of gambling can have for evaluating success in business and finance and for evaluating the results of statistical testing. https://www.gsimulator.net/dalembert