HYPOTHESIS TESTING
Definition
A hypothesis testing is a method requiring to state a claim unambigously to determine whether a statistic
(a characteristic of sample) is consistent with a known parameter (a characteristic of population). Example a claim
that the population mean is 368 grams. Than we do a sampling and examine the sample statistic to see if it better
supports the stated claim. The claim is called null hypothesis or the mutually exclusive alternative or the test
hypothesis. The null hypothesis is stated as :
H 0 : = 368
Whenever a null hypothesis is specified, an alternative hypothesis is also specified and it must be true if
the null hypothesis is false. The alternative hypothesis or research hypothesis is always the opposite of the null
hypothesis. The hypothesis alternatives are stated below :
A. H 1 : 368 or B. H 1 : 368 or C. H 1 : 368
Critical Critical
Region Region
(H1) 1- α =γ (H1) Significa
nt level
Region of non
rejection (H0)
α
Critical Critical
Value Value
If you have sufficient evidence from the sample information that null hypothesis is false, so you must reject the
null hypothesis and you have statistical proof that alternative hypothesis is correct.
The Level of Significance or Significant Level (α) is the probability that we will t reject the null hypothesis, H0,
when it is true and should not be rejected.
The Level of Confidence or Confident Level (1-α) is the probability that we will not reject the null hypothesis,
H0, when it is true and should not be rejected.
-Z 1/2α Z1/2α
Step 2. n = 35; α = 0,05
Step 3. Because it is known that σ = 1,2 and μ = 4,5 and the distribution is normal than we use Z test
Step 4. Because α = 0,05, the critical values of z test statistic are -Z1/2α <Z< + Z1/2α = -Z0,025<Z<+ Z0,025 = -1,96 < Z < 1,96
Step 5. Collect the sample data; X = 5,1 . Calculate the test statistic :
X − X 5,1 − 4,5
Z hit = = Z hit = = 2,96
1,2
n 35
Step 6. Because Ztest > Z1/2α = 2,96 > 1,96 the null hypothesis is rejected. There is evidence that population mean
waiting time to place an order has changed from its previous value of 4,5. The mean waiting time for
customers is longer now than it was last month.
-t1/2α t1/2α
Step 2. n = 25; α = 0,05
Step 3. Because it is known that σ = unknown and μ = 4,5 and the distribution is normal than we use t test
Step 4. Because α = 0,05, the critical values of t test statistic are - t n-1;0,025≤t≤+ t 25-1;0,025 = -2,3910 ≤Z ≤ 2,3910
Step 5. Collect the sample data; X = 5,1 . Calculate the test statistic :
X − X 5,1 − 4,5
ttest = = t test = = t test = 4,286
s 0,7
n 25
Step 6. Because ttest > t1/2α = 4,286 > 2,0639 the null hypothesis is rejected. There is sufficient evidence that
population mean waiting time to place an order has changed from its previous value of 4,5.
Step 6. Because p-Value = 0,0005350 < α = 0,05, we reject the null hypothesis. There is sufficient evidence that population
mean waiting time to place an order has changed from its previous value of 4,5.
H1 : __________________________________________________________________________
H0 : =
H1 :
Step 5. Because Ztest = ....... than P (Ztest =........) = .......... p-Value = ......- p(Ztest = ........)
p-Value =.......-......................
= .............................
Because the test is .........-tailed test so p-Value =
Step 6. Because p-Value = ........... α = ........., we .................the null hypothesis.There .....................................
7
...............................................................................................................................................................
H1 : __________________________________________________________________________
H0 : =
H1 :
Step 5. Because Ztest = ....... than P (Ztest =........) = .......... p-Value = ......- p(Ztest = ........)
p-Value =.......-......................
= .............................
Because the test is .........-tailed test so p-Value =
Step 6. Because p-Value = ........... α = ........., we .................the null hypothesis.There .....................................
..............................................................................................................................................................
III. Parameters estimation approach
Step 5. Estimate parameters :
Is the parameter still in the parameter estimation range or not
8
Step 6. Because not/ in the rage so there is no /sufficient evidence to accept Ho
H1 : __________________________________________________________________________
H0 : =
H1 :
Step 5. Because Ztest = ....... than P (Ztest =........) = .......... p-Value = ......- p(Ztest = ........)
p-Value =.......-......................
= .............................
Because the test is .........-tailed test so p-Value =
Step 6. Because p-Value = ............α = ........., we .................the null hypothesis.There .....................................
..............................................................................................................................................................
H1 : __________________________________________________________________________
H 0 : 1 − 2 = 0; ( 1 = 2 )
H 0 : 1 − 2 .....0; ( 1 ..... 2 )
H1 : __________________________________________________________________________
H 0 : 1 − 2 = 0; ( 1 = 2 )
H 0 : 1 = 2 0; ( 1 2 )
Step 6. Because .......... =. Ztest ......–Z.....=...... the null hypothesis ........ rejected. There is .... sufficient evidence
that ............................................................................................................................................................
II. p-Value approach
Step 5. Because Ztest = ....... than P (Ztest =........) = .......... p-Value = ......- p(Ztest = ........)
p-Value =.......-......................
= .............................
Because the test is .........-tailed test so p-Value =
Step 6. Because p-Value = ............α = ........., we .................the null hypothesis.There .....................................
...............................................................................................................................................................
III. Parameters estimation approach
Step 5. Estimate parameters :
Is the parameter still in the parameter estimation range or not
Hasil di SPSS
Jawab
_ Hipotesis
_ Ho : X1 = X2
tidak ada perbedaan tekanan darah antara sebelum
dan sesudah KB suntik
_ Ha : X1≠ X2
ada perbedaan tekanan darah anatara sebelum dan
sesudah KB suntik
_ Uji t (perhitungan nilai t)
_ Kriteria
_ Tolak Ho apabila harga thitung (to) sama atau lebih
besar dari harga ttabel atau sama atau lebih kecil dari
harga – ttabel. Ttabel(t(1-1/2α)(n-1))
t hit t tab
Kriteria
Tolak Ho apabila harga thitung sama atau lebih besar
dari harga ttabel
2. nonrank approach
1. Buka program SPSS 24, lalu ketik open new data set
15
2. Ketik atau salin dari excel dengan copy ke spss di VAR00001 di bawah ini
No 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
Waiting Time 4.8 4.9 4.8 4.7 4.6 4.6 4.5 5.2 4.5 4.6 5 5 5 5.3 6.3
No 16 17 18 19 20 21 22 23 24 25 Total Mean Stdev
Waiting Time 6.4 6.5 6.4 6.2 5.3 4.7 5 4.5 4.3 4.3 127.4 5.1 0.7
3. Di program SPSS variable view di klik kemudian diubah name dari VAR0001 menjadi WaitTime dst
seperti di bawah ini
5. Maka setelah proses tersebut dilakukan akan muncul tampilan sebagai berikut kemudian pilih
options dan confidence interval percentage 5% dan exclude cases lalu klik ok:
One-Sample Test
Test Value = 0
Difference
6. An experimental research activity, has succeeded in finding the "ABG" method as a new method for teaching
Statistics II courses. In order to test the effectiveness or efficacy of the new method, further research is carried
out by submitting a Zero Hypothesis (Nil) which says: There is no significant difference in Statistics II values
between before and after the implementation of the "ABG" method as a method of teaching UIB students 6 In
the framework of this test, a sample of 20 students was taken. Use a confidence level of 95% (alpha = 5%) to
test the statement (hypothesis).
Scores
Name
Before After
A 78 75
B 60 68
C 55 59
D 70 71
E 57 63
F 49 54
G 68 66
H 70 74
I 81 89
J 30 33
K 55 51
L 40 50
M 63 68
N 85 83
O 70 77
P 62 69
Q 58 73
R 65 65
S 75 76
T 69 86