Stat 475 Notes 8: y B X y B X y BX N SEB NNX N X Is Unknown, Then We Substitute The Sample Mean X For It
Stat 475 Notes 8: y B X y B X y BX N SEB NNX N X Is Unknown, Then We Substitute The Sample Mean X For It
Stat 475 Notes 8: y B X y B X y BX N SEB NNX N X Is Unknown, Then We Substitute The Sample Mean X For It
� n � 1 i�S
�( y - Bx
i
ˆ )
i
2
SE ( Bˆ ) = �
1- � 2
� N �nxU n -1
If xU is unknown, then we substitute the sample mean x for it.
tˆstr H
N
ystr = = � h yh
N h =1 N
N h =1 � N h �
�N �nh
As always, the standard error of an estimator is the square
root of the estimated variance: SE ( ystr ) = Varˆ ( ystr ) .
If either (1) the sample sizes within each stratum are large
or (2) the sampling design has a large number of strata, an
approximate 95% confidence interval for the population
mean yU is
ystr �1.96* SE ( ystr )
2
Some survey researchers use the 0.975 quantile of the t-
distribution with n - H degrees of freedom instead of 1.96
(this multipler converges to 1.96 as n - H gets large).
towna=c(35,43,36,39,28,28,29,25,38,27,26,32,29,40,35,41,37,31,45,34);
townb=c(27,15,4,41,49,25,10,30);
rural=c(8,14,12,15,30,32,21,20,34,7,11,24);
mean(towna)
> [1] 33.9
mean(townb)
> [1] 25.125
mean(rural)
> [1] 19
sd(towna)
> [1] 5.94625
sd(townb)
> [1] 15.24502
sd(rural)
> [1] 9.36143
A good way to view the key features of these samples and look
for any outliers or unusual features is to make side-by-side
boxplots.
4
There do not appear to be any outliers or unusual features to be
concerned about.
Note that N = 155, N = 62, N = 93, N = 155 + 62 + 93 = 310 Our estimate of the
1 2 3
population mean is
H
N
ystr = � h yh =
h =1 N
1
[ (155)(33.90) + (62)(25.12) + (93)(19) ] = 27.7
310
5
2
H
� nh � 2
�N h �sh
SE ( ystr ) = �� 1- �N �n =
�
h =1 � N h �
� � h
�
� 155 �
2 2
�155 �5.95 � 62 �
2 2
�62 �15.25 � 93 � �93 �9.36 �
2 2
�
�1 - �
� � + 1
� - �
� � + 1
� - �
� � �
� 310 �
� �310 � 20 � 310 � �310 � 8 � 310 �
�310 � 12 �
= 1.40
��w
h =1 j�Sh
hj yhj
ystr = H .
��w
h =1 j�S h
hj
Stratum Nh nh whj
8
minimize the variance for a fixed cost, we can prove, using
calculus, that the optimal allocation has nh proportional to
N h Sh
ch
for each h. Thus, the optimal sample size in stratum h is
� N h Sh �
� �
c
nh = �H h �n
� N l Sl �
�� �
�l =1 cl �
We thus sample heavily within a stratum if
The stratum accounts for a large part of the population.
The variance within the stratum is large; we sample more
heavily to compensate for the heterogeneity.
Sampling in the stratum is inexpensive.
h =1
9
Example 1 continued. The advertising firm finds that obtaining
an observation from a rural household costs more than obtaining
a response in town A or B. The increase is due to the costs of
traveling from one rural household to another. The cost per
observation in each town is estimated to be $9 (that is,
c1 = c2 = 9 ) and the cost per observation in the rural area $16
(that is, c3 = 16 ). The stratum standard devations (approximated
by the strata sample variances from a prior survey) are
S1 �5, S2 �15, S3 �10 . Find the overall sample size n and the
stratum sample sizes n1 , n2 , n3 that allow the firm to estimate, at
minimum cost, the average television-viewing time with a
margin of error equal to 2 hours.
We have
H
155(5) 62(15) 93(10)
�N h Sh / ch =
h =1 9
+
9
+
16
= 800.83
H
�N S
h =1
h h ch = 155(5) 9 + 62(15) 9 + 93(10) 16 = 8835
Thus,
10
�H �
�H �
�
�
�
h =1
N h S h / ch �
�
�
�
�h =1
N h S h ch �
�
n= H
N D + �N h Sh2
2
h =1
(800.83)(8835)
= = 57.42 �58
(310) 21 + 27,125
Then,
� �
� NS / c � � 155(5) / 3 �
n1 = n �3 1 1 1
�= 58 � �= 58(.32) = 18.5 �18
� N S / c � �800.83 �
�� h h h �
�h =1 �
Similarly,
� 62(15) / 3 �
n2 = 58 � � = 58(.39) = 22.6 �23
� 800.83 �
�93(10) / 4 �
n3 = 58 � �= 58(0.29) = 16.8 �17
� 800.83 �
Hence, we should select 18 households at random from town A,
23 from town B, and 17 from the rural area. We can then
estimate the average number of hours spent watching television
at minimum cost with a margin of error of 2 hours.
11
If all variances in strata and costs are equal, proportional
allocation is the same as optimal allocation. If we know the
variances within each stratum and they differ, optimal allocation
gives a smaller variance than proportional allocation. But
optimal allocation is a more complicated scheme; often the
simplicity and self weighting property of proportional allocation
are worth the extra variance. In addition, the optimal allocation
will differ for each variable being measured, whereas the
proportional allocation depends only on the number of
population units in each stratum.
Let y , ystr , pa , ystr ,na be for a sample of size n the mean from a
simple random sample, a proportional allocation and the
Neyman allocation respectively. Ignoring the finite population
correction,
2
1 H Nh
Var ( ystr , pa ) - Var ( ystr ,na ) = � ( S h - S ) ,
n h =1 N
H
N
where S = � h S h
h =1 N
and
2
1 H Nh
Var ( y ) - Var ( ystr , pa ) = � ( yhU - yU ) .
n h =1 N
12
the variances of the strata are all the same, but if the variances
differ, the optimal allocation is better.
13