Anda di halaman 1dari 26

Hypothesis Testing

VITRI WIDYANINGSIH
Hipotesis
Hipotesis merupakan jawaban sementara terhadap masalah penelitian, dimana sudah
dimunculkan hubungan antar variabel dan dinyatakan dalam kalimat deklaratif
◦ Hipotesis Nol (Null Hypothesis) 🡪 H0
◦ Merupakan hipotesis pada uji statistic, dimana kita mengasumsikan tidak adanya hubungan antar variable, atau tidak ada beda
antar kelompok
◦ Misal: Tidak ada beda rerata (mean) kadar hemoglobin sebelum dan sesudah terapi zat besi

◦ Hipotesis Kerja (Alternative Hypotesis) 🡪 Ha/H1


◦ Adalah hipotesis yang menyatakan adanya hubungan antar variable, atau ada beda antar kelompok
◦ Merupakan kebalikan dari hipotesis nol
◦ Misal : Ada beda rerata (mean) kadar hemoglobin sebelum dan sesudah terapi zat besi
Hipotesis
Hipotesis satu arah/sisi (one tailed)
◦ Hipotesis yang sudah ditentukan arahnya
◦ Misal:
◦ Kadar haemoglobin sesudah terapi lebih tinggi disbanding sebelum terapi zat besi
◦ H1 = M2 > M1

Hipotesis dua arah/sisi (two tailed)


◦ Hipotesis yang belum ditentukan arahnya
◦ Misal:
◦ Ada beda rerata (mean) kadar hemoglobin sebelum dan sesudah terapi zat besi
◦ HI = M1 ≠ M1
Uji hipotesis
α adalah probabilitas
kesalahan saat
menolak H0

Hipotesis dua arah

Hipotesis satu arah


What about
α=0.05?
Uji hipotesis Apabila kita
menentukan nilai α =
0.05, maka untuk
hipotesis dua arah,
kita mencari Zα untuk
0.025 = 1.96

Sedang hipotesis
satu arah, kita
Hipotesis dua arah
mencari Zα untuk
0.05 = 1.64

Hipotesis satu arah


Steps in Hypothesis testing
1. Specify the statements for null and alternative hypotheses
2. Specify the level of significance (α) 🡪 rejection criteria
3. Clearly state the probability distribution that we are going to follow (normal, t test, etc)
4. Compute the t statistics and compare to the probability distribution
5. Draw conclusion: reject or fail to reject null hypothesis
Type I vs. Type II Error
There are four possible results with respect to hypothesis testing:
1. Conclude there is a difference when in fact there is a difference (Correct conclusion)
2. Conclude there is a difference when in fact there is not a difference (Type I error)
3. Conclude there is not a difference when in fact there is not a difference (Correct conclusion)
4. Conclude there is not a difference when in fact there is a difference (Type II error)
Type I vs type II error
Level of significance (α)
▪ The significance level (α) is the
probability of making Type I error.
▪ For instance, a significance level 5% (α =
0.05) means that there is a 5% chance of
rejecting a true null hypothesis.
▪ When conducting hypothesis test, a
significance level must be specified when
selecting the critical values

11
Power (1-β)
▪ The power of a test (1 – β) is the
probability of rejecting the null
hypothesis when it is false (correct
decision when the null is false).
▪ The power of a test is one minus the
probability of making Type II error
(β)
▪ Ordinarily, we wish to use the test
statistic that provides the most
powerful test among all possible
tests.

12
P value
▪ The p-value is defined as "the probability of obtaining a test statistic at least as
extreme as the one we actually observed, given the null hypothesis is true".
▪ The p-value indicates how consistent the observed data is with the null
hypothesis of no difference.
▪ The significance level (or alpha level) is the cutoff value chosen by the
investigator to decide whether a given p-value is statistically significant or not.
▪ When the P value is less than or equal to alpha, the result is deemed "statistically
significant", and the null hypothesis is rejected.
▪ When the P value is greater than alpha, there is insufficient evidence to reject the
null hypothesis (the result is not statistically significant).
UJI BEDA RERATA
(COMPARING MEANS)
VITRI WIDYANINGSIH
Contoh rumusan masalah
Adakah perbedaan kadar hemoglobin antara ibu bekerja dengan ibu tidak bekerja?
◦ Variabel terikat berskala kontinue
◦ Variabel bebas berskala kategorik (2 kelompok) Independent T test

Adakah perbedaan kadar hemoglobin sebelum mendapat terapi zat besi dengan sesudah terapi
zat besi?
◦ Variabel terikat berskala kontinue Paired T Test
◦ Variabel bebas berskala kategorik
◦ Dua kelompok sampel berhubungan (pre-post test, berpasangan/matched)
Uji T independen
Uji T independent digunakan untuk mengetahui
apakah ada perbedaan rerata (mean)
Syarat uji T adalah variable terdistribusi normal pada
masing-masing kelompok

H0 : μ1 = μ2
H1 : μ1 ≠ μ2

Asumsi-nya adalah bahwa kedua kelompok tidak


saling berhubungan
Uji T dengan variance sama
Independent T test – Equal variance
Assume σ2 unknown, but equal in the two samples, i.e. the same variance in the
two populations .
Replace σ2 with S2 to make a t-statistic with df = n1+n2-2

with S =
S2 : Estimate of
Common Var

19
Decision
Critical value method:
If t > t n1+n2-2, 1-α/2, or t < - t n1+n2-2, 1-α/2 then
reject H0
If - t n1+n2-2, 1-α/2 ≤ t ≤ t n1+n2-2, 1-α/2 then
fail to reject H0.
p-value:
p = 2 Pr (t n1+n2-2 ≤ t), if t <0
P = 2 Pr (t n1+n2-2 > t), if t > 0
Group practice
Steps for equal variance :
Run normality test
Hypothesis testing for T
test
- Calculate T statistics
- Compare with t
distribution
Group practice

Anda mungkin juga menyukai