**Class 17: Law of averages**

**Computer Lab:**

Finish
Part 2 of the computer lab from last time on simulating 1000 coin flips. Note: the fifth column is supposed to be ÒDifference between the
number of heads so far and half the number of tosses **so far**Ó. A
nice way of calculating the number of heads so far for the third column is to use
something like =SUM(B$2:B2) in the first row and drag it down. The $ makes this
formula update correctly when you drag it down.

Write
down your results after 100 flips and after 1000 flips on the blackboard
chart.

If
there is time, you can work on Part 3.

**Journal assignment: Do #1 and choose between #2 and #3
(Bonus to do all.)**

1) Print out two plots from the coin-tossing part of todayÕs computer lab – one for number of tosses so far vs. ÒChance ErrorÓ, and one for number of tosses so far vs. ÒPercent Chance ErrorÓ. Also write down the number of tosses you simulated total, the number of heads you got total, how far off the number of heads was from half the number of tosses, and the percent of tosses that were heads out of all your tosses.

2) Make a similar spreadsheet for dice rolling. It should have 9 columns, as describe below. Print out the first few rows and also make and print out plots like for part 1.

a. Column A: Dice roll number

b. Column B: Outcome of roll
(1,2,3,4,5,6)

c. Was the roll an ace (1 = was
an ace, 0 = was not an ace).
Hint: use something like
=IF(B2=1,1,0)

d. Number of aces so far

e. Expected number of aces so far. Hint: this is 1/6 times the number of rolls so far

f. Chance error. This is the difference between the
number of aces so far and the expected number of aces so far.

g. Percent of aces so far

h. Expected percent of aces so
far. Hint: this is always the same and doesnÕt
depend on how many rolls have happened so far

i. Percent chance error. This
is the difference between the percent of aces so far and the expected percent
of aces.

3) Take the shark attack quiz at (link is on Blackboard under external links) http://encarta.msn.com/quiz_125/Shark_Attack_What_Are_the_Odds.html

(0dds is approximately the same thing as probability here.) When they talk about the chance of being attacked by a shark, do they mean the chance of it happening in your whole life or the chance of it happening in one year? What about for the other events? Which answers did you find most surprising? Does everyone have the same chance of getting attacked by a shark? Why / why not? Do you think it is helpful to compare the chances of these different events? Why / why not?

**Homework Assignment for Tues,
Oct 27: **On
blackboard (Ch 16)

**Announcements: **WeÕll have
a Quiz next week on Thursday, Oct. 29.
Review session in CPM 101 on Sunday at 4:00. I will post a review sheet on blackboard tonight.