Professional Documents
Culture Documents
Confidence Intervals For A Single Sample: H.W. Kayondo C 1
Confidence Intervals For A Single Sample: H.W. Kayondo C 1
H.W. Kayondo 1
X̄ − µ
Z= √ (3)
σ/ n
Z has a standard normal distribution.
A confidence interval estimate for µ is an interval of the form l ≤ µ ≤ u,
where the end-points l and u are computed from the sample data. Because
different samples will produce different values of l and u, these end-points
are values of random variables L and U, respectively. Suppose that we can
determine values of L and U such that the following probability statement is
true:
P(L ≤ µ ≤ U) = 1 − α (4)
c
H.W. Kayondo
3
σ σ
!
P X̄ − zα/2 √ ≤ µ ≤ X̄ + zα/2 √ = 1 − α (6)
n n
From consideration of Equation (4), the lower and upper limits of the
inequalities in Equation (6) are the lower and upper confidence limits L and U,
respectively. This leads to the following definition.
Definition: If x̄ is the sample mean of size n from a normal population with
known variance σ2 , a 100(1 − α)% of CI is given by:
σ σ
x̄ − zα/2 √ ≤ µ ≤ x̄ + zα/2 √ (7)
n n
where zα/2 is the upper 100α/2 percentage point of the standard normal
distribution.
Example 1 ASTM Standard E23 defines standard test methods for notched bar impact
testing of metallic materials. The Charpy V-notch (CVN) technique measures impact
energy and is often used to determine whether or not a material experiences a ductile-to-
brittle transition with decreasing temperature. Ten measurements of impact energy (J )
on specimens of A238 steel cut at 60◦ C are as follows:
64.1, 64.7, 64.5, 64.6, 64.5, 64.3, 64.6, 64.8, 64.2, and 64.3
.
Solution
σ σ 1 1
x̄−zα/2 √ ≤ µ ≤ x̄+zα/2 √ = 64.46−1.96 √ ≤ µ ≤ 64.46+1.96 √ = 63.84 ≤ µ ≤ 65.08
n n 10 10
That is, based on the sample data, a range of highly plausible values for
mean impact energy for A238 steel at 60◦ C is 63.84J ≤ µ ≤ 65.08J.
Thus, the 99% CI is longer than the 95%. This is why we have a higher
level of confidence in the 99% confidence interval. Generally, for a fixed sample
size n and standard deviation σ, the higher the confidence level, the longer the
resulting CI.
The length of a confidence interval is a measure of the precision of estimation.
From the preceding discussion, we see that precision is inversely related to the
confidence level. It is desirable to obtain a confidence interval that is short
enough for decision-making purposes and that also has adequate confidence.
One way to achieve this is by choosing the sample size n to be large enough to
give a CI of specified length or precision with prescribed confidence.
Example 2 To illustrate the use of this procedure, consider the CVN test described in
the previous example, and suppose that we wanted to determine how many specimens
must be tested to ensure that the 95% CI on µ for A238 steel cut at 60◦ C has a length of
at most 1.0J.
Solution
Since the bound on error in estimation E is one-half of the length of the CI,
to determine n, we use Equation (8) with E = 0.5, σ = 1 and zα/2 = z0.025 = 1.96.
The required sample size is:
!2
zα/2 σ 2 1.96(1)
n= = = 15.37
E 0.5
Since n must be an integer, the required sample size is n = 16.
Notice the general relationship between sample size, desired length of the
confidence interval 2E, confidence level 100(1 − α), and standard deviation σ:
X̄ − µ
√
S/ n
has an approximately standard normal distribution. Consequently,
S S
x̄ − zα/2 √ ≤ µ ≤ x̄ + zα/2 √ (9)
n n
is a large sample confidence interval for µ, with confidence level of
100(1 − α)%. Equation (9) holds regardless of the shape of the population
distribution. Generally n should be at least 40 to use this result reliably. The
central limit theorem generally holds for n ≤ 30, but the larger sample size is
recommended here because replacing σ by S in Z results in additional variability.
Exercise
1. For a normal population with known variance σ2 , answer the following
questions:
(a) What is the confidence level for the interval:
x̄ − 2.14 √σn ≤ µ ≤ x̄ + 2.14 √σn ?
(b) What is the confidence level for the interval:
x̄ − 2.49 √σn ≤ µ ≤ x̄ + 2.49 √σn ?
(c) What is the confidence level for the interval:
x̄ − 1.85 √σn ≤ µ ≤ x̄ + 1.85 √σn ?
P(−tα/2,n−1 ≤ T ≤ tα/2,n−1 ) = 1 − α
It can be further be simplified as:
X̄ − µ
!
P − tα/2,n−1 ≤ √ ≤ tα/2,n−1 = 1 − α
S/ n
10 Engineering Mathematics IV– EMT 2201
where tα/2,n−1 is the upper 100α/2 percentage point of the t distribution with
n − 1 degrees of freedom.
Example 3 An article in the journal Materials Engineering (1989, Vol. II, No. 4, pp.
275–281) describes the results of tensile adhesion tests on 22 U-700 alloy specimens.
The load at specimen failure is as follows (in megapascals):
19.8, 15.4, 11.4, 19.5, 10.1, 18.5, 14.1, 8.8, 14.9, 7.9, 17.6
13.6, 7.5, 12.7, 16.7, 11.9, 15.4, 11.9, 15.8, 11.4, 15.4, 11.4
Compute 95% CI on µ.
Solution
From the computations done, the sample mean x̄ = 13.71, and the sample
standard deviation s = 3.55. Since n = 22, we have n − 1 = 21 degrees of freedom
for t, so t0.025,21 = 2.080. The resulting CI is:
√ √ √ √
x̄−tα/2,n−1 S/ n ≤ µ ≤ x̄+tα/2,n−1 S/ n = 13.71−2.080(3.55)/ 22 ≤ µ ≤ 13.71+2.080(3.55)/ 22
Exercise
1. Find the values of the following percentiles: t0.025,15 , t0.05,10 , t0.10,20 , t0.005,25
and t0.001,30
2. Determine the t-percentile that is required to construct each of the following
confidence intervals:
c
H.W. Kayondo
11
2216, 2225, 2318, 2237, 2301, 2255, 2249, 2281, 2275, 2204, 2263, 2295
(n − 1)S2
X2 = (12)
σ2
has a chi-square (χ2 ) distribution with n − 1 degrees of freedom.
12 Engineering Mathematics IV– EMT 2201
P(χ21−α/2,n−1 ≤ X2 ≤ χ2α/2,n−1 ) = 1 − α
It follows that:
(n − 1)S2
P(χ21−α/2,n−1 ≤ ≤ χ2α/2,n−1 ) = 1 − α
σ2
After simplification, one obtains:
(n − 1)S2 (n − 1)S2
!
P 2 ≤ σ2 ≤ 2
χα/2,n−1 χ1−α/2,n−1
(n − 1)S2 (n − 1)S2
≤ σ2 ≤ 2 (13)
χα/2,n−1
2
χ1−α/2,n−1
where χ2α/2,n−1 and χ21−α/2,n−1 are upper and lower 100α/2 percentage points
of the chi-square distribution with n − 1 degrees of freedom, respectively. A
confidence interval for σ has lower and upper limits that are the positive square
roots of the corresponding limits in Equation (13).
Example 4 An automatic filling machine is used to fill bottles with liquid detergent. A
random sample of 20 bottles results in a sample variance of fill volume of s2 = 0.0153
( f luid ounces)2 . If the variance of fill volume is too large, an unacceptable proportion
of bottles will be under or overfilled. Assuming that the fill volume is approximately
normally distributed, construct a 95% confidence interval for the variance σ2
Solution
Since α = 0.05 and from the Tables, χ2α/2,n−1 = χ20.025,19 = 32.852 and
χ21−α/2,n−1= χ20.975,19 = 8.907. From Equation (13), we have:
19(0.0153) 19(0.0153)
≤ σ2 ≤ = 0.0088 ≤ σ2 ≤ 0.0326
32.853 8.907
Therefore, 95% CI for σ2 is 0.0088 ≤ σ2 ≤ 0.0326. We can easily find 95% CI
for σ by taking square roots and this gives: 0.0938 ≤ σ ≤ 0.1806.
c
H.W. Kayondo
13
Exercise
1. Determine the values of the following percentiles: χ20.05,10 , χ20.025,15 , χ20.01,12 ,
χ20.95,20 , χ20.99,18 , χ20.995,16 and χ20.005,25 .
X − np P̂ − p
Z= p = p
np(1 − p) p(1 − p)/n
is approximately standard normal.
To construct the confidence interval on p, we note that:
P(−zα/2 ≤ Z ≤ zα/2 ) ≈ 1 − α
It follows: !
P̂ − p
P − zα/2 ≤ p ≤ zα/2 ≈ 1 − α
p(1 − p)/n
After rearranging, one obtains:
14 Engineering Mathematics IV– EMT 2201
!
p p
P P̂ − zα/2 p(1 − p)/n ≤ p ≤ P̂ + zα/2 p(1 − p)/n ≈ 1 − α (14)
p
The quantity p(1 − p)/n in Equation (14) is called the standard error of the
point estimator P̂. We now replace p by P̂ in the standard error which results in:
q q !
P P̂ − zα/2 P̂(1 − P̂)/n ≤ p ≤ P̂ + zα/2 P̂(1 − P̂)/n ≈ 1 − α (15)
where zα/2 is the upper α/2 percentage point of the standard normal distri-
bution.
This procedure depends on the adequacy of the normal approximation
to the binomial. To be reasonably conservative, this requires that np and
n(1 − p) be greater than or equal to 5. In situations where this approximation is
inappropriate, particularly in cases where n is small, other methods must be
used. Tables of the binomial distribution could be used to obtain a confidence
interval for p. However, we could also use numerical methods based on the
binomial probability mass function that are implemented in computer programs.
Solution
A point estimate of the proportion of bearings in the population that exceeds the
roughness specification is p̂ = x/n = 10/85 = 0.12. A 95% confidence interval for
p is computed from Equation (16) as:
p p
p̂ − z0.025 p̂(1 − p̂)/n ≤ p ≤ p̂ + z0.025 p̂(1 − p̂)/n
1.962
n= 0.5(0.5) ≈ 385.
0.052
Note: If we have information concerning the value of p, 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.
16 Engineering Mathematics IV– EMT 2201
Exercise
1. Of 1000 randomly selected cases of lung cancer, 823 resulted in death
within 10 years. Construct a 95% confidence interval on the death rate
from lung cancer.
2. How large a sample would be required in Exercise 1 to be at least 95%
confident that the error in estimating the 10-year death rate from lung
cancer is less than 0.03?