1. Overview
Untuk menguji efek ramuan herbal terhadap peningkatan
kemampuan memori, diambil dua sampel secara acak,
satu sampel diberikan ramuan dan sampel lain diberikan
placebo. Satu bulan kemudian dilakukan uji memori
untuk kedua sampel.
Sample
1
Sample
77
15
x
1
s
1
=
=
73
12
2
x
2
=
=
s
Experimental Group Control Group
2
95
1
=
n
105
2
=
n
Ramuan Placebo
Hasil uji statistik 77 - 73 = 4. Apakah
perbedaan tersebut signifikan ataukah
kebetulan saja (sampling error)?
2. l
Chapter Eleven
Uji Hipothesis DDuuaa SSaammppeell
GOALS
1. Understand the difference between dependent and
independent samples.
2. Conduct a test of hypothesis about the difference
between two independent population means when both
samples have 30 or more observations.
3. Conduct a test of hypothesis about the difference
between two independent population means when at
least one sample has less than 30 observations.
4. Conduct a test of hypothesis about the mean difference
between paired or dependent observations.
5. Conduct a test of hypothesis regarding the difference in
two population proportions.
3. Two Sample Tests
TEST FFOORR EEQQUUAALL VVAARRIIAANNCCEESS TTEESSTT FFOORR EEQQUUAALL MMEEAANNSS
HHo
HH1
Population 1
Population 2
Population 1
Population 2
HHo
HH1
Population 1
Population 2
Population 1 Population 2
4. Tahapan Uji Statistik secara
Umum Anggaplah kita tertarik menguji parameter population
(q) sama dengan k.
H0: q = k
H1: q ¹ k
Pertama, kita perlu memperoleh estimasi sampel (q )
terhadap parameter population (q).
Kedua, pada umumnya uji statistik akan berupa:
t=(q-k)/sq
Bentuk sq tergantung pada apa yang dimaksud
dengan q .
Jumlah sampel dan Hipothesis akan menentukan
distribusi statistiknya.
Jika q adalah rata-rata populasi, dan jumlah
samplenya lebih dari 30, t mendekati distribusi
5. Membandingkan dua populasi
Kita ingin mengetahui apakah distribusi
perbedaan dalam rata-rata sampel memiliki
rata-rata 0.
Jika kedua sampel mengandung
setidaknya 30 pengamatan kita gunakan
distribusi z sebagai uji statistik.
6. Hypothesis Tests for Two
Population Means
FFoorrmmaatt 11
TTwwoo--TTaaiilleedd
TTeesstt
UUppppeerr OOnnee--
TTaaiilleedd TTeesstt
LLoowweerr OOnnee--
TTaaiilleedd TTeesstt
m m
- =
m m
: 0.0
0 1 2
- ¹
: 0.0
1 2
H
A H
m m
- £
m m
: 0.0
0 1 2
- >
: 0.0
1 2
H
A H
m m
- ³
m m
: 0.0
0 1 2
- <
: 0.0
1 2
H
A H
FFoorrmmaatt 22
m =
m
:
m m
0 1 2
:
¹
1 2
H
A H
m £
m
:
m m
0 1 2
:
>
1 2
H
A H
m ³
m
:
m m
0 1 2
:
<
1 2
H
A H
Preferred
7. Two Independent Populations:
Examples
1. Seorang ekonom hendak menentukan apakah ada
perbedaan rata-rata pendapatan keluarga pada dua
kelompok sosial ekonomi yang berbeda.
Apakah mahasiswa Unair berasal dari keluarga
dengan pendapatan yang lebih tinggi daripada
mahasiswa Unhas?
1. Seorang panitia penerimaan mahasiswa sebuah
perguruan tinggi ingin membandingkan nilai rata-rata
UNAS calon mahasiswa yang berasal dari sekolah
menengah di pedesaan & perkotaan.
Apakah siswa dari sekolah menengah di pedesaan
memiliki nilai rata-rata UNAS yang lebih rendah
dibandingkan dari sekolah menengah di perkotaan?
8. Two Dependent Populations:
Examples
1. Seorang analis Pinlabs Unair ingin
membandingkan rata-rata skor TOEFL para
mahasiswa sebelum & sesudah mengikuti
Kursus Persiapan TOEFL.
2. Nike ingin menguji apakah ada perbedaan daya
tahan 2 bahan sol sepatu. Salah satu jenis
dipasang pada satu sepatu, jenis lain di sepatu
lain dari pasangan yang sama.
9. Thinking Challenge
Are they independent or dependent?
1. Peringkat Miles per gallon mobil sebelum &
sesudah memakai ban radial.
2. Daya tahan lampu yang diproduksi dua pabrik
yang berbeda
independent
3. Perbedaan kekuatan 2 metal: satu
mengandung alloy, yang lain tidak
independent
4. Daya tahan dua ban sepeda motor: satu
dipasang di depan, dan satu di pasang
dibelakang
dependent
dependent
10. Hypothesis Testing:
1. Two Population Means
The test statistic is the standard normal (Z) if :
The population standard deviations are known, or
The population standard deviations are unknown
but the two samples both contain at least 30
observation.
Z = X -
X
1 2
2 2
1 2
1 2
s +
s
n n
11. c o nt. .
Note : The Z test statistic
No assumption about the shape of either
population is required
The samples are from independent population
(that are not related in any way)
Variance of distribution of differences in sample
means :
s s s
- n n
1 2
2 2
2 1 2
1 2
X X
= +
12. Contoh 1
Dua kota, Bojonegoro dan Tuban dipisahkan
oleh Sungai Bengawan. Ada persaingan antara
kedua kota. Koran lokal baru-baru ini
melaporkan bahwa pendapatan rumah tangga
rata-rata di Bojonegoro sebesar Rp 38 juta
dengan deviasi standar sebesar Rp 6 juta
untuk sampel 40 rumah tangga. Artikel yang
sama melaporkan pendapatan rata-rata di
Tuban sebesar Rp 35 juta dengan deviasi
standar Rp 7 juta untuk 35 rumah tangga
sampel. Pada tingkat signifikansi 0,01
dapatkah kita simpulkan bahwa pendapatan
rata-rata di Bojonegoro lebih tinggi?
13. EXAMPLE 1 c o ntinue d
Step 1: State the null and alternate
hypotheses.
H0: μB ≤ μT ; H1: μB > μT
Step 2: State the level of significance. The .
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.
14. Example 1 c o ntinue d
Step 4: State the decision rule. The null
hypothesis is rejected if z is greater than 2.33.
Rejection
Region a =
0.01
= 2.33 a 0 z
H0: μB ≤ μT ;
H1: μB > μT
Probability density of z
statistic : N(0,1)
Acceptance Region a = 0.01
15. Example 1 c o ntinue d
Step 5: Compute the value of z and make a
decision.
z = - =
38 35 1.98
(6) 2 2
+
(7)
40 35
= 2.33 a 0 z
H0: μB ≤ μK ;
H1: μB > μK
1.98
Rejection
Region a =
0.01
Acceptance Region a = 0.01
16. Example 1 c o ntinue d
Keputusanhipotesis nol tidak ditolak. Kita
tidak bisa menyimpulkan bahwa rata-rata
pendapatan rumah tangga di Bojonegoro
lebih besar.
17. Example 1 c o ntinue d
The p -value is:
P(z > 1.98) = .5000 - .4761 = .0239
= 2.33 a 0 z
Rejection
Region a =
0.01
H0: μB ≤ μK ;
H1: μB > μK
1.98
P-value = 0.0239
18. Hypothesis Testing:
2. Small Sample Tests of Means
The t distribution is used as the test statistic if
one or more of the samples have less than 30
observations.
The required assumptions are:
1. Both populations must follow the normal
distribution.
2. The populations must have equal standard
deviations.
3. The samples are from independent
populations.
19. Small sample test of means c o ntinue d
Finding the value of the test statistic requires two
steps.
Step 1: Pool the sample standard deviations.
( 1) ( 1)
s = n - s + n -
s p
2
n n
1 2
2
2 2
2
2 1 1
+ -
Step 2: Determine the value of t from the following
formula.
ö
÷ ÷ø
t X X
æ
ç çè
+
= -
1 2
2
1 2
1 1
n n
s
p
20. Or:
t = X -
X
1 2
æ ( n - 1) s 2 + ( n - 1) s
2
öæ 1 1
ö ç 1 1 2 2
+ è n + n - 2
¸ç ¸ 1 2 øè n n
1 2
ø
21. Contoh 2
Sebuah studi oleh EPA membandingkan
konsumsi bahan bakar mobil penumpang
domestik dan impor. Sebuah sampel yang
terdiri dari15 mobil domestik menunjukkan
rata-rata sebesar 33,7 mil/galon dengan
deviasi standar 2,4 mil/galon. Sampel12
mobil impor menunjukkan rata-rata 35,7 mpg
dengan deviasi standar 3,9.
Pada tingkat signifikansi 0,05 dapatkah EPA
menyimpulkan bahwa konsumsi bahan
bakar mobil impor lebih tinggi?
22. Example 2 c o ntinue d
Step 1: State the null and alternate hypotheses.
H0: μD ≥ μI ; H1: μD < μI
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.
23. EXAMPLE 2 c o ntinue d
Step 4: The decision rule is to reject H0 if t<-
1.708.
There are 25 degrees of freedom.
m ³
m
D I
0.05
: 0
H
Rejection
Region a =
0.05
= -1.708 a t 0
:
=
<
a
m m
A D I
H
Probability density of t
statistic : t (df=25)
24. EXAMPLE 2 c o ntinue d
Step 5: We compute the pooled variance:
9.918
( 1)( ) ( 1)( )
s = n - s + n -
s p
2
n n
+ -
1 2
2 2
(15 1)(2.4) (12 1)(3.9)
= - + -
15 12 2
2
2 2
2
2 1 1
=
+ -
25. Example 2 c o ntinue d
We compute the value of t as follows.
t = X -
X
1 2
2
æ 1 ö
ç + 1
¸
è 1 2
ø
33.7 35.7 1.640
9.918 1 1
15 12
p
s
n n
= - =-
æ + ö çè ø¸
26. Example 2 c o ntinue d
Rejection
Region a =
0.05
= -1.708 a t 0
m m
:
³
D I
0.05
0 :
=
<
H
a
m m
A D I
H
-1.640
H0 is not rejected. There is insufficient sample
evidence to claim a higher mpg on the imported cars.
27. Hypothesis Testing:
3. Involving Pa ire d Observations
Independent samples are samples that are
not related in any way.
Dependent samples are samples that are
paired or related in some fashion. For
example:
If you wished to buy a car you would look at the
same car at two (or more) different dealerships
and compare the prices.
If you wished to measure the effectiveness of a
new diet you would weigh the dieters at the
start and at the finish of the program.
28. Hypothesis Testing Involving Pa ire d
Observations (dependent sample)
Use the following test when the samples are
dependent:
t d
s n
d
where is the mean of the differences
is the standard deviation of the differences
n is the number of pairs (differences)
or
=
d
sd
d d = n å
( )2
s = å d -
d
d n
-
1
2
d d
å - å
2 ( )
s n
d n
1
=
-
29. Contoh 3
Sebuah lembaga survei independen
membandingkan biaya sewa harian untuk
menyewa mobil dari Hertz dan Avis.
Sebuah sampel acak dari delapan kota
menunjukkan informasi yang tercatat dalam
tabel. Pada tingkat signifikansi 0.05 dapat
lembaga survei tersebut menyimpulkan
bahwa ada perbedaan dalam sewa yang
dibebankan?
30. EXAMPLE 3 c o ntinue d
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
31. EXAMPLE 3 c o ntinue d
Step 1: State the null and alternate
hypotheses.
H0: μd = 0 ; H1: μd ≠ 0
Step 2: State the level of significance. The .
05 significance level is stated in the problem.
Step 3: Find the appropriate test statistic.
We can use t as the test statistic.
32. EXAMPLE 3 c o ntinue d
Step 4: State the decision rule. H0 is rejected
if t < -2.365 or t > 2.365. We use the t
distribution with 7 degrees of freedom.
2.365 / 2 = a t
H0: μB ≤ μK ;
H1: μB > μK
Rejection Region II
probability=0.025
Acceptance Region a =
0.05
Rejection Region I
Probability =0.025
2.365 / 2 = - a t
Probability density of t
statistic : t (df=7)
33. Example 3 c o ntinue d
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
34. Example 3 c o ntinue d
1.00
= S = 8.0 =
8
d d
n
( )
3.1623
78 8
8
-
8 1
d d
S - S
1
2 2
2
=
-
=
-
=
n
n
sd
0.894
= = 1.00 =
s n
3.1623 8
t d
d
35. Example 3 c o ntinue d
Step 5: Because 0.894 is less than the critical
value, do not reject the null hypothesis. There
is no difference in the mean amount charged
by Hertz and Avis.
2.365 / 2 = a t
H0: μB ≤ μK ;
H1: μB > μK
Rejection Region II
probability=0.025
Acceptance Region a =
0.05
Rejection Region I
Probability =0.025
2.365 / 2 = - a t
0.894
36. Hypothesis Testing:
4. Two Sample Tests of
Proportions
We investigate whether two samples came
from populations with an equal proportion of
successes.
The two samples are pooled using the
following formula.
p = X +
X c +
1 2
n n
1 2
where X1 and X2 refer to the number of
successes in the respective samples of n1 and
n2.
37. Two Sample Tests of
Proportions c o ntinue d
The value of the test statistic is computed from
the following formula.
or
z = p -
p
1 2
(1 ) p (1 p
)
c c c c - + -
n
p p
n
1 2
Z p p
1 2
1 2
ˆ ˆ
(1 ) 1 1 c c
P P
n n
= -
æ ö
- ç + ¸
è ø
38. Contoh 4
Apakah pekerja yang belum menikah
(unmarried) lebih cenderung absen dari
pekerjaan dari pekerja menikah (married)?
Sebuah sampel 250 pekerja menikah
menunjukkan 22 absen lebih dari 5 hari tahun
lalu, sementara sampel 300 pekerja menikah
menunjukkan absen lebih dari lima hari.
Gunakan tingkat signifikansi .05.
39. Example 4 c o ntinue d
The null and the alternate hypothesis are:
H0: pU ≤ p M H1: p U > p M
The null hypothesis is rejected if the computed
value of z is greater than 1.65.
40. Example 4 c o ntinue d
The pooled proportion is
.1036
35 22 =
= + c p
300 +
250
The value of the test statistic is
1.10
22
.1036(1 .1036)
250
35
-
.1036(1 .1036)
300
250
300
=
- + -
z =
41. Example 4 c o ntinue d
The null hypothesis is not rejected. We
cannot conclude that a higher proportion of
unmarried workers miss more days in a year
than the married workers.
The p -value is:
P(z > 1.10) = .5000 - .3643 = .1457
42. Contoh 1
Seorang dosen berpendapat bahwa nilai
ujian kls A lebih rendah dari pada kls B.
Suatu penelitian dilakukan untuk menguji
pendapat tersebut dengan sampel masing-masing
50 orang. Hasilnya rata-rata kls A
60 dengan simpangan baku 15 dan rata-rata
kls B 70 dengan simpangan baku 20.
Ujilah pendapat tersebut dengan a = 5%
43. Contoh 2
Mhs UTS UAS
A 64 54
B 62 77
C 45 50
D 66 54
E 70 89
F 62 56
G 80 72
H 54 65
I 65 76
Dengan a = 0,05 ujilah
apakah ada perbedaan
nilai UTS dan UAS ?
44. Contoh 4
Pimpinan perusahaan berpendapat bahwa
konsumen lebih menyukai produk A dari pada
B. Untuk membuktikan pendapat tsb tim
marketing melakukan penelitian dengan
mengambil sampel 200 orang. Hasilnya 70
orang menyukai produk A dan 65 orang
menyukai produk B. Ujilah dengan taraf
signifikansi 5%
Many experiments are conducted where one group gets a treatment and another receives a placebo. These are often double-blind meaning that neither the experimenter of the subject knows which group a person belongs to,
Placebo: A substance containing no medication and prescribed or given to reinforce a patient&apos;s expectation to get well