In: Statistics and Probability
Can you please check my work? I used R but it's very basic. I searched for this question on Chegg to check my answer but my numbers are slightly different. What did I do wrong?
Question: Calculate confidence intervals for population variance and standard deviation. Assume that samples are simple random samples and taken from a normal population. α=0.05, sample size=30,s=3.5
stdev =3.5
df = 29
n = 30
alpha = 0.05
qchisq(0.05,df,lower.tail = FALSE)
onechi <- 42.55679
#[1] 42.55697
qchisq(0.05,df)
#[1] 17.70837
twochi <- 17.70837
#CI for standard dev
(LowerCI.stdev = (sqrt(df*stdev^2/onechi)))
#[1] 2.889233
(UpperCI.stdev = (sqrt(df*stdev^2/twochi)))
#[1] 4.478966
cbind(LowerCI.stdev,UpperCI.stdev)
# LowerCI.stdev UpperCI.stdev
# [1,] 2.889233 4.478966
#CI for variance
(LowerCI.var = (df*stdev^2)/onechi)
#[1] 8.347669
(UpperCI.var = (df*stdev^2)/twochi)
#[1] 20.06113
cbind(LowerCI.var,UpperCI.var)
Confidance interval for polpulation variance is,
Given :
n = 30 , S = 3.5 ,alpha=0.05
To find critical values we devide alpha/2
Using R,
> stdev=3.5
> n=30
> df = 29
> alpha = 0.05
>
>
onechi=qchisq(0.05/2,df,lower.tail = FALSE)
> onechi
[1] 45.72229
> twochi=qchisq(0.05/2,df)
> twochi
[1] 16.04707
>
> #CI for standard dev
>
> (LowerCI.stdev = (sqrt(df*stdev^2/onechi)))
[1] 2.787424
>
> (UpperCI.stdev = (sqrt(df*stdev^2/twochi)))
[1] 4.705103
>
>
cbind(LowerCI.stdev,UpperCI.stdev)
LowerCI.stdev UpperCI.stdev
[1,] 2.787424 4.705103
>
>
> #CI for variance
>
> (LowerCI.var = (df*stdev^2)/onechi)
[1] 7.769734
>
> (UpperCI.var = (df*stdev^2)/twochi)
[1] 22.138
>
>
cbind(LowerCI.var,UpperCI.var)
LowerCI.var UpperCI.var
[1,] 7.769734 22.138
>
Confidance interval for standard deviation is [2.787424 4.705103 ].
Confidance interval for Variance is [ 7.769734
22.138]