Geometric distribution The geometric distribution function is x f ( x) p(1 p) 1 x {1,2,3,...}, 0 p 1 It is the pdf of the random variable X, which equals the smallest positive integer x such that in a sequence of independent coin tosses with head probability p, the first head occurs at the x th toss.
Geometric distribution The cdf is given by P( X x) 1 (1 p) x F( x)
Geometric distribution A gambler decides to play roulette 25 times and bets $50 on 0 each time. What is the chance that he is ahead at the end (given that zero pays 36 times the bet)?
Geometric distribution The probability is 37 1 F( 25) 1 (1 ) 25 0.496 so the gambler has roughly a 50% chance of winning.
Geometric distribution A casino puts a limit of $1000 on each bet. Suppose a gambler decides to bet $10 on red and keeps doubling until she wins or exceeds the limit. The payoff on red is $10 plus another $10 win. What is the probability that she comes out ahead?
Geometric distribution 2 6 7 Note that 10 1000 2. 10 So in the worst case she bets 10 20 40 80 160 320 640 and loses every time i.e. seven times and then she cannot go further without exceeding the maximum.
Geometric distribution If she hits success in r 7 bets then she will be ahead by $10 exactly since net win win at stage r loss so far 2 (2 2 r 2 r 10 (2 k r 1 r 2 k 10 1)) 10 10
Geometric distribution The probability that she wins in the first 7 turns is F(7) 1 1 7 18 37 0.9905 This strategy says she has a roughly 99% chance of being ahead by $10.
Geometric distribution Suppose she now decides to bet $10 until she loses for the first time, and then applies her doubling strategy. What is the chance then that she finishes ahead? If she wins at most 127 times and then loses 7 times consecutively then she will not be ahead. In all other situations she will be ahead.
Geometric distribution The chance she is not ahead is 127 k 0 18 37 k 1 18 37 7 1 18 37 7 1 18 37 1 18 37 128 0.0185 The chance she is ahead is therefore roughly 98.15% - this is less than the pure doubling strategy.
Geometric distribution Which strategy is better can be measured by the expected payoff. It turns out the second strategy has a much better expected payoff, even though the probability of winning is small.
Let X be a discrete random variable a random variable whose range is a countable set R R with pdf f. The expected value of X is defined by xr E( X ) x f ( x) x P( X x) xr
Example : Let X be the outcome of tossing a fair die. Then the expected value is E( X) as expected: the average value when we toss a sixsided die is 3.5. xr x f ( x) 6 x1 x 1 6 7 2
Example : Let X be the sum from tossing two fair dice. Then the expected value is E( X) R x x f ( x) 2 36 1 3 36 2 4 36 3 5 36 4 6 36 5 7 36 6 8 36 5 9 36 4 10 36 3 11 36 2 12 36 1 7
Property 1 Linearity of expectation If then X i : i I is a finite set of random variables E( ii X ) E( X ) i ii i
We could have used this in the preceding example. There X was the sum of two dice. If W,Y are the values on each die, then X W Y and so E( X) E( W Y ) E( W ) E( Y ) 3.5 3.5 7
Suppose a person flips a coin n times, where the probability of getting heads each time is p. Let X be the number of heads obtained. Then X X 1 X 2 X n where X 1 if the i th flip is heads and 0 i if the i th flip is tails. X i
By linearity of expectation, E( X) n i 1 E( X i ) We compute the answer is pn since E( X i ) 1 p 0 (1 p) p
Suppose a person flips a coin n times, where the probability of getting heads each time is p. Let X be the number of flips up to and including the first head obtained. Then X has a geometric distribution so E( X) p x x 1 xf ( x) x(1 x 1 p) x 1 xp(1 p) x 1
We use the fact that for 2 0 0 1 1 ) (1 1 1 1 z z dz d z dz d z dz d xz x x x x x x 1 z
Putting z 1 p we get E( X) (1 p 2 z) z1p 1 p So the expected number of tosses up to and including the first head toss is 1/p.
A gambler bets on $10 red on a roulette wheel and then doubles the bet until she wins or exceeds the betting limit of $1000. Determine the expected value of the net amount she has when she stops.
Let X be the amount she has when she stops. We computed that if she stops in r 7 turns then she will be ahead by $10, and that the probability of this occurring is 1 (1 18 ) 7 37
If she loses all seven bets, then she has lost 10 20 640 1270 and this occurs with probability ( 1 18 ) 7 37
Therefore E( X) 1270 (1 ) 7 10 (1 (1 ) 7) 2.05239 18 37 18 37 Is there a playing strategy for roulette with positive expected value?
The answer no. Suppose that is the net gain at spin i. Then the total net gain X satisfies X i E( X) n i 1 E( X i ) by linearity of expectation. So we might as well play the same strategy every spin.