Tutorial 10 (chapter 6 part1&2)
cluster sampling
Solution: M is Known, we use estimator 1:
𝑁 = 30, 𝑀𝑜 = 250 , 𝑎𝑛𝑑 𝑛 = 6
𝑀𝑜 250
̅=
𝑀 = = 8.3333
𝑁 30
Estimate of the average amount of times a video cassette of the serial was hired from a dealer:
𝑛 𝑛
𝑁 1
𝑦̅𝑐𝑙 = ∑ 𝑦𝑖. = ∑ 𝑦𝑖.
𝑛 𝑀𝒐 ̅𝑛
𝑀
𝑖=1 𝑖=1
1 396
= (90 + 35 + 67 + 36 + 132 + 36) = = 7.9200
8.3333 ∗ 6 49.9998
Estimate of variance:
𝑛
(𝑁 − 𝑛) 1
𝑣𝑎𝑟(𝑦̅𝑐𝑙 ) = ̅ 𝑦̅𝑐𝑙 )2
∑(𝑦𝑖. − 𝑀
̅
𝑁𝑛 𝑀 2 𝑛 − 1
𝑖=1
̅ 𝑦̅𝑐𝑙 = (8.3333)(7.9200) = 65.9997
𝑀
30 − 6 1
=( 2
) [(90 − 65.9997)2 + (35 − 65.9997)2 +
30 ∗ 6 ∗ (8.3333) 5
(67 − 65.9997)2 + (36 − 65.9997)2 + (132 − 65.9997)2 + (36 − 65.9997)2 ]
= (0.0004) ∗ (7694) = 2.95452
Using above calculated estimate of variance, the standard error of mean will be
𝑠𝑑(𝑦̅𝑐𝑙 ) = √𝑣𝑎𝑟(𝑦̅𝑐𝑙 ) = √2.95452 = 1.7189
The required confidence limits for population mean are obtained as
𝑦̅𝑐𝑙 ± 𝑍1−𝛼 √𝑣𝑎𝑟(𝑦̅𝑐𝑙 )
2
7.9200 ± 2 ∗ (1.7189)
[ 4.4822, 11.3578]
> y = c(90,35,67,36,132,36)
> [Link] = c(7,3,6,4,9,4)
>
> Mo=250
> N= 30
> n=length(y)
>
> ybar.c = (1/(n*(Mo/N)))*sum(y)
> ybar.c
[1] 7.92
>
> s2.c= sum((y-mean(y))^2 )/(n-1)
> var.c = ((N-n)/(N*n*(Mo/N)^2))*s2.c
> var.c
[1] 2.954496
>
> ME = 2*sqrt(var.c) #margin of error(precision of estimate)
> [Link]= ybar.c-ME
> [Link]= ybar.c+ME
> [Link]; [Link]
[1] 4.482271
[1] 11.35773
> # for finding the estimate of total?!!!!
> # when Mo is known, we can use both estimators BUT
> #check correlation between cluster means and the size of cluster
> # if low, estimator 2 is preferred, if high, estimator 1 is preferred.
> y_bar=y/[Link]
> cor(y_bar,[Link])
[1] 0.8025784
#using the first method
> ytotal.c= Mo*ybar.c
> ytotal.c
[1] 1980
>
> var_ytotal.c= Mo^2 *var.c
> var_ytotal.c
[1] 184656
> ytotal.c= Mo*ybar.c
> ytotal.c
[1] 1980
>
> var_ytotal.c= Mo^2 *var.c
> var_ytotal.c
[1] 184656
Solution: 𝑀𝑜 = ∑𝑁
𝑖=1 𝑀𝑖 is unknown, we use estimator 2
𝑁 = 70, 𝑀𝑜 = 𝑢𝑛𝑘𝑜𝑤𝑛 , 𝑎𝑛𝑑 𝑛 = 9
Estimate of the average metal alertness for the population of persons aged above 80 years:
Village 𝑀𝑖 𝑦𝑖. 𝑦̅𝑖
1 7 32 4.5714
2 11 61 5.5455
3 4 25 6.25
4 5 30 6
5 8 48 6
6 6 32 5.3333
7 4 22 5.5
8 7 43 6.1429
9 9 49 5.4444
𝑛
1
𝑦̅𝑐𝑙 = ∑ 𝑦̅𝑖
𝑛
𝑖=1
1 50.7875
= (4.5714 + 5.5455 + 6.25 + 6 + 6 + 5.3333 + 5.5 + 6.1429 + 5.4444) =
9 9
= 5.6431
Estimate of variance:
𝑛
(𝑁 − 𝑛) 1
𝑣𝑎𝑟(𝑦̅𝑐𝑙 ) = ∑(𝑦𝑖 − 𝑦̅𝑐𝑙 )2
𝑁𝑛 𝑛 − 1
𝑖=1
70 − 9 1
=( ) [(4.5714 − 5.6431)2 + (5.5455 − 5.6431)2 +
70 ∗ 9 8
(6.25 − 5.6431)2 + (6 − 5.6431)2 + (6 − 5.6431)2 + (5.3333 − 5.6431)2
+ (5.5 − 5.6431)2 + (6.1429 − 5.6431)2 + (5.4444 − 5.6431)2 ]
= (0.0121) ∗ (2.186885) = 0.0265
Using above calculated estimate of variance, the standard error of mean will be
𝑠𝑑(𝑦̅𝑐𝑙 ) = √𝑣𝑎𝑟(𝑦̅𝑐𝑙 ) = √0.0265 = 0.1628
The required confidence limits for population mean are obtained as
𝑦̅𝑐𝑙 ± 𝑍1−𝛼 √𝑣𝑎𝑟(𝑦̅𝑐𝑙 )
2
5.6431 ± 2 ∗ (0.1628)
[ 5.3175, 5.9687]
> #question 10.6 page 278
> y = c(32,61,25,30,48,32,22,43,49)
> [Link] = c(7,11,4,5,8,6,4,7,9)
> y_bar=y/[Link]
> y_bar
[1] 4.571429 5.545455 6.250000 6.000000 6.000000 5.333333 5.500000 6.142857 5.444444
>
>
> N= 70
> n=length(y)
>n
[1] 9
> ybar.c = (1/n)*sum(y_bar)
> ybar.c
[1] 5.643058
> mean(y_bar)
[1] 5.643058
> s2.c= sum((y_bar-mean(y_bar))^2 )/(n-1)
> var.c = ((N-n)/(N*n))*s2.c
> var.c
[1] 0.02646663
>
> ME = 2*sqrt(var.c) #margin of error(precision of estimate)
> [Link]= ybar.c-ME
> [Link]= ybar.c+ME
> [Link]; [Link]
[1] 5.317686
[1] 5.968429
>
> # for finding the estimate of total?!!!!
> # when Mo not known, we only can use estimator 1
>
> ytotal.c= (N/n)*sum(y)
> ytotal.c
[1] 2660
>
> var_ytotal.c= (N*(N-n)/(n*(n-1)))*sum((y- (ytotal.c/N))^2)
> var_ytotal.c
[1] 79232.22
Example 10.2 and 10.3 by R are going to very similar to exercise 10.4 and 10.6, so It’s left for
students as HW