3 - Data Analysis - Tests of Differences
3 - Data Analysis - Tests of Differences
• Parametric tests assume that the variables of interest are measured on at least
an interval scale.
• The most popular parametric test is the t test used for examining the
hypotheses about means.
• t Statistics (aka student t-test)
• Assumption: Random variable X is normally distributed with mean μ and unknown
population variance σ2, which is estimated by the sample variance s2 . The standard
deviation of the sample mean is estimated as Sx = S / √n.
t
x
• Then is t distributed with (n - 1) degrees of freedom.
sx
• For large samples of 30 or more the t distribution is similar to a normal distribution.
Comparing t and z
distributions
• Test the hypothesis that the mean familiarity rating exceeds 4.0, the
neutral value on a 7-point scale, that is, we want to see whether
there is familiarity, in general, about internet.
H0 : μ ≤ 4
H a: μ ˃ 4
Normality Check
Analyze Descriptive Statistics Explore
• Select continuous dependent variable (familiar)
• In ‘Plots’, select ‘Normality plots with tests’.
• Select ‘Both’ in Display. Press OK.
Reporting: With a positive t value, the data suggests a high level of familiarity
with internet usage (M = 4.72, SD = 1.579), t(28) = 2.470, p = .020.
Assuming that the Distribution is not Normal
Non-Parametric Alternative: One Sample: Wilcoxon Signed-Rank
Test
• Assumes data is on a continuous scale.
• Analyze Nonparametric Tests One Sample
• Under ‘Fields’ Select “Use custom field assignments” and in ‘Test Fields’
add Familiarity
• Under ‘Settings’ select “Customize tests” and choose “Compare median
to hypothesized (Wilcoxon signed-rank test).
• In “Hypothesized median” write 4.
• Click Run
• OR
• Analyze Nonparametric Tests Legacy Dialogs 1-Sample K-S
In both cases, with and without Lilliefors correction, the null
hypothesis of mean familiarity being less than or equal to 4
Is rejected.
One Sample Z-Test
• Not available on SPSS Copy-paste this text into new Syntax
**syntax created by how2stats
**This syntax performs a one sample z-test in SPSS
**Simply enter the four relevant values in the line below underneath the 'begin data' command
**The first number is the sample size (35), the second number is the sample mean (105),
**the third number is the population mean (100)
**and the fourth number is the population standard deviation (15)
**Replace the four values below with your own.
**The p value that is reported is based on a two-tailed test.
**To obtain the one-tailed p value, simply divide the two-tailed p value by 2.
**As an extra, this syntax also calcuates Cohen's d as estimate of effect size.
• From a survey data, groups of users and non-users are identified and a
comparison is made to evaluate which group has a more positive attitude
towards the brand.
Each group is measured only once
Examples: Paired samples examples
• In an experiment, subjects’ attitude towards a product are measured at time
T1. Then they are given the product for use and their attitudes measured again
after a month, at time T2. A comparison is made to evaluate if there has been
a change in attitude after usage
Same group of people measured twice
Effect size: SPSS does not provide an effect size statistic, but the value of z that
is reported in the output can be used to calculate an approximate value of r.
r = z / square root of N where N = total number of cases.
Paired-Samples T Test: Same Sample 2 Measures
Paired-Samples T Test: Same Sample 2 Measures
• The two sets of observations relate to the same respondents.
• A sample of respondents may rate two competing brands, indicate the
relative importance of two attributes of a product, or evaluate a brand at
two different times.
• The difference in these cases is examined by a paired samples t test.
• H0 :μ1 – μ2 = 0;
• OR μ1 = μ2;
• OR μD = 0 where μD is the difference in means
An example:
Source SS Df MS F Sig.*
Between 91.476 2 45.733 4.467 .021
Within 276.400 27 10.237
Total 367.867 29