week 2 -- Conditional probabilities & Bayes' rule Flashcards
general addition rule
a OR b OR both
P(A or B) = P(A) + P(B) - P(A and B)
add probabilities of two events and subtract out probability of their intersection
does not require disjoint events!
general multiplication rule
P(A and B) = P(A) x P(B given A)
does not require independent events!
general addition rule
a OR b BUT NOT both
P(A) + P(B) - 2x P(A and B)
1st substraction > not to double count events
2nd subtraction > not to count intersection at all
Formal independence
P(A) = P(A given B)
Are disjoint events independent?
NEVER
If one occurs, the other doesn’t
NO MULTIPLICATION RULE!
P(A given B) =
P(A given B) = P (A and B) / P(A)
see week 2, Ch 15, page 352,
joint probability (being a binge drinker AND having an accident)
Use tree diagram
or multiplication rule:
P(binge and accident) = P(binge) x P(accident given binge)
Tree diagram
final outcomes are disjoint! Each branch chooses between disjoint alternatives
(right terminal branch probabilities must sum to 1!!!)
so add probabilities to get probabilities for compound events
Bayes rule 1
a formula for reversing the probability from conditional probability we are originally given
I have P(A given B) but I want to know P(B given A)
Can be done with a tree diagram!
Bayes Rule 2
How likely is it that our hypothesis is true given our data?
The lower the probability of the data, the higher the probability of H given D
Hypothesis, Data
P(H given D) = P(H) x P(D given H) / P(D)
Extraordianary claims require extraordinary evidence
If you draw ONE M&M, are the events of getting a
red one and getting an orange one disjoint, independent,
or neither?
For a SINGLE draw, getting red and getting orange are disjoint events, they cannot both occur.
But they are NOT independent. If we get red, then the probability of getting orange becomes zero (and vice versa). So each event affects the probability of the
other.
If you draw two M&M s one after the other, are the events of getting a red on the first and a red on the second disjoint, independent, or neither?
For a series of two draws, the events of red on the first draw and red on the second are not
disjoint. They can both occur. They are independent. Assuming that the output of the
M&M factory is large and continuous, removing one red M&M on the first draw does not
really alter the proportion of reds that remain for the second draw. But if you are a die-hard
pedant, you may argue the case that if the total number of M&Ms in the world is finite, then
there is a very tiny non-independence between these two events.
You shuffle a deck of cards and then start turning them over one at a time. The first one is red. So is the second. And the third. In fact, you are surprised to get
10 red cards in a row. You start thinking, The next one is
due to be black!
Is this correct?
The pack is a finite source of cards, and we know the number of red and black cards in the pack. The fact that we are not replacing the cards into the deck means that having taken 10 red cards, there is now a larger proportion of black cards remaining in the pack, so we are correct in thinking that we are due to get a black card.
Baye’s Rule – how we get there
P(A) x P(B given A) = P(B) x P(A given B)
If we have three, we can find the fourth
P(A given B) = P(A) x P(B given A) / P(B)