

Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
Material Type: Notes; Class: Introduction to Mathematical Statistics; Subject: STATISTICS; University: University of Wisconsin - Madison; Term: Spring 2008;
Typology: Study notes
1 / 2
This page cannot be seen from the preview
Don't miss anything!


TA: Yi Chai Office: 1335N MSC Email: [email protected] Webpage: http://www.stat.wisc.edu/∼chaiyi Office Hours: 11:00-12:00pm T and 1:00-2:00pm Th or by appointment
100(1 − α)%-C.I. Margin of error Length of C.I.
mean of N (μ, σ^2 )
known σ^2 Y¯ ± zα/ 2 × σ √ n
zα/ 2 × σ √ n
2 zα/ 2 × σ √ n
unknown σ^2 Y¯ ± tα/ 2 ,n− 1 × s √ n
tα/ 2 ,n− 1 × s √ n
2 tα/ 2 ,n− 1 × s √ n
Proportions pˆ ± zα/ 2
pˆ(1 − pˆ) n zα/ 2
pˆ(1 − pˆ) n 2 zα/ 2
pˆ(1 − pˆ) n
Zα/ 2 δ
n >
Zα/ 2 δ
x¯(1 − x¯) n , x¯ + z(1+γ)/ 2
x¯(1 − x¯) n
with γ = 0.95 and record the proportion of intervals that contain the true value. What do you notice? Repeat this simulation with n = 20. What do you notice?
simu <- function(S,n,p) { num= for (simno in 1:S) { x=rbinom(n,1,p) hatp=sum(x)/n lower=hatp-1.96sqrt(hatp(1-hatp)/n) upper=hatp+1.96sqrt(hatp(1-hatp)/n) if (lower<=p & upper>=p) { num=num+1 } } return(num) }
simu(1000,5,0.5) simu(1000,20,0.5)
(¯x − s/
5 , x¯ + s/
where s is the sample standard deviation, and record the proportion of times this interval contains μ = 0. Repeat this simulation with n =10 and 100. Compare your results.
simu <- function(S,n) { num= for (simno in 1:S) { x=rnorm(n) lower=mean(x)-sd(x)/sqrt(n) upper=mean(x)+sd(x)/sqrt(n) if (lower<0 & upper>0) { num=num+1 } } return(num) }
simu(10000,5) simu(10000,10) simu(10000,20)