Transcript 11/24/2015

Psychology 202a
Advanced Psychological
Statistics
November 24, 2015
The plan for today
•
•
•
•
•
•
A priori contrasts in SAS
Orthogonal contrasts
Contrast coding
The Eysenck ANOVA example
Helmert contrasts
Introduction to power
A priori contrasts
• A contrast is a question about a linear
combination of means.
• Example:
H0 :
Massed  Spaced
2
 None  0
• Shorthand notation: 1/2 1/2 -1
• Equivalent: 1 1 -2
• Another question that might interest us is 1 -1 0.
Contrasts (continued)
• Once a contrast is specified, its sum of squares is
calculated:
k
SS contrast


 c i M i 
  i 1k 2 
2
c
i

n
i
1
i
• Contrasts always have 1 df, so the sum of
squares is a mean square.
• Division by the error mean square provides an F
statistic that tests the contrast.
Contrasts (continued)
• Illustration in SAS.
• Any set of contrasts defined in advance
may be tested, dividing the alpha among
them.
• However, this particular set has a special
property: orthogonality.
• If the contrasts are orthogonal and
specified in advance, there is no need for
an adjustment to alpha.
Checking for orthogonality
• Multiply the corresponding coefficients of
each pair of contrasts.
• If the products sum to zero, the pair is
orthogonal.
• Here, we are considering (1, 1, -2) and (1,
-1, 0).
• (1×1) + (1×-1) + (-2×0) = 0, so the pair is
orthogonal.
Why is orthogonality special?
• Contrast coding
• Illustration in SAS
• So orthogonal contrasts divide the model
sum of squares into exhaustive and
mutually exclusive partitions.
• A more complicated example (Eysenck
memory experiment)
Introducing power
• In the world of hypothesis testing, one of
two things is true:
– The null hypothesis may be true; or
– The null hypothesis may be false.
• In the world of hypothesis testing, one of
two outcomes will occur:
– The null hypothesis may be rejected; or
– The null hypothesis may be retained.
Consider that in tabular form:
H0 True
H0 Rejected
H0 Retained
H0 False
Consider that in tabular form:
H0 True
H0 Rejected
H0 Retained
H0 False
Great!
Consider that in tabular form:
H0 True
H0 Rejected
H0 Retained
H0 False
Great!
No problem.
Consider that in tabular form:
H0 True
H0 False
H0 Rejected
Type I error
Great!
H0 Retained
No problem
Consider that in tabular form:
H0 True
H0 False
H0 Rejected
Type I error
Great!
H0 Retained
No problem
Type II error
Consider that in tabular form:
H0 True
H0 False
H0 Rejected
Type I error
(p = a)
Great!
H0 Retained
No problem
Type II error
Consider that in tabular form:
H0 Rejected
H0 Retained
H0 True
H0 False
Type I error
(p = a)
Great!
No problem
Type II error
(p = b)
What is power?
• In that scenario, power = 1 – b.
• In other words, power is the probability
that we will avoid a Type II error, given
that the null hypothesis is actually false.