Stats
Stats
Analysis of Behavioural
Data
CHAPTER 11
INSTRUCTOR: NICOLE JENNI
T-test comes in 3 forms
• Compare one group mean to a known
population μ when you don’t know σ
Single sample (Ch 9)
• Compare one group mean to some other null
value of interest (e.g., scale midpoint)
1 65 60 -5
2 65 70 5 Paired Samples t Test
66
3
4
66
67 65
0
-2
takes 2 columns of
5 70 68 -2 data and converts
6
7
71
72
72
62
1
-10
them into 1.
8 73 70 -3
9 75 73 -2 Then, just calculates a one-
N=9 M = 69.333 M = 67.333 MD = -2.000 sample t test on the
s = 3.708 s = 4.444 sD = 4.123 difference score column.
Paired-Samples t Test
Our sampling distributions is now a
Distribution of Mean Differences
=
Independent-Samples t Tests
Analyzing Paired Samples Data
A B C D E
Used to compare two means in a
between-groups design
=
Provides a situation in which each
participant is assigned to only one
Analyzing Independent Groups Data
condition
Q1. How can we express the null
hypothesis for independent groups?
A. H0: |μ1 – μ2|= 0 Protip: We should use more
informative subscripts…
B. H1: |μ1 – μ2|≠ 0 E for experimental and C for control
condition
C. H1: μ1 = μ2 or use the whole words!
D. A and C Ex:
H0: |μexperimental – μcontrol|= 0
Ways to express the null…
Conceptually speaking… Is the Two-tailed Null Hypothesis
difference between two group H0: |μ1 – μ2|= 0
means significantly different
or
from zero?
H0: μ1 = μ2
Corresponding Research Hypothesis
We tend to say… Are two
independent group means H1: |μ1 – μ2| ≠ 0
significantly different from each or
other? H1: μ1 ≠ μ2
Distribution of differences between means
This graph represents the
beginning of a distribution of
differences between means.
If class sizes are even, this can be done If class sizes are not even, we need to
by simply taking the average compute a weighted mean
Section 1 (n=100) = 69 Section 1 (n=300) = 69
Section 2 (n=100) = 73 Section 2 (n=100) = 73
69+73
= 71
2 300 100
100 100 (400 ∗ 69) + (400 ∗ 73) = 70
(200 ∗ 69) + (200 ∗ 73) = 71
This is ‘weighting’ by proportion of students,when n’s are This is ‘weighting’ by proportion of students,when n’s are
equal, both scores contribute (100/200) or 50% not equal, Section 1 contributes (300/400) or 75%
Pooled variance that
Variance of one
incorporates two
sample
sample variances
2 𝑛𝑋 − 1 2 𝑛𝑌 − 1 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 𝑠𝑋 + 𝑠𝑌
𝑁−2 𝑁−2
n1 = 70 people n2 = 73 people
2 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 𝑠𝑝𝑜𝑜𝑙𝑒𝑑 What is the pooled
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = + variance estimate?
𝑛1 𝑛2
A. 0.82931
2 𝑛𝑋 − 1 2 𝑛𝑌 − 1 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 𝑠𝑋 + 𝑠𝑌 B. 0.91067
𝑁−2 𝑁−2
C. 0.91057
Introvert D. 0.15234
Extravert
2
Independent Groups t-test: calculate 𝑠𝑝𝑜𝑜𝑙𝑒𝑑
𝑀1 − 𝑀2 𝑠𝑖𝑛𝑡𝑟𝑎𝑣𝑒𝑟𝑡 = 0.92439 𝑠 2
𝑖𝑛𝑡𝑟𝑎𝑣𝑒𝑟𝑡 = 0.854497
𝑡𝑜𝑏𝑡 =
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 𝑠𝑒𝑥𝑡𝑟𝑎𝑣𝑒𝑟𝑡 = 2
0.89732 𝑠𝑒𝑥𝑡𝑟𝑎𝑣𝑒𝑟𝑡 = 0.805183
2 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 𝑠𝑝𝑜𝑜𝑙𝑒𝑑
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = + 2 70 − 1 73 − 1
𝑛1 𝑛2 𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 0.854497 + 0.805183
143 − 2 143 − 2
2
2 𝑛𝑋 − 1 2 𝑛𝑌 − 1 2 𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 0.48936 0.854497 + 0.510638 0.805183
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 𝑠𝑋 + 𝑠𝑌
𝑁−2 𝑁−2 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 0.418158 + 0.411157
2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 0.829315
Independent Groups t-test: calculate 𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒
2
𝑀1 − 𝑀2 𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 0.829315
𝑡𝑜𝑏𝑡 =
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 What is the pooled
2 2
variance estimate?
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 𝑠𝑝𝑜𝑜𝑙𝑒𝑑
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = + A. 0.011361
𝑛1 𝑛2
B. 0.02321
2 𝑛𝑋 − 1 2 𝑛𝑌 − 1 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 𝑠𝑋 + 𝑠𝑌
𝑁−2 𝑁−2 C. 0.15342
D. 0.15234
Introvert
Extravert
Independent Groups t-test: calculate 𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒
2
𝑀1 − 𝑀2 𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 0.829315
𝑡𝑜𝑏𝑡 =
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = +
2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 𝑛1 𝑛2
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = +
𝑛1 𝑛2
0.829315 0.829315
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = +
𝑛𝑋 − 1 2 𝑛𝑌 − 1 2 70 73
2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 𝑠𝑋 + 𝑠𝑌
𝑁−2 𝑁−2
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = 0.11847 + 0.01136
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = 0.023208
Introvert
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = 0.15234
Extravert
Independent Groups t-test: calculate t-obtained
𝑀1 − 𝑀2
𝑡𝑜𝑏𝑡 =
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒
3.6357 − 3.5616
𝑡𝑜𝑏𝑡 =
0.1523
𝑡𝑜𝑏𝑡 = 0.4864
Introvert
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = 0.15234
Extravert
Null Hypothesis Sampling
Distribution of the Difference
Between Group Means, at N-2
degrees of freedom
.025 .025
All possible
-5 -4
values of t
When we reject the null hypothesis with the t sampling distribution, we’re saying we think we drew
our sample from a population that has a non-zero t (i.e., a difference between group means).
Null Hypothesis Sampling
Distribution of the Difference
𝑡𝑜𝑏𝑡 = 0.4864
Between Group Means, at N-2
degrees of freedom Is our difference
between means
tcrit(141) = -1.980 tcrit(141) = 1.980
significantly
different from zero?
A. Yes
B. No
.025 .025
-5 -4
μ1 – μ2 = 0
2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 0.82931
Introvert
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = 0.15234
Extravert
Computing Cohen’s D
𝑀1 −𝑀2
Cohen’s 𝑑 = 𝑠𝑝𝑜𝑜𝑙𝑒𝑑
2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 0.82931
3.6357 − 3.5616
𝑑=
0.910665 𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 0.910665
𝑑 = 0.081
Add a Confidence Interval to identify the range of plausible
values for the difference between means of whatever
population our sample belongs to.
2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 0.82931
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = 0.15234 Q8. What is the 95CI
tcritical = 1.98 A.[-0.22, 0.38]
B. [-1.56, 1.72]
Lower Boundary Upper Boundary
C.[-0.07, 0.23]
MDifflower = MDiff - tcritical(𝑠𝑑𝑖𝑓𝑓 ) MDiffupper = MDiff + tcritical(𝑠𝑑𝑖𝑓𝑓 ) D. [-0.15, 0.38]
-.30 -.20 -.10 0 .10 .20 .30 .40 .50 .60 .70 .80 .90
-.30 -.20 -.10 0 .10 .20 .30 .40 .50 .60 .70 .80 .90
t-test Confidence
• Means, SD, n per group Intervals Cohen’s d
• Difference between group • t-critical • Difference between
means • Difference between
• Pooled standard group means
group means Conclusions
• Standard Error of the • Pooled standard
deviation deviation
difference between
• Standard Error of the means
difference between
means
The 95% confidence interval for Mx – My does not include 0. If the
H0 that mx – my = 0 was being tested, the difference between Mx
and My would:
Caffeine
Placebo
2
calculate 𝑠𝑝𝑜𝑜𝑙𝑒𝑑
Caffeine (ms) Placebo (ms) 𝑋ത1 − 𝑋ത2 What is the pooled
𝑡𝑜𝑏𝑡 =
40 45 𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 variance estimate?
45 60 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 A. 34.5779
55 55 𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = +
𝑛1 𝑛2
35 50 B. 34.4871
40 55
45 50 2 𝑛𝑋 − 1 2 𝑛𝑌 − 1 2 C. 5.85388
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 𝑠𝑋 + 𝑠𝑌
40 𝑁−2 𝑁−2
D. 5.8803
2 𝑛𝑋 − 1 2 𝑛A𝑌 − 1 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 𝑠𝑋 + 𝑠𝑌
Caffeine 𝑁−2 𝑁−2
Placebo
Independent Groups t-test: calculate 𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒
2
𝑋ത1 − 𝑋ത2 𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 34.5779
𝑡𝑜𝑏𝑡 =
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 What is the standard error
2 2
estimate?
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 𝑠𝑝𝑜𝑜𝑙𝑒𝑑
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = + A. 10.7027
𝑛1 𝑛2
B. 3.5607
2 𝑛𝑋 − 1 2 𝑛𝑌 − 1 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 = 𝑠𝑋 + 𝑠𝑌
𝑁−2 𝑁−2 C. 3.2715
D. 12.6786
Caffeine
Placebo
Independent Groups t-test: calculate t-obtained
𝑋ത1 − 𝑋ത2
𝑡𝑜𝑏𝑡 =
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒
42.8571 − 52.5000
𝑡𝑜𝑏𝑡 =
3.2715
𝑡𝑜𝑏𝑡 = -2.948
𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 = 3.2715
Caffeine
Placebo
Null Hypothesis Sampling
Distribution of the Difference
Between Group Means, at N-2 𝑡𝑜𝑏𝑡 = -2.948
degrees of freedom Is our difference between
means significantly different
tcrit(11) = -1.796 from zero?
.05
A. Yes
All possible
values of t
-5 -4 B. No
Caffeine
Placebo
SPSS Output
Levene’s Test is testing the assumption that our two Did we violate our HOV assumption?
samples have equal variances in the population (HOV) p=0.78
Here we can see this test is NOT SIGNIFICANT (p=.78) A. YES, we violated this assumption
B. NO, we did not
HOV Assumption
• When we design an experiment, we generally hypothesize that our
manipulation (ie caffeine) will cause some mean difference between our
groups
• Ie. There should still be the same ‘spread’ or variability in the caffeine and
non caffeine group
Paired Samples
sampling distribution (repeated measures) t-
To compare means of t distribution
of the mean difference test
two related groups df = N-1
(𝑠𝑋ത ) (CI around mean
difference, effect size)
Where we’ve been…
Normal Single sample
To compare sampling z test
distribution
sample mean to a distribution of the
(when know μ (CI around mean,
population mean mean (𝜎𝑀 )
and σ) effect size)
Paired Samples
sampling distribution (repeated measures) t-
To compare means of t distribution
of the mean difference test
two related groups df = N-1
(𝑠𝑋ത ) (CI around mean
difference, effect size)
sampling Independent
To compare means distribution of the groups t-test
of two t distribution
difference between (CI around
independent two means df = N-2
groups difference between
(𝑠𝑑𝑖𝑓𝑓𝑒𝑟𝑒𝑛𝑐𝑒 ) means, effect size)
Where z-distribution is the normal
curve, and t’s reference t-distribution
Comparison Distributions as their associated dfs
𝜎 𝑠
𝜎𝑋ത = 𝑠𝑋ത =
𝑁 𝑁
samples t-test
Sampling Distribution of mean samples t-test • Centered around 0
difference • Error = standard error of difference
• Centered around 0 between means
• Error = standard error of mean 2 2
𝑠𝑝𝑜𝑜𝑙𝑒𝑑 𝑠𝑝𝑜𝑜𝑙𝑒𝑑
difference s 𝑠𝑑𝑖𝑓𝑓 = +
D
𝑠𝑋ത = 𝑛1 𝑛2
𝑁
Learn to dissociate your symbols
Standard deviation = s
Variance =𝑠 2
Standard deviation of ‘difference scores’ = 𝑠𝐷
2
Pooled variance = 𝑠𝑝𝑜𝑜𝑙𝑒𝑑