You are on page 1of 40

# Pertemuan 4

## Estimasi Dua Populasi

Rudi Salam
rudisalam@stis.ac.id - 1

## Membandingkan Dua Populasi

Previously we looked at techniques to estimate and create
confidence interval for one population:
Population Mean , Population Variance 2, and
Population Proportion p
Kita tetap menggunakan parameter tersebut untuk dua
populasi, di mana perhatiannya sekarang adalah:
The difference between two means.
The ratio of two variances.
The difference between two proportions.
rudisalam@stis.ac.id - 2

## Estimasi Dua Populasi

Mengestimasi nilai
dua populasi
Rata-rata
Populasi,
independent
samples

Sampel
Berpasangan

Proporsi
Populasi

Varians
Populasi

Examples:
Group 1 vs.
independent
Group 2

Same group
before vs. after
treatment

Proportion 1 vs.
Proportion 2

Varians 1 vs.
Varians 2

rudisalam@stis.ac.id - 3

Pertemuan 4
Estimasi Dua Rata-rata
Rudi Salam
rudisalam@stis.ac.id - 4

## Perbedaan Dua Rata-Rata

Dalam mengestimasi dan menguji perbedaan di antara
rata-rata dua populasi, kita mengambil sampel acak dari
masing-masing populasi. Kita akan menganggap kedua
sampel adalah independen, maksudnya, kedua sampel
sama sekali tidak berhubungan satu sama lain.
Population 1
Sample, size: n1

Parameters:

(Likewise, we consider

Statistics:

for popn 2)
rudisalam@stis.ac.id - 5

## Perbedaan Dua Rata-rata

Population means,
independent
samples

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

## Tujuan: Form a confidence

interval for the difference
between two population
means, 1 2
The point estimate for the
difference is

x1 x2
rudisalam@stis.ac.id - 6

Sampel Independen
Population means,
independent
samples

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

## Different data sources

Unrelated
Independent
Sample selected from
one population has no
effect on the sample
selected from the other
population
Use the difference between 2
sample means
Use z test or pooled variance
t test
rudisalam@stis.ac.id - 7

1 dan 2 diketahui
Population means,
independent
samples
1 and 2 known
1 and 2 unknown,
n1 and n2 30
1 and 2 unknown,
n1 or n2 < 30

Assumptions:

## Samples are randomly and

independently drawn
population distributions are
normal or both sample sizes
are 30
Population standard
deviations are known
rudisalam@stis.ac.id - 8

1 dan 2 diketahui
Population means,
independent
samples
1 and 2 known

## When 1 and 2 are known and

both populations are normal or
both sample sizes are at least 30,
the test statistic is a z-value

## and the standard error of

x1 x2 is

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

(continued)

x1 x 2

2
1

n1
n2

rudisalam@stis.ac.id - 9

1 dan 2 diketahui
Population means,
independent
samples
1 and 2 known
1 and 2 unknown,
n1 and n2 30

(continued)

## Confidence interval untuk

x 2 z /2

2
1

n1
n2

1 and 2 unknown,
n1 or n2 < 30
rudisalam@stis.ac.id - 10

## 1 and 2 unknown, large samples

Assumptions:

Population means,
independent
samples

## Samples are randomly and

independently drawn

1 and 2 known
1 and 2 unknown,
n1 and n2 30

## both sample sizes

are 30
Population standard
deviations are unknown

1 and 2 unknown,
n1 or n2 < 30
rudisalam@stis.ac.id - 11

## 1 and 2 unknown, large samples

(continued)

Population means,
independent
samples

Forming interval
estimates:
use sample standard
deviation s to estimate

1 and 2 known
1 and 2 unknown,
n1 and n2 30

## the test statistic is a z value

1 and 2 unknown,
n1 or n2 < 30
rudisalam@stis.ac.id - 12

## 1 and 2 unknown, large samples

(continued)

Population means,
independent
samples

## The confidence interval for

1 2 is:

1 and 2 known

x
and unknown, *
1

n1 and n2 30

x 2 z /2

2
1

s
s2

n1 n2

1 and 2 unknown,
n1 or n2 < 30
rudisalam@stis.ac.id - 13

## 1 = 2 unknown, small samples

Population means,
independent
samples

Assumptions:
populations are normally
distributed

1 and 2 known

variances

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

## samples are independent

*
rudisalam@stis.ac.id - 14

## 1 = 2 unknown, small samples

(continued)

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 and 2 known
1 and 2 unknown,
n1 and n2 30
1 and 2 unknown,
n1 or n2 < 30

## the test statistic is a t value

with (n1 + n2 2) degrees
of freedom
rudisalam@stis.ac.id - 15

## 1 = 2 unknown, small samples

(continued)

Population means,
independent
samples

Standar deviasi

1 and 2 known

sp

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

n1 1s

n2 1s 2
n1 n2 2
2
1

*
rudisalam@stis.ac.id - 16

(continued)

## The confidence interval for

1 2 is:

Population means,
independent
samples

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

x 2 t /2 sp

1 1

n1 n2

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

and

sp

n1 1s12 n2 1s2 2
n1 n2 2
rudisalam@stis.ac.id - 17

(continued)

## Interval kepercayaan untuk

Population means,
independent
samples

1 2 jika 1 2 adalah:

1 and 2 known

x 2 t /2

## Where t/2 adalah nilai distribusi t

dengan derajat bebas v di mana :

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

s12 s 2 2

n1 n 2

s n s

v
s n s
2
1

2
1

2
2

n1 1

2
2

n2

n2

n2 1

rudisalam@stis.ac.id - 18

Sampel Berpasangan
Tests Means of 2 Related Populations
Paired
samples

## Paired or matched samples

Repeated measures (before/after)
Use difference between paired values:

d = x1 - x2

## Eliminates Variation Among Subjects

Assumptions:
Both Populations Are Normally Distributed
Or, if Not Normal, use large samples
rudisalam@stis.ac.id - 19

Paired Differences
The ith paired difference is di , where
Paired
samples

di = x1i - x2i
The point estimate for
the population mean
paired difference is d :
The sample standard
deviation is

## n is the number of pairs in the paired sample

d
i 1

n
n

sd

2
(d

d
)
i
i1

n 1
rudisalam@stis.ac.id - 20

Paired Differences
Paired
samples

(continued)

d t /2

sd
n
n

## Where t/2 has

n - 1 d.f. and sd is:

sd

(d d)
i1

n 1

## n is the number of pairs in the paired sample

rudisalam@stis.ac.id - 21

## Contoh (varians known)

Suatu ujian kimia yang telah dibakukan
diberikan pada 50 siswa wanita dan 75 siswa
pria. Nilai rata-rata wanita 76, sedangkan murid
pria mendapat nilai rata-rata 82. Carilah CI 96%
untuk selisih 1-2, bila 1 menyatakan rataan
nilai semua siswa pria dan 2 rataan nilai
semua siswa wanita yang mungkin akan
mengikuti ujian ini. Anggap simpangan baku
populasi untuk wanita dan pria, masing-masing
6 dan 8.
rudisalam@stis.ac.id - 22

## Contoh (varians known)

Solusi:
Estimasi titik untuk 1-2 adalah x1 x2 82 76 6
Dengan =0,04 diperoleh z0,02=2,054.
64 36
64 36
6 2, 054

1 2 6 2, 054

75 50
75 50
atau
3, 43 1 2 8,57
rudisalam@stis.ac.id - 23

Pertemuan 4
Selisih Dua Proporsi
Rudi Salam
rudisalam@stis.ac.id - 24

Proporsi
Populasi

## 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

p 1 p2
rudisalam@stis.ac.id - 25

## Confidence Interval for

Two Population Proportions
Proporsi
Populasi

## The confidence interval for

p1 p2 is:

p1 p 2 z /2

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

n1
n2

rudisalam@stis.ac.id - 26

Contoh
A consumer packaged goods (CPG) company is test
marketing two new versions of soap packaging. Version one
(bright colors) is distributed in one supermarket, while
version two (simple colors) is in another.
Here is
the summary data:

rudisalam@stis.ac.id - 27

Contoh
Create a 95% confidence interval for the
difference between the two proportions of
packaged soap sales

rudisalam@stis.ac.id - 28

Pertemuan 4
Rasio Dua Varians
Rudi Salam
rudisalam@stis.ac.id - 29

## Rasio Dua Varians

When looking at two population variances, we
consider the ratio of the variances, i.e. the
parameter of interest to us is: 12

2
2

Ingat:
22 s12
F 2 2 F v1 , v2 di mana v1 n1 1 dan v2 n2 1
1 s2
rudisalam@stis.ac.id - 30

## Rasio Dua Varians

Sehingga
dapat ditulis:

/2

1-

f1-/2

P f v1 , v2 F f v1 , v2 1
1 2

/2

f/2
rudisalam@stis.ac.id - 31

## Rasio Dua Varians

Diuraikan:

P f v1 , v2 F f v1 , v2 1
1 2

22 s12
P f v1 , v2 2 2 f v1 , v2 1
1 s2
1 2

2
2

2
2
s

1
1
s

P 12
12 12
1

s f v , v 2 s2 f v1 , v2
2 2 1 2

1
2
2

2
2
s

1
s

P 12
12 12 f v2 , v1 1
s f v , v 2 s2 2
2 2 1 2

rudisalam@stis.ac.id - 32

## Rasio Dua Varians

Bila S12 dan s22 adalah varians dari sampel bebas masingmasing ukuran n1 dan n2 dari populasi normal maka
selang kepercayaan (1-)100% untuk 12 22 adalah

12 s12
s12
1
2 2 f v2 , v1
2
s2 f v1 , v2 2 s2 2
2

## Di mana f/2(v1,v2) adalah nilai f dengan df v1=n1-1 dan

v2=n2-1 sehingga luas di sebelah kanannya adalah /2,
dan f/2(v2,v1) adalah nilai f yang sama dengan df
v2=n2-1 dan v1=n1-1.
rudisalam@stis.ac.id - 33

Contoh
A sample of 150 people was randomly drawn. Each
person was identified as a consumer or a nonconsumer of high-fiber cereal. For each person the
number of calories consumed at lunch was recorded.
The data

rudisalam@stis.ac.id - 34

Contoh
If we wanted to determine the 95% confidence
interval estimate of the ratio of the two
population variances, we would proceed as
follows
The confidence interval
2
2
estimator for 1 2 is:

rudisalam@stis.ac.id - 35

Contoh
Dari tabel:
The 95% confidence interval estimate of the ratio of the
two population variances is:

2
2

## That is, we estimate that 1

2 lies between 0.2388

and 0.6614. Note that one (1.00) is not within this interval
rudisalam@stis.ac.id - 36

Soal 1
Suatu perusahaan taksi ingin menentukan apakah
membeli ban merk A atau merk B untuk armada
taksinya. Untuk menaksir perbedaan kedua merk,
dilakukan suatu percobaan menggunakan 12 ban
dari tiap merk. Ban dipakai sampai aus. Hasil
merk A: X1=36.300 km, s1=5000 km ; merk B:
X2=38.100 km, s2=6100 km. Hitunglah selang
kepercayaan 95% untuk 1-2, kedua populasi
diasumsikan normal
rudisalam@stis.ac.id - 37

Soal 2
Kembali ke soal 1, hitunglah selang
kepercayaan 99% untuk A-B bila suatu ban
dari tiap merk dipasang secara acak di roda
belakang delapan taksi dan jarak yang ditempuh
Taksi

32000

48400

32800

38100

30100

31100

47800

36400

38900

31500

## Anggap selisih jarak berdistribusi hampir normal

rudisalam@stis.ac.id - 38

Soal 3
Seorang ahli genetika ingin mengetahui proporsi
pria dan wanita dalam penduduk yang
mempunyai sejenis penyakit darah. Suatu
sampel acak 1000 pria menunjukkan 250 yang
terserang, sedangkan sebanyak 275 dari 1000
wanita yang diperiksa juga terserang penyakit
tersebut. Hitunglah selang kepercayaan 95%
untuk selisih kedua proporsi pria dan wanita
yang terserang penyakit tersebut.

Soal 4
Suatu perusahaan taksi ingin menentukan apakah
membeli ban merk A atau merk B untuk armada
taksinya. Untuk menaksir perbedaan kedua merk,
dilakukan suatu percobaan menggunakan 12 ban
dari tiap merk. Ban dipakai sampai aus. Hasil
merk A: XA=36300 km, sA=5000 km ; merk B:
XB=38100 km, sB=6100 km. Buatlah selang
kepercayaan 90% untuk 12/ 22. Apakah asumsi
bahwa 12=22 mendapat dukungan dalam
membuat selang kepercayaan untuk 1-2.