One consequence of the Law of Large Numbers is that once we have a probability distribution for a random variable, we can find its mean by simulating many outcomes and averaging them. The Law of Large Numbers says that if we take enough outcomes, their average value is sure to approach the mean of the distribution.
I have a little bet to offer you. Toss a coin ten times. If there is no run of three or more straight heads or tails in the ten outcomes, I'll pay you $2. If there is a run of three or more, you pay me just $1. Surely you will want to take advantage of me and play this game?
Simulate enough plays of this game (the outcomes are -$1 if you lose and +$2 if you win) to estimate the mean outcome. Is it to your advantage to play?
Example: HTTHT HTTTH
has a run of 3 T's so you pay me 1 (the outcome is -1)
HTHHT THTHH has no run of 3's so I pay you 2 (the outcome is +2)
HHHTT HTTTT
has a run of 3 H's (and a run of 4 T's) so you pay me 1 (the outcome is
-1)
To simulate the flipping of a coin ten times, go to the author's website, www.whfreeman.com/scc, scroll down and choose Statistical Applets from the list under Select a Category. In the Applets, choose What is Probability? You will want to see the "pennies" at the top of the gray box and the "toss" button simultaneously--if your screen is too short, go back, and on the main page, click away the Netscape toolbars (tiny areas at far left of bar.). Then choose Statistical Applets and What is Probability again.
Set the probability at .50 and number
of tosses at 10.
Hit Toss. Copy your list of H's and T's
from the pennies at the top. Record Y for run of 3 or more, N
otherwise.
For Y, you lose, write down -1. For N, you win, write down
+2.
This is your first simulation of tossing 10 times.
Repeat this process, 5 times.
Repeat 20 more times for
a total of 25 --you can stop recording the actual H and T's--just put
down
Y for run or N for not, and -1 or 2. (You
may
need to reset & start again if you reach their "limit" of
tosses.)
Do more if you're interested.
Find your Total "winnings" (sum the -1
and +2's). Now find your
Average winning per game,
in 25 games, by dividing the sum by 25. (If you simulated more
than 25, find the average
for the total number of games you played?) The LLN says this is
close
to the theoretical mean winning for this game. (How close?
I'll tell you the theoretical mean later...)
HAND IN the record for your 25 games, your sum and your average.
List of
H,T's
| Run? Y/N | -1forY, +2 forN
HTTHT
HTTTH
Y
-1 Example of
record
for first game. (Don't average this one)
| Sievers home | Math151-Sp04/LLN-game.htm | 3pm | 4/4/04 |