20
The t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These samples need not be of equal #, nor are they paired.(tidak berpasangan) H0: The 2 samples are from the same population (any differences are due to chance) H1: The 2 samples come from different populations. CATATAN : RISET GUNAKAN STATISTIK SEDERHANA (S1) Sesuai TUJUAN RISET YANG HEBAT BUKAN STATISTIKNYA_ Tetapi SUBSTANSINYA BUATLAH PEMASALAHAN PENELITIAN, TUJUAN , CARI DATA, ANALISIS, INTREPETASI, KESIMPULAN

The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

Embed Size (px)

Citation preview

Page 1: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

The t- test (uji-t)Uji beda Mean dua sampel kelompok I dan II

require 2 samples which may be from the same

population.(berpasangan)

These samples need not be of equal #, nor are

they paired.(tidak berpasangan)

H0: The 2 samples are from the same population (anydifferences are due to chance)

H1: The 2 samples come from different populations.

CATATAN : RISET GUNAKAN STATISTIK SEDERHANA (S1) Sesuai TUJUAN

RISET YANG HEBAT BUKAN STATISTIKNYA_ Tetapi SUBSTANSINYA

BUATLAH PEMASALAHAN PENELITIAN, TUJUAN , CARI DATA,

ANALISIS, INTREPETASI, KESIMPULAN

Page 2: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

• Menguji perbedaan rata-rata/mean :antara klmpk.Idan ke II

• Perlu diperhatikan : dua kelompok yang independen(tak berpasangan) atau dua kelompok yangdependen (berpasangan)

• A. Data independen : bila data kelompok yang satu tidaktergantung dari data kelompok kedua,

misal: 1.membandingkan mean tekanan darah sistolik orangdesa dengan orang kota.

2.Produksi susu pada ketinggian tempat beda• B. Data dependen/pasangan : bila kelompok data yang

dibandingkan datanya saling mempunyai ketergantungan,misal : 1.Data BB sebelum dan sesudah mengikuti program diet

2.Kualitas daging kaki kanan-kaki kiri

CIRI- CIRI T TEST _ CONTOH:

Page 3: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These
Page 4: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

4

T-Test : Perbandingan dua nilai tengah (mean)

• Goal: to compare the mean of a numerical variable for different groups.

• Tests one categorical vs. one numerical variable

Example: gender (M, F) vs. height

Perbandingan :

• Data from the two groups are paired

• There is a one-to-one correspondence between the individuals in the two groups

Paired designs (berpasangan)

Page 5: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

Uji t dependen(Paired Sampels T-Test)

• Untuk menguji perbedaan mean antara dua kelompokdata yang dependen.

• Uji ini banyak digunakan untuk penelitian eksperimen.

Syarat/asumsi yang harus dipenuhi :

• Data berdistribusi normal/simetris

• Kedua kelompok data dependen

• Variabel yang dihubungkan berbentuk numerik untuk variabel dependen dan kategorik dengan hanya dua kelompok untuk variabel independen

Page 6: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

Paired designs (Berpasangan)

• Each member of the pair shares much in common with the other, except for the tested categorical variable

• Example: identical twins raised in different environments

• Can use the same individual at different points in time

• Example sederhana: before, after medical treatment

• We have many pairs

• In each pair, there is one member that has one treatment and another who has another treatment

• “Treatment” can mean “group”

Paired comparisons - setup

• To compare two groups, we use the mean of the difference between the two members of each pair

Page 7: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

STUDENT’S T TEST

•The student’s t test is used to see if to sets of data differ significantly.

•The method assumes that the results follow the normal distribution (also called student's t-distribution) if the null hypothesis is true.

•This null hypothesis will usually stipulate that there is no significant difference between the means of the two data sets.

•It is best used to try and determine whether there is a difference between two independent sample groups. For the test to be applicable, the sample groups must be completely independent, and it is best used when the sample size is too small to use more advanced methods.

•Before using this type of test it is essential to plot the sample data from he two samples and make sure that it has a reasonably normal distribution, or the student’s t test will not be suitable.

• It is also desirable to randomly assign samples to the groups, wherever possible.

Page 8: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

Sample

Null hypothesis

The population mean

is equal to o

One-sample t-test

Test statistic

t=Y − o

s /n

Null distribution t with n-1 dfcompare

How unusual is this test statistic?

P < 0.05 P > 0.05

Reject Ho Fail to reject Ho

Page 9: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

The Use of the Null Hypothesis• Is the difference in two sample populations due to chance or a

real statistical difference?

• The null hypothesis assumes that there will be no “difference” or no “change” or no “effect” of the experimental treatment.

• If treatment A is no better than treatment B then the null hypothesis is supported.

• If there is a significant difference between A and B then the null hypothesis is rejected...

• Test statistic > critical value

• P < alpha

• Reject the null hypothesis

• Statistically significant

Page 10: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

21

21

2

21

22

2

11

21

2

)1()1(

nn

nn

nn

snsn

XXt

Two Sample Difference of Means T-Test

2

21

22

2

11

2

)1()1(

nn

snsnSp2 =Pooled variance of the two groups

21

21

nn

nn= common standard deviation of two groups

The nominator of the equation captures difference in

means,

while the denominator captures the variation within

and between each group

Page 11: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

Contoh

• Test on verbal test scores by gender:

Females: mean = 50.9, variance = 47.553, n=6

Males: mean =41.5, variance = 49.544, n=10

)10(6

106

2106

544.49)110(553.47)16(

5.419.50t

)26667(.826.48

4.9t

02.13

4.9t 605.2

608.3

4.9t

Now what do we do with this obtained value?

Page 12: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

Steps of Testing and Significance

1. Statement of null hypothesis: sesuai tujuan

2. Set Alpha Level of Risk: .10, .05, .01 ( 10 %, 5 %, 1 %) kepercayaan

3. Selection of appropriate test statistic: T-test. Lakukan perhitungan t test

4. Computation of statistical value: nilai t-test hitung.

5. Compare obtained value to critical value: bandingkan t hitung vs t tabel

Catatan:

6. Comparison of the obtained and critical values.

7. If obtained value is more extreme than critical value, you may reject the null hypothesis. In other words, you have significant results.

8. If point seven above is not true, obtained is lower than critical, then

null is not rejected.

Page 13: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

T table of values (5% = 0.05)

For example:For 10 degrees of freedom (2N-2)The chart value to compare your t value to is 2.228

If your calculated t value is between +2.228 and -2.228Then accept the null hypothesis the mean are similar

If your t value falls outside +2.228 and -2.228 (larger than 2.228 or smaller than -2.228)Fail to reject the null hypothesis (accept the alternative hypothesis) there is a significant difference.

Page 14: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These
Page 15: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

CARA HITUNG I:

Page 16: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

CARA HITUNG II:

Page 17: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

CONTOH:

Rumus uji t

d

T = -------------------

Sd_d / ndf = n - 1

d = rata-rata deviasi/selisih nilai sesudah dengan sebelum

SD_d = standar deviasi dari nilai d/selisih sampel 1 dan sampel 2

Contoh : Seorang peneliti ingin mengetahui pengaruh pemberian tablet Fe terhadap kadar Hb pada ibu hamil. Sebanyak 10 ibu hamil diberi tablet Fe dan diukur kadar Hb sebelum dan sesudah pemberian Fe. Hasil pengukuran sbb :

Page 18: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

Sebelum : 12,2 11,3 14,7 11,4 11,5 12,7 11,2 12,1 13,3 10,8

Sesudah : 13,0 13,4 16,0 13,6 14,0 13,8 13,5 13,8 15,5 13,2

Buktikan apakah ada perbedaan kadar Hb antara sebelum dan sesudah pemberian tablet Fe, dengan alpha 5%

Jawab :

Hipotesis

Ho :δ=0 (tdk ada perbedaan kadar Hb sebelum dan sesudah pemberian Fe)

Ha : δ≠0 (ada perbedaan kadar Hb sebelum dan sesudah pemberian Fe)

Perhitungan uji t :

Sebelum : 12,2 11,3 14,7 11,4 11,5 12,7 11,2 12,1 13,3 10,8

Sesudah : 13,0 13,4 16,0 13,6 14,0 13,8 13,5 13,8 15,5 13,2

deviasi : 0,8 2,1 1,3 2,2 2,5 1,1 2,3 1,7 2,2 2,4

(jumlah deviasi = 18,6)

Page 19: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

• rata-rata deviasi : 18,6/10 = 1,86

• Standar deviasi dari nilai deviasinya (SD_d)=0,60

d 1,86

t = ------------------- t = --------------

Sd_d / n 0,60/√ 10

t = 9,80

Kemudian dari nilai t tersebut dibandingkan dengan tabel t dengan df = n – 1 = 9

.20 .10 .05 .01

1

9

.

1,383 1,833 2,262 3,250

-

Page 20: The t- test (uji-t) - Bank Sel · PDF fileThe t- test (uji-t) Uji beda Mean dua sampel kelompok I dan II require 2 samples which may be from the same population.(berpasangan) These

• Dari soal diatas didapat t=9,80, dan df=9 maka nilai t tabel adalah 2,26

• Keputusan uji statistik

t hitung ≥ t tabel sehingga Ho ditolak

t hitung < t tabel maka Ho diterima

Jadi secara statistik ada perbedaan kadar Hb antara sebelum dan sesudah diberi tablet Fe