2. T-TEST
T-test is a useful technique for comparing
mean values of two sets of numbers.
It is used to test whether there is significant
difference between the mean of two groups.
Suppose we want to know that the mean difference
between two different species of turtles is equal or not.
3. ASSUMPTIONS OF T-TEST
T-test
assumes
that:
i. Scale of measurement (continuous or ordinal scale)
ii. Simple random sampling
iii. Small sample size. (Valid for large sample if variance is
unknown)
iv. No outlier
v. Normal distribution of data.
vi. Variances are equal.
4. CONTINUED…..
For checking normality of data Shapiro wilk and Kolmogorov-Smirnov tests are
used and for graph P-P plot and Q-Q plot are used.
STEPS/COMMAND:
ANALYZE DESCRIPTIVE STATISTICS EXPLORE SHIFT
“WEIGHT” TO DEPENDENT LIST CLICK PLOTS UNCHECK
“STEM AND LEAF” CHECK “NORMALITY PLOTS WITH TEST”
CONTINUE OK.
7. “Variances are equal” assumption should meet in two sample or independent
sample t-test.
• STEPS
ANALYZE DESCRIPTIVE STATISTICS EXPLORE SHIFT
“WEIGHT” TO DEPENDENT VARIABLE AND “GENDER” TO FACTOR
LIST CLICK PLOTS CHECK FOR “POWER ESTIMATION”
CONTINUE OK.
10. INTERPRETATION OF LEVEN’S TEST:
The test should not be significant. P-value is greater than 0.05 which shows
that variance are not significantly different(i.e., the homogeneity assumption
of the variance is met)
11. TYPES OF T-TEST
One Sample T-test
Two Sample Or Independent Sample T-test
Paired Sample T-test
12. APPLICATION
To compare the mean of
sample with population
mean.
To compare the mean of
one sample with the
mean of another
independent sample.
To compare between the
values (readings) of one
sample between two
occasions i.e. Before and
after treatment.
14. ONE SAMPLE T TEST
• The one-sample t-test allows us to test whether a sample mean is significantly different
from a population mean. When only the sample standard deviation is known.
• Simply, when to use the one-sample t-test, you should consider using this test when you
have continuous data collected from group that you want to compare that group’s
average scores to some known criterion value (probably a population mean)
Hypothesis of one sample t-test:
One-sample t-test is used to test whether a population mean is significantly different or not
from hypothesized value.
𝐻0 ∶ 𝜇 = Mean (Means are not significantly different)
𝐻1 ∶ 𝜇 ≠ Mean (Means are significantly different)
15. ASSUMPTIONS FOR ONE SAMPLE T-TEST:
• Test variable that is continuous (i.e., Interval or ratio level
• Scores on the test variable are independent (i.e., Independence of
observations)
• Random sample of data from the population normal distribution
(approximately) of the sample and population on the test variable
• No outliers
16. EXAMPLE OF ONE SAMPLE T-TEST
To test whether the average weight of student population is different from 140 lb.
Data: a random sample of 21 students’ weights from student population 235 is
selected.
135 119 106 135 180 108 128 160 143 175
205 195 185 150 175 190 180 195 220 235
170
Hypothesis:
𝐻0 ∶ 𝜇 = 140𝑙𝑏
𝐻1 ∶ 𝜇 ≠ 140𝑙𝑏
17. CONTINUED…
• Create data file: enter the data in SPSS, with the variable “weight” takes up one
column as shown in the picture on the right.
18. • COMMANDS/STEPS:
To perform the one sample t-test, first click through the menu selections
ANALYZE COMPARE MEANS ONE SAMPLE T TEST SELECT
THE VARIABLE “WEIGHT” TO VARIABLE BOX ENTER THE TEST
VALUE “140” OK.
20. INTERPRETATION
The one sample t-test statistic is 3.582 and
the p-value from this statistic is .002˂0.05
so we reject the null hypothesis and the
average weight of student is different from
140lb .
22. TWO/INDEPENDENT SAMPLE T-TEST
1. It measures the significant difference in the mean of
two groups, variables or categories.
2. The variables used in this test are known as:
i. Dependent variable or test variable.
ii. Independent variable or grouping variable
23. • It is used to
Compare mean of two samples only
If more than 2 groups use ANOVA
For example:
Social work student’s have higher GPA then
nursing students.
Social work students volunteer for more
hours per week than education majors.
APPLICATION
24. ASSUMPTION FOR TWO
SAMPLE T-TEST
Dependent variable is continuous (i.e., Interval
or ratio level)
Independent variable that is categorical and has
exactly two categories
Cases that have values on both the dependent
and independent variables
Independent samples/groups (i.e., Independence
of observations.
25. • HYPOTHESIS:
It is about making statement about the difference between the mean of one
population μ1 and the mean of another population μ2.
Null hypothesis: the means for the two populations are equal
Alternative hypothesis: the means for the two populations are not equal.
OR
H0: 𝜇1 = 𝜇2
H1: 𝜇1 ≠ 𝜇2
26. EXAMPLE
A researcher want to study the impact of caffeine on a motor test where the
task is to keep mouse centered on a moving dot. Everyone gets a drink: half
get caffeine, half get placebo; nobody knows who got what.
DATA:
Experimental
(Caffeine)
12 14 10 8 16 5 3 9 11
Control (No
Caffeine)
21 18 14 20 11 19 8 12 13 15
27. • SOLUTION:
STEP 1:
HYPOTHESIS
H0: 𝜇1 = 𝜇2
H1: 𝜇1 ≠ 𝜇2
• H0: MEAN FOR THE TWO POPULATIONS ARE EQUAL.
H1: MEAN FOR THE TWO POPULATION ARE NOT EQUAL.
28. • STEP 2:
DATA ENTRY:
1.
After entering variable
name in spss
2nd step in variable
declaration is coding of
groups or labeling the value
of group i.e., “1” For
experimental and “2” for
control.
30. • COMMANDS/STEPS:
ANALYZE COMPARE MEANS INDEPENDENT SAMPLE T-TEST
SHIFT “CAFFEINE” TO TEST VARIABLE(S) SHIFT GROUP TO
GROUPING VARIABLE DEFINE GROUP GROUP 1 = 1
GROUP 2 = 2 OPTIONS CONFIDENCE INTERVAL
PERCENTAGE WRITE 95% CONTINUE OK.
31.
32. 2. 3.
Shift “caffeine” to
Test V
ariable(s) and
“Group” to grouping
variable
Click Define
Groups
33. 4. 5.
Assign Values to
group 1 and group 2
then continue.
Click options then write interval
percentage 95% , then click continue.
1.
2
.
3.
35. INTERPRETATION
This table displays the basic
descriptive statistics for each
subgroup of independent
variable.
This part display
Levene’s statistics with it
significant value
36. If P-value is less than level of significance (α = 0.05) then reject 𝐻0. Which
means that the population means are significantly different.
According to interpretation of example: As P-value level 0.014 < level of
significance (α = 0.05) therefore 𝐻0 is rejected which means that the two
population means are significantly different.
38. PAIRED SAMPLE T-TEST
• Compares the means of two measurements taken from the same individual,
object, or related units. These "paired" measurements can represent things like: A
measurement taken at two different times (e.g., Pre-test and post-test score with
an intervention administered between the two time points)
• The paired samples t test is commonly used to test the following:
• Statistical difference between two time points
• Statistical difference between two conditions
• Statistical difference between two measurements
• Statistical difference between a matched paired
39. Assumptions of paired T-test
The common assumptions made when doing a t-test includes;
• Random sampling
• Normality of data distribution
• No outliers
40. EXAMPLE
A training program was conducted to improve the participants knowledge on
ICT. Data was collected from a selected sample both before and after the ICT
training program.
Hypothesis for paired sample t-test
• The hypotheses can be expressed in two different ways.
H0: µ1 = µ2
H1 : µ1 ≠ µ2
H0 ; the paired population means are equal"
H1: "the paired population means are not equal
41. • COMMAND/STEPS:
• ANALYZE COMPARE MEANS PAIRED SAMPLE T-TEST
SHIFT “PRE-TEST AND POST TEST” TO VARIABLE 1 AND 2
OPTIONS /CONFIDENCE INTERVAL PERCENTAGE WRITE 95
CONTINUE/OK.
1
.
2.
44. • Interpretations ;
As P-value is less 0.000 < than the level of significance (alpha value =0.05)
therefore ho is rejected which means that the population means are significantly
different.