Remember
• You just invented a “magic math pill” that will increase test scores.
• On the day of the first test you give the pill to 4 subjects. When these same subjects take the second test they do not get a pill
• Did the pill increase their test scores?
What if. . .
• You just invented a “magic math pill” that will increase test scores.
• On the day of the first test you give a full pill to 4 subjects. When these same subjects take the second test they get a placebo. When these same subjects that the third test they get no pill.
Note
• You have more than 2 groups • You have a repeated measures design
• You need to conduct a Repeated Measures ANOVA
Tests to Compare Means
Independent Variables and # of levels
Independent Samples Related Samples
One IV, 2 levels Independent t-test Paired-samples t-test
One IV, 2 or more levels ANOVA Repeated measures ANOVA
Tow IVs, each with 2 or more levels
Factorial ANOVA Repeated measures factorial ANOVA
Design of experiment
What if. . .
• You just invented a “magic math pill” that will increase test scores.
• On the day of the first test you give a full pill to 4 subjects. When these same subjects take the second test they get a placebo. When these same subjects that the third test they get no pill.
Results
Pill Placebo No Pill
Sub 1 57 60 64
Sub 2 71 72 74
Sub 3 75 76 78
Sub 4 93 92 96
Mean 74 75 78
For now . . . Ignore that it is a repeated design
Pill Placebo No Pill
Sub 1 57 60 64
Sub 2 71 72 74
Sub 3 75 76 78
Sub 4 93 92 96
Mean 74 75 78
Pill Placebo No Pill
Sub 1 57 60 64
Sub 2 71 72 74
Sub 3 75 76 78
Sub 4 93 92 96
Mean 74 75 78
Between Variability = low
Pill Placebo No Pill
Sub 1 57 60 64
Sub 2 71 72 74
Sub 3 75 76 78
Sub 4 93 92 96
Mean 74 75 78
Within Variability = high
34.667 2 17.333 .091 .914
1720.0 9 191.11
1754.7 11
BetweenGroupsWithinGroupsTotal
SCORE
Sum ofSquares df
MeanSquare F Sig.
ANOVA
Notice – the within variability of a group can be predicted by the other groups
Pill Placebo No Pill
Sub 1 57 60 64
Sub 2 71 72 74
Sub 3 75 76 78
Sub 4 93 92 96
Mean 74 75 78
Notice – the within variability of a group can be predicted by the other groups
Pill Placebo No Pill
Sub 1 57 60 64
Sub 2 71 72 74
Sub 3 75 76 78
Sub 4 93 92 96
Mean 74 75 78
Pill and Placebo r = .99; Pill and No Pill r = .99; Placebo and No Pill r = .99
Pill Placebo No Pill Mean
Sub 1 57 60 64 60.33
Sub 2 71 72 74 72.33
Sub 3 75 76 78 76.33
Sub 4 93 92 96 93.66
Mean 74 75 78
These scores are correlated because, in general, some subjects tend to do very well and others tended to do very poorly
Repeated ANOVA
• Some of the variability of the scores within a group occurs due to the mean differences between subjects.
• Want to calculate and then discard the variability that comes from the differences between the subjects.
Pill Placebo No Pill Mean
Sub 1 57 60 64 60.33
Sub 2 71 72 74 72.33
Sub 3 75 76 78 76.33
Sub 4 93 92 96 93.66
Mean 74 75 78 75.66
Example
Sum of Squares
• SS Total
– The total deviation in the observed scores
• Computed the same way as before
2..)( XXSSTotal
Pill Placebo No Pill Mean
Sub 1 57 60 64 60.33
Sub 2 71 72 74 72.33
Sub 3 75 76 78 76.33
Sub 4 93 92 96 93.66
Mean 74 75 78 75.66
SStotal = (57-75.66)2+ (71-75.66)2+ . . . . (96-75.66)2 = 908
*What makes this value get larger?
Pill Placebo No Pill Mean
Sub 1 57 60 64 60.33
Sub 2 71 72 74 72.33
Sub 3 75 76 78 76.33
Sub 4 93 92 96 93.66
Mean 74 75 78 75.66
SStotal = (57-75.66)2+ (71-75.66)2+ . . . . (96-75.66)2 = 908
*What makes this value get larger?
*The variability of the scores!
Sum of Squares
• SS Subjects
– Represents the SS deviations of the subject means around the grand mean
– Its multiplied by k to give an estimate of the population variance (Central limit theorem)
2..)( XXkSS SSubjects
Pill Placebo No Pill Mean
Sub 1 57 60 64 60.33
Sub 2 71 72 74 72.33
Sub 3 75 76 78 76.33
Sub 4 93 92 96 93.66
Mean 74 75 78 75.66
SSSubjects = 3((60.33-75.66)2+ (72.33-75.66)2+ . . . . (93.66-75.66)2) = 1712
*What makes this value get larger?
Pill Placebo No Pill Mean
Sub 1 57 60 64 60.33
Sub 2 71 72 74 72.33
Sub 3 75 76 78 76.33
Sub 4 93 92 96 93.66
Mean 74 75 78 75.66
SSSubjects = 3((60.33-75.66)2+ (72.33-75.66)2+ . . . . (93.66-75.66)2) = 1712
*What makes this value get larger?
*Differences between subjects
Sum of Squares
• SS Treatment
– Represents the SS deviations of the treatment means around the grand mean
– Its multiplied by n to give an estimate of the population variance (Central limit theorem)
2..)( XXnSS WTreatment
Pill Placebo No Pill Mean
Sub 1 57 60 64 60.33
Sub 2 71 72 74 72.33
Sub 3 75 76 78 76.33
Sub 4 93 92 96 93.66
Mean 74 75 78 75.66
SSTreatment = 4((74-75.66)2+ (75-75.66)2+(78-75.66)2) = 34.66
*What makes this value get larger?
Pill Placebo No Pill Mean
Sub 1 57 60 64 60.33
Sub 2 71 72 74 72.33
Sub 3 75 76 78 76.33
Sub 4 93 92 96 93.66
Mean 74 75 78 75.66
SSTreatment = 4((74-75.66)2+ (75-75.66)2+(78-75.66)2) = 34.66
*What makes this value get larger?
*Differences between treatment groups
Sum of Squares• Have a measure of how much all scores differ
– SSTotal
• Have a measure of how much this difference is due to subjects– SSSubjects
• Have a measure of how much this difference is due to the treatment condition– SSTreatment
• To compute error simply subtract!
Sum of Squares
• SSError = SSTotal - SSSubjects – SSTreatment
8.0 = 1754.66 - 1712.00 - 34.66
Compute df
Source df SS
Subjects 1712.00
Treatment 34.66
Error 8.00
Total 11 1754.66
df total = N -1
Compute df
Source df SS
Subjects 3 1712.00
Treatment 34.66
Error 8.00
Total 11 1754.66
df total = N -1
df subjects = n – 1
Compute df
Source df SS
Subjects 3 1712.00
Treatment 2 34.66
Error 8.00
Total 11 1754.66
df total = N -1
df subjects = n – 1
df treatment = k-1
Compute df
Source df SS
Subjects 3 1712.00
Treatment 2 34.66
Error 6 8.00
Total 11 1754.66
df total = N -1
df subjects = n – 1
df treatment = k-1
df error = (n-1)(k-1)
Compute MS
Source df SS MS
Subjects 3 1712.00
Treatment 2 34.66 17.33
Error 6 8.00
Total 11 1754.66
Compute MS
Source df SS MS
Subjects 3 1712.00
Treatment 2 34.66 17.33
Error 6 8.00 1.33
Total 11 1754.66
Compute F
Source df SS MS F
Subjects 3 1712.00
Treatment 2 34.66 17.33 13.00
Error 6 8.00 1.33
Total 11 1754.66
Test F for Significance
Source df SS MS F
Subjects 3 1712.00
Treatment 2 34.66 17.33 13.00
Error 6 8.00 1.33
Total 11 1754.66
Test F for Significance
Source df SS MS F
Subjects 3 1712.00
Treatment 2 34.66 17.33 13.00*
Error 6 8.00 1.33
Total 11 1754.66
F(2,6) critical = 5.14
Measure: MEASURE_1Sphericity Assumed
34.667 2 17.333 13.000 .007 26.000 .9408.000 6 1.333
SourcePILLSError(PILLS)
Type IIISum ofSquares df
MeanSquare F Sig.
Noncent.Parameter
ObservedPowera
Tests of Within-Subjects Effects
Computed using alpha = .05a.
Additional tests
Source df SS MS F
Subjects 3 1712.00
Treatment 2 34.66 17.33 13.00*
Error 6 8.00 1.33
Total 11 1754.66
Can investigate the meaning of the F value by computing t-tests and Fisher’s LSD
Remember
nMSXXtwithin2
21
Pill Placebo No Pill Mean
Mean 74 75 78 75.66
nMSXXtwithin2
21
Measure: MEASURE_1Sphericity Assumed
34.667 2 17.333 13.000 .007 26.000 .9408.000 6 1.333
SourcePILLSError(PILLS)
Type IIISum ofSquares df
MeanSquare F Sig.
Noncent.Parameter
ObservedPowera
Tests of Within-Subjects Effects
Computed using alpha = .05a.
Pill Placebo No Pill Mean
Mean 74 75 78 75.66
nMSXXtwithin2
21
Measure: MEASURE_1Sphericity Assumed
34.667 2 17.333 13.000 .007 26.000 .9408.000 6 1.333
SourcePILLSError(PILLS)
Type IIISum ofSquares df
MeanSquare F Sig.
Noncent.Parameter
ObservedPowera
Tests of Within-Subjects Effects
Computed using alpha = .05a.
Pill vs. Placebo
Pill Placebo No Pill Mean
Mean 74 75 78 75.66
4)33.1(2
757423.1
Measure: MEASURE_1Sphericity Assumed
34.667 2 17.333 13.000 .007 26.000 .9408.000 6 1.333
SourcePILLSError(PILLS)
Type IIISum ofSquares df
MeanSquare F Sig.
Noncent.Parameter
ObservedPowera
Tests of Within-Subjects Effects
Computed using alpha = .05a.
Pill vs. Placebo t=1.23
Pill Placebo No Pill Mean
Mean 74 75 78 75.66
4)33.1(2
757423.1
Measure: MEASURE_1Sphericity Assumed
34.667 2 17.333 13.000 .007 26.000 .9408.000 6 1.333
SourcePILLSError(PILLS)
Type IIISum ofSquares df
MeanSquare F Sig.
Noncent.Parameter
ObservedPowera
Tests of Within-Subjects Effects
Computed using alpha = .05a.
Pill vs. Placebo t=1.23
t (6) critical = 2.447
Pill Placebo No Pill Mean
Mean 74 75 78 75.66
4)33.1(2
787498.4
Measure: MEASURE_1Sphericity Assumed
34.667 2 17.333 13.000 .007 26.000 .9408.000 6 1.333
SourcePILLSError(PILLS)
Type IIISum ofSquares df
MeanSquare F Sig.
Noncent.Parameter
ObservedPowera
Tests of Within-Subjects Effects
Computed using alpha = .05a.
Pill vs. Placebo t=1.23
Pill vs. No Pill t =4.98*
t (6) critical = 2.447
Pill Placebo No Pill Mean
Mean 74 75 78 75.66
4)33.1(2
787570.3
Measure: MEASURE_1Sphericity Assumed
34.667 2 17.333 13.000 .007 26.000 .9408.000 6 1.333
SourcePILLSError(PILLS)
Type IIISum ofSquares df
MeanSquare F Sig.
Noncent.Parameter
ObservedPowera
Tests of Within-Subjects Effects
Computed using alpha = .05a.
Pill vs. Placebo t=1.23
Pill vs. No Pill t =4.98*
Placebo vs. No Pill t =3.70*
t (6) critical = 2.447
Practice
• You wonder if the statistic tests are of all equal difficulty. To investigate this you examine the scores 4 students got on the three different tests. Examine this question and (if there is a difference) determine which tests are significantly different.
Test 1 Test 2 Test 3
Sub 1 60 70 78
Sub 2 78 76 85
Sub 3 64 90 89
Sub 4 77 81 94
Measure: MEASURE_1Sphericity Assumed
564.50 2 282.25 7.211 .025 14.423 .742234.83 6 39.139
SourceFACTOR1Error(FACTOR1)
Type IIISum ofSquares df
MeanSquare F Sig.
Noncent.Parameter
ObservedPowera
Tests of Within-Subjects Effects
Computed using alpha = .05a.
Measure: MEASURE_1Sphericity Assumed
564.50 2 282.25 7.211 .025 14.423 .742234.83 6 39.139
SourceFACTOR1Error(FACTOR1)
Type IIISum ofSquares df
MeanSquare F Sig.
Noncent.Parameter
ObservedPowera
Tests of Within-Subjects Effects
Computed using alpha = .05a.
4 60.00 78.00 69.750 9.10594 70.00 90.00 79.250 8.46074 78.00 94.00 86.500 6.7577
4
TEST1TEST2TEST3Valid N(listwise)
N Minimum Maximum MeanStd.
Deviation
Descriptive Statistics
nMSXXtwithin2
21
SPSS Homework – Bonus
1) Determine if practice had an effect on test scores.2) Examine if there is a linear trend with practice on test scores.
Why is this important?
• Requirement
• Understand research articles
• Do research for yourself
• Real world
The Three Goals of this Course
• 1) Teach a new way of thinking
• 2) Teach “factoids”
Mean
r =
2
22
e
e nb
2)( ijWithin XXSS
YX
XY
SSCOVr
)(Z . . . . )(Z )(Z Y pp2211Z
)1()1(2
2
RpRpNF
aar YPS
1e b c a
a 2).(
What you have learned!• Describing and Exploring Data / The
Normal Distribution
• Scales of measurement– Populations vs. Samples
• Learned how to organize scores of one variable using:
– frequency distributions– graphs
What you have learned!
• Measures of central tendency– Mean– Median– Mode
• Variability– Range– IQR– Standard Deviation– Variance
What you have learned!
– Z Scores
– Find the percentile of a give score– Find the score for a given percentile
What you have learned!
• Sampling Distributions & Hypothesis Testing
– Is this quarter fair?– Sampling distribution
• CLT
– The probability of a given score occurring
What you have learned!• Basic Concepts of Probability
– Joint probabilities– Conditional probabilities
– Different ways events can occur• Permutations• Combinations
– The probability of winning the lottery
– Binomial Distributions• Probability of winning the next 4 out of 10 games of Blingoo
What you have learned!
• Categorical Data and Chi-Square
– Chi square as a measure of independence• Phi coefficient
– Chi square as a measure of goodness of fit
What you have learned!
• Hypothesis Testing Applied to Means
– One Sample t-tests
– Two Sample t-tests• Equal N• Unequal N• Dependent samples
What you have learned!
• Correlation and Regression
– Correlation
– Regression
What you have learned!
• Alternative Correlational Techniques
– Pearson Formulas• Point-Biserial• Phi Coefficent• Spearman’s rho
– Non-Pearson Formulas• Kendall’s Tau
What you have learned!
• Multiple Regression
– Multiple Regression• Causal Models• Standardized vs. unstandarized • Multiple R• Semipartical correlations
– Common applications• Mediator Models• Moderator Mordels
What you have learned!
• Simple Analysis of Variance
– ANOVA
– Computation of ANOVA
– Logic of ANOVA• Variance• Expected Mean Square• Sum of Squares
What you have learned!• Multiple Comparisons Among Treatment Means
– What to do with an omnibus ANOVA• Multiple t-tests• Linear Contrasts• Orthogonal Contrasts• Trend Analysis
– Controlling for Type I errors• Bonferroni t• Fisher Least Significance Difference• Studentized Range Statistic• Dunnett’s Test
What you have learned!
• Factorial Analysis of Variance
– Factorial ANOVA
– Computation and logic of Factorial ANOVA
– Interpreting Results• Main Effects• Interactions
What you have learned!• Factorial Analysis of Variance and Repeated
Measures
– Factorial ANOVA
– Computation and logic of Factorial ANOVA
– Interpreting Results• Main Effects• Interactions
– Repeated measures ANOVA
The Three Goals of this Course
• 1) Teach a new way of thinking
• 2) Teach “factoids”
• 3) Self-confidence in statistics
• CRN 33515.0
Four Step When Solving a Problem
• 1) Read the problem
• 2) Decide what statistical test to use
• 3) Perform that procedure
• 4) Write an interpretation of the results
Four Step When Solving a Problem
• 1) Read the problem1) Read the problem
• 2) Decide what statistical test to use
• 3) Perform that procedure3) Perform that procedure
• 4) Write an interpretation of the results4) Write an interpretation of the results
Four Step When Solving a Problem
• 1) Read the problem
• 2) Decide what statistical test to use2) Decide what statistical test to use
• 3) Perform that procedure
• 4) Write an interpretation of the results
How do you know when to use what?
• If you are given a word problem, would you know which statistic you should use?
Example
• An investigator wants to predict a male adult’s height from his length at birth. He obtains records of both measures from a sample of males.
a. Independent t-test k. Regression b. Dependent t-test l. Standard Deviation c. One-sample t-test m. Z-score d. Goodness of fit Chi-Square n. Mode e. Independence Chi-Square o. Mean f. Dunnett's test p. Median g. Correlation (Pearson r) q. Fisher's LSD h. Scatter Plot r. Binomial Distribution i. Bonferroni t s. ANOVA j. Factorial ANOVA t. Kendall's Tau
Example
• An investigator wants to predict a male adult’s height from his length at birth. He obtains records of both measures from a sample of males.
• Use regression
Type of Data
Qualitative Quantitative
One categorical variable
Two categorical variables
Goodness of FitChi Square
Independence Chi Square
Differences Relationships
One predictor
Two predictors
Continuous measurement
Ranks
Degree ofRelationship
Prediction
PearsonCorrelation
Regression
Spearmn’s r orKendell’s Tau
Multiple Regression
One Group
Two Groups
Multiple Groups
One samplet-test
IndependentGroups
DependentGroups
Two-samplet-test
Dependentt-test
IndependentGroups
DependentGroups
One IV
Two IVs
One-wayANOVA
FactorialANOVA
Repeated mmeasuresANOVA