# A medical researcher at Chilton Medical Center surveyed 12 hospitals throughout New Jersey and found that the standard deviation for the number of days a person stays at a hospital after having their appendix removed was 2.70days. Assume the variable is normally distributed. Based on this, find the 95% confidence interval of the true variance for the length of hospital stays.

The 95% confidence interval for the variance given n=12 and s=2.70 is 3.658<variance<21.014.

We are asked to find the 95% confidence interval for the variance `sigma^2` given a sample of size n=12 and a sample standard deviation of s=2.70.

The form of the confidence interval is `((n-1)s^2)/(chi^2_("right"))<sigma^2<((n-1)s^2)/(chi^2_("left"))` .

(For the confidence interval of the standard deviation we just take the square root of all three.)

Here, n is the sample size, `s^2` is the sample variance (which is the square of the sample standard deviation), and `sigma^2` is the population variance. The denominators are indicative of the confidence level and can be found in a `chi^2` distribution table.

Many distributions are symmetric about the center, but the standard deviation and variance are nonnegative and the distribution is right-skewed.

With n=12 we have the degrees of freedom (d.f.=n-1) to be 11. In a `chi^2` table we look for values in the d.f.=11 row in the columns .025(right) and .975(left.) (The column under .975 indicates that 97.5% of the samples would have a standard deviation/variance larger than the number in the table. The area or probability is to the right of the vertical axis.)

Thus `chi^2_("Right")~~21.920` and `chi^2_("Left")~~3.816`

The confidence interval is `(11(2.7^2))/21.920 < sigma^2 < (11(2.7^2))/3.816`

or `3.658 < sigma^2 < 21.014`

The confidence interval for the standard deviation (not asked for) would be

`sqrt(3.658) < sigma < sqrt(21.014) " or " 1.913<sigma<4.584`