D4 - Metstat 2.4 - Pengujian Hipotesis (Part 2)
D4 - Metstat 2.4 - Pengujian Hipotesis (Part 2)
n Rasio 2 varians
Hypothesis Tests for the Difference
Between Two Means
Population means,
independent The test statistic for
samples μ1 – μ2 is:
σ1 and σ2 known * z=
( x 1 )
- x 2 - ( μ1 - μ2 )
2 2
σ1 and σ2 unknown, σ σ2
n1 and n2 ³ 30
1
+
n1 n2
σ1 and σ2 unknown,
n1 or n2 < 30
σ1 and σ2 unknown, large samples
Population means,
independent The test statistic for
samples μ1 – μ2 is:
σ1 and σ2 known
z=
( x 1 )
- x 2 - ( μ1 - μ2 )
σ1 and σ2 unknown,
n1 and n2 ³ 30
* s
+
1
2
s2
2
n1 n2
σ1 and σ2 unknown,
n1 or n2 < 30
σ1 and σ2 unknown, small samples
*Assuming equal variances
Population means,
independent The test statistic for μ1 – μ2 is:
samples
t=
( x 1 )
- x 2 - ( μ1 - μ 2 )
σ1 and σ2 known
1 1
sp +
σ1 and σ2 unknown, n1 n 2
n1 and n2 ³ 30
Where ta/2 or ta has (n1 + n2 – 2) d.f.,
σ1 and σ2 unknown,
n1 or n2 < 30
* and
sp =
(n1 - 1)s12 + (n2 - 1)s22
n1 + n2 - 2
σ1 and σ2 unknown, small samples
*Assuming different variances
Population means,
independent The test statistic for μ1 – μ2 is:
samples
t=
( x 1 )
- x 2 - ( μ1 - μ 2 )
σ1 and σ2 known 2 2
s s
1
+ 2
σ1 and σ2 unknown, n1 n 2
n1 and n2 ³ 30
Where ta/2 or ta has d.f.,
*
2 2
s
(1 s
+ 2 )2
σ1 and σ2 unknown, n1 n2
n1 or n2 < 30 v=
[(s
2
1 n ) /(n - 1)]+ [(s
1
2
1
2
2 )
2
n2 /(n2 - 1) ]
Hypothesis tests for μ1 – μ2
Two Population Means, Independent Samples
Lower tail test: Upper tail test: Two-tailed test:
H0: μ1 – μ2 ³ 0 H0: μ1 – μ2 ≤ 0 H0: μ1 – μ2 = 0
HA: μ1 – μ2 < 0 HA: μ1 – μ2 > 0 HA: μ1 – μ2 ≠ 0
a a a/2 a/2
df = 21 + 25 - 2 = 44 -2.0154 0 2.0154 t
Critical Values: t = ± 2.0154
2.040
Test Statistic: Decision:
3.27 - 2.53 Reject H0 at a = 0.05
t= = 2.040
1 1
1.2256 + Conclusion:
21 25 There is evidence of a
difference in means.
Calculating the Test Statistic
The test statistic is:
t=
(x 1 )
- x 2 - (μ1 - μ 2 ) (3.27 - 2.53) - 0
= = 2.040
1 1 1 1
sp + 1.2256 +
n1 n 2 21 25
sp =
(n1 - 1)s12 + (n2 - 1)s22 =
(21 - 1)1.30 2 + (25 - 1)1.16 2 = 1.2256
n1 + n2 - 2 21 + 25 - 2
Hypothesis Testing for
Paired Samples
a a a/2 a/2
-21 n -1
= 5.67
Paired Samples: Solution
§ Has the training made a difference in the number of
complaints (at the 0.01 level)?
Reject Reject
H0: μd = 0
HA: μd ¹ 0
a/2 a/2
Population proportions
n1 pˆ 1 + n 2 pˆ 2 x1 + x 2
pˆ = =
n1 + n 2 n1 + n 2
where x1 and x2 are the numbers from
samples 1 and 2 with the characteristic of interest
Two Population Proportions
(continued)
z=
( pˆ1 - pˆ 2 ) - ( p1 - p2 )
æ1 1ö
pˆ (1 - pˆ ) çç + ÷÷
è n1 n2 ø
Hypothesis Tests for
Two Population Proportions
Population proportions
Lower tail test: Upper tail test: Two-tailed test:
H0: p1 – p2 ³ 0 H0: p1 – p2 ≤ 0 H0: p1 – p2 = 0
HA: p1 – p2 < 0 HA: p1 – p2 > 0 HA: p1 – p2 ≠ 0
a a a/2 a/2
a a/2
a/2
0 F 0 F
Do not Reject H0 Do not Reject H0
reject H0 Fa reject H0 Fa/2
n rejection region n rejection region for
for a one-tail test a two-tailed test is
(upper tail test) is
s12 s 2
s12 F = 2 > Fa / 2 or F = 12 < F1-a / 2
F = 2 > Fa s2 s2
s2
F Test: An Example
n df1 = n1 – 1 = 21 – 1 = 20
n Denominator:
n df2 = n2 – 1 = 25 – 1 = 24
F.95, 20, 24 = 0,48 or F.05, 20, 24 = 2.03
F Test: Example Solution
(continued)
0
nConclusion : do not reject H0 Do not Reject H0
reject H0 Fa/2 =2.03
n There is no evidence of a
difference in variances at a = .1