100BHW1S

# 100BHW1S - (1) Find the 95% conﬁdence interval of p ....

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

STAT 100B HWI Solution Problem 1 Let X 1 ,...,X n Bernoulli( p ) independently. Let S = n i =1 X i . Suppose we have two estimators of p . (1) ˆ p = S/n , and (2) ˆ p = ( S + n/ 2) / ( n + n ). (1) Calculate the bias and variance of each estimator. A: (1) E[ˆ p ] = E[ S/n ] = E[ S ] /n = np/p = p . The bias is E[ˆ p ] - p = 0. Var[ˆ p ] = Var[ S/n ] = Var[ S ] /n 2 = np (1 - p ) /n 2 = p (1 - p ) /n . (2) E[ˆ p ] = (E[ S ] + n/ 2) / ( n + n ) = ( np + n/ 2) / ( n + n ). The bias is E[ˆ p ] - p = (1 / 2 - p ) / (1 + n ). Var[ˆ p ] = Var[ S ] / ( n + n ) 2 = p (1 - p ) / (1 + n ) 2 . (2) Calculate the mean squared error of each estimator. Plot the mean squared errors of the two estimators together over the true value of p [0 , 1], for n = 5, n = 10, and n = 100 respectively. A: The MSE is (E[ˆ p ] - p ) 2 + Var[ˆ p ]. For estimator 1, the MSE is p (1 - p ) /n . For estimator 2, the MSE is 1 / (4(1 + n ) 2 ). Problem 2 Suppose we roll a die 1000 times independently, and we observe the number six 180 times. Let p be the probability that we observe the number six each time.
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (1) Find the 95% conﬁdence interval of p . What is the margin of error? Find the 90% conﬁdence interval of p . A: ˆ p = 180 / 1000 = . 18, s = p ˆ p (1-ˆ p ) /n = . 012. The 95% CI is [ˆ p-2 s, ˆ p + 2 s ] = [ . 156 ,. 204]. The margin of error is 2 s = . 024. The 90% CI is [ˆ p-1 . 64 s, ˆ p + 1 . 64 s ] = [ . 160 ,. 200]. (2) Test the hypothesis H : p = 1 / 6 versus the hypothesis H 1 : p > 1 / 6. Calculate the p-value. Is there evidence that the die is not fair? A: The observed value of ˆ p is 180 / 1000 = . 18. The Z-score is (ˆ p-p ) / p p (1-p ) /n = ( . 18-1 / 6) / p 1 / 6 × (1-1 / 6) / 1000 = 1 . 1314. The p-value is Pr( Z ≥ 1 . 1314) = . 129. There is no much evidence against H . 1...
View Full Document

## This note was uploaded on 09/20/2011 for the course STAT 100B taught by Professor Wu during the Spring '11 term at UCLA.

Ask a homework question - tutors are online