Exercise Set 9 Statistics AO Løst

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Problem Set 9

Due date: tutorial session in week 17

Question 1:

a) The probability that everybody in the sample is aged 18 or older is:

The person, I, in the sample is aged 18 and below is equal to p.


The probability that all the five test persons in the sample are over 18 is equal to:

(
P per
18
1 2
, per … person
18
5
18
=¿ )
(
¿ P person
1
18 )(
· person
2
18 ) 5
· …· P( person )
18

5
¿ ( 1− p ) · ( 1− p ) · …· ( 1− p ) =( 1− p )
Because there are five persons, we raise the parentheses to 5.

b) We will find the expected value of the sample average and the variance:

We note that X i can take two values only:


- 1, the person is under 18, with probability p
- 0, the person is over 18, with probability (1− p)

This gives that X i follows a Bernoulli distribution. The mean and variance of X i are:

E ( X i) =E ( X ) =μ= p

2
Var ( X i ) =Var ( X )=σ = p·(1− p)

The sample average:


E ( X )=μ= p

The variance of the sample average then becomes:

2
σ p·(1− p)
Var ( X )= =
n 5

c) If p=0.3 then the sample average and variance become:

E ( X )=μ= p=0.3
2
σ p·(1− p) 0.3·(1−0.3)
Var ( X )= = = =0.042
n 5 5
d) Discuss…. (se løsningen for dette)

Question 2:

a) The nurse should select a random child out of the 2000 children at each draw. For this to
become a simple random sample the nurse should not eliminate a child from the list after
the person’s name is drawn - this would also indicate that the same child may be selected
more than once in the sample.

b) The expected value of the sample average is:

E ( X )=μ=140 cm
c) The variance:

2
σ 64 8
Var ( X )=
= = =0 , 32
n 200 25
d) The approximate distribution of the sample average:

The sample is large, so it will approximately follow a normal distribution with mean value 140cm
and variance 0.32:
X N (140 , 0.32)

e) The probability that the sample average will be within 2cm of the populations mean value:

We want to calculate the probability that ( 140−2 ) ≤ X ≤(140+2)


For this we use the formulas for calculating probabilities for a normal distribution:

142−140
P ( 138 ≤ X ≤ 142 )=ϕ
(
√ 0.32
−ϕ
) (
138−140
√ 0.32 )
=ϕ ( 3.54 )−ϕ (−3.54 )=0.9996

f) A sample with 90% probability of the average being within 1 cm of the populations mean
value:

We want to find the probability that ( 140−1 ) ≤ X ≤(140+1) is equal to 0.9. With the current
sample size, the probability will then be:

P ( 13 9 ≤ X ≤ 14 1 )=ϕ
( 14√1−140
0.32 ) −ϕ
( √0.32 )
13 9−140
=ϕ ( 1.77 )−ϕ (−1.77 )=0.92

Se Excel fil for svar. We will be 90% sure, if we pick a sample size of 173 students.

Question 3:

a) The mean value of X in the whole population:


To find the mean value of X we need to determine the weight of each stratum w j in the
population.
The weights for each stratum are:
N1 105 35
w 1= 4 = = =0 ,32
105+76+57+ 89 109
∑ Nj
j=1

N2 76 76
w 2= 4
= = =0 , 23
105+76+57+ 89 327
∑ Nj
j =1

N3 57 19
w 3= 4
= = =0 ,17
105+76+57+ 89 109
∑ Nj
j =1

N4 89 89
w 4= = = =0 ,27
4
105+76 +57+89 327
∑Nj
j=1

The mean value of X in the population then become:


4
μ=E ( X )=∑ μ j · w j
j=1

μ= ( 6.5· 0.32 ) + ( 8.4 ·0.23 )+ ( 12.4 ·0.17 ) + ( 3.6 · 0.27 ) ≈ 7,092(7.18)

Verify the variance is equal to 11.86?

b) The variance of the sample average:

The variance of the sample average when using simple random sampling is equal to:

2
σ 11.86
Var ( X )= = =0 , 30
n 40

c) Determine the sample sizes from each stratum, also determine the variance of the
stratified sample average:

We use proportional allocation, then it becomes:

n1=w1 · n=0.32 · 40=13

n2 =w2 · n=0.23 · 40=9


n3 =w3 · n=0.17 · 40=7

n 4=w4 · n=0.27 · 40=11

The variance of the stratified sample average when using proportional allocation is equal to:
Var ¿

1
· ( 4.34 · 0.32+ 2.33· 0.23+3.52 · 0.17+2.12 ·0.27 ) ≈ 0,078
40

d) Determine the sample sizes using optimal allocation and determine the variance of the
stratified the sample average:

When using optimal allocation, the number of observations in each stratum is equal to:

σ1· w1 √ 4.34 · 0.32


n1=n· =40 · =15
4
√ 4.34 ·0.32+ √2 .33 ·0.23+ √3.52 · 0.17+ √ 2.12· 0.27
∑σ jwj
j=1

σ2· w2 √2.33 · 0.23


n2 =n· =40 · =8
4
√ 4.34 ·0.32+ √2 .33 ·0.23+ √3.52 · 0.17+ √ 2.12· 0.27
∑σ jwj
j=1

σ3· w3 √3.52 · 0.17


n3 =n· =40 · =8
4
√ 4.34 ·0.32+ √2 .33 ·0.23+ √3.52 · 0.17+ √ 2.12 ·0.27
∑ σjwj
j=1

σ 4 · w4 √ 2.12· 0. 27
n 4=n· =40 · =9
4
√ 4.34 · 0.32+ √ 2.33 · 0.23+ √ 3.52 ·0.17+ √2.12 · 0.27
∑ σ j wj
j =1

The variance of the stratified sample average when using optimal allocation is equal to:

Var ( X )=¿ ¿

2
( √ 4.34 · 0.32+ √ 2.33 · 0.23+ √ 3.52· 0.17+ √2.12 · 0.27 )
=0,076
40

e) Compare the variances from b) - d)…

f) Calculate the optimal sample size from the various strata if you select without replacement
- also determine the variance:

If we now select without replacement in each stratum, the optimal sample size for each will be:
n1=n·
σ 1 · w1 ·
√ N1
N 1−1


4
Nj
∑ σ j · wj · N j−1
j=1

n1=40 ·
√ 4.34 ·0.32 ·
√ 105
105−1
=15
√ 4.34 · 0.32 ·

105
10 4
+ √ 2.33 · 0.23·
76
75 √
+ √ 3.52 ·0.17 ·
75
56
+ √ 2.12 ·0.27 ·

89
88 √
n2 =40 ·
√2.33 · 0. 23·
√ 76
76−1
=8
√ 4.34 · 0.32 ·

105
104
+ √ 2.33 ·0.23 ·
76
75 √
+ √ 3.52· 0.17 ·
57
56 √
+ √ 2.12· 0.27 ·
89
88 √
n3 =40 ·
√3.52 · 0.17 ·
√ 57
57−1
=8
√ 4.34 ·0.32 ·

105
104
+ √ 2.33 ·0.23 ·
76
75 √
+ √ 3.52· 0.17 ·
57
56
+ √ 2.12· 0.27 ·
√89
88 √
n 4=40·
√ 2.12· 0. 27 ·
√ 89
89−1
=9
√ 4.34 · 0.32·

105
104
+ √ 2.33 · 0.23 ·
76
75 √
+ √ 3.52 · 0.17 ·
57
56 √
+ √ 2.12 · 0.27 ·
89
88 √
The variance of the stratified sample average, using optimal allocation is:

( ( ))
4 2
σ Nj n
Var ( X )=∑ w · j·
2
j · 1− j
j=1 n j N j−1 Nj

0.322 ·
4.34 105
·
15 104
· 1− (
15
105 )
+ 0.232 ·
2.33 76
· · 1−
8 75
8
76 (
+ 0.172 ·
3.52 57
· · 1−
8 56
8
57 )
+0.27 2 ·
2.12 89
· · 1−
9 88
9
89 ( )
=0 .07 ( )
Question 4

a) Find the sample sizes for the different strata with proportional of a total sample size of
n=30

The fraction of each type in the population is equal to:


N small 238 238
w small= = = ≈ 0 , 69
N small+ N medium + N large 238+90+ 19 347

N medium 90 90
w medium = = = ≈ 0 , 26
N small + N medium + N large 238+ 90+19 347

N large 19 19
w large= = = ≈ 0 , 05
N small + N medium + N large 238+90+19 347

The size of each stratum then is equal to:


n small=n· w small=30 · 0.69=20

n medium=n· w medium =30 ·0.26 ≈ 8

nlarge =n· wlarge =30 · 0.05=2

b) Find the optimal sample sizes…

The optimal size of the stratum j will be:

σ j· w j
n j=n· 3

∑ σ k · wk
k=1

We must calculate the denominator first:

∑ σ k · wk =w small · σ small+ w medium · σ medium + wlarge · σ large


k =1

You might also like