In: Statistics and Probability
The CEO of Manitoba Health does not want the variance of waiting times at the emergency in Manitoba's hospital longer than 0.25 0.25 square hours. A random sample of 25 25 patients taken from Health Science Center gave the variance of the waiting time equal to 0.49 0.49 square hours. Assume that the waiting times for all patients are normally distributed. (a) Test whether the standard deviation of the waiting times for all patients at HSC is greater than 0.5 0.5 hours. Use α=0.05 α=0.05 . (b) Calculate a 95% 95% confidence interval for the population standard deviation.
All the calculations has been done with the help of R software.
(a) Given, sample variance = 0.49 square hours, sample size = 25 patients and level of significance = 0.05
Hypothesis:
H0: The standard deviation of the waiting times for all patients at HSC is equal to 0.5 hours
H1: The standard deviation of the waiting times for all patients at HSC is greater than 0.5 hours
Here we use chi square test and we find P-value = 0.90 which is larger than given level of significance 0.05, So we reject Null hypothesis means the standard deviation of the waiting times for all patients at HSC is greater than 0.5 hours.
(b) Confidence Interval for standard deviation at 95% confidence = (0.65, 1.16)
R code:
####Test of standard deviation####
var_x = 0.49; n = 25; sig_pop = 0.5
sig_sample = sqrt(var_x)
sig_sample
chi_cal = ((n-1)*sig_sample)/sig_pop
chi_cal
P_value = pchisq(chi_cal, 24)
P_value
chi_tab = qchisq(0.05, 24)
chi_tab
##########Confidence Interval#####
L = ((n-1)*sig_sample)/qchisq(0.975, 24)
sqrt(L)
U = ((n-1)*sig_sample)/qchisq(0.025, 24)
sqrt(U)
Output:
> ####Test of standard deviation####
> var_x = 0.49; n = 25; sig_pop = 0.5
> sig_sample = sqrt(var_x)
> sig_sample
[1] 0.7
> chi_cal = ((n-1)*sig_sample)/sig_pop
> chi_cal
[1] 33.6
> P_value = pchisq(chi_cal, 24)
> P_value
[1] 0.907967
> chi_tab = qchisq(0.05, 24)
> chi_tab
[1] 13.84843
> ##########Confidence Interval#####
> L = ((n-1)*sig_sample)/qchisq(0.975, 24)
> sqrt(L)
[1] 0.6532879
> U = ((n-1)*sig_sample)/qchisq(0.025, 24)
> sqrt(U)
[1] 1.163921
>