
388 10 Two Samples
polyethylene-covered tree wire had X
2
= 12 failures in a sample of t
2
= 467.9
thousand foot-years. We are interested in a 95% confidence interval for the
ratio of population failure rates.
The associated MATLAB file
ratiopoissons.m calculates the 95% confi-
dence interval for the ratio
λ = λ
1
/λ
2
using Wilson’s proposal (“add two suc-
cesses and two failures”). There,
ˆ
p
= (X
1
+2)/(n +4), and the interval for p
is [0.7564, 0.9141]. After transforming the bounds to the
λ domain, the final
interval is [1.3461,4.6147].
%CI for Ratio of Two Poissons
X1=69; t1 = 1079.6;
X2=12; t2=467.9;
n=X1 + X2;
phat = X1/n; %0.8519
phat1 = (X1 +2)/(n + 4); %0.8353
qhat1 = 1 - phat1; %0.1647
% Agresti-Coull CI for prop was selected.
LBp=phat1-norminv(0.975)
*
sqrt(phat1
*
qhat1/(n+4)) %0.7564
UBp=phat1+norminv(0.975)
*
sqrt(phat1
*
qhat1/(n+4)) %0.9141
LBlam = LBp/(1 - LBp)
*
t2/t1; %back to lambda
UBlam = UBp/(1 - UBp)
*
t2/t1;
[LBlam, UBlam] %[1.3461 4.6147]
%Frame size in Poisson Sampling
lambar1 = 69/1079.6; %0.0639
lambar2 = 12/467.9; %0.0256
w = 2;
td =4
*
norminv(0.995)^2
*
(1/lambar1+1/lambar2)/...
(asin(lambar2/lambar1
*
w/2)); %3511.8
tr = 4
*
norminv(0.995)^2
*
...
( 1/lambar1 + 1/lambar2 )/(log(w))^2; %3018.1
Cox (1953) gives an approximate test and confidence interval for the ratio
that uses an F distribution. He shows that the statistic
F
=
t
1
λ
1
t
2
λ
2
X
2
+1/2
X
1
+1/2
has an approximate F distribution with 2X
1
+1 and 2X
2
+1 degrees of freedom.
From this, an approximate (1
−α)100% confidence interval for λ
1
/λ
2
is
·
t
2
t
1
X
1
+1/2
X
2
+1/2
F
2X
1
+1,2X
2
+1,α/2
,
t
2
t
1
X
1
+1/2
X
2
+1/2
F
2X
1
+1,2X
2
+1,1−α/2
¸
.
Suppose we want to replicate this study using a new shipment of each type
of wire. We want to estimate the failure rate ratio with 99% confidence and
UB
λ
/LB
λ
=2. Using
λ
1
=69/1079.6 =0.0691 and
λ
2
=12/467.9 =0.0833 as our
planning estimates of λ
1
and λ
2
, we would sample t =
4(2.5758)
2
(1/0.0691+1/0.0833)
log
2
(2)
=
3018 foot-years from each shipment. If we want to complete the study in k
years, then we would sample 3018/k linear feet of wire from each shipment.