1. 1
Topic: Test of Hypothesis Using SPSS
Nabil Awan
Lecturer, ISRT, University of Dhaka
Day 3, Session III and IV
M. Amir Hossain
Professor, ISRT, University of Dhaka
2
Basics of Hypothesis Testing
Hypothesis Testing
Hypothesis testing is a decision making process for
evaluating claims about a population.
2. 2
3
Basics of Hypothesis Testing
The researcher must
1) Define the population under study
2) State the hypothesis that is under investigation
3) Give the significance level
4) Select a sample from the population
5) Collect the data
6) Perform the statistical test
7) Reach a conclusion
4
Basics of Hypothesis Testing
How to set your hypotheses
1) Set the researcher’s hypothesis as alternative
hypothesis.
2) When you are testing if a parameter differs from a
certain value, set that particular value as the null
value.
3) If you are testing a difference between two
samples, set 0 as the null value.
3. 3
5
Basics of Hypothesis Testing
Definition of P-value
The probability of observing more extreme
observations (or observing more extreme test
statistics).
• Decisions are taken based on P-values.
• P-value stands for probability value.
6
Basics of Hypothesis Testing
Two-tailed test
If the sample statistic falls
in this region, we would
not reject H0.
We would reject H0 if
the sample statistic
falls in these regions.
e.g.
H0: 1 = 2
H1: 1 2
4. 4
7
Basics of Hypothesis Testing
One-tailed test
If the sample statistic falls
in this region, we would
not reject H0.
We would reject H0 if
the sample statistic
falls in these regions.
e.g.
H0: 1 = 2
H1: 1 > 2
8
Basics of Hypothesis Testing
One-tailed test
If the sample statistic falls
in this region, we would
not reject H0.
We would reject H0 if
the sample statistic
falls in these regions.
e.g.
H0: 1 = 2
H1: 1 < 2
5. 5
9
Basics of Hypothesis Testing
You reject your null hypothesis when the p-value
is lower than α i.e. there is more chance of
observing more extreme observations than those
obtained from the sample.
• The area of the rejection region is α.
• α is called the level of significance.
10
One Sample t-test (Test of Population Mean)
Suppose that we want to answer the question: Can
you conclude that a certain population mean is not
50? The null hypothesis is
H0: = 50
and the alternative hypothesis is
H1: 50.
6. 6
11
One Sample t-test (Test of Population Mean)
For example, using the hsb2.sav data file, say we
wish to test whether the average writing score
(write) differs significantly from 50. We can do this
as shown below.
t-test
/testval = 50
/variable = write.
12
One Sample t-test (Test of Population Mean)
Decision: We can reject the null hypothesis in
favor of the alternative hypothesis.
7. 7
13
Two Sample t-test (Test of Two Population Means)
Suppose we want to show that the students in one
group have a different average score than those of
another. Then we might formulate the null
hypothesis that there is no difference, namely,
H0: 1 = 2.
The alternative hypothesis is
H1: 1 2.
14
Two Sample t-test (Test of Two Population Means)
For example, using the hsb2.sav data file, say we
wish to test whether the mean for write is the
same for males and females. We can do that as
follows:
t-test groups = female(0 1)
/variables = write.
8. 8
15
Two Sample t-test (Test of Two Population Means)
Decision: We can reject the null hypothesis in
favor of the alternative hypothesis.
16
Two Sample Paired t-test
Reasons for pairing
It frequently happens that true differences do not exist between two
populations with respect to the variable of interest, but the presence
of extraneous sources of variation may cause rejection of the null
hypotheses of no difference or may mask true differences.
When used
Frequently employed for assessing the effectiveness of a
treatment or experimental procedure.
9. 9
17
Two Sample Paired t-test
A paired (samples) t-test is used when you have
two related observations and you want to see if
the means on these two variables differ from one
another. For example, using the hsb2.sav data
file we will test whether the mean of read is equal
to the mean of write.
t-test pairs = read with write (paired).
18
Two Sample Paired t-test
Decision: These results indicate that the mean
of read is not statistically significantly different
from the mean of write (t = -0.867, p = 0.387).
10. 10
19
Analysis of Variance (Test of k Population Means)
We test the null hypothesis that all population or
treatment means are equal against the alternative
that the members of at least one pair are not
equal. We may state the hypothesis formally as
follows:
H0: 1 = 2 = ….. = k
H1: Not all j are equal.
20
Analysis of Variance (Test of k Population Means)
Sources of
variation
Sum of squares Degrees of
freedom
Mean square Variance ratio
(F statistic)
Among samples SSA k-1 MSA = SSA/(k-1) V.R. = MSA/MSW
Within sample SSW N-k MSW = SSW/(N-k)
Total SST N-1
11. 11
21
Analysis of Variance (Test of k Population Means)
For example, using the hsb2.sav data file, say we
wish to test whether the mean of write differs
between the three program types (prog). The
command for this test would be:
oneway write by prog.
22
Analysis of Variance (Test of k Population Means)
Decision: The mean of the dependent variable
write differs significantly among the levels of
program type.
12. 12
23
Test of Association or Test Contingency Table
Suppose we want to test if a categorical variable is
associated with another categorical variable. We
first make a contingency table and perform Chi-
square test of association. We may state the
hypothesis formally as follows:
H0: No association
H1: There is association.
24
Test of Association or Test Contingency Table
Educated Uneducated Row Total
Male 80 20 100
Female 60 40 100
Column
Total
140 60 Total=200
Gender
Education
13. 13
25
Test of Association or Test Contingency Table
Using the hsb2.sav data file, let's see if there is a
relationship between the type of school attended
(schtyp) and students' gender (female). Remember that
the chi-square test assumes that the expected value for
each cell is five or higher.
crosstabs
/tables = schtyp by female
/statistic = chisq.
26
Test of Association or Test Contingency Table
Decision: These results indicate that there is no statistically
significant relationship between the type of school attended
and gender.
14. 14
Thank you for your
patience!
For further query: nawan@isrt.ac.bd
The End