sol05.pdf

Upload: spitzersglare

Post on 03-Apr-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/28/2019 sol05.pdf

    1/3

    University of Illinois Spring 2012

    ECE 313: Problem Set 5: SolutionsBayes Formula and binary hypothesis testing

    1. [Explaining a sum]

    (a) Let Bx 1 x 2 x 3 x 4 denote the event {(X 1, X 2, X 3, X 4) = ( x1, x2, x3, x4)}. These events aremutually exclusive for different choices of x1x2x3x4. Let q i = 1 pi .P {S = 1} = P {B1000 B0100 B0010 B0001}

    = p1q 2q 3q 4 + q 1 p2q 3q 4 + q 1q 2 p3q 4 + q 1q 2q 3 p4= (1 3 2 1 + 4 2 2 1 + 4 3 3 1 + 4 3 2 4)/ 625= 154 / 625 = 0.2464

    (b) P

    {X 1 = 1 , S = 1

    }= P (B1000 ) = p1q 2q 3q 4 = 6 / 625, so

    P (X 1 = 1 |S = 1) = P {X 1 =1 ,S =1 }P {S =1 } =

    6154 = 0 .0390.

    2. [The weight of a positive]

    (a)

    P (positive) = P (positive |cancer) P (cancer) + P (positive |no cancer) P (no cancer)= (0 .9)(0.008) + (0 .07)(0.992) = 0 .07664 7.7%

    (b)

    P (cancer |positive) =P (cancer and positive)

    P (positive)

    =P (positive |cancer) P (cancer)

    P (positive)

    =(0.9)(0.008)

    0.07664= 0 .0939 9.4%

    (c) Out of 1000 woman getting a mammogram, we expect 1000*0.008=8 women to havebreast cancer, and 8*(0.9)=7.2 of those to get a positive mammogram. Expect1000*(0.992)*(0.07)=69.4 women to get a false positive. There is a debate within thehealth industry as to whether women in this age range should get mammograms.

    3. [A simple hypothesis testing problem]

    (a) The likelihood ratio function is ( i) = p1 (i) p0 (i) =9i260 . The ML rule is as follows: if X = i,

    decide H 1 if (i) 1, or equivalently, if |i| 2.58, or equivalently, because i is integervalued, if |i| 3. Equivalently, 1 = {4, 3, 3, 4}and 0 = {2, 1, 0, 1, 2}. (Themeaning of 1 and 0 is that if X 1 we declare that H 1 is true, and if X 0 wedeclare that H 0 is true. )

    (b) For the ML rule, pfalse alarm = P (|X | 3|H 0) = 49 , and pmiss = P (|X | 2|H 1) = 2

    2 +1 2 +0 2 +1 2 +2 260 =

    16 .

  • 7/28/2019 sol05.pdf

    2/3

    (c) The MAP rule for X = i is to decide H 1 if (i) 0 1 , or equivalently if 9i2

    60 2,or equivalently, if |i| 3.65, or equivalently, because i is integer valued, if |i| 4.Equivalently, 1 = {4, 4}and 0 = {3, 2, 1, 0, 1, 2, 3}.(d) For the MAP rule, pfalse alarm = P (|X | 4|H 0) = 29 and

    pmiss = P (

    |X

    | 3

    |H 1) = 3

    2 +2 2 +1 2 +0 2 +1 2 +2 2 +3 260 =

    2860 =

    715 . The average probability of

    error is pe = 0 pfalse alarm + 1 pmiss = 23 29 + 13 715 = 41135 0.3037.(e) Since max i (i) = 9(4)

    2

    60 = 2 .4, the MAP rule always decides H 0 if and only if 0 1 > 2.4.

    4. [Matching Poisson means]

    (a) p0(i, j ) = 4i e 4i !

    4j e 4 j ! and p1(i, j ) =

    2i e 2i!

    6j e 6 j ! and the likelihood ratio is ( i, j ) =

    24

    i 64

    j . The ML rule decision for ( X 1, X 2) = ( i, j ) is H 1 if i ln(1/ 2) + j ln(3/ 2) 0, or j

    ln(2)ln(3 / 2) i, or j (1.71)i. See sketch (a) for the decision regions. The points (4 , 4) and

    (2, 6) are also shown in the sketchthese are the points ( E [X 1], E [X 2]) under hypothesesH 0 and H 1.

    (b)(a)

    0

    1

    i

    j

    5

    5 5

    5

    0

    1

    i

    j

    (b) We need to compare the likelihood ratio function ( i, j ), found in part (a), to the

    threshold 0 1 = 2 . Taking logarithms yields that the MAP rule decision for ( X 1, X 2) =

    (i, j ) is H 1 if i ln(1/ 2) + j ln(3/ 2) ln 2, or j ln(2)

    ln(3 / 2) (i + 1) , or j (1.71)(i + 1) . Seesketch (b). As expected, 0 is larger for (b) than ( a) because 0 > 0.5.

    5. [Field goal percentages home vs. away]

    (a) Using a = 20 so that 1 1a 2 = 0 .95, the symmetric, two-sided condence interval forthe parameter p of a binomial distribution with known n and observed p has endpointskn

    202 n . The given data yields the condence interval [0 .290, 0.557] for ph and the

    interval [0 .309, 0.505] for pa . These intervals intersect; we say the data is not conclusive.(b) It can be said that if H 0 were true, and if p denotes the common value of ph and pa ,

    from a perspective before the experiment is conducted, the probability the condenceintervals will not intersect is less than or equal to the probability that at least one of the condence intervals will not contain p. The probability the condence interval for phwill not contain p is less than or equal to 5%, and the probability the condence intervalfor pa will not contain p is less than or equal to 5%. So the probability that at leastone of the two condence intervals will not contain p is less than or equal to 10%. Sotherefore, if H 0 is true, before we know about the data, we would say the probabilitythe intervals do not intersect is less than or equal to 10% . Thus, if and when we observenonintersecting condence intervals, we can say either H 0 is false, or we just observed

    2

  • 7/28/2019 sol05.pdf

    3/3

    data with an unlikely extreme. Note that we cannot conclude that there is a 90% chancethat H 1 is true.

    3