Chapter 16: law of averages Context................................................................... 2 Law of averages 3 Coin tossing experiment...................................................... 4 Questions................................................................ 5 First 50 tosses............................................................ 6 10,000 tosses............................................................. 7 Chance error.............................................................. 8 Law of averages........................................................... 9 Law of averages........................................................... 10 Box model 11 Drawing with replacement.................................................... 12 Drawing without replacement.................................................. 13 Rolling two dice........................................................... 14 Sum of the draws.......................................................... 15 Setting up a box model 16 Box model............................................................... 17 Playing roulette........................................................... 18 Red or black.............................................................. 19 Example................................................................ 20 Box model............................................................... 21 Example................................................................ 22 Summary box model for gambling problems........................................ 23 1
Context We ll look at various chance processes: Tossing coins, rolling dice, playing roulette Sampling voters We ll use box models to analyze these processes. These help to translate real life problems into statistical problems. The questions we ll answer in chapters 16-18 are of the following type: Suppose we play a game of roulette 10 times. What is our expected net gain? How much variability do we expect? What is the chance that we will come out ahead? How do these answers depend on the number of plays? In chapter 16 we ll start with the law of averages and setting up box models. 2 / 23 Law of averages 3 / 23 Coin tossing experiment John Kerrich, South African mathematician Visited Copenhagen when WWII broke out He spent the war interned at a camp in Jutland To kill the time, he did some probability experiments. He tossed a coin 10,000 times, and counted the number of heads. The results are given in section 16.1 of the book 4 / 23 Questions How many heads do you think he got? We expect heads to come up in about half the number of tosses, so we expect about 5,000 heads. Do you think that he got exactly 5,000 heads? No, that is not very likely. We expect that he got about 5,000 heads. Nr of heads = half the number of tosses + chance error What is the size of the chance error? How does it depend on the number of tosses? To get some insight in this, I repeated the experiment on the computer 5 / 23 2
First 50 tosses nr of heads 5 10 15 20 0 10 20 30 40 50 nr of tosses 6 / 23 10,000 tosses nr of heads half the number of tosses 20 10 0 10 20 0 2000 4000 6000 8000 10000 number of tosses % of heads 50% 4 2 0 2 4 0 2000 4000 6000 8000 10000 nr of tosses 7 / 23 3
Chance error Let s look at the chance error: observed chance observed % chance nr tosses nr of heads error of heads error in % 50 24-1 48.00% 2.00% 100 47-3 47.00% 3.00% 500 252 2 50.40% 0.40% 1000 508 8 50.80% 0.80% 5000 2514 14 50.28% 0.28% 10000 4986-14 49.86% 0.14% 8 / 23 Law of averages The law of averages in terms of counts: The number of heads is around half the number of tosses But it is likely to be off a bit, due to chance error Nr of heads = half the number of tosses + chance error As the number of tosses goes up, the chance error goes up (see third column of the table). Note though that it goes up only slowly. 9 / 23 Law of averages The law of averages in terms of percentages: The percentage of heads is around 50% But it is likely to be off a bit, due to chance error Percentage of heads = 50% + chance error in % As the number of tosses goes up, the chance error in % goes down (see fifth column of the table) Note: The law of averages does not work by changing the chances. After a long run of heads, a head is still as likely as a tail in the next toss. 10 / 23 4
Box model 11 / 23 Drawing with replacement Consider a box with tickets We can draw tickets with replacement: Shake the box Draw one ticket at random (equal chance for all tickets) Make a note of the number on the ticket, and put it back in the box Shake the box again and draw another ticket, make a note of it, and put it back in the box. And so on. Note that the box stays the same 12 / 23 Drawing without replacement We can also draw tickets without replacement: Shake the box Draw one ticket at random (equal chance for all tickets) Do not put the ticket back in the box Shake the box again and draw another ticket. Don t put it back in the box. And so on. Note that the box changes. After each draw, there is one less ticket in the box. See example on overhead. 13 / 23 Rolling two dice Consider a box with tickets 1,2,3,4,5,6 Draw two tickets with replacement, and compute the sum of the two draws Examples: Suppose the first draw was a 3, and the second a 4, then the sum is 7 Suppose the first draw was a 2, and the second was also a 2, then the sum is 4 Note that there is variability in the sum What is this a box model for? For the number of squares you move in a game of Monopoly (role a pair of dice, and count the total number of spots). 14 / 23 5
Sum of the draws We ll work a lot with the sum of the draws. This is shorthand for: Draw tickets at random with replacement from a box Add up the numbers on the tickets Examples: The number of squares you ll move in a turn at Monopoly is like the sum of two draws from a box with tickets 1,2,3,4,5,6. The number of heads in 10,000 coin tosses is like the sum of 10,000 draws from a box with tickets 0,1. 15 / 23 Setting up a box model 16 / 23 Box model A box model is a model for a chance process Why do we use it? It helps to translate a real life process into a statistical problem. The box model contains only the relevant information, and we strip away all the irrelevant stuff. When setting up a box model, ask yourself: What tickets go in the box? How many of each ticket? How many draws do we make? With or without replacement? (we ll mostly use drawing with replacement) 17 / 23 Playing roulette Nevada roulette: see overhead 38 pockets: 2 green numbers: 0 and 00 18 red numbers: 1,3,5,7,9,12,14,16,18,19,21,23,25,27,30,32,34,36 18 black numbers: 2,4,6,8,10,11,13,15,17,20,22,24,26,28,29,31,33,35 People make various types of bets Croupier spins wheel, and throws ball on wheel The ball is equally likely to land in any of the 38 pockets 18 / 23 6
Red or black 1 dollar bet on red: If the ball lands on red, you get your dollar back, plus an additional dollar (so you win 1 dollar) If the ball does not land on red, the croupier rakes in your dollar (so you loose 1 dollar) Suppose we play 10 times, betting a dollar on red each time Can we make a box model for our net gain? 19 / 23 Example Play Amount won in each play Net gain red $1 $1 red $1 $3 black $1 $2 green $1 $1 red $1 $3 black $1 $2 black $1 $1 Net gain after these 10 plays: $2. 20 / 23 Box model What numbers do we put in the box? The amounts you can win (+) or loose (-): $1 and $1 How many of each number? We win $1 if the ball lands on red. There are 18 possibilities for that to happen. So we put 18 tickets of $1. We win $1 if the ball does not land on red. There are 20 possibilities for that to happen (18 black numbers and 2 green numbers). So we put 20 tickets of $1. How many draws? We play 10 times, so we make 10 draws 21 / 23 7
Example Play Amount won in each play Net gain (one draw from the box) (sum of the draws) red $1 $1 red $1 $3 black $1 $2 green $1 $1 red $1 $3 black $1 $2 black $1 $1 The net gain is like the sum of 10 draws from the following box: 18 tickets $1, and 20 tickets $1. 22 / 23 Summary box model for gambling problems Tickets in the box show the amounts that can be won (+) or lost (-) The chance of drawing any particular value from the box equals the chance of winning that amount on a single play The number of draws equals the number of plays The net gain is the sum of the draws from the box 23 / 23 8