Anda di halaman 1dari 24

Analisis Data Kontinyu (t test )

Dr. Pudji Lestari, dr, Mkes


IKM-KP Fak Kedokteran
Univ Airlangga
PARAMETRIK NON PARAMETRIK
RASIO/INTERVAL ORDINAL NOMINAL /
DISTRIBUSI R/I DISTR NORMAL (-) KATEGORIAL
NORMAL
I. KOMPARASI
1. Populasi vs sampel t satu sampel Kolmogorov-Smirnov 2
satu sampel
2. Sampel
(i) 2 sampel t 2 sampel Mann-Whitney / 2 /
Wilcoxon 2 sampel Fisher’s Exact test
(ii) >2 sampel ANOVA Kruskall Wallis 2
3. Pengamatan
(i) 2 pengamatan Paired t test Wilcoxon signed rank test Mc. Nemar
(ii) > 2 pengamatan Anova sama subyek Friedman Q Cochran
II. KORELASI
1. Interdependency rho-Pearson Spearman Contingency C, Phi
Kendall Log rank (>2 variabel)
2. Dependency Regresi linier Regresi Polinomial Regresi logistik
(variabel dependent)
T Test
Uji t (t-test) merupakan prosedur pengujian
parametrik rata-rata dua kelompok data, baik
untuk kelompok data terkait maupun dua
kelompok bebas.

Tes t atau Uji t adalah uji statistik yang


digunakan untuk menguji kebenaran .
Penggolongan Uji T

Uji t

Satu Sampel Dua Sampel

Berhubungan Terpisah
(Dependen) (Independen)
T test satu sampel
 Syarat :
1. Skala data ratio/interval
2. Distribusi normal
3. Membandingkan dengan /menaksir harga SE populasi
Bisa untuk n kecil (kurang sari 30)
Dasar perhitungan
 Mean = jumlah nilai seluruh pengamatan dibagi jumlah
pengamatan (n)
 Standar deviasi

( X  M ) 2
s
N 1
Distribusi nilai T
T tes satu sample
 Contoh : membandingkan panjang badan janin 40 minggu dengan suatu
standar
 Panjang badan janin 40 minggu tidak kurang dari 20 inchi, literatur dari Eropa dan
Amerika Utara. Apakah janin Indonesia juga cocok dengan standar tersebut?
Data:
 15.6, 16.2, 22.5, 20.5, 16.4, 19.4, 16.6, 17.9, 12.7, 13.9
 Apakah janin dalam data menunjukkan cukup fakta untuk cocok dengan standar yang
dimaksud ? a Type I error (false alarm, reject the Null when it is true)) with a
probability = 0.01?
 Step 1: Assumptions: dependent variable is scale, Randomization, Normal
Distribution
 Step 2: State H0 and H1:
 H0 Janin Indonesia sesuai dengan standar tersebut;
 H1 Janin Indonesia tidak sesuai dengan standar tersebut
Contoh t Test satu sample
 Panjang badan janin 40 minggu tidak kurang dari 20 inchi, literatur dari Eropa
dan Amerika Utara. Apakah janin Indonesia juga cocok dengan standar tersebut?

 15.6, 16.2, 22.5, 20.5, 16.4, 19.4, 16.6, 17.9, 12.7, 13.9
 Step 3: Determine Characteristics of Sample
Mean M = 17.17
Standard Deviation of Sample s = 2.98
( X  M )2
s
Standard Error of Sample sm = 0.942
N 1
s
 Step 4: Determine Cutoff sm 
N
 df = N-1 = 10-1 =9
 t statistic cut-off = -2.822 Step 5: Calculate t Statistic
Contoh t Test satu sample
 Panjang badan janin 40 minggu tidak kurang dari 20 inchi, literatur dari Eropa
dan Amerika Utara. Apakah janin Indonesia juga cocok dengan standar tersebut?

 15.6, 16.2, 22.5, 20.5, 16.4, 19.4, 16.6, 17.9, 12.7, 13.9

 Mean M = 17.17 Standard Deviation of Sample s = 2.98


Standard Error of Sample sm = 0.942

Step 5: Calculate t Statistic Step 6:


t statistic cut-off = -2.822
( M   m ) (17.17  20) t statistic = -3.00
t   3.00 Tolak Ho
sm 0.942
Normality Check

We should check for normality using:


• assumptions about population
• histograms for each group
• normal quantile plot for each group

With such small data sets, there really isn’t a really good
way to check normality from data, but we make the
common assumption that physical measurements of people
tend to be normally distributed.
Contoh t test independen

 Suppose we put people on 2 diets:


the pizza diet and the beer diet.
 Participants are randomly assigned to either 1-week of
eating exclusively pizza or 1-week of exclusively drinking
beer.

 Of course, this would be unethical, because pizza and beer


should always be consumed together, but this is just an
example.

12
Contoh :

 At the end of the week, we measure


weight gain by each participant.

 Which diet causes more weight gain?

 In other words, the null hypothesis is:

Ho: wt. gain pizza diet =wt. gain beer diet.

13
Contoh

 Why?
 The null hypothesis is the opposite of what we hope to find.
 In this case, our research hypothesis is that there ARE
differences between the 2 diets.
 Therefore, our null hypothesis is that there are NO
differences between these 2 diets.

14
Column 3 Column 4

X1 : Pizza X2 : Beer (  1  1 ) ( 
2
2   2 ) 2

1 3 1 1
2 4 0 0
2 4 0 0
2 4 0 0
3 5 1 1
1  2 2  4

s x2 
 (    ) 2

 0.4 0.4
n 15
Contoh
 The first step in calculating the independent samples t-test is
to calculate the variance and mean in each condition.
 In the previous example, there are a total of 10 people, with
5 in each condition.
 Since there are different people in each condition, these
“samples” are “independent” of one another;
giving rise to the name of the test.

16
 The variances and means are calculated separately for each
condition
(Pizza and Beer).
 A streamlined calculation of the variance for each condition was
illustrated previously.
 In short, we take each observed weight gain for the pizza
condition, subtract it from the mean gain of the pizza dieters
and square the result

17
Example 3.1 (cont.)
 Next, add up column 3 and divide by the number of
participants in that condition (n1 = 5) to get the sample
variance,
s  0.4
2
x
 The same calculations are repeated for the “beer” condition.

18
Formula

The formula for


the independent samples t-test is:

1   2
t , df = (n1-1) + (n2-1)
2 2
S S

x1 x2

n1  1 n2  1
19
Example 3.1 (cont.)
 From the calculations previously, we have everything that is
needed to find the “t.”

24
t  4.47, df = (5-1) + (5-1) = 8
.4 .4
 C.V. t(8), 2-tailed = 2.31
4 4
After calculating the “t” value, we need to know
if it is large enough to reject the null hypothesis.
20
T Test

1. Paired Sample T Test (Uji Dua


Sampel Berpasangan)
 Satu kelompok dengan dua perlakuan
berbeda atau
 Membandingkan nilai rata-rata dua
kelompok berpasangan
T Test (Lanjutan)

1. Paired Sample T Test (Uji Dua


Sampel Berpasangan)
 Ciri-ciri uji paired sample t test:
a. Level pengukuran data yaitu interval dan
rasio;
b. Jumlah data minimal 30 sampel;
c. Ciri utama: berasal dari 1 buah populasi yang
sama diberi 2 perlakuan yang berbeda dan
mempunyai hubungan;
d. Data berdistribusi normal.
Dependent T-test
 2 samples
 two groups are matched in some way (e.g., pairs of twins are
divided between two groups)
 typically the same people are in both groups (e.g., before &
after design)
 Example: The North American Bacon Council tests if
participants change weight after 6 months of an all bacon diet.
 IV: Diet (normal, all-bacon); DV: Weight
 Standard Error of the Mean Difference D  D
t
sˆD

p. 23
Hypothesis Testing Steps (Dep. t)
1. Comparing xbar1 and xbar2, μ and σ unknown.
2. H0: μD = 0 HA: μD ≠ 0
3. α = .05, df=npairs –1 = 7-1 = 6, tcritical =  2.447
4. tobtained = -3.074
x1  x2 188.57  203.57
d   1.1619
sˆ 12.91
5. REJECT the H0 Get off SPSS print-out
 The research hypothesis was supported. The weight of subjects before the all
bacon diet (M=188.57) was significantly less than the weight after
(M=203.57), t(6)= -3.074, p≤ .05. The effect of the diet on weight was
large, d=1.1619.

p. 24

Anda mungkin juga menyukai