CH 9 10
CH 9 10
Behavioural Data
CHAPTER 9
INSTRUCTOR: NICOLE JENNI
Ch 9: Introducing the t-
test!
Chapter 9: Introducing the t-test
Sampling
Introducing distributions Finding Calculating
t tests! modeled by tcrit tobt
t
Types and uses of t tests
• It is still a bell-shaped,
symmetrical curve (like
the normal curve)
• Becomes more
‘normal’ as N
increases
Using the t table
to find tcritical
TO JUDGE OUR T OBTAINED (REJECT OR RETAIN
NULL)
TO CREATE A CONFIDENCE INTERVAL AROUND
THE PARAMETER ESTIMATE
Q3. Finding tcritical using Table B-2
Of those provided, what is the closest
critical value of t(199) for α = .052tail?
A. 1.645
B. 1.658
C. 1.960
D. 2.576
E. 12.706
C
tcrit(199) = -1.96 tcrit(199) = 1.96
.025 .025
Paired-Samples t Test
The paired-samples t test (dependent-samples t
test)
◦ Compares two means for a within-groups design in which
every participant is in both samples
Major difference
◦ In the paired-samples t test, difference scores must be
created for every participant.
◦ A distribution of the means of these difference scores, or a
distribution of mean differences, is used.
Participant CBCL CBCL Difference
# Depression Depression Score
Score T1 Score T2
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
A. H0: μD = 0
B. H0: μ1 ≠ μ2
C. H0:|μT1 - μT2|=0
D. A and C
D
What’s similar? What’s different?
ONE-SAMPLE PAIRED SAMPLES
𝑀 − 𝑛𝑢𝑙𝑙 𝑐𝑜𝑚𝑝𝑎𝑟𝑖𝑠𝑜𝑛 𝑣𝑎𝑙𝑢𝑒 𝑀𝐷 −0 𝑀1 −𝑀2
𝑡𝑜𝑏𝑡 = 𝑡𝑜𝑏𝑡 = O𝑅 𝑀𝐷 = Mean of the
𝑠𝑀 𝑠𝑀 𝑠𝑀 difference scores
Df = N-1 Df= N-1 (where N= # of participants, not scores)
𝑠
Standard error of the mean = 𝑠𝑀 = Standard error of the mean difference
𝑁 𝑠
(scores) = 𝑠𝑀 = 𝐷𝑁 𝑠𝑀 = Standard error of the
mean difference
𝑀−𝑛𝑢𝑙𝑙 𝑐𝑜𝑚𝑝𝑎𝑟𝑖𝑠𝑜𝑛 𝑣𝑎𝑙𝑢𝑒
Cohen’s 𝑑 = Where 𝑠𝐷 = Standard
𝑆 𝑀𝐷 deviation of the difference
Cohen’s 𝑑 = scores
𝑠𝐷
Paired-Samples t Test
Participant # CBCL CBCL Difference
Depression Depression Score
Score T2
Step 3: Determine the characteristics of the
Score T1 comparison distribution.
1 65 60 -5
𝑀 difference = –2
2 65 70 5
3 66 66 0
Standard deviation
4 67 65 -2
𝑠 = 4.123 ∗∗ 𝑁𝑜𝑡𝑒, 𝑏𝑒 𝑎𝑏𝑙𝑒 𝑡𝑜 𝑐𝑜𝑚𝑝𝑢𝑡𝑒 𝑡ℎ𝑖𝑠 𝑏𝑦 ℎ𝑎𝑛𝑑!
5 70 68 -2
6 71 72 1 Standard error 𝑠𝑀
7 72 62 -10
8 73 70 -3
9 75 73 -2 4.123
𝑠𝑀 = = 1.3743
N=9 M= 69.333 M= 67.333 𝑴D = -2.000 9
s = 3.708 s = 4.444 sD = 4.123
Paired-Samples t Test
Participant # CBCL CBCL Difference
Depression Depression Score
Score T1 Score T2 Step 5: Calculate the test statistic.
1 65 60 -5 𝑠𝑀 = 1.3743
2 65 70 5
3 66 66 0
(𝑀 − 𝜇𝑀 ) (−2)
4 67 65 -2 𝑡= = = −1.46
𝑆𝑀 1.3743
5 70 68 -2
6 71 72 1
62
Do we reject H0?
7 72 -10
A) YES
8 73 70 -3 B) NO
9 75 73 -2
N=9 M= 69.333 M= 67.333 ഥ D = -2.000
𝑴
s = 3.708 s = 4.444 sD = 4.123
How do Confidence Intervals fit in each case?
ONE-SAMPLE PAIRED SAMPLES
𝑠
Standard error of the mean = 𝑠𝑀ഥ = Standard error of the mean difference (scores) = 𝑠𝑀ഥ =
𝑁 𝑠𝐷
ഥ
𝑀−𝑛𝑢𝑙𝑙 𝑐𝑜𝑚𝑝𝑎𝑟𝑖𝑠𝑜𝑛 𝑣𝑎𝑙𝑢𝑒 𝑁
Cohen’s 𝑑 =
𝑆 𝑋ത 𝐷 −0
Cohen’s 𝑑 =
𝑠𝐷
ഥ to estimate a
Confidence Interval around 𝑀
parameter µ ഥ𝐷 to estimate
Confidence Interval around 𝑀
a parameter µD
We can use a t-test, or
we can use a
Confidence Interval (CI)
A N I N T E R VA L E S T I M AT E B A S E D O N A S A M P L E S TAT I S T I C .
C A N B E U S E D F O R N H S T A N D TO E S T I M AT E P O P U L AT I O N PA R A M E T E R .
I F T H E S A M E P O P U L AT I O N I S S A M P L E D R E P E AT E D LY, T H E C I W I L L C O N TA I N T H E A C T UA L
P O P U L AT I O N M E A N ( O R M E A N D I F F E R E N C E ) A C E R TA I N P E R C E N TA G E O F T H E T I M E .
R E F R E S H YO U R U N D E R S TA N D I N G O F H O W C I R E L AT E S TO A L P H A A N D S A M P L E S I Z E B Y
T I N K E R I N G : H T T P S : / / R P S YC H O L O G I S T. C O M / D 3 / C I /
e.g., Sample mean,
Sample mean difference
Our best
estimate of
the true
population
parameter
-6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6
Mean difference scores
We calculate a CI around a mean difference in exactly
the same way. We just swap in the values we have.
Counterbalancing
Minimizes order effects by varying the order of presentation of
different levels of the independent variable from one participant to
the next
Method
◦ Randomly select 30 students who self disclose as social media
‘overusers’
◦ Record their GPA
◦ Conduct a ONE TAILED t-test, alpha .05
Step 1: Formally Stating the Hypotheses
NULL HYPOTHESIS ALTERNATIVE HYPOTHESIS
H0: μ ≥ 70% H1: μ < 70%
The population of students from The population of students from
which we drew this sample will which we drew this sample has a
have a mean GPA greater or equal mean GPA score LOWER than 70%
to 70%.
Q1. Finding tcritical using Table B-2
What is the closest critical value of t for α = .051tail? (N=30)
A. -1.698
B. -1.699
C. 1.698
D. 1.699
B
Note: for a 1-tailed test, pay close attention to the sign on your critical value!
Σ(𝑋 − 𝑀)2
𝑠=
𝑁−1
D
tcrit(29) = -1.699
.05
Q3. What is the p-value
associated with this hypothesis
test?
A. p>0.05
B. p<0.05
tcrit(29) = -1.699 tobt(29) = 1.83
A
.05
Remember, for 1-tailed tests in the
WRONG direction, the p-value is = to
1- area in the tail
Add a Confidence Interval to identify the range of plausible
values for the mean of whatever population our sample
belongs to.
Summary:
tcrit = -1.699
M= 73%
S= 9%
Lower Boundary Upper Boundary 𝑠𝑀 = 1.6432
ഥ lower =M sample - tcritical(𝑠𝑀 )
𝑀 𝑀upper = 𝑀sample + tcritical(𝑠𝑀 ) N= 30
tobt = 1.83
65 66 67 68 69 70 71 72 73 74 75 76 77
65 66 67 68 69 70 71 72 73 74 75 76 77
GPA
Write a sentence that summarizes the
results of this test.
H0: μ ≥ 70, The population of students from which
we drew this sample has a mean grade greater or
equal to 70. One way to phrase the results…
t(29) = 1.83, p>.05 Students who self disclose as social media ‘over
users’ have a mean GPA that is not significantly
M= 73 lower than the population at UBC (M= 73, s = 9,
s=9 t(29) = 1.83, p<.05, .95CI for µ: [70.21, 75.59]).
A. 4
B. 5
C. 10
D. 25
12. A sample for a paired-samples t-test has a Mdifference = 40, a variance of s2
= 20, and an estimated standard error of 2. How many scores are in the
sample? (Answer)
A. 4
B. 5 (correct answer)
C. 10
D. 25
13. If a hypothesis test for a paired-samples t-test using a sample
of n = 15 scores produces a t statistic of t = 2.15, then the correct
decision is to reject the null hypothesis for a two-tailed test with
an a of .05.
A. True
B. False
13. If a hypothesis test for a paired-samples t-test using a sample
of n = 15 scores produces a t statistic of t = 2.15, then the correct
decision is to reject the null hypothesis for a two-tailed test with
an a of .05. (Answer)
A. Conduct a t-test α = .052tail and use this to decide whether you should 𝑋ത sample ± tcritical(𝑠𝑋ത )
reject or retain your null hypothesis.
𝑋ത − 𝜇
𝑑=
𝑠
𝑋ത = 𝑋ത − 𝜇
Df= t=
𝑠𝑋ത
tcrit = 𝑠
𝑠𝑋ത =
𝑠𝑋ത = 𝑁
𝑋ത − 𝜇
t=
𝑠𝑋ത
Practice: You are interested in whether students who attend private school receive a
better education than what’s required to attend university. University admissions
look for a 78% Grade 12 average. You sampled 30 BC private school students and
measured a mean of 83% standard deviation 13%
A. Conduct a t-test α = .052tail and use this to decide whether you should 𝑋ത sample ± tcritical(𝑠𝑋ത )
reject or retain your null hypothesis.
𝑋ത − 𝜇
𝑑=
𝑠
𝑋ത = 83% 𝑋ത − 𝜇
Df= 29 t=
𝑠𝑋ത
tcrit = 2.045 𝑠
𝑠𝑋ത =
𝑠𝑋ത = 13/sqrt(30) = 2.3735 𝑁
ത
𝑋−𝜇 83−78
t= 𝑠𝑋
=
2.3735
= 2.11
ഥ
Practice: You are interested in whether students who attend private school receive a
better education than what’s required to attend university. University admissions
look for a 78% Grade 12 average. You sampled 30 BC private school students and
measured a mean of 83% standard deviation 13%
B. Set a 95% confidence interval for your sample mean, and use this to 𝑋ത sample ± tcritical(𝑠𝑋ത )
decide whether you should reject or retain your null hypothesis.
𝑋ത − 𝜇
𝑑=
𝑠
𝑋ത = 83% 𝑋ത − 𝜇
tcrit = 2.045 t=
𝑠𝑋ത
𝑠𝑋ത = 2.3735 𝑠
𝑠𝑋ത =
𝑁
Practice: You are interested in whether students who attend private school receive a
better education than what’s required to attend university. University admissions
look for a 78% Grade 12 average. You sampled 30 BC private school students and
measured a mean of 83% standard deviation 13%
B. Set a 95% confidence interval for your sample mean, and use this to 𝑋ത sample ± tcritical(𝑠𝑋ത )
decide whether you should reject or retain your null hypothesis.
𝑋ത − 𝜇
𝑑=
𝑠
𝑋ത = 83% 𝑋ത − 𝜇
tcrit = 2.045 t=
𝑠𝑋ത
𝑠𝑋ത = 2.3735 𝑠
𝑠𝑋ത =
𝑁
83 ± 4.852
95CI = [78.15, 87.85]
Practice: You are interested in whether students who attend private school receive a
better education than whats required to attend university. University admissions look
for a 78% Grade 12 average. You sampled 30 BC private school students and
measured a mean of 83% standard deviation 13%
𝑋ത − 𝜇
𝑑=
𝑠
𝑋ത − 𝜇
t=
𝑠𝑋ത
𝑠
𝑠𝑋ത =
𝑁
Practice: You are interested in whether students who attend private school receive a
better education than whats required to attend university. University admissions look
for a 78% Grade 12 average. You sampled 30 BC private school students and
measured a mean of 83% standard deviation 13%
𝑋ത − 𝜇
𝑑=
𝑠
𝑋ത − 𝜇 𝑋ത − 𝜇
𝑑=
𝑠 t=
𝑠𝑋ത
83 − 78 𝑠
𝑑=
13 𝑠𝑋ത =
𝑁
𝑑 = 0.38