Statistical Evidence Evaluation, fall semester 2013 Solutions to Exercises 1 1. Correction: The number of cars is of course five and not six. Pr ( A) = 3 5 Pr (B ) = 2 5 Pr (C ) = 4 5 Pr ( A, B ) = 1 5 ≠ Pr ( A) ⋅ Pr (B )(= (3 5) ⋅ (2 5) = 6 25) ⇒ A and B are non - independent events Pr ( A C ) = 2 4 = 1 2 ; Pr (B C ) = 2 4 = 1 2 Pr ( A, B C ) = 1 4 = (1 2 ) ⋅ (1 2 ) = Pr ( A C )⋅ Pr (B C ) ⇒ A and B are conditionally independent given C 2. Let A = Dye is present an B = Method gives positive detection Pr ( A) = 0.001 Pr (B A) = 0.99 ⇒ Proportion of false negatives, p fn = 0.01 Pr (B A) = 0.02 = Proportion of false positives, p fp Pr ( A B ) = Pr (B A)⋅ Pr ( A) = Pr (B A)⋅ Pr ( A) + Pr (B A)⋅ Pr ( A) ( 1 − p )⋅ 0.001 = (1 − p )⋅ 0.001 + p ⋅ 0.999 fn fn fp 0 0.2 1 0.8 0.4 0.6 1 0.8 0.6 0.4 Obviously it is the proportion of false positives that is the most crucial. 0.2 post prob 01 0.8 0.6 0.4 false pos 0.2 false neg 0 3. a) Gender: Two states, no numerical relationships them between nominal scale b) Temperature in F: Continuous variable but no well-defined zero interval scale c) Age: Even if usually represented with integral values it is still a continuous variable and it has a well-defined zero ratio scale d) Acoustic intensity level: logarithmic scale unequal distances between consecutive values ordinal scale 4. Let A = It has rained that day ; B = The parking place outside Mr Johnson’s house is wet ; C = Somebody has washed their car up the road The information given is used to assign probabilities: Pr ( A) = 17 30 Pr (B A) = 4 5 Pr (B C ) = 1 2 Pr (C A) = 0 Pr ( A B ) + Pr (C B ) = 1 17 out of 30 days four out of five times 50 % of the cases No car washing on rainy days No other explanation than rain or car washing Likelihood of rain when parking place is wet: Pr (B | A ) = 4/5 Pr ( A B ) Pr (B A) Pr ( A) 4 5 17 30 68 1 = ⋅ = ⋅ = ⋅ Pr (C B ) Pr (B C ) Pr (C ) 1 2 Pr (C ) 75 Pr (C ) Pr (A B ) + Pr (C B ) = 1 ⇒ Pr (A B ) 68 1 = ⋅ 1 − Pr (A B ) 75 Pr (C ) 68 1 ⋅ 1 75 Pr (C ) ⇒ Pr ( A B ) = = 68 1 75 ⋅ + 1 1 + ⋅ Pr (C ) 75 Pr (C ) 68 We know that Pr(C | A) = 0 ⇒ Pr (C ) ≤ Pr ( A) = 13 30 1 ⇒ Pr ( A B ) ≥ ≈ 0.67 75 13 1+ ⋅ 68 30 5. Let π = The probability that the coin land “heads” The hypotheses: H0: “The coin is fair ⇔ π = 0.5 H1: π = 0.6 Experiment: Five tossings gives four heads Model: Number of heads is Bin (5, π ) 5 ⇒ L(π Data ) = ⋅ π 4 ⋅ (1 − π ) 4 5 5 5 ⇒ L(H 0 Data ) = ⋅ 0.54 ⋅ 0.5 = ⋅ 0.55 ; L(H1 Data ) = ⋅ 0.6 4 ⋅ 0.4 4 4 4 Simple hypothesis The Bayes factor is the likelihood ratio 5 ⋅ 0.55 L(H 0 Data ) 4 0.55 LR = = = ≈ 0.60 4 L(H1 Data ) 5 0.6 ⋅ 0.4 ⋅ 0.6 4 ⋅ 0.4 4 Slight evidence against H0 6. Using π = The probability that the coin land “heads” the hypothesis are H0: π = 0.5 H1: π > 0.5 i.e. simple null hypothesis and composite alternative hypothesis ⇒B= L(H 0 Data ) ∫π ∈H1 L(π Data )⋅ p (π H1 ) dπ = Uniform prior for π under H 1 = 5 ⋅ 0.54 ⋅ (1 − 0.5) 4 0.55 = = = 1 4 1 5 1 4 2 ⋅ ∫ π ⋅ (1 − π )dπ ( ) π π π ⋅ ⋅ 1 − ⋅ d 0.5 ∫0.5 4 1 − 0 . 5 = 0.55 2 ⋅ B(5,2) ⋅ ∫ 1 0.5 π 4 ⋅ (1 − π ) B(5,2 ) dπ 0.55 = 2 ⋅ B(5,2) ⋅ (1 − Fbeta ( 5, 2) (0.5)) where B is the Beta function and Fbeta(5,2) is the cdf of a beta(5,2)distribution Use R to find B(5,2) and Fbeta(5,2)(0.5): B(5,2) Fbeta(5,2)(0.5) 0 .5 5 ⇒B≈ ≈ 0.53 2 ⋅ 0.0333 ⋅ (1 − 0.1094) Slight evidence against H0 (a little bit stronger than in task 5) 7. The hypotheses are Hp : “The particular screwdriver was used to break the lock” Hd : “Another screwdriver was used to break the lock” The hypotheses are not formulated in terms of any parameter. Instead, distinct probabilities are used to form the likelihoods. The particular screwdriver would leave precisely those marks on the lock that has been observed ( ) ⇒ Pr Marks observed H p = 1 ⇒ L(H p Marks observed) = 1 Now, Hd = Hd1 ∪ Hd2 where Hd1 = “Another screwdriver of the same type as the particular one was used to break the lock” Hd2 = “Another screwdriver of a different type than the particular one was used to break the lock” It is known that Pr (H d 2 H d ) ≈ 0.99 and Pr (H d 1 H d ) ≈ 0.01 discarding that the particular screwdriver has been taken out of the population of screwdrivers. Now, L(H d 1 Marks observed) ≈ L(H p Marks observed) = 1 since screwdrivers of the same type as the particular one are expected to give the same type of marks. Moreover, L(H d 2 Marks observed ) = Pr (Marks observed H d2 ) ≈ 0.0002 ⇒B= = L(H p Marks observed) L(H d 1 Marks observed)⋅ Pr (H d 1 H d ) + L(H d 2 Marks observed)⋅ Pr (H d 2 H d ) 1 ≈ 98.0 1 ⋅ 0.01 + 0.0002 ⋅ 0.99 =