midterm2sol

You do not need to simplify the expression just write

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

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 find 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 = . Pr[B] pq + (1 − p)(1 − q) 3 Name: SID: 2. (15 points) Even or odd. Suppose you flip 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 first 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.

Ask a homework question - tutors are online