3. (10 points) Suppose that measurements of a response are a realization of X1,
ID: 2930437 • Letter: 3
Question
3. (10 points) Suppose that measurements of a response are a realization of X1, . . . , Xn, where all the Xi ’s have the same distribution and are dependent. In particular, suppose that Xi = µ + T + Ui , i = 1, . . . , n, where T N(0, 2 ), (0, 1), U1, . . . , Un are iid N(0,(1 ) 2 ) and are independent of T. In this model, Xi N(µ, 2 ) for i = 1, . . . , n and cor(Xi , Xj ) = for i 6= j. We will see what happens when we use this sample in the one-sample (t-distribution-based) confidence interval for µ Perform a simulation study that makes a simulation-based 99% score approximate confidence interval for the coverage probability of the random 95% confidence interval for µ: X¯ ± t0.975,n1S/ n, where X¯ = n 1 Pn i=1 Xi and S = q (n 1)1 Pn i=1(Xi X¯) 2. Set µ = 68 and = 3. Use 10,000 replications and report the score approximate 99% confidence interval for the coverage probability of X¯ ± t0.975,n1S/ n for each (n, ) {10, 50, 100} × {0.1, 0.5, 0.9}. What happens to the coverage probability as increases? What happens to the coverage probability as n increases?
Explanation / Answer
Coverage probabilities:
n=10, rho=0.1
Coverage probability of 95 % CI, CP95=0.8676
Coverage probability of 99 % CI, CP99=0.9699
n=10, rho=0.5
Coverage probability of 95 % CI, CP95=0.4924
Coverage probability of 99 % CI, CP99=0.6581
n=10, rho=0.9
Coverage probability of 95 % CI, CP95=0.1845
Coverage probability of 99 % CI, CP99=0.2564
------------------------------------------------------------------------------------------------
n=50, rho=0.1
Coverage probability of 95 % CI, CP95=0.5658
Coverage probability of 99 % CI, CP99=0.7019
n=50, rho=0.5
Coverage probability of 95 % CI, CP95=0.2136
Coverage probability of 99 % CI, CP99=0.2818
n=50, rho=0.9
Coverage probability of 95 % CI, CP95=0.074
Coverage probability of 99 % CI, CP99=0.1003
n=100, rho=0.1
Coverage probability of 95 % CI, CP95=0.4242
Coverage probability of 99 % CI, CP99=0.5421
n=100, rho=0.5
Coverage probability of 95 % CI, CP95=0.1558
Coverage probability of 99 % CI, CP99=0.2028
n=100, rho=0.9
Coverage probability of 95 % CI, CP95=0.0507
Coverage probability of 99 % CI, CP99=0.066
----------------------------------------------------------------------------
R-code
mu=68
sig=3
n=100 # 10 # 50
rho=0.9 # 0.9 # 0.5
R=10000
L95<-NULL
R95<-NULL
L99<-NULL
R99<-NULL
X_bar<-NULL
for(i in 1:R){
T=rnorm(1,0,sqrt(rho*sig^2))
U=rnorm(n,0,sqrt((1-rho)*sig^2))
X=mu+T+U
X_bar[i]=mean(X)
X_sd=sd(X)
t95=qt(0.975,n-1)
t99=qt(0.995,n-1)
L95[i]=X_bar[i]-t95*X_sd/sqrt(n)
R95[i]=X_bar[i]+t95*X_sd/sqrt(n)
L99[i]=X_bar[i]-t99*X_sd/sqrt(n)
R99[i]=X_bar[i]+t99*X_sd/sqrt(n)
}
l95=mean(L95)
r95=mean(R95)
cp95=0
for(i in 1:R){
if((l95<=X_bar[i]) && (r95>=X_bar[i])){
cp95=cp95+1
}}
CP95=cp95/R
l99=mean(L99)
r99=mean(R99)
cp99=0
for(i in 1:R){
if((l99<=X_bar[i]) && (r99>=X_bar[i])){
cp99=cp99+1
}}
CP99=cp99/R
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.