0% found this document useful (0 votes)
60 views48 pages

CH 9 10

The document introduces the t-test, which is used to compare means. It discusses different types of t-tests including single sample, paired samples, and independent samples t-tests. Key differences between the z-test and t-test are explained. Steps for performing paired samples t-tests are outlined including calculating the test statistic and determining if the null hypothesis can be rejected.

Uploaded by

kavinbhatia777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
60 views48 pages

CH 9 10

The document introduces the t-test, which is used to compare means. It discusses different types of t-tests including single sample, paired samples, and independent samples t-tests. Key differences between the z-test and t-test are explained. Steps for performing paired samples t-tests are outlined including calculating the test statistic and determining if the null hypothesis can be rejected.

Uploaded by

kavinbhatia777
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 48

Welcome to : Analysis of

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

Single • Compare one group mean to a known population


μ when you don’t know σ
• Compare one group mean to some other null
sample (Ch 9) value of interest (e.g., scale midpoint)

• Compare mean change in repeated measures


Paired experiment

Samples (Ch 10) • Compare mean differences when participants are


linked (e.g., parent and child, twin siblings)

Independent • Compare two group means in independent groups


experiment
Samples (Ch 11)
Z-test vs t-test
If we don’t know 𝝈 , our best estimate for this parameter is
our sample standard deviation (s)

Compare one group mean to Single sample


• Compare one group mean to a known
Single sample population μ when you don’t know σ
a known population μ when
• Compare one group mean to some
Z-test we know σ …population
standard deviation
t-test other null value of interest (e.g., scale
midpoint)

Sampling Distribution Sampling Distribution


of the Mean of the Mean
𝑖𝑡𝑠 𝑚𝑒𝑎𝑛 = 𝜇𝑀 , 𝑖𝑡𝑠 𝑚𝑒𝑎𝑛 = 𝜇𝑀 ,
𝑖𝑡𝑠 𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑑𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛 = 𝜎𝑀 𝑖𝑡𝑠 𝑠𝑡𝑎𝑛𝑑𝑎𝑟𝑑 𝑑𝑒𝑣𝑖𝑎𝑡𝑖𝑜𝑛 = 𝑠𝑀
So what’s new?
t is a Family of distributions
• Bell shaped
• Symmetrical
Sometimes t distribution is very similar to the
Normal Distribution
• If population is normally shaped
• If N ≥ 30

But shape changes depending on sample size


• Smaller N means scores in the tails become more common →
“Fatter tails”
• Degrees of Freedom
For example, this shows 3 of the t distributions,
compared to the Normal Distribution

• It is still a bell-shaped,
symmetrical curve (like
the normal curve)

• …BUT it has more area


in the tails

• 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

◦ The population used here is one based on


the null hypothesis—that there is no average
difference between your two groups
Q4. How can we state the null hypothesis for a paired
samples, two tailed t Test?

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

subtract “Margin of Error” add “Margin of Error” to


to find Lower Bound find Upper Bound

Critical Standard Critical Standard


X X
value Error value Error

A L L CI S FOLLOW T HE SAME PAT T ERN… AN D WE ’ RE G OI N G TO


S E E T HI S R E P EATEDLY FOR T HE R EST OF T HE T E R M.
Adjusted the width of the bar to reflect Summary:
M= -2
our upper and lower .95CI boundaries S= 4.123
𝑠𝑀 = 1.3743
N= 9
tobt = -1.46
Lower Boundary Upper Boundary tcrit = -2.306

ഥ lower = Msample - tcritical(𝑠𝑀ഥ )


𝑀 ഥ upper = Msample + tcritical(𝑠𝑀ഥ )
𝑀
ഥ lower = -2 – (1.3743)(2.306)
𝑀 ഥ upper = -2 + (1.3743)(2.306)
𝑀
ഥ lower = -2 – 3.1691
𝑀 ഥ upper = -2 + 3.1691
𝑀 Because the interval spans 0, we do
ഥ lower = -5.17
𝑀 ഥ upper = 1.17
𝑀 NOT reject the null hypothesis, it is
plausible there is no mean
difference

-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.

Sample mean Sample mean


difference

Critical value Critical value


of z of t

Standard error of Standard error of


𝜎 𝑠
the mean (𝜎𝑀 = ) the
themean (𝑠𝑀 = )
mean difference
𝑛 𝑆𝐷
𝑛
scores (𝑠𝐷ഥ = 𝑛
)
Order Effects and Counterbalancing
Order effects and counterbalancing
◦ Tells how a participant’s behavior changes when
the dependent variable is presented for a second
time

Counterbalancing
Minimizes order effects by varying the order of presentation of
different levels of the independent variable from one participant to
the next

Measures such as this can reduce order effects in within-groups


research designs
Q6. With α = .05 and df = 8, the critical values for a two-tailed test are t =
± 2.306. Assuming that all other factors are held constant, if the df value
was increased to df = 30, what would happen to the critical values for t?

A. They would increase (move farther from zero).


B. They would decrease (move closer to zero).
C. They would stay the same.
D. It cannot be determined based on the information
provided.
9. With α = .05 and df = 8, the critical values for a two-tailed test are t = ± 2.306.
Assuming that all other factors are held constant, if the df value was increased to
df = 30, what would happen to the critical values for t? (Answer)

A. They would increase (move farther from zero).


B. They would decrease (move closer to zero). (correct answer)
C. They would stay the same.
D. It cannot be determined based on the information provided.
Practice: one-sample t-test
Example: using a single sample t-test
Research Question
◦ You are interested in studying the link between social media usage and
academic performance
◦ More specifically, you plan to sample students who are self disclosed
social media ‘overusers’ at UBC. You will then record their GPA. You
would like to see whether this GPA is BELOW UBC’s average of 70%

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

Standard deviation of a sample


is denoted s, subtracts 1 from
denominator
Q2. Calculating your tobtained
In your sample of 30 students, 𝑠𝑋ത =
𝑠
𝑡𝑜𝑏𝑡 =
𝑀 − 𝑛𝑢𝑙𝑙 𝑐𝑜𝑚𝑝𝑎𝑟𝑖𝑠𝑜𝑛 𝑣𝑎𝑙𝑢𝑒
you record a mean GPA of 73%, 𝑁 𝑠𝑋ത
s= 9%
73 − 70
𝑡𝑜𝑏𝑡 =
9
Compute your t-statistic
30
Calculate 95CI around u A. -1.83
B. -0.33 𝑡𝑜𝑏𝑡 =
3
1.6432
C. 0.33
D. 1.83 𝑡𝑜𝑏𝑡 = 1.83

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

CBCL Time 1 Depression score


Adjusted the width of the bar to reflect Summary:
tcrit = -1.699

our upper and lower .95CI boundaries M= 73%


S= 9%
𝑠𝑀 = 1.6432
N= 30
tobt = 1.83
Lower Boundary Upper Boundary
𝑀 lower =𝑀sample - tcritical(𝑠𝑀 ) 𝑀upper =𝑀sample + tcritical(𝑠𝑀 )
𝑀lower = 73 – (1.699)(1.6432) 𝑀upper = 73 + (1.699)(1.6432)
𝑀lower = 73 – 2.7917 𝑀upper = 69.333 + 2.7917
𝑀lower = 70.21 𝑀upper = 75.79

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]).

.95CI for µ: [70.21, 75.79]


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?

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. True (correct answer)


B. False
14. Dependent sampling generally results in a more powerful
statistical test than independent sampling because:
A. the dependent procedure generally has a larger N.
B. dependent procedures have higher acceptable levels of a.
C. dependent procedures reduce the variability in the sampling
distribution.
D. All of these are true.
14. Dependent sampling generally results in a more powerful statistical test than
independent sampling because: (Answer)

A. the dependent procedure generally has a larger N.


B. dependent procedures have higher acceptable levels of a.
C. dependent procedures reduce the variability in the sampling
distribution. (correct answer)
D. All of these are true.
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.
𝑋ത − 𝜇
𝑑=
𝑠
𝑋ത = 𝑋ത − 𝜇
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%

B. What is the effect size? (Cohen’s D) 𝑋ത sample ± tcritical(𝑠𝑋ത )

𝑋ത − 𝜇
𝑑=
𝑠

𝑋ത − 𝜇
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%

B. What is the effect size? (Cohen’s D) 𝑋ത sample ± tcritical(𝑠𝑋ത )

𝑋ത − 𝜇
𝑑=
𝑠
𝑋ത − 𝜇 𝑋ത − 𝜇
𝑑=
𝑠 t=
𝑠𝑋ത
83 − 78 𝑠
𝑑=
13 𝑠𝑋ത =
𝑁
𝑑 = 0.38

You might also like