Robert_V._Hogg,_Joseph_W._McKean,_Allen_T._Craig

(Jacob Rumans) #1
584 Nonparametric and Robust Statistics

10.2.3 Confidence Interval for the Median

In Section 4.4, we obtained a confidence interval for the median. In this section, we
derive this confidence interval by inverting the sign test. Based on the monotonicity
ofS(θ), the derivation is straightforward, but the technique will prove useful in
subsequent sections of this chapter.
Suppose the random sampleX 1 ,X 2 ,...,Xnfollows the location model (10.2.1).
In this subsection, we develop a confidence interval for the medianθofXi. Assum-
ing thatθis the true median, the random variableS(θ), (10.2.9), has a binomial
b(n, 1 /2) distribution. For 0<α<1, selectc 1 so thatPθ[S(θ)≤c 1 ]=α/2. Hence
we have
1 −α=Pθ[c 1 <S(θ)<n−c 1 ]. (10.2.36)


Recall in our derivation for thet-confidence interval for the mean in Chapter 3,
we began with such a statement and then “inverted” the pivot random variable
t=



n(X−μ)/S(Sin this expression is the sample standard deviation) to obtain
an equivalent inequality withμisolated in the middle. In this case, the function
S(θ) does not have an inverse, but it is a decreasing step function ofθand the
inversion can still be performed. As depicted in Figure 10.2.2,c 1 <S(θ)<n−c 1 if
and only ifYc 1 +1≤θ<Yn−c 1 ,whereY 1 <Y 2 <···<Ynare the order statistics of
the sampleX 1 ,X 2 ,...,Xn. Therefore, the interval [Yc 1 +1,Yn−c 1 )isa(1−α)100%
confidence interval for the medianθ. Because the order statistics are continuous
random variables, the interval (Yc 1 +1,Yn−c 1 ) is an equivalent confidence interval.
Ifnis large, then there is a large sample approximation toc 1 .Weknowfrom
the Central Limit Theorem thatS(θ) is approximately normal with meann/2and
variancen/4. Then, using the continuity correction, we obtain the approximation


c 1 ≈

n
2

zα/ 2


n
2

1
2
, (10.2.37)

where Φ(−zα/ 2 )=α/2; see Exercise 10.2.7. In practice, we use the closest integer
toc 1.


Example 10.2.5(Example 10.2.1, Continued). There are 20 data points in the
Shoshoni basket data. The sample median of the width to the length is 0.5(0.628 +
0 .654) = 0.641. Because 0.021 =PH 0 (S(0.618)≤5), a 95.8% confidence interval
forθis the interval (y 6 ,y 15 )=(0. 606 , 0 .672), which includes 0.618, the ratio of the
width to the length, which characterizes the golden rectangle.
Currently, there is not an intrinsic R function for the one-sample sign analysis.
The R functiononesampsgn.R, which can be downloaded at the site listed in the
Preface, computes this analysis. For these data, its default 95% confidence interval
is the same as that computed above.


EXERCISES
10.2.1.Sketch Figure 10.2.2 for the Shoshoni basket data found in Example 10.2.1.
Show the values of the test statistic, the point estimate, and the 95.8% confidence
interval of Example 10.2.5 on the sketch.
Free download pdf