Inferential Tests To Compare Two Conditions

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 27

Inferential Tests to

compare two Conditions


Dr Jennifer Mattschey
This Lecture
• Paired-Samples T-Test
• Wilcoxon Signed Ranks test
Paired-Samples T-Tests
• T-Test used to compare two conditions of one Independent Variable
• Both conditions are experienced by the same people
• Which means you get two scores/measurements for each participant, i.e. one for each of the
two conditions.
• This means random sample-specific variation is reduced between conditions
Paired-Samples T-Tests
• Data Type:
• Can be used with parametric interval or ratio data

• Design:
• The study design should include two conditions and one group of participants
Aim of
Paired- Is the difference between conditions
large enough to result in a
statistically significant difference or

Sample is it smaller and we should assume


differences emerged by chance?

s T-Test
• One-Samples t-test
Other names • Related t-test
for the • Paired t-test
paired- • Correlated t-test

samples t- • Within-subject t-test


• Within-groups t-test
test • Repeated-measures t-test
Example
• Stroop Task:
• RED = Incongruent
• GREEN = Congruent
• Task: Name the font colour
• Participants usually respond faster and are less likely to make an error in the congruent
condition
• For the example, we will look at reaction time
Example Hypothesises
H0: There is no difference between the congruent and incongruent condition
HA: Participants will be slower (i.e. have longer reaction times) in the incongruent
condition

For the example data, we tested 100 participants.


Example Data
M (SD)
Congruent Incongruent

560.21 (37.71) 627.08 (22.82)


Example Data: Test of Normality

Both tests of normality are non-


significant, which means we can
assume a normal distribution
Distribution for each Condition
Paired-Samples T-Test: Result
Paired-Samples T-Test: Results cont.

Measures of variance relating to the Mean Difference Score,


Mean Difference Score, in including the Standard Deviation (SD = 43.98), Standard Error (SE
this case -66.87 = 4.39), and the upper and lower estimate of the 95%-CI.
Paired-Samples T-Test: Results cont.

Usually reported in the following format:


t(99) = -15.203, p < .001

Colour-coded version:
t(99) = -15.203, p < .001

Tip 1:
If you want to report the one-tailed level of
t-value Degree of P-Value (2-tailed)
significance, half the two-tailed one.
Freedom
For example, to get the one-tailed p-value for p
= .020 (two-tailed) we would need to
calculate .020/2 = .010. Thus, the one-tailed p-value
is p = .010.
Data Order

Tip 2:
If the t-value is positive or negative depends on the order in which you have entered the data. Here, the shorter
congruent RTs were entered first, which is why the t-value is negative. If the longer incongruent RTs would have been
entered first instead, we would get the exact same value but it would be positive.
Cohen’s d

• Just as for the independent t-test, we need to calculate Cohen’s d by


hand for the paired-samples t-test
• The calculation for this is slightly different than the one we used for
the independent samples t-test.
• Reminder: d < 0.2 = trivial or a null effect; d ≥ 0.2 = small effect; d ≥
0.5 = moderate effect; d ≥ 0.8 = large effect
Calculating Cohen’s d
t-value

Square-root of the number of


participants (100 in this case)
Re-Cap: Paired-
Samples T-Test
• Appropriate to compare parametric ratio and interval data
• Used to compare differences between two conditions if all
participants experienced/were exposed to both conditions

• Example Data in full:


• “Participants were significantly faster in the congruent
(M = 560.21, SD = 37.71) than in the incongruent
condition (M = 627.08, SD = 22.82) of the Stroop Task,
t(99) = -15.203, p < .001, d = 1.520.”
Wilcoxon Signed Ranks
Test
• Used to compare two conditions in a repeated-measures design
• Non-parametric version of the paired-samples t-test

Data Types:
• Ordinal
• If non-normally distributed: ratio and interval data

Is data in one condition is consistently ranked more highly


than in the other condition?
Ranking

• The “ranks” in the title refer to


actual ranks
• To obtain them, we first need to
calculate the difference between
scores
• In this case “happiness
ratings” before and after
playing with puppies
• These differences are then put
into order (smallest to largest)
and ranked based on that order
Ranking

Step 1: Order the differences according to size, regardless of whether the values are positive or negative
Step 2: Than assign ranks based on that order of values

Step 3: Calculate the sum of ranks for all negative (blue) and all positive (orange) values:
• Positive Sum of Ranks = 1 + 3 + 4 + 6 + 7 + 8 + 9 = 38
• Negative Sum of Ranks: 2 + 5 = 7
Positive vs Negative Sum of Ranks

T-Values for Wilcoxon Signed Ranks Tests:


• T1 = first measurement entered into analysis, in this case the “before” score
• T2 = second measurement entered into analysis, in this case the “after” score
• T-Value = sum of positive/negative ranks

If the null hypothesis is true, we would expect roughly equal ranks, e.g. rank 1, 3, 5, and
7 (= 16) for positive changes and 2, 4, 6, 9 (= 21) for negative changes.

In this case, we observed a much higher value for ranks of positive values (38) than
negative values (7)
Wilcoxon Signed
Ranks Tests: Example

We ask 100 students to rate how happy


they feel before they spend one hour
playing with four-months old guide dog
puppies and after

Scale:
1 2 3 4 5
Very Unhappy Neutral Happy Very
Unhappy Happy
SPSS Results: Part I

Sum of all
negative ranks

Sum of all
positive ranks

Number Number
negative ranks positive ranks
SPSS Results: Part II

P-Value

Note:
There are different ways to run the Wilcoxon
Signed Ranks Test in SPSS and the output will look
different based on which way you choose. This is
the output for Analyze  Non-Parametric Tests
 Legacy Dialogs  2 Related Samples

Reporting format: Z = 8.644, p < .001


Effect Size

Effect Size Classifications:


r = .10 (small)
r = 30 (medium)
r = .50 (large)

Reporting format: Z = 8.644, p < .001, r = -.864


Summary:
One group, two conditions

• For parametric ratio and interval data:


• Paired-Samples T-Test
• For ordinal data and non-paracemetric
interval and ration data:
• Wilcoxon Signed Ranks Test

• Calculate effect size for each test:


• Cohen’s d for the t-test
• Cohen’s r for Wilcoxon Signed Ranks
Test

You might also like