Lecture 3: T-tests Part 2

Download Report

Transcript Lecture 3: T-tests Part 2

T-tests
Part 2
PS1006 Lecture 3
Sam Cromie
1
From Repeated t to Unrelated t
NOMENCLATURE
within, repeated, paired
vs.
between, unrelated, independent
2
Generic form of a statistic
Data – Hypothesis
Error
What you got – what you expected (null)
The unreliability of your data
3
Repeated measures t test
Before
Mean
St. Dev.
21
24
21
26
32
27
21
25
18
23.84
4.20
D
t
sD
After
15
15
17
20
17
20
8
19
10
15.67
4.24
D

sD
n
Diff.
6
9
4
6
15
7
13
6
8
8.22
3.60
• PTSD symptoms measured before
and after supportive counseling
• Difference scores are used for the
calculation
• t calculates the likelihood of
achieving these scores (using the
concept of a sampling distribution),
given there is there is no difference
between before and after scores
• Since there should be no difference
we assume  (pop diff score) to be 0
8.22

3.6
9
8.22

 6.85
1.2
4
SPSS repeated t output
Paired Samples St at ist ics
Pair 1
BEFORE
AFTER
Mean
23.89
15.67
N
Std. Deviation
4.20
4.24
9
9
Std. Error Mean
1.40
1.41
Paired Samples Correlations
N
Pair 1
BEFORE & AFTER
9
Correlation
.637
Sig.
.065
Paired Samples Test
Paired Differences
Pair 1
BEFORE - AFTER
Mean
8.22
Std. Deviation
3.60
Std. Error Mean
1.20
95% Confidence Interval
of the Difference
Lower
Upper
5.46
10.99
t
6.856
df
8
Sig. (2-tailed)
.000
5
Reporting the result
• Supportive counselling resulted in a
decrease (M= 8.22, SD=3.6) in the number
of PTSD symptoms reported. A repeated
measures t test showed these differences to
be significant; t(8)=6.86, p<.001, two-tailed.
– shorthand t(8)=6.86, p<.001, two-tailed
– In exam - conclusion = supportive counselling
reduced the number of PTSD symptoms
• Reporting p
Options are: > .05, <.05, <.01, <.001
Never state that p =.000 or that p is < .000
6
Independent groups t test
• Used to analyse a between subjects design
– Also referred to as a between subjects t test
• Should realise our therapy trial could have
been designed using two different groups
rather than a repeated measures design
– One group received therapy the other did not
• There are no comparable scores within each
group therefore groups as a whole have to
be compared
7
Changing to between groups design
Mean
St. Dev.
No Therapy
Group
Therapy
Group
21
24
21
26
32
27
21
25
18
15
15
17
20
17
20
8
19
10
23.84
4.20
15.67
4.24
• Same data presented as
different groups
• No comparable scores
within each group - groups
as a whole have to be
compared
• Test differences between
sample means
• Need a sampling
distribution of differences
between group means
8
D 
t
sD

X
t
1

 X 2  ( 1   2 )
sX 1 X 2
8.22

3.6
9

8.22
4.2 2 4.242

9
9
=
D
sD
n
X1  X 2
=
2
1
2
2
s s

n1 n2
=
8.22

 6.85
1.2
=
8.22

 4.13
1.99
9
Equation elements
• X 1 = mean of group 1
• X 2 = mean of group 2
•sX  X = the standard deviation of a sampling
distribution based on the difference between
the mean of two samples
2
s
• 1 = the variance of group 1
2
s
• 2 = the variance of group 2
• n1= the number of participants in group 1
• n2= the number of participants in group 2
1
2
10
Allowing for Gs of different sizes
• A sample variance should be weighted
according to the number within the sample
• Formula below calculates the pooled variance
2
2
2
such that s1 and s2 are replaced by s p
t
X1  X 2
s 2p
n1


s 2p
n1
X1  X 2
 1
1 

s 

 n1 n2 
2
p
where
2
2


(
n

1
)
s

n

1
s
1
2
2
s 2p  1
n1  n2  2
11
Inputting data into SPSS
• Basic rule - each participant occupies a single
row
– Repeated measures design:
• each participant = 2 columns, 1 for before and 1 for after
therapy
– Between groups design:
• all the scores go into 1 column since each participant
only produces one score
12
• With between groups each participant must
also be identified in terms of the group they
come from
• A second column is designated the grouping
variable (sometimes referred to as dummy
variable) - identifying which group the
participant was in
13
SPSS output
Group St atist ics
GROUP
BEFORE 1
2
N
Mean
23.89
15.67
9
9
Std. Deviation
4.20
4.24
Std. Error Mean
1.40
1.41
Independent Samples Test
Levene's Test for
Equal ity of Var iances
F
BEFORE Equal vari ances assumed
Equal vari ances not
assumed
.000
Sig .
.983
t- test for Equal ity of Means
t
4.133
4.133
df
16
15.998
Sig . ( 2-tai led)
.001
Mean Difference
8.22
Std. Error
Differ ence
1.99
.001
8.22
1.99
95% Confi dence Inter val
of the Di fference
Lower
Upper
4.01
12.44
4.01
12.44
• Note SPSS uses the pooled variance
formula
14
Degrees of freedom
• Each group has 9 participants
– df for each group = n - 1 = 9 - 1 = 8
– Since there are 2 groups
• df = n1 - 1 + n2 - 1 = n1 + n2 - 2
• = 9 + 9 - 2 = 16 df
• New result
t(16) = 4.133, p<.01, two-tailed
– Value of t is smaller - independent groups
design is less powerful and will always
produce a smaller t result given the same data
15
Conditions of use
For all parametric statistics, the data must fulfil
three criteria with varying stringency
– The data must be of interval quality
– Both populations are sampled from
populations with equal variances
• Homogeneity of variance
– Both groups are sampled from normal
populations
• Assumption of normality
16
Nonparametric equivalents
• When the data produced do not conform to
the requirements of parametric data, then
there are nonparametric equivalents
• Repeated measures t test – Wilcoxon’s Matched-Pairs Signed-Ranks Test
• Unrelated groups t test
– Mann-Whitney (U) Test
17
Conditions of
use
Pop mean and SD
known - interested
in score of ind
Formula
X 
z

X 
Value
interested in
Score of
individual
Population
value
Denominator
Population mean
Population
standard
deviation
Population mean
Standard error of
sampling
distribution of
mean
Population mean
SE of sampling
distribution of
mean
Pop mean and SD
known - interested
in mean of sample
z
Pop mean but SD
unknown interested in mean
of sample
X 
t
sX
Mean of sample
Interested in
difference between
2 repeated
measures
D 
t
sD
Mean difference
between two
repeated
measures
zero
SE of sampling
distribution of
mean difference
scores
Interested in
difference between
2 independent Gs
X
t
Difference between
means of 2
independent Gs
zero
SE of differences
18
between means
1
X

 X 2  ( 1   2 )
sX 1 X 2
Mean of sample