Lecture 4
Lecture 4
Zhenxia Liu
Matematisk statistik
Matematiska institutionen
Content
▶ Review - Type I: One sample
▶ Type II: Two independent samples
▶ Iµ1 −µ2 if σ1 and σ2 are known
▶ Ic1 µ1 +c2 µ2
(1) (1 − α) CI for µ,
X̄ −µ √σ
(1.1) If σ is known,
√
σ/ n
∼ N(0, 1) ⇒ Iµ = x̄ ∓ λα/2 · n
X̄ −µ
(1.2) If σ is unknown, √ ∼ t(n − 1) ⇒ Iµ = x̄ ∓ tα/2 (n − 1) · √s
S/ n n
(2) (1 − α) CI for σ 2 ,
(n − 1)S 2 (n − 1)s 2 (n − 1)s 2
∼ χ2 (n − 1) ⇒ Iσ2 = ( , )
σ2 χ2α/2 (n − 1) χ21−α/2 (n − 1)
Note:
n √ n
1X 1 X
x̄ = xi , s= s 2, s2 = (xi − x̄)2
n n−1
i=1 i=1
µ1 − µ2 , c1 µ1 + c2 µ2 , σ 2 or σ if σ1 = σ2 = σ, σ22 /σ12 .
X̄ − Ȳ − (µ1 − µ2 )
s ∼ N(0, 1)
σ12 σ22
+
n1 n2
▶ (1 − α) CI for µ1 − µ2 is
s
σ12 σ22
Iµ1 −µ2 = x̄ − ȳ ∓ λα/2 · +
n1 n2
1 Pn1 1 Pn2
▶ x̄ = n1 i=1 xi , ȳ = n2 i=1 yi , λα/2 =?
c1 X̄ + c2 Ȳ − (c1 µ1 + c2 µ2 )
s ∼ N(0, 1)
c12 σ12 c22 σ22
+
n1 n2
▶ (1 − α) CI for c1 µ1 + c2 µ2 is
s
c12 σ12 c22 σ22
Ic1 µ1 +c2 µ2 = c1 x̄ + c2 ȳ ∓ λα/2 · +
n1 n2
Remark:
(n1 −1)S12
• degrees of freedom of S12 is n1 − 1, since σ2
∼ χ2 (n1 − 1).
(n2 −1)S22
• degrees of freedom of S22 is n2 − 1, since σ2
∼ χ2 (n2 − 1).
X̄ − Ȳ − (µ1 − µ2 )
r ∼ t(n1 + n2 − 2)
1 1
S +
n1 n2
▶ (1 − α) CI for µ1 − µ2 is
r
1 1
Iµ1 −µ2 = x̄ − ȳ ∓ tα/2 (n1 + n2 − 2) · s ·
+
n1 n2
▶ Note: s 2 is the Combined/Pooled sample variance.
c1 X̄ + c2 Ȳ − (c1 µ1 + c2 µ2 )
s ∼ t(n1 + n2 − 2)
c12 c22
S +
n1 n2
▶ (1 − α) CI for c1 µ1 + c2 µ2 is
s
c12 c22
Ic1 µ1 +c2 µ2 = c1 x̄ + c2 ȳ ∓ tα/2 (n1 + n2 − 2) · s · +
n1 n2
X̄ − Ȳ − (µ1 − µ2 )
s ≈ t(f )
S12 S22
+
n1 n2
▶
2
s12 s22
+
n1 n2
f = 2 .
(s1 /n1 )2 (s22 /n2 )2
+
n1 − 1 n2 − 1
▶ (1 − α) CI for µ1 − µ2 is
s
s12 s2
Iµ1 −µ2 = x̄ − ȳ ∓ tα/2 (f ) · + 2
n1 n2
(n1 + n2 − 2)S 2
∼ χ2 (n1 + n2 − 2)
σ2
▶ (1 − α) CI for σ 2 is
!
(n1 + n2 − 2)s 2 (n1 + n2 − 2)s 2
Iσ 2 = ,
χ2α/2 (n1 + n2 − 2) χ21−α/2 (n1 + n2 − 2)
▶ (1 − α) CI for σ, Iσ =?
X1 /r1
V = ∼ F (r1 , r2 )
X2 /r2
Remark:
1
▶ ∼ F (r2 , r1 ).
V
▶
1
Fα (r1 , r2 ) =
F1−α (r2 , r1 )
Proof is given in Appendix.
1 1
F0.01 (4, 3) = 28.71, F0.99 (4, 3) = F0.01 (3,4) = 16.69 ≈ 0.0599.
(n1 −1)S12
σ12
/(n1 − 1) S12 /σ12 S12 /S22
= = ∼ F (n1 − 1, n2 − 1)
(n2 −1)S22
/(n2 − 1) S22 /σ22 σ12 /σ22
σ22
▶ (1 − α) CI for σ12 /σ22 is
s12 /s22 s12 /s22
Iσ12 /σ22 = ,
Fα/2 (n1 − 1, n2 − 1) F1−α/2 (n1 − 1, n2 − 1)
X̄ − Ȳ − (µ1 − µ2 )
r ∼ t(n1 + n2 − 2)
1 1
S +
n1 n2
The data is shown in the following table, which gives the maximum
percentage of all the platelets that are aggregated after being
exposed to a stimulus.
Before xi 25 25 27 44 30 67 53 53 52 60 28
After yi 27 29 37 56 46 82 57 80 61 59 43
Question: Does smoking increase the formation of blood clots with 95%
confidence?
Let xi be the percentage of all platelets that are aggregated before being
exposed to a stimulus for the i−th person, i = 1, 2, . . . , 11.
Let yi be the percentage of all platelets that are aggregated after being
exposed to a stimulus for the i−th person, i = 1, 2, . . . , 11.
Model:
{x1 , x2 , . . . , x11 } is a sample from population X ∼ N(µ1 , σ1 ).
{y1 , y2 , . . . , y11 } is a sample from population Y ∼ N(µ2 , σ2 ).
Note: X and Y are Not independent. Why?
D̄−(µ2 −µ1 )
The sampling distribution of D̄ is: √
S/ n
∼ t(n − 1)
Then 95% one sided lower bound CI:
s
Iµ2 −µ1 = (a, ∞) = d¯ − tα (n − 1) √ , ∞
n
√
s2
= (10.27 − (1.81) √ , ∞) = (5.9, ∞)
11
1 P11
where d¯ = 11 i=1 di = 10.27; 1 − α =P95%, then α = 0.05, so
1 n ¯2
tα (n − 1) = t0.05 (10) = 1.81; s 2 = n−1 i=1 (di − d) = 63.62.
With 95% confidence, we can say µ2 − µ1 > 5.9 > 0, that is, µ2 > µ1 which means
smoking increases the formation of blood clots.
Thus, if you have two equal length measurement series and want
to investigate if there is ”systematic difference/change ”(e.g.,
(µ2 − µ1 ) in Example 2) between them, think about:
Exercises: