Robert_V._Hogg,_Joseph_W._McKean,_Allen_T._Craig

(Jacob Rumans) #1
4.2. Confidence Intervals 241

In practice, we often do not know if the population is normal. Which confidence
interval should we use? Generally, for the sameα, the intervals based ontα/ 2 ,n− 1
are larger than those based onzα/ 2. Hence the interval (4.2.3) is generally more
conservative than the interval (4.2.6). So in practice, statisticians generally prefer
the interval (4.2.3).
Occasionally in practice, the standard deviationσis assumed known. In this
case, the confidence interval generally used forμis (4.2.6) withsreplaced byσ.


Example 4.2.3(Large Sample Confidence Interval forp).LetXbe a Bernoulli
random variable with probability of successp,whereXis 1 or 0 if the outcome is
success or failure, respectively. SupposeX 1 ,...,Xnis a random sample from the
distribution ofX.Letp̂=X be the sample proportion of successes. Note that
̂p=n−^1


∑n
i=1Xiis a sample average and that Var(p̂)=p(1−p)/n. It follows
immediately from the CLT that the distribution ofZ=(p̂−p)/



p(1−p)/nis
approximatelyN(0,1). Referring to Example 5.1.1 of Chapter 5, we replacep(1−p)
with its estimatep̂(1−p̂). Then proceeding as in the last example, an approximate
(1−α)100% confidence interval forpis given by


(p̂−zα/ 2


p̂(1−p̂)/n,p̂+zα/ 2


̂p(1−̂p)/n), (4.2.7)

where


p̂(1−p̂)/nis called the standard error ofp̂.
In Example 4.1.2 we discussed a data set involving hip replacements, some
of which were squeaky. The outcomes of a hip replacement were squeaky and
non-squeaky which we labeled as success or failure, respectively. In the sam-
ple there were 28 successes out of 143 replacements. Using R, the 99% confi-
dence interval forp, the probability of a squeaky hip replacement, is computed by
prop.test(28,143,conf.level=.99), which results in the interval (0. 122 , 0 .298).
So with 99% confidence, we estimate the probability of a squeaky hip replacement
to be between 0.122 and 0.298.


4.2.1 Confidence Intervals for Difference in Means


A practical problem of interest is the comparison of two distributions, that is, com-
paring the distributions of two random variables, sayXandY. In this section, we
compare the means ofXandY. Denote the means ofXandYbyμ 1 andμ 2 , respec-
tively. In particular, we obtain confidence intervals for the difference Δ =μ 1 −μ 2.
Assume that the variances ofXandYare finite and denote them asσ^21 =Var(X)
andσ 22 =Var(Y). LetX 1 ,...,Xn 1 be a random sample from the distribution ofX
and letY 1 ,...,Yn 2 be a random sample from the distribution ofY. Assume that
the samples were gathered independently of one another. LetX=n− 11


∑n 1
i=1Xi
andY =n− 21

∑n 2
i=1Yibe the sample means. Let
Δ=̂ X−Y.ThestatisticΔiŝ
an unbiased estimator of Δ. This difference,Δ̂−Δ, is the numerator of the pivot
random variable. By independence of the samples,


Var(Δ) =̂

σ 12
n 1

+

σ 22
n 2

.
Free download pdf