IE 8090 - Modeling
Systems Under Risk
Lecture-8
Confidence Intervals (cont.)
Confidence Interval on the Variance and Standard
Deviation of a Normal Distribution
• ๐ 2 distribution is used to construct confidence intervals for
population variance (๐ 2 ) or standard deviation (๐) when the
population is normally distributed.
• For a random sample ๐1 , ๐2 , … , ๐๐ with sample variance ๐ 2 :
2
๐
−
1
๐
๐2 =
๐2
• The statistic ๐ 2 follows a chi-square distribution with ๐ −1 degrees
of freedom.
Chi-square (๐ ) Distribution
2
• The probability density function of a ๐ 2 random variable is
• Note that the chi-square random variable is nonnegative and
that the probability distribution is skewed to the right.
• However, as ๐ increases, the distribution becomes more
symmetric.
• As ๐ → ∞, the limiting form of the chi-square distribution is
the normal distribution.
where ๐ is the number of degrees of freedom.
Chi-square (๐ ) Distribution
2
2
• ๐๐ผ,๐
: The value of the chi-square variable with ๐ degrees of freedom such that
2
๐ ๐ 2 > ๐๐ผ,๐
=α
This probability is shown as the shaded area in figure
2
The shaded area to the right of ๐๐ผ,๐
equals α
• Example (๐ = 10)
2
• ๐.05,10
= 18.31 →(upper 5% point)
2
• ๐.95,10
= 3.94 →(lower 5% point)
๐
Confidence Interval for ๐
• The construction of the 100(1 − ๐ผ)% CI for ๐ 2 is straightforward. Because
2
๐
−
1
๐
๐2 =
๐2
is chi-square with ๐ − 1 degrees of freedom, we may write
2
2
๐ ๐1−๐ผ/2,๐−1
≤ ๐ 2 ≤ ๐๐ผ/2,๐−1
=1−๐ผ
So that
Rearranged;
2
๐
−
1
๐
2
2
๐ ๐1−๐ผ/2,๐−1
≤
≤
๐
=1−๐ผ
๐ผ/2,๐−1
๐2
2
(๐ − 1)๐ 2
(๐
−
1)๐
๐
≤ ๐2 ≤ 2
=1−๐ผ
2
๐๐ผ/2,๐−1
๐1−๐ผ/2,๐−1
One-sided Confidence Bounds on the
Variance
• It is also possible to find a 100(1-๐ผ)% lower confidence bound or
upper confidence bound on ๐ 2 .
(๐ − 1)๐ 2
2
≤
๐
2
๐๐ผ,๐−1
and
2
(๐
−
1)๐
๐2 ≤ 2
๐1−๐ผ,๐−1
Are the 100(1-๐ผ)% lower and upper confidence bounds on ๐ 2 ,
respectively.
Choice of Sample Size for Variance
• Choosing the sample size when constructing a confidence interval for the
population variance or standard deviation (using the chi-square distribution) is not
straightforward, and it shares similar difficulties with the ๐ก-distribution case.
• Because
1. The chi-square distribution is not symmetric:
• Unlike the normal distribution, the chi-square distribution is skewed, especially for small sample
sizes.
• This skewness affects the width of the confidence interval in a nonlinear way, making it hard to
predict.
2. The confidence interval depends on percentiles of the chi-square distribution:
2
2
• The critical values ๐๐ผ/2,๐−1
and ๐1−๐ผ/2,๐−1
change with ๐, and their relationship to ๐ is nonlinear.
3. The interval depends on ๐ 2 , which is random:
• Just like in2the t-distribution case, the actual width of the interval depends on the sample
variance ๐ , which you don’t know in advance.
• Because of the nonlinear and skewed nature of the chi-square distribution, we often
try different values of ๐ to see what sample size gives us the desired confidence
interval width.
Example
• An automatic filling machine is used to fill bottles with liquid detergent.
• A random sample of2 20 bottles results in a sample variance of fill volume of ๐ 2 =
.0153 fluid ounce
• If the variance of fill volume is too large, an unacceptable proportion of bottles will
be under- or overfilled.
• We will assume that the fill volume is approximately normally distributed. A 95%
upper confidence bound is found
.
Large-Sample CI for a Population Proportion
• When estimating a population proportion ๐ using sample data, we use the sample
proportion:
๐
๐เท =
๐
where ๐ is the number of observations belonging to the class of interest in a sample of
size ๐.
• If the sample size ๐ is large (specifically, if ๐๐ ≥ 5 and ๐(1 − ๐) ≥ 5, the binomial
distribution of ๐ can be approximated by a normal distribution. Then:
๐=
is s approximately standard normal.
๐เท − ๐
๐ 1−๐
๐
• To construct a confidence interval for ๐, we use:
๐ −๐ง๐ผ/2 ≤
๐เท − ๐
๐ 1−๐
๐
≤ ๐ง๐ผ/2
≈1−๐ผ
• This may be arranged as
๐ ๐เท −๐ง๐ผ/2
• The quantity
๐ 1−๐
๐
๐ 1−๐
๐ 1−๐
≤ ๐ ≤ ๐เท + ๐ง๐ผ/2
๐
๐
≈ 1−๐ผ
เท The upper and lower limits of the confidence interval
is called the standard error of the point estimator ๐.
contain the unknown parameter ๐.
• Since ๐ is unknown, a satisfactory solution is to replace ๐ by ๐เท in the standard error, giving the approximate (1 −
๐ผ)100% confidence interval:
๐ ๐ฦธ −๐ง๐ผ/2
๐ฦธ 1 − ๐ฦธ
๐ฦธ 1 − ๐ฦธ
≤ ๐ ≤ ๐ฦธ + ๐ง๐ผ/2
๐
๐
Where ๐ง๐ผ/2 is the upper ๐ผ/2 percentage of the standard normal distribution.
Example
• In a random sample of 85 automobile engine crankshaft bearings, 10 have a
surface finish that is rougher than the specifications allow. Therefore, a point
estimate of the proportion of bearings in the population that exceeds the
roughness specification is
๐ 10
๐ฦธ = =
= .12
๐ 85
A 95% two-sided confidence interval for ๐ is:
.
Choice of Sample Size
• We can define the error in estimating ๐ by ๐เท as
๐ธ = ๐ − ๐เท
• We're approximately 100(1−α)% confident that the error is less than ๐ง๐ผ/2 ๐ 1 − ๐ /๐:
๐ธ ≤ ๐ง๐ผ/2 ๐ 1 − ๐ /๐
• For the previous example, we are 95% confident that the estimate ๐ฦธ = .12 differs from the
true ๐ by no more than .07.
• If we want the error to be smaller than some specified value ๐ธ, we can solve for the sample
size needed:
๐ง๐ผ/2 2
๐=
๐ 1−๐
๐ธ
This formula allows us to calculate how large a sample we need to estimate ๐ within a certain
margin of error ๐ธ, at a given confidence level.
Choice of Sample Size
• If no estimate of ๐ is available, we can use ๐ = .5, which maximizes ๐(1 − ๐) (its
maximum is 0.25).
• This gives a conservative (worst-case) estimate for required sample size:
๐ง๐ผ/2 2
๐=
(.25)
๐ธ
• This guarantees the error will be less than ๐ธ with at least 100(1 − ๐ผ)% confidence.
To summarize:
• Use a prior estimate of ๐ if available to get a more accurate ๐.
• If no estimate exists, use ๐ = .5 for the safest upper bound on required sample size.
• The smaller the margin of error ๐ธ, the larger the required sample size ๐.
Example
• How large a sample is required if we want to be 95% confident that the error in using ๐ฦธ to estimate ๐ is less
than 0.05 for the last example?
๐ง๐ผ/2 2
๐=
๐ฦธ 1 − ๐ฦธ
๐ธ
Using ๐ฦธ = .12 as an initial estimate of ๐, we find the required sample size as,
1.96
๐=
.05
2
. 12 1 − .12 ≅ 163
If we wanted to be at least 95% confident that our estimate ๐ฦธ of the true proportion ๐ was within 0.05 regardless
of the value of ๐,
๐ง๐ผ/2 2
1.96
๐=
.25 =
๐ธ
.05
2
.25 ≈ 385
• Notice that if we have information concerning the value of ๐, either from a preliminary sample or from past
experience, we could use a smaller sample while maintaining both the desired precision of estimation and the
level of confidence.
โ If we do know or can estimate ๐, we can reduce the sample size while still achieving the same confidence and
precision.
One-sided Confidence Bounds
• The approximate one-sided 100(1 − ๐ผ)% lower and upper
confidence bounds are
๐ฦธ −๐ง๐ผ
respectively.
๐เท 1−๐เท
๐
≤๐
and
๐ ≤ ๐ฦธ + ๐ง๐ผ
๐เท 1−๐เท
๐
Exercise
• A study in Knee Surgery, Sports Traumatology, Arthroscopy (2005)
reported that 25 of 37 meniscal tears (≈ 67.6%) located 3–6 mm
from the meniscus rim healed after surgery.
• (a) Calculate a two-sided 95% confidence interval on the
proportion of such tears that will heal.
(b) Calculate a 95% lower confidence bound on the proportion of
such tears that will heal.
Exercise
• Of 1000 randomly selected cases of lung cancer, 823 resulted in
death within 10 years.
• (a) Calculate a 95% two-sided confidence interval on the death
rate from lung cancer.
(b) Using the point estimate of ๐ obtained from the preliminary
sample, what sample size is needed to be 95% confident that the
error in estimating the true value of ๐ is less than 0.03?
(c) How large must the sample be if we wish to be at least 95%
confident that the error in estimating ๐ is less than 0.03,
regardless of the true value of ๐?