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[BA] = p
¯
Pr[BA] = 1 − p
We would like to ﬁnd Pr[AB]. By the total probability rule:
¯
¯
Pr[B] = Pr[BA] Pr[A] + Pr[BA] Pr[A] = pq + (1 − p)(1 − q).
And by Bayes’ rule:
Pr[AB] = CS 70, Fall 2013, Midterm #2 Pr[BA] Pr[A]
pq
=
.
Pr[B]
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
2n
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
2
n ≥ 1.
Solution:
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
2
2
claimed.
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

Click to edit the document details