Feb 18
Continue our discussion of probability from chapter 2.
New formula : "expectation value" (i.e. mean).
Given a random variable x and its probability distribution P(x),
the mean or "expected value" of x is
mean(x) = sum over all x of ( x * P(x) )
Do out an example with both numbers and probabilities to show
that this is the same as what we had before for the mean.
Data: x = c(1,1, 2, 4, 5,5,5,5).
Questions:
- What is the probability of x, P(x)?
- Can you construct a physical device which gives a random variable with the same values & probabilities as x ?
- What is the mean of x using our old formula (i.e. add-em-up and divide by the numbers)
- What is the mean of x using our new formulat ( sum of x * P(x) )
Then do an example of a gambling game and show that this is the "worth" of the game:
Here is the game:
We roll a die.
If it's a 1, 2, or 3, you win nothing.
If it's a 4 or 5, you win $10.
If it's a 6, you win $100.
How much would you be willing to pay to play this game?
(Assume that you are able to play it over and over as many times as you want.)
coming up :
2. Conditional probability & Bayes' Theorem :
Suppose that you are worried that you might have a rare disease. You
decide to get tested, and suppose that the testing methods for this
disease are correct 99 percent of the time (in other words, if you
have the disease, it shows that you do with 99 percent probability,
and if you don't have the disease, it shows that you do not with 99
percent probability). Suppose this disease is actually quite rare,
occurring randomly in the general population in only one of every
10,000 people.
If your test results come back positive, what are your chances
that you actually have the disease?
(This formulation is from
https://www.math.hmc.edu/funfacts/ffiles/30002.6.shtml)
To understand what's going on, consider a million people who are all tested.
Count how many there are who either do or don't have cancer and who
test positive or negative, and what that says about P(have cancer | test positive),
which is the probability that you have cancer given that you tested positive.