11- 1Day # 7
Pengujian Hipotesis Dua sampel GOALS
When you have completed this chapter, you will be able to:
TWO
Conduct a test of hypothesis regarding the difference in two population
proportions.
THREE
Conduct a test of hypothesis about the mean difference between paired or
dependent observations.
ONE
Conduct a test of hypothesis about the difference between two independent
population means.
FOUR
Understand the difference between dependent and independent samples.
11- 2
Comparing two populations
Apakah terdapat
perbedaan distribusi rata-
rata sample dari dua
populasi yang
dibandingkan ?
Membandingkan 2 rata-rata Populasi
jika n ≥ 30,
gunakan tabel
distribusi z sebagai
uji statistik
Tdk ada asumsi terkait dg
populasi tsb
Jika sampel
berasal dari
populasi yang
independen
Rumus utk
menghitung z :
2
22
1
21
21
n
s
n
s
XXz
+
−=
11- 3
EXAMPLE 1
Sebesar $7000 utk sample
yang terdiri ats 35 rumah
tangga. Dengan α = 0.01
d a p a t k a h d i s i m p u l k a n
bahwa rata-rata pendapatan
di Bradford lbh tinggi ?
2 kota, Bradford
& K a n e h a n y a
d i p i s a h k a n o l e h
sungai Conewango.
K e d u a k o t a t s b
s a l i ng be r s a i n g .
Rata-rata pendapatan rumah
tangga di Bradford adl
$38.000 dgn standard deviasi
$6.000 untk sample yang
terdiri atas 40 rumah tangga.
S e d a n g k a n r a t a - r a t a
pendapatan di Kane adalah
$35.000 dgn standart deviasi
11- 4
Example 1 continued
Step 2
State the level of significance.
The 0,01 significance level is
stated in the problem.
Step 3
Find the appropriate test
statistic. Because both
samples are more than 30, we
can use z as the test statistic.
Step 1
State the null and
alternate hypotheses.
H0: µB < µK
H1: µB > µK
Step 4
State the decision rule.
The null hypothesis is
rejected if z is greater
than 2,33
11- 5
Example 1 continued
98.1
35
)000,7($
40
)000,6($
000,35$000,38$
22=
+
−=z
Step 5: Compute the value of z and make a decision.
Krn Zhitung 1.98
< Z critical of 2.33,
maka H0 tdk dapat
ditolak. Kita tdk dpt
menyimpulkan bahwa
rata-rata pendapatan
di Bradford lebih
besar.Reject H0Do not reject H0
αααα = 0,01
2,330
Reject H0
z = 1,98
11- 6
21
21
nn
XXpc
+
+=
Two Sample Tests of Proportions: apakah kedua
sampel berasal dari suatu populasi dg proporsi yang sama
Kedua sampel di
pooled dg rumus:
Dimana X1 dan X2 adl
kejadian sukses dlm
sampel n1 & n2.
Test statistik yang
digunakan adl
21
21
)1()1(
n
pp
n
pp
ppz
cccc −+
−
−=
dimana P1 & P2 adl
proporsi kejadian sukses
dlm sampel n1 & n2.
11- 7
Example 2
Apakah pekerja lajang
lebih sering absen jika
dibandingkan dgn pekerja
yang sudah menikah? Dr
250 pe ke r j a yg s dh
menikah tdp 22 org yang
absen lbh dr 5 hari dlm
setahun, sedangkan dr
300 sampel pekerja lajang
tdp 35 org yang absen
lebih dari 5 hari dalam
s e t a h u n t e r a k h i r
Dgn menggunakan α = 5%
dptkah dikatakan bahwa pekerja
lajang lebih sering absen
11- 8
Example 2 continued
The null and the alternate hypotheses
H0: ππππU < ππππM H1: ππππU > ππππM
H0 ditolak jika nilai
zhitung > 1.65
The pooled proportion
250300
2235
+
+=cp
= 0,1036
11- 9
Example 2 continued
10,1
300
)1036.1(1036,0
250
)1036.1(1036,0
300
35
250
22
−=−
+−
−
=z
Karena z hitung - 1,10 < z critical 1.65, maka H0 tdk dapat ditolak. Kita tdk dapat menyimpulkan bahwa pekerja lajang lebih sering absen dibandingkan pekerja yang sdh menikah
Reject H0Do not reject H0
αααα = 0,05
0
Reject H0
z = -1,10
1,65
11- 10
Small Sample Tests of Means
Asumsi
1. Kedua populasi terdistribusi normal
2. Kedua populasi memiliki standart deviasi yang sama.
3. Kedua sampel berasal dari populasi yang independen
Pengujian Hipotesis sampel kecil Gunakan t test jika satu atau lebih sampel memiliki
observasi < 30.
11- 11
Small sample test of means
continued
2
)1()1(
21
222
2112
−+
−+−=
nn
snsns p
+
−=
21
2
21
11
nns
XXt
p
2 : tentukan nilai t dengan rumus:
Langkah-langkah pengujian.
1: Pool the varians.
11- 12
Example 3
Sebuah studi
membandingkan
konsumsi BBM mobil
lokal dgn mobil impor.
Dr sampel yg terdiri dr
15 mobil lokal
menunjukkan rata-rata
33,7 mpg & standard
deviasi 2,4 mpg.
Sdgkan sample yg tdr 12
mobil impor menunjukan
rata-rata 35,7 mpg dgn
standart deviasi 3,9. dg α
= 0,05 dptkah disimpulkan
bahwa rata-rata mpg mobil
impor lbh tinggi?
11- 13
Example 3 continued
Step 1
State the null and
alternate hypotheses.
H0: µ I ≤ µD
H1: µ I > µD
Step 2
State the level of
significance. The .05
significance level is
stated in the problem.
Step 3
Find the appropriate test
statistic. Both samples
are less than 30, so we
use the t distribution.
11- 14
Example 3 continued
918,921215
)9.3)(112()4.2)(115(
2
))(1())(1(
22
21
2
22
2
112
=−+
−+−=
−+
−+−=
nn
snsnsp
Step 4
The decision rule is to reject
H0 if t<1,708 . df = n1 + n2
– 2 or 25 degrees of
freedom.
Step 5
We compute the
pooled variance.
11- 15
Example 3 continued
640,1
12
1
15
1918,9
7.357.33
11
21
2
21
−=
+
−=
+
−=
nns
XXt
p
We compute the value of t as follows.
11- 16
Krn nilai t hitung - 1, 64 < t kritik 1.708, maka H0 tdk ditolak . Shg tdk dpt disimpulkan bahwa rata-rata mpg mobil import lebih tinggi
Example 3 continued
Do not reject H0
αααα = 0,05
0
Reject H0
t = -1,64
1,708Reject H0
11- 17
Pengujian Hipotesis sampel berpasangan
Dependent samples
jika kedua sampel saling
berpasangan .
Independent samples
jika kedua sampel tdk
saling berpasangan
(independen).
Membandingkan harga mobil dg tipe yang
s a m a d i d u a d e a l e r
Membandingkan
efektifitas program diet
bagi kelompok treatment
sblm dan sesudah
melakukan diet
11- 18
Hypothesis Testing Involving Paired
Observations
td
s nd
=/
d
sd
Jika sampelnya dependent gunakan rumus :
dmn adl rata-rata perbedaan
adl standart deviasi perbedaan
n is jumlah observasi yang berpasangan
11- 19
EXAMPLE 4
Seorang konsumen
membandingkan biaya
sewa mobil Hertz &
Avis di 8 kota yang
menjadi sampel. Dg α =
5% dptkah dikatakan ada
perbedaan biaya sewa
kedua mobil tersebut?
City Hertz
($)
Avis ($)
Atlanta 42 40
Chicago 56 52
Cleveland 45 43
Denver 48 48
Honolulu 37 32
Kansas City 45 48
Miami 41 39
Seattle 46 50
11- 20
Example 4 continued
Step 4
H0 is rejected if
t < -2.365 or t > 2.365;
we use the t distribution with
n-1 or 7 degrees of freedom.Step 2
The stated
significance
level is .05.
Step 3
The appropriate
test statistic is the
paired t-test.
Step 1
Ho: µµµµd = 0
H1: µµµµd ≠ 0
Step 5
Perform the
calculations and make
a decision.
11- 21
Example 4 continued
City Hertz Avis d d2
Atlanta 42 40 2 4
Chicago 56 52 4 16
Cleveland 45 43 2 4
Denver 48 48 0 0
Honolulu 37 32 5 25
Kansas City 45 48 -3 9
Miami 41 39 2 4
Seattle 46 50 -4 16
11- 22
Example 4 continued
00.18
0.8==
Σ=
n
dd
( )
1623.318
8
878
1
222
=−
−
=−
Σ−Σ
=n
n
dd
sd
894.081623.3
00.1===
ns
dt
d
11- 23
Example 4 continued
Krn – 2,365 < 0,
894 < 2,365
maka kita tdk
dpt menolak H0.
Dgn demikian
disimpulkan
bahwa tdk ada
perbedaan rata-
rata biaya sewa
mobil Hertz
dan Avis.
0,894
Reject H0 Do not reject H0
α = .05/2
-t = -2,365 0
α = .05/2
Reject H0
+t = 2,365