4. 1. What is meant by T-test?
The t-test compares the actual difference between two means
in relation to the variation in the data (expressed as the
standard deviation of the difference between the means).
4Qasimraza555@gmail.com
5. 2. 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).
Often performed for testing the mean value of distribution.
It can be used under the assumption that sample distribution is normal.
For large samples, the procedure performs often well even for non-
normal population.
5Qasimraza555@gmail.com
6. One-Sample T-test (Cont…)
Example:
To test whether the average weight of student population is different
from 140 lb.
Data:
A random sample of 22 students’ weights from student population.
To perform One Sample t-Test for the data above:
135 119 106 135 180 108 128 160 143 175 170
205 195 185 182 150 175 190 180 195 220 235
6Qasimraza555@gmail.com
7. One-Sample T-test (Cont…)
1. Create data file: Enter the data in SPSS, with the variable “weight” takes
up one column as shown in the picture on
the right.
7Qasimraza555@gmail.com
8. One-Sample T-test (Cont…)
2. To perform the one sample t-test, first click through the menu selections
Analyze / Compare Means / One Sample T Test… as in the following
picture, and the One-Sample t-test dialog box will appear on the screen.
8Qasimraza555@gmail.com
9. One-Sample T-test (Cont…)
Select the variable “weight” to be analyzed into the Test Variable box, and enter
the Test Value which the average value to be tested with (the mean value
specified in the null hypothesis, that is 140 in this example). Click Continue
and click OK for performing the test and estimation. The results will be
displayed in the SPSS Output window.
9Qasimraza555@gmail.com
10. One-Sample T-test (Cont…)
Interpret SPSS Output: The statistics for the test are in the following table.
The one sample t-test statistic is 3.582 and the p-value from this statistic is .002
and that is less than 0.05 (the level of significance usually used for the test)
Such a p-value indicates that the average weight of the sampled population is
statistically significantly different from 140 lb. The 95% confidence interval
estimate for the difference between the population mean weight and 140 lb is
(11.27, 42.46).
10Qasimraza555@gmail.com
11. 3. Independent Sample t-test
Purpose: test whether or not the populations represented by the two samples
have a different mean.
Independent Sample t-test measures the significance difference in the means
of the Two categories /variables/Groups.
Examples:
o Whether there is a significant difference in the satisfaction level of
consumers using Prepaid and Post Paid Packaging…Here we have Package
in two subcategories as a variable and Test Variable is Satisfaction Level.
o Social work students have higher GPA’s than nursing students
o Social work students volunteer for more hours per week than education
majors
11Qasimraza555@gmail.com
12. Assumptions
Level Of Measurement:
Independent sample t-test assume that grouping variable or categorical
variable should be measured on Nominal Scale whereas Test variable
should be measured on interval or Ratio Scale. This is LOM for this Test.
Normality:
The test variable should be Normal or Homogeneous. In order to
check the homogeneity, Independent Sample t-test has Levene’s
Test.
If Test variable is abnormal or Heterogeneous then we can not
proceed to independent sample t-test rather we have to switch for
Non-Parametric alternate to independent Sample t-test i.e. Mann
Whitney test etc. 12Qasimraza555@gmail.com
13. Solving the problem with SPSS:
Evaluating normality
13Qasimraza555@gmail.com
14. Solving the problem with SPSS:
Evaluating normality (Cont…)
14Qasimraza555@gmail.com
15. Solving the problem with SPSS:
Evaluating normality (Cont…)
"Highest year of school completed" [educ] did
not satisfy the criteria for a normal
distribution. The skewness of the distribution
(-.137) was between -1.0 and +1.0, but the
kurtosis of the distribution (1.246) fell outside
the range from -1.0 to +1.0.
Having failed the normality requirement using
this criteria, we will see if we can apply the
central limit theorem.
15Qasimraza555@gmail.com
16. Solving the problem with SPSS:
The independent-samples t-test
Select Compare Means
> Independent-
Samples T Test… from
the Analyze menu.
16Qasimraza555@gmail.com
17. “Solving the problem with SPSS:
The independent-samples t-test (Cont…)
17Qasimraza555@gmail.com
18. Solving the problem with SPSS:
The independent-samples t-test (Cont..)
18Qasimraza555@gmail.com
19. Solving the problem with SPSS:
The independent-samples t-test (Cont…)
19Qasimraza555@gmail.com
20. Solving the problem with SPSS:
Evaluating equality of group variances
The independent-samples t-test assumes that the variances of
the dependent variable for both groups are equal in the
population. This assumption is evaluated with Levene's Test for
Equality of Variances. The null hypothesis for this test states that
the variance for both groups are equal. The desired outcome for
this test is to fail to reject the null hypothesis, which
demonstrates equality.
The probability associated with Levene's Test for Equality of
Variances (.161) is greater than alpha (.05), indicating that the
'Equal variances assumed' formula for the independent samples
t-test should be used for the analysis.
20Qasimraza555@gmail.com
21. 4. Paired Sample T-test
A paired sample t test is used to test if an observed difference between
two means is statistically significant i.e. whether there is a significant
difference between the average values of the same measurement made
under two different conditions.
Assumptions for paired sample T-test:
To run the paired sample T-test data
Should have normal distribution
Is a large data set
Has no outliers
21Qasimraza555@gmail.com
22. Paired Sample T-test (Cont…)
Research Questions for Paired Sample T-test
Is there an instructional effect taking place in the computer class?
Hypothesis for Paired Sample T-test:
NULL HYPOTHESIS (H0): H0 specifies that the value for the population
parameters are the same. H0 always includes an equality.
H0: there is no influence of using internet on academic achievement for
this class.
ALTERNATE HYPOTHESIS (H1): H1 always includes a non-equality
H1: there is an influence of using the internet on academic achievement
for this class. 22Qasimraza555@gmail.com
23. Paired Sample T-test (Cont…)
Steps for paired sample T-test:
Click on Analyze/ Compare Means/Paired-Samples T-Test/ Click on Pretest and
then Posttest/ Click OK.
SPSS Output
23Qasimraza555@gmail.com
25. Paired Sample T-test (Cont…)
Results:
Given that the researcher is interested in assessing the results in one
direction, this is a one-tailed T-test. The Significance (p) value (2-tailed),
located in the above table, must be divided by 2 before reporting the final
results. In this case, it remained the same
(p = .000/2 = .000).
25Qasimraza555@gmail.com
26. 5. Analysis of Variance (ANOVA)
ANOVA measures significant difference among at-least three or more
categories .
Purpose of ANOVA: In statistics, analysis of variance (ANOVA) is a
collection of statistical models about comparing the mean values of
different groups. There are a few types of ANOVA depending on the
number of treatments and the way they are applied to the subjects in the
experiment.
In SPSS, you can calculate One-way ANOVA in two different ways;
o Analyze/Compare Means/ One-way ANOVA
o Analyze/ General Linear Model/ Univariate
26Qasimraza555@gmail.com
27. “ Analysis of Variance (ANOVA)”
Null and Alternate Hypothesis:
The null hypothesis is that the mean are all equal
i. Ho: u1=u2=u3=…=uk
ii. For Example, with three groups: Ho: u1=u2=u3
The alternate hypothesis is that at least one of the mean is different
from another
In other words, H1: u1=u2=u3=…=uk would not be an acceptable way to
write the alternate hypothesis (this slightly contradicts Gravettter &
Wallnau, but technically there is no way to test this specific alternative
hypothesis with a one-way ANOVA ).
27Qasimraza555@gmail.com
28. Assumptions
Level of Measurement assumption:
According to this assumption one variable should be categorical
having at least 3-subcategories or nominal scale and Test variable
(dependent ) should be measured on interval or Ratio Scale.
Normality:
2nd assumption is Normality or Homogeneity of the Test
variable. This means that the test variable should be normal and we
test this by means of Levene’s Test.
The Hypothesis of ANOVA are
Null : means across the categories are equal
Alternate: means across the categories are not equal
28Qasimraza555@gmail.com
29. Normality
Homogeneity is whether the variances in the populations are equal.
When conducting an ANOVA, one of the options is to produce a test of
homogeneity in the output, called Levene’s Test.
If Levene’s test is significant (p < .05) then equal variances are NOT assumed,
called heterogeneity.
If Levene’s is not significant (p > .05) then equal variances are assumed, called
homogeneity.
29Qasimraza555@gmail.com
30. What if
If Test variable is not Normal ,then we switch to the NON-Parametric
alternate to ANOVA i.e.
Kruskal Wallis Test….
30Qasimraza555@gmail.com
31. Difference
ANOVA is different than “t-test” in that the t-test is testing the mean
difference between two groups; whereas ANOVA is testing the mean
difference between three or more groups.
Examples:
T-test compares two means to each other
(Who is happier: Republicans, Democrats?)
ANOVA compares three or more means to each other
(Happier: Republicans, Democrats, Independents, etc)
31Qasimraza555@gmail.com
32. Extension of ANOVA……Post Hoc
ANOVA Sees only significant difference (Yes/No).
In order to extend this analysis of measure of difference from one
subsection to another subsection, we proceed to Post Hoc test. With in
Post Hoc test we have further sub-categories in terms of Homogeneity or
Heterogeneity.
If Normal we proceed as
ANOVA to Post Hoc to Tukey
If Not Normal
ANOVA to Post Hoc to Duuntt’s-3
32Qasimraza555@gmail.com