Unformatted text preview: > sd(C1) 40 45 50 5 60 65 [1] 5.230672 >mean(C1)qnorm(0.975)*sd(C1)/sqrt(length(C1)) [1] 53.2286 >mean(C1)+qnorm(0.975)*sd(C1)/sqrt(length(C1)) [1] 56.18807 Ex. Toss n = 100 biased coins with P ( H ) = p . Suppose you observe 38 heads. Construct 95 % CI of p . > X<rbinom(100,1,0.4) > X [1] 1 0 0 0 0 0 0 0 1 0 1 1 0 0 0 0 [17] 0 0 1 1 0 1 0 1 1 0 1 0 1 0 1 0 [33] 1 1 0 0 0 0 1 0 1 0 0 0 0 0 1 0 [49] 0 1 0 0 0 0 1 1 0 1 0 1 1 0 0 1 [65] 0 0 1 0 0 1 0 0 0 1 0 0 1 0 0 0 [81] 1 0 1 0 0 1 1 0 0 0 1 0 0 1 1 1 [97] 0 1 1 0 > sd(X) [1] 0.4878317 > sqrt(0.38*(10.38)/(1001)) [1] 0.04878317 > 0.38+1.96*0.049/sqrt(100) [1] 0.389604 > 0.381.96*0.049/sqrt(100) [1] 0.370396 Selfstudy problems Example 7.8., Exercise 7.13., 7.19., 7.25. In the above coin tossing example, check if ¯ X is MLE....
View
Full Document
 Spring '04
 Chung
 Statistics

Click to edit the document details