This preview shows page 1. Sign up to view the full content.
Unformatted text preview: obability that a player uses
CS 70, Fall 2013, Midterm #2 2 Name: SID:
steroids if he tested positive? You do not need to simplify the expression - just write it in terms
of p and q.
The probability is pq
pq+(1− p)(1−q) . Solution: Let A be the event that an NCAA football player uses steroids. Let B be the event that
the test result is positive. Then we are given:
Pr[A] = q
Pr[B|A] = p
Pr[B|A] = 1 − p
We would like to ﬁnd Pr[A|B]. By the total probability rule:
Pr[B] = Pr[B|A] Pr[A] + Pr[B|A] Pr[A] = pq + (1 − p)(1 − q).
And by Bayes’ rule:
Pr[A|B] = CS 70, Fall 2013, Midterm #2 Pr[B|A] Pr[A]
pq + (1 − p)(1 − q) 3 Name: SID: 2. (15 points) Even or odd. Suppose you ﬂip a biased coin with P[H ] = p. Let En be the event you get
an even number of H’s in n tosses of the coin. Prove by induction on n that P[En ] = 1 + (1−2 p) for
n ≥ 1.
Base Case: n = 1. E1 is the event that you obtain tails on the ﬁrst day. Pr[E1 ] = 1 − p = 1 + 1−2 p as
n−1 Inductive Hypothesis: Assume that Pr[En−1 ] = 1 + (1−22p)
2 . n 2
Inductive Step: Prove that Pr[En ] = 1 + (1−2 p) .
2 We can use the total probability rule:
Pr[En ] = Pr[En |En−1 ] Pr[En−1 ] + Pr[En |En−1 ] Pr[En−1 ].
Observe that Pr[En |En−1 ] is...
View Full Document
This document was uploaded on 01/28/2014.
- Winter '09