Anda di halaman 1dari 50

INFERENSIA STATISTIKA

Bab 11
Selang Kepercayaan dan
Pengujian Hipotesis Dua Populasi

Inferensia Statistika
Terhadap Dua Populasi

Selang Kepercayaan dan


Pengujian Hipotesis:
Inferensia untuk Dua Populasi

Pendugaan Mean Dua


Populasi
Pendugaan Dua
Populasi
Mean
Populasi,
independent
samples

Sampel
Berpasangan/
Paired
samples

Proporsi
Populasi

Examples:
Group 1 vs.
independent
Group 2

Same group
before vs. after
treatment

Proportion 1 vs.
Proportion 2

Inferensia untuk Beda Dua


Mean
Mean Populasi,
Sampel
bebas/independent
samples

Goal: Membuat Selang


Kepercayaan untuk beda
dua mean, 1 2

1 dan 2 diketahui
1 dan 2 unknown,
n1 dan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

Penduga titik untuk


beda dua mean:

x1 x2

Sampel Bebas/
Independent Samples
Mean Populasi,
independent
samples

1 dand 2 diketahui
1 dan 2 unknown,
n1 dan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

Sumber data berbeda


Tidak berhubungan
Saling bebas
Sampel terpilih dari
satu populasi tidak
berpengaruh terhadap
sampel terpilih dari
populasi lainnya
Inferensia dilakukan terhadap
beda 2 mean sampel
Gunakan distribusi z atau
distribusi t-student, dengan
ragam gabungan (pooled
variance)

SK Beda Mean,
Bila 1 dan 2 diketahui
Mean Populasi,
independent
samples
1 dan 2 diketahui
1 dan 2 unknown,
n1 dan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

Asumsi::

Sampel diambil secara acak


dan bebas
Distribusi populasi normal
atau ukuran kedua sampel 30
Simpangan baku populasi
diketahui

SK Beda Mean,
Bila 1 dan 2 diketahui
Bila 1 dan 2 diketahui dan kedua
populasi berdistribusi normal atau
ukuran kedua sampel minimal = 30
, gunakan statistik uji z-value

Mean Populasi,
independent
samples
1 dan 2 diketahui

dan the standard error dari


x1 x2 adalah

1 dan 2 unknown,
n1 dan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

x1 x 2

2
1

n1
n2

SK Beda Mean,
Bila 1 dan 2 diketahui
Population means,
independent
samples
1 dan 2 diketahui
1 dan 2 unknown,
n1 dan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

Selang Kepercayaan
(1-)100% bagi 1 2:

x 2 z /2

2
1

n1
n2

Bila 1 dan 2 tidak diketahui, large


samples
Asumsi:

Population means,
independent
samples

Sampel diambil secara acak


dan bebas

1 dan 2 diketahui
1 dan 2 unknown,
n1 dan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

sample sizes
are 30
Simpangan baku populasi tidak
diketahui
da, 1 = 2 = (ragam homogen)

Bila 1 dan 2 tidak diketahui, large


samples
Population means,
independent
samples

Membuat Selang
Kepercayaan:
use sample standard
deviation s to estimate

1 dan 2 diketahui
1 dan 2 unknown,
n1 dan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

the test statistic is a z value

Bila 1 dan 2 tidak diketahui, large


samples
Population means,
independent
samples

The confidence interval for


1 2 is:

1 dan 2 diketahui

x
dan unknown, *
n dan n 30
1

1 dan 2 unknown,
n1 atau n2 < 30

x 2 z /2

2
1

s
s2

n1 n2

Contoh SK Beda Mean,


Bila 1 dan 2 Tidak Diketahui

Contoh: Ujian suatu mata kuliah diberikan pada 50


mahasiswa dan 75 mahasiswi. Ternyata nilai ujian
mahasiswa memiliki mean 82 dan simpangan baku 8,
sedangkan mahasiswi memiliki mean 76 dengan
simpangan baku 6. Tentukan selang kepercayaaan 96 %
bagi beda mean ujian!

Jawab:
n1 dan n2 cukup besar (>30)

x1 x2 = 82 - 76 = 6
S1 = 8 dan S2 = 6
= 0,04 dan /2 = 0,02, sehingga z/2 = 2,05

Contoh SK Beda Mean,


Bila 1 dan 2 Tidak Diketahui

Jadi selang kepercayaan 96 % bagi 1 - 2 adalah:

x 2 z/2
6 2,05

S1
S2

n1
n2
82
50

62
75

Dengan demikian, dengan tingkat kepercayaan 96 % beda


mean nilai ujian antara mahasiswa dan mahasiswi sebenarnya
terletak di antara 3,43 dan 8,57.
Karena selang tersebut tidak mencakup 0 dan kedua batas
selang bernilai positif, maka dapat disimpulkan bahwa nilai
tengah nilai ujian mahasiswa lebih tinggi dari mahasiswi.

SK Beda Mean,
Bila 1 dan 2 tidak diketahui, Small Samples
Population means,
independent
samples

Assumptions:
populations are normally
distributed

1 and 2 known

the populations have equal


variances

1 and 2 unknown,
n1 and n2 30
1 and 2 unknown,
n1 or n2 < 30

samples are independent

SK Beda Mean,
Bila 1 dan 2 tidak diketahui, Small Samples
Forming interval
estimates:

Population means,
independent
samples

The population variances


are assumed equal, so use
the two sample standard
deviations and pool them to
estimate

1 dan 2 diketahui
1 dan 2 unknown,
n1 adan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

the test statistic is a t value


with (n1 + n2 2) degrees
of freedom

SK Beda Mean,
Bila 1 dan 2 tidak diketahui, Small Samples
The pooled standard
deviation is

Population means,
independent
samples
1 dan 2 diketahui

sp

1 dan 2 unknown,
n1 dan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

n1 1 s

n2 1 s 2
n1 n2 2
2
1

SK Beda Mean,
Bila 1 dan 2 tidak diketahui, Small Samples
The confidence interval for
1 2 is:

Population means,
independent
samples

1 dan 2 diketahui
1 dan 2 unknown,
n1 dan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

x 2 t /2 sp

1 1

n1 n2

Where t/2 has (n1 + n2 2) d.f.,

and

sp

n1 1 s12 n2 1 s2 2
n1 n2 2

Contoh SK Beda Mean,


Bila 1 dan 2 Tidak Diketahui
Contoh: Uji laboratorium dilakukan untuk menguji stabilitas dan
permeabilitas pondasi beton yang terbuat dari bahan campuran
aspal. Dua jenis pondasi beton masing-masing terbuat dari bahan
campuran yang mengandung 3% dan 7% aspal. Data hasil
pengujian permeabilitas pondasi (inci per jam) terhadap empat
specimen atau cuplikan pondasi beton disajikan di bawah ini.
Tentukan selang kepercayaan 95% beda mean permeabilitas
pondasi beton dari dua jenis aspal tersebut!
Kandungan 3 % Aspal:
Kandungan 7 % Aspal:

1.189 840
853 900

1.020 980
730 785

Contoh SK Beda Mean,


Bila 1 dan 2 Tidak Diketahui
Jawab:
n1 = 4 dan n2 = 4 (keduanya <30)

x 1= (1189 + + 980)/4 = 1007,25


x 2= (853 + + 785)/4 = 817,75
s12 = 20636,92
s22 = 5420,92

sp

(4 1)(20636,92) (4 1)(5420,92)
114,1443
442

Contoh SK Beda Mean,


Bila 1 dan 2 Tidak Diketahui
= 0,05 dan /2 = 0,025, db = 4 + 4 - 2 = 6
sehingga t/2 = 2,447
Jadi selang kepercayaan 95 % bagi 1 - 2 adalah:

x2

t /2 s p

1
1

n1
n2

1 1
(1007,25 817,75) 2,447(114,1443)

4 4
Dengan demikian, dengan tingkat kepercayaan 95 % beda
mean permeabilitas dari dua jenis pondasi beton terletak di
antara -8 dan 387.
Karena selang kepercayaan tersebut mencakup 0, maka tidak
dapat disimpulkan bahwa permeabilitas kedua jenis pondasi
beton tersebut berbeda.

Contoh SK Beda Mean,


Bila 1 dan 2 Tidak Diketahui

Contoh:
Peneliti melakukan percobaan untuk mengetahui keefektifan
suatu jenis obat terhadap jumlah cacing yang ada dalam perut domba.
Setelah domba sebanyak 14 diinfeksi cacing, secara acak separuhnya
diberi obat dan separuh lainnya sebagai kontrol. Setelah 6 minggu, perut
domba dibedah dan jumlah cacing yang ada dihitung dan dicatat seperti
berikut:

Dengan obat: 18
43
28
50
16
32
13
Kontrol
: 40
54
26
63
21
37
39
Tentukan selang kepercayaan 95 % bagi beda dua nilai tengah jumlah
cacing! Kedua populasi dianggap menyebar normal.

Contoh SK Beda Mean,


Bila 1 dan 2 Tidak Diketahui
Jawab:
n1 = 7 (kontrol) dan n2 = 7 (diberi obat) (keduanya <30)

x 1 = (40 + + 39)/7 = 40
x 2 = (18 + + 13)/7 = 28,57
s12 = 215,33
s22 = 198,62

sp

(7 1)(215,33) (7 1)(198,62)
14,39
772

Contoh SK Beda Mean,


Bila 1 dan 2 Tidak Diketahui
= 0,05 dan /2 = 0,025, db = 7 +7 - 2 = 12
sehingga t/2 = 2,179
Jadi selang kepercayaan 95 % bagi 1 - 2 adalah:

x2

t /2 s p

1
1

n1
n2

Dengan demikian,
dengan
%)beda nilai
(40
28tingkat
,57) kepercayaan
2,179(1495
,39
tengah jumlah cacing dari
7 dan
7 28,19.
domba kontrol dan domba diberi obat terletak di antara -5,33
Karena selang tersebut11
mencakup
maka
tidak dapat disimpulkan bahwa jumlah cacing pada
,43 0,16
,7604
domba kontrol dan diberi obat tersebut berbeda.

Uji Hipotesis bagi Beda Dua


Mean

Pengujian hipotesis tentang 1 2

Gunakan situasi yang serupa dengan SK:

Simpangan baku diketahui ataukah tidak

diketahui
Ukuran sampel atau Sample sizes n 30
ataukah n < 30

Uji Hipotesis bagi 1 2


Mean populasi, sampel bebas
1 dan 2 diketahui
1 dan 2 unknown,
n1 dan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

Gunakan statistik uji z


Gunakan s untuk menduga ,
dekati dengan statistik uji z
Gunakan s untuk menduga
, gunakan degan statistik
uji t dan simpangan baku
gabungan

Uji Hipotesis bagi 1 2


bila 1 dan 2 diketahui
Mean populasi,
sampel bebas

1 dan 2 diketahui
1 dan 2 unknown,
n1 dan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

Statistik uji bagi


1 2 adalah:

x
z

x 2 1 2
2
1

n1
n2

Daerah Kritis/Daerah Penolakan


Uji Hipotesis bagi 1 2
Dua mean populasi, sampel bebas
Lower tail test:

Upper tail test:

Two-tailed test:

H0: 1 2 = 0
HA: 1 2 < 0

H0: 1 2 = 0
HA: 1 2 > 0

H0: 1 2 = 0
HA: 1 2 0

-z

Tolak H0 if z < -z

z
Tolak H0 if z > z

/2
-z/2

/2
z/2

Tolak H0 if z < -z/2


or z > z/2

Uji Hipotesis bagi 1 2


bila 1 dan 2 diketahui
Contoh
The U-Scan facility was recently installed at the Byrne Road FoodTown location. The store manager would like to know if the mean
checkout time using the standard checkout method is longer than
using the U-Scan. She gathered the following sample information. The
time is measured from when the customer enters the line until their
bags are in the cart. Hence the time includes both waiting in line and
checking out.

Uji Hipotesis bagi 1 2


bila 1 dan 2 diketahui
Jawab:

Step 1: State the null and alternate hypotheses.


(keyword: longer than)
H0: S = U
H1: S > U
Step 2: Select the level of significance.
The .01 significance level is stated in the problem.

Uji Hipotesis bagi 1 2


bila 1 dan 2 diketahui

Step 3: Determine the appropriate test statistic.


Because both population standard deviations are known, we can use z-distribution as the test statistic
Step 4: Formulate a decision rule.
Reject H0 if Z > Z
Z > 2.33
Step 5: Compute the value of z and make a decision

Xs Xu

s2
ns

u2
nu

5.5 5.3

0.40 2
0.30 2
is larger than the critical value of 2.33. Our decision is to reject the null hypothesis. The
The computed value of 3.13
50
100
difference of .20 minutes between the mean checkout time using the standard method is too large to have occurred by
0.2 the U-Scan method is faster.
chance.We conclude
3.13
0.064

Uji Hipotesis bagi 1 2 bila 1 dan 2


tidak diketahui, ukuran sampel besar
Mean populasi,
sampel bebas

Statistik uji bagi


1 2 adalah:

1 dan 2 diketahui
1 dan 2 unknown,
n1 dan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

x
z

x 2 1 2
2
1

s
s2

n1 n2

Uji Hipotesis bagi 1 2 bila 1 dan 2


tidak diketahui, ukuran sampel kecil
Statistik uji bagi
1 2 adalah:

Mean populasi,
sampel bebas

x
t

1 dan 2 diketahui

x 2 1 2
sp

1 dan 2 unknown,
n1 dan n2 30
1 dan 2 unknown,
n1 atau n2 < 30

1
1

n1 n 2

Dimana t/2 memiliki derajat bebas (n1


+ n2 2) dan simpangan baku
gabungan:

sp

n1 1 s12 n2 1 s2 2
n1 n2 2

Uji Hipotesis bagi 1 2 bila 1 dan 2


tidak diketahui, ukuran sampel kecil
Contoh:
Owens Lawn Care, Inc., manufactures and assembles lawnmowers that are
shipped to dealers throughout the United States and Canada. Two different
procedures have been proposed for mounting the engine on the frame of the
lawnmower. The question is: Is there a difference in the mean time to
mount the engines on the frames of the lawnmowers?
To evaluate the two methods, it was decided to conduct a time and motion
study. A sample of five employees was timed using the Welles method and
six using the Atkins method. The results, in minutes, are shown below:

Is there a difference in the mean mounting times? Use the .10 significance
level.

Uji Hipotesis bagi 1 2 bila 1 dan 2


tidak diketahui, ukuran sampel kecil
Step 5: Compute the value of t and make a decision
Step 1: State the null and alternate hypotheses.
(Keyword: Is there a difference)
H0: 1 = 2
H1: 1 2
Step 2: State the level of significance.
The 0.10 significance level is stated in the problem.
Step 3: Find the appropriate test statistic.
Because the population standard deviations are not
known but are assumed to be equal, we use the
pooled t-test.
Step 4: State the decision rule.
Reject H0 if t > t/2,n1+n2-2 or t < - t/2, n1+n2-2
t > t.05,9 or t < - t.05,9
t > 1.833 or t < - 1.833

-0.662
The decision is not to reject the null hypothesis,
because -0.662 falls in the region between -1.833 and
1.833.
We conclude that there is no difference in the mean times
to mount the engine on the frame using the two methods

Uji Hipotesis bagi 1 2 bila 1 dan 2


tidak diketahui, ukuran sampel kecil
Youre a financial analyst for a brokerage firm. Is there a
difference in dividend yield between stocks listed on the
NYSE & NASDAQ? You collect the following data:

NYSE
Number
21
Sample mean
3.27
Sample std dev 1.30

NASDAQ
25
2.53
1.16

Assuming equal variances, is


there a difference in average
yield ( = 0.05)?

Uji Hipotesis bagi 1 2 bila 1 dan 2


tidak diketahui, ukuran sampel kecil
The test statistic is:

x
t

x 2 1 2
sp

sp

1
1

n1 n 2

n1 1 s12 n2 1 s2 2
n1 n2 2

3.27 2.53 0
1
1
1.2256

21 25

21 11.30 2 25 11.16 2
21 25 2

2.040

1.2256

Uji Hipotesis bagi 1 2 bila 1 dan 2


tidak diketahui, ukuran sampel kecil
H0: 1 - 2 = 0 i.e. (1 = 2)

Reject H0

Reject H0

HA: 1 - 2 0 i.e. (1 2)
= 0.05
df = 21 + 25 - 2 = 44
Nilai kritis: t = 2.0154

Statistik uji:
3.27 2.53
t
2.040
1
1
1.2256

21 25

.025

-2.0154

.025

0 2.0154

2.040

Decision:
Tolak H0 pada =
0.05
Conclusion:
There is evidence of
a difference in
means.

Hypothesis Testing for


Paired Samples
Paired
samples

The test statistic for d is

d d
t
sd
n

n is the
number
of pairs in
Where t/2 has n - 1 d.f.
the
paired
and sd is:
sample

sd

(d
i1

d)

n 1

Hypothesis Testing for


Paired Samples
(continued)

Paired Samples
Lower tail test:

Upper tail test:

Two-tailed test:

H0: d = 0
HA: d < 0

H0: d = 0
HA: d > 0

H0: d = 0
HA: d 0

-t

Reject H0 if t < -t

t
Reject H0 if t > t
Where t has n - 1 d.f.

/2
-t/2

/2
t/2

Reject H0 if t < -t
or t > t

Paired Samples Example


Assume you send your salespeople to a customer
service training workshop. Is the training effective?
You collect the following data:

Number of Complaints:
(2) - (1)
Salesperson Before (1) After (2)
Difference, di
C.B.
T.F.
M.H.
R.K.
M.O.

6
20
3
0
4

4
6
2
0
0

- 2
-14
- 1
0
- 4
-21

d =

di
n

= -4.2

sd

2
(d

d
)
i

5.67

n 1

Paired Samples: Solution


Has the training made a difference in the number of

complaints (at the 0.01 level)?


H0: d = 0
HA: d 0
= .01

d = - 4.2

Critical Value = 4.604


d.f. = n - 1 = 4

sd / n

4.2 0
5.67/ 5

Reject

/2

/2

- 4.604

4.604

- 1.66

Decision: Do not reject H0


(t stat is not in the reject region)

Test Statistic:

d d

Reject

1.66

Conclusion: There is not a


significant change in the
number of complaints.

Two Population Proportions


Population
proportions

Goal: Form a confidence interval for


or test a hypothesis about the
difference between two population
proportions, p1 p2
Assumptions:
n1p1 5 , n1(1-p1) 5
n2p2 5 , n2(1-p2) 5
The point estimate for
the difference is

p1 p2

Confidence Interval for


Two Population Proportions
Population
proportions

The confidence interval for


p1 p2 is:

p 2 z /2

p1(1 p1 ) p 2 (1 p 2 )

n1
n2

Hypothesis Tests for


Two Population Proportions
Population proportions
Lower tail test:

Upper tail test:

Two-tailed test:

H0: p1 = p2
HA: p1 < p2

H0: p1 = p2
HA: p1 > p2

H0: p1 = p2
HA: p1 p2

i.e.,

i.e.,

i.e.,

H0: p1 p2 0
HA: p1 p2 < 0

H0: p1 p2 0
HA: p1 p2 > 0

H0: p1 p2 = 0
HA: p1 p2 0

Two Population Proportions


Population
proportions

Since we begin by assuming the null


hypothesis is true, we assume p1 = p2
and pool the two p estimates
The pooled estimate for the
overall proportion is:

n1p1 n2 p 2 x1 x 2
p

n1 n2
n1 n2
where x1 and x2 are the numbers from
samples 1 and 2 with the characteristic of interest

Two Population Proportions


Population
proportions

The test statistic for


p1 p2 is:

p
z

p 2 p1 p 2

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
HA: p1 p2 < 0

H0: p1 p2 = 0
HA: p1 p2 > 0

H0: p1 p2 = 0
HA: p1 p2 0

-z

Reject H0 if z < -z

z
Reject H0 if z > z

/2
-z/2

/2
z/2

Reject H0 if z < -z
or z > z

Example:
Two population Proportions
Is there a significant difference between the
proportion of men and the proportion of
women who will vote Yes on Proposition A?

In a random sample, 36 of 72 men and 31 of


50 women indicated they would vote Yes

Test at the .05 level of significance

Example:
Two population Proportions

The hypothesis test is:

H0: p1 p2 = 0 (the two proportions are equal)


HA: p1 p2 0 (there is a significant difference between proportions)

The sample proportions are:

Men:

p1 = 36/72 = .50

Women:

p2 = 31/50 = .62

The pooled estimate for the overall proportion is:

x1 x 2 36 31 67
p

.549
n1 n2 72 50 122

Example:
Two population Proportions
The test statistic for p1 p2 is:
z

p 2 p1 p 2

1
1
p (1 p)

n1 n2

.50 .62 0
1
1
.549 (1 .549)

72 50

Critical Values = 1.96


For = .05

Reject H0

Reject H0

.025

.025

-1.96
-1.31

1.31

1.96

Decision: Do not reject H0


Conclusion: There is not
significant evidence of a
difference in proportions
who will vote yes between
men and women.

Anda mungkin juga menyukai