Practice 4
Practice 4
Practice Problems
a) Fifty automobiles were tested (each automobile was tested a single time). The sample
mean time to reach 60 mph from zero was 5.09 seconds. Find the p-value of this test.
c) Find the power of this test if the true average time is 5.15 seconds, a 5% level of
significance will be used, and 50 automobiles will be tested (each automobile to
be tested a single time).
d) What is the minimum sample size required if we want to have the power of at least
0.90 at µ = 5.15 for the test with a 5% level of significance.
P ( X 1 = k ) = ( 1 – p ) k – 1 p, k = 1, 2, 3, … .
We are interested in testing H 0 : p = 0.30 vs. H 1 : p = 0.40.
a) Use the likelihood ratio to find the best rejection region in terms of ∑ in=1 x i .
b) Find the best rejection region with the significance level closest to 0.07.
c) If the rejection region from part (b) is used, find the power of the test.
y −1
P( Y = y ) = ⋅ p n ⋅ ( 1 − p ) y − n , y = n, n + 1, n + 2, … .
n −1
a) Fifty automobiles were tested (each automobile was tested a single time). The sample
mean time to reach 60 mph from zero was 5.09 seconds. Find the p-value of this test.
X − µ0 5.09 − 5.0
Test Statistic: σ is known. Z= = = 1.48.
σ 0.43
n 50
Right – tailed test. p-value = ( area of the right tail ) = P ( Z > 1.48 ) = 0.0694.
c) Find the power of this test if the true average time is 5.15 seconds, a 5% level of
significance will be used, and 50 automobiles will be tested (each automobile to
be tested a single time).
5.1 − 5.15
= P Z >
0.43 = P ( Z > – 0.82 ) = 0.7939.
50
d) What is the minimum sample size required if we want to have the power of at least
0.90 at µ = 5.15 for the test with a 5% level of significance.
0.43
Rejection Region: Reject H 0 if X > 5.0 + 1.645 ⋅ .
n
0.43
Power ( 5.15 ) = P ( Reject H 0 | µ = 5.15 ) = P ( X > 5.0 + 1.645 ⋅ | µ = 5.15 )
n
0.43
5.0 + 1.645 ⋅ − 5.15
= P Z >
n = P Z > − 0.15 n + 1.645 .
0.43 0.43
n
− 0.15 n − 0.15 n
⇒ + 1.645 ≤ −1.282 . ⇒ ≤ −2.927 .
0.43 0.43
H 0 : p = 1/2 H 1 : p = 1/4
Reject H 0 if X 1 + … + X 12 ≤ 2
Power: γ ( θ ) = P ( Poisson ( 12 θ ) ≤ 2 ) = ∑
2 (12 θ ) k e −12 θ
k =0 k!
1
γ ( ) = P ( Poisson ( 6 ) ≤ 2 ) = 0.062 = significance level = α
2
1 1
γ ( ) = P ( Poisson ( 4 ) ≤ 2 ) = 0.238 γ ( ) = P ( Poisson ( 3 ) ≤ 2 ) = 0.423
3 4
1 1
γ ( ) = P ( Poisson ( 2 ) ≤ 2 ) = 0.677 γ( ) = P ( Poisson ( 1 ) ≤ 2 ) = 0.920
6 12
4. 4.5.12 ( 7th edition ) 5.5.12 ( 6th edition )
Reject H 0 if X 1 + … + X 8 ≥ 8
∞ (8 µ ) k e − 8 µ 7 (8 µ ) k e − 8 µ
b) γ ( µ ) = P ( Poisson ( 8 µ ) ≥ 8 ) = ∑ = 1− ∑ .
k =8 k! k =0 k!
P ( X 1 = k ) = ( 1 – p ) k – 1 p, k = 1, 2, 3, … .
We are interested in testing H 0 : p = 0.30 vs. H 1 : p = 0.40.
a) Use the likelihood ratio to find the best rejection region in terms of ∑ in=1 x i .
b) Find the best rejection region with the significance level closest to 0.07.
c) If the rejection region from part (b) is used, find the power of the test.
y −1
P( Y = y ) = ⋅ p n ⋅ ( 1 − p ) y − n , y = n, n + 1, n + 2, … .
n −1
n
∏ 0.70 ⋅ 0.30
xi − 1
L ( p = 0.30 ; x 1 , x 2 ,..., x n ) i =1
a) λ ( x 1 , x 2 ,..., x n ) = =
L ( p = 0.40 ; x 1 , x 2 ,..., x n ) n
⋅ 0.40
xi − 1
∏ 0.60
i =1
n n
∑ xi 0.60 ⋅ 0.30
n ∑ xi n
0.70 i =1
⋅ 7
⋅
18
= = i =1 .
0.60 0.70 ⋅ 0.40 6 28
n 7 18
λ ( x 1 , x 2 ,..., x n ) ≤ k ⇔ ∑ x i ⋅ ln + n ⋅ ln ≤ ln k
i =1 6 28
n
⇔ ∑ x i ≤ c.
i =1
n
Rejection Region: Reject H 0 if ∑ X i ≤ c. ( left tail )
i =1
A B C D
1 y PMF @ y CDF @ y
2 4 =NEGBINOMDIST(A2–4,4,0.30) =B2
3 =A2+1 =NEGBINOMDIST(A3–4,4,0.30) =C2+B3
4 =A3+1 =NEGBINOMDIST(A4–4,4,0.30) =C3+B4
5 =A4+1 =NEGBINOMDIST(A5–4,4,0.30) =C4+B5
6 =A5+1 =NEGBINOMDIST(A6–4,4,0.30) =C5+B6
7 =A6+1 =NEGBINOMDIST(A7–4,4,0.30) =C6+B7
… … … …
A B C D
1 y PMF @ y CDF @ y
2 4 0.0081 0.0081
3 5 0.02268 0.03078
⇒ 4 6 0.03969 0.07047
5 7 0.055566 0.126036
6 8 0.068068 0.194104
7 9 0.076237 0.270341
… … … …
OR
4 − 1
P ( Y = 4 | p = 0.30 ) = (0.30 ) 4 (0.70 ) 4 − 4 = 0.0081,
4 − 1
5 − 1
P ( Y = 5 | p = 0.30 ) = (0.30 ) 4 (0.70 ) 5 − 4 = 0.02268,
4 − 1
6 − 1
P ( Y = 6 | p = 0.30 ) = (0.30 ) 4 (0.70 ) 6 − 4 = 0.03969.
4 − 1
n
Rejection Region: Reject H 0 if Y = ∑ X i ≤ 6.
i =1
c) Power = P ( Reject H 0 | H 0 is not true ) = P ( Y ≤ 6 | p = 0.40 ) = CDF @ 6.
A B C D
1 y PMF @ y CDF @ y
2 4 =NEGBINOMDIST(A2–4,4,0.40) =B2
3 =A2+1 =NEGBINOMDIST(A3–4,4,0.40) =C2+B3
4 =A3+1 =NEGBINOMDIST(A4–4,4,0.40) =C3+B4
5 =A4+1 =NEGBINOMDIST(A5–4,4,0.40) =C4+B5
6 =A5+1 =NEGBINOMDIST(A6–4,4,0.40) =C5+B6
7 =A6+1 =NEGBINOMDIST(A7–4,4,0.40) =C6+B7
… … … …
A B C D
1 y PMF @ y CDF @ y
2 4 0.0256 0.0256
3 5 0.06144 0.08704
⇒ 4 6 0.09216 0.1792
5 7 0.110592 0.289792
6 8 0.116122 0.405914
7 9 0.111477 0.51739
… … … …
OR
4 − 1
P ( Y = 4 | p = 0.40 ) = (0.40 ) 4 (0.60 ) 4 − 4 = 0.0256,
4 − 1
5 − 1
P ( Y = 5 | p = 0.40 ) = (0.40 ) 4 (0.60 ) 5 − 4 = 0.06144,
4 − 1
6 − 1
P ( Y = 6 | p = 0.40 ) = (0.40 ) 4 (0.60 ) 6 − 4 = 0.09216.
4 − 1