In: Statistics and Probability
The values listed below are waiting times (in minutes) of customers at two different banks. At Bank A, customers enter a single waiting line that feeds three teller windows. At Bank B, customers may enter any one of three different lines that have formed at three teller windows. Answer the following questions. Bank A 6.4 6.6 6.7 6.8 7.1 7.3 7.4 7.7 7.7 7.7 Bank B 4.1 5.3 5.9 6.2 6.8 7.6 7.6 8.4 9.4 10
Construct a 99% confidence interval for the population standard deviation σ at Bank A.
R-commands and
outputs:
x=c(6.4, 6.6, 6.7, 6.8, 7.1, 7.3, 7.4, 7.7, 7.7, 7.7)
length(x)
[1] 10
## We check normality of x:
shapiro.test(x)
Shapiro-Wilk normality test
data: x
W = 0.90223, p-value = 0.2318
## p-value=0.2318 > alpha=0.01, we Accept H0.
## sample (x) follow normal distribution.
n=length(x)
n
[1] 10
s2=var(x) ## sample variance (or sample standard
deviation's square)
s2
[1] 0.2426667
sqrt(s2) ## sample standard deviation
[1] 0.4926121
#Since 99% CI, 1-alpha=0.99
alpha=0.01
qchisq(1-alpha/2,df=n-1)
[1] 23.58935
qchisq(alpha/2,df=n-1)
[1] 1.734933
## Required values for computing 99% Confidence Interval (CI)
for the population standard deviation σ at Bank A:
## n=10, s2=0.2426667, chi1sq=1.734933, chi2sq=23.58935
chi1sq=1.734933
chi2sq=23.58935
lower=((n-1)*s2)/ chi2sq
lower
[1] 0.09258415
upper=((n-1)*s2)/ chi1sq
upper
[1] 1.258838
## This, [lower=0.092584, upper=1.258838] gives 99% CI
for population variance.
## For finding 99% CI for population standard deviation we
simply take squareroot of above interval's limits
sqrt(lower)
[1] 0.3042764
sqrt(upper)
[1] 1.12198
## A 99% confidence interval for the population standard
deviation σ at Bank A is [0.3042764,1.12198]