Tuesday, June 25, 2013

Bayes Theorem, Probability Models, and Expected Value

Based on where things were left off, I thought a little more work with Bayes Theorem was warranted. But first, we had to finish discussing the Birthday problem. Most of the class hadn't made any headway on the problem, although a couple had calculated the probabilities for up to seven people in the room.

I went through the calculations, which resulted in

    P(no one with the same birthday in a room of 30 people) = 364! / (36529 x 336!)

It's a nice formula but most calculators and spreadsheets get an overflow error trying to calculate values this large. I demonstrated how lists could be made, manipulated and used to calculate the result. It works out to approximately a 70% probability. This is surprisingly large; most people think the value would be much smaller. This lies at the heart of statistical analysis; should we be shocked by something we observe or is it really something that is expected. In this case, with such a high probability, it is not shocking that at least two people in a room of 30 have the same birthday.

From there, we worked with another Bayes problem involving jumping paper frogs. The frogs are indistinguishable but one frog lands on its feet more often than the other. We pick a frog and it lands on its feet. What is the probability that we picked the one that lands on its feet the most often. Most students did a good job creating a tree diagram for the problem, and with minor prompting most were able to determine the desired "reversed" probability.

I then asked what the probability would be if the frog we selected landed on its feet twice in a row. This led to some discussion as to whether or not the probability would change; some thought it would be the same. After calculating the probabilities, they saw that the probability grew larger that the better jumper was selected. This makes sense; every time we see another feet-first landing our confidence we feel more confident that we picked the better jumper.

After, we looked at probability models. I used simple examples like rolling a single die or flipping a coin. I then asked students to consider what the average of roles would be if we rolled a single die numerous times. They were unclear, so I simulated 100 die rolls and calculated a sample mean of 3.58. I then asked how many times we should expect to roll a 1 if we tossed a die 1200 times, and how many 2's etc. After calculating the total point values and dividing by the number of rolls, we came to a result of 3.5. I repeated the question but as what the average would be if we rolled 12,000 times and 12,000,000 times. The expectation is that the average should be 3.5. This is not a value you can roll but what we expect the average of all our rolls to become.

We worked through a problem involving sibling counts and the percentage occurrence of each. I asked students to calculate the expected number of siblings. One student suggested multiplying the value times the percentage. Referring back to the die roll, the class saw that this worked. I then used this to define expected value. We practiced on a simple coin tossing game: two heads wins $1, one head and one tail wins $0.50, and two tails loses $1.

Below is the outline of what was covered today along with italicized comments enclosed in square brackets [like this].

o   Bayes
§  Jumping frogs
o   The Birthday problem
§  Results involve factorials and permutations 
—Discrete Random Variables
·         What is a random variable?
o   Variable that depends on chance [discussed concept briefly]
·         What is a discrete random variable?
o   Can list out all possible values of variable [used die roll as an example]
·         When make a table and histogram of a variable it is the probability distribution and probability histogram
o   Use dice roll example [made histogram on calculator after simulating; with thousands of rolls would expect histogram to flatten out showing a uniform distribution]
·         What is the mean dice roll?
o   This is called the expected value [expected value and mean of the probability model are equivalent terms]
o   Use sibling example to calculate the expected value
o   What does this value mean?
·         What is the standard deviation of a dice roll?
o   Consider how standard deviation was calculated before [showed how to calculate on a calculator and then showed formula]
o   What does this value mean? [as with previous standard deviation, the average distance from the mean]

No comments:

Post a Comment