one-way anovas Flashcards
what are we comparing in a t-test?
two means
-> asking ‘are the means of the two groups significantly different when accounting for variance?’
what do t-values represent?
the difference between the mean as a function of variance (how spread out the data is)
what are we comparing in a regression?
two models of data and their relationship
what does a regression provide?
an accurate relationship between two data points
why do we use regressions instead of continuing to use t-tests?
- t-tests give you the same value as regression BUT can only be used to compare 2 data points / means while an ANOVA allows you to compare more complicated data then this
what are we looking for in a regression?
model that explains the difference between our variance / mean
* concept is the same as for a t-test
what do we do in regression?
compare more than two means -> general liner model
* (GLM: foundation for most inferential statistics -> all link into the concept of modelling our data and whether we can draw a line between our data which explains our data well
why can’t we just use multiple t-tests?
family-wise error
what is family-wise error?
with more groups / categories, the number of comparisons between groups increases (3 groups = 3 comparisons), the increase is not linear either (i.e. 4 groups = 6 comparisons, 10 = 45 comparisons etc.)
what is the issue with the number of comparisons between groups increasing called?
n choose k problem
which is the danger of multiple comparison?
we are looking at the probability of whether our results are due to chance (and when you add more comparisons, every single one of them has a 5% chance -> as you increase the comparisons, the chance level won’t stay at 5%)
what is an issue if more comparisons are made?
higher chance of type 1 error (false positive)
[accepting something which isn’t there in reality]
what is family wise error?
increased likelihood of type 1 error (due to multiple comparisons)
how can you calculate the family error rate?
for an alpha level of <.05, the probability of type one error can be calculated using:
1-(0.95)^k
*k is the number of comparisons
what are some examples of calculating a family wise error?
for 1 comparison, familywise error rate is 0.05 (5% chance of a type 1 error) -> 1-(0.95)^1
3 comparisons, increase error to 0.14 (14% chance of type 1 error) -> 1-(0.95)^3
14 comparisons, increases error rate to 0.51 (51% chance of a type 1 error) -> 1-(0.95)^14
*hence why conducting may t-tests is a bad idea
what issues does multiple comparisons cause?
- likely ‘find effects’ that are actually type 1 errors
- if you correct the alpha level, you miss real effects (type 2 errors)
what is the solution to issues with multiple comparisons?
ANOVAs -> allowing us to make more than one comparison within one test
what is a one-way ANOVA?
- one independent variable
- can have more than two levels (i.e. 4 age groups/8 nationalities etc.)
- one dependent variable (run a test per dependent variable)
what are the assumptions of a one-way independent ANOVA?
- Normality (K-S test or Shapiro-Walk)
- Homogeneity of Variance (Levene’s Test)
- Data is independent (Between-Subjects Design)
what to do if assumptions are violated?
non-parametric alternative
* but ANOVAs are pretty robust anyways -> if you violate the assumptions, there are non-parametric alternatives
how to structure your data on SPSS?
one row per subject
two columns
* IV i.e. (1-4 levels)
* DV
how do we inspect the data on SPSS?
Graph > Chart Builder
* Drag a simple bar chart into the canvas
* Drag the IV to the x-axis
* Drag the DV to the y-axis
* element properties; add error bars (+/- 1 SE)
How do we run a one-way ANOVA on SPSS?
Analyse > Compare Means > One-Way ANOVA
* drag IV to factor list
* drag DV to dependent list
Click Options
* Descriptive (Mean and SD)
* Homogeneity of Variance Test (Levene’s Statistic) [Brown-Forsyth and Welch -> non-parametric alternatives]
* Mean Plots (basic line graph)
* Exclude Cases by analysis
How do we interpret the output on SPSS?
- check sample size is what you were expecting (descriptive)
- Test of Homogeneity of Variance (Levene’s Statistic)
- ANOVA Results Table
- Writing up your results
what is homogeneity of variance?
statistical assumption of equal variance, meaning that the average squared distance of a score from the mean is the same across all groups sampled in a study
Homogeneity of Variance
If the p value in the sig. column is >.050 (greater than) the variances can be considered equal
If the p value is <.050 (less than), the assumption has been violated
ANOVA results table
F-ratio is the test statistic (like the t-value)
P value is in the sig column. -> if p <.050 (less than) the ANOVA is significant
Writing up the results:
- Descriptive for graph (mean, SD or SE)
- Results of assumptions tests
- Test statistics (F)
- Degrees of Freedom (model, error)
- P value
i.e. F(3, 1997) = 3.23, p=.022 (tells us there is a significant main effect of the IV on the DV -> but doesn’t tell us where the main effect is coming from)
what are the components of the F ratio?
F = MSm / MSr
MSm
mean squares of the model
* in One-Way -> Between-group Squared Mean
^ IN ANOVA table
MSr
mean squares of residuals
* In One-Way -> Within-group Squared Mean in ANOVA table
MSm split into smaller formulae
MSm = SSm / dfm
* Sum of Squares (Between-Groups)
* Degrees of Freedom (Between groups)
^ IN ANOVA table
MSr can split into smaller formulae
MSr = SSr / dfr
* Sum of Squares (Within-Group)
* Degrees of Freedom (Within-Group)
^ IN ANOVA table
what is the Within-Group section of the ANOVA table?
Residual -> as it’s an independent samples of between groups, any within-group variance within this experiment is unexplained variance which we don’t ‘understand’
How to calculate the Model Sum of Squares?
squared difference between each group mean and the grand mean, multiplied by the number of subjects in each group, and added together
Calculating the Model Sum of Squares
Need to Diagram -> Flashcards
Group mean minus grand mean squared, times by the number of participants in each group. Do that for each level of the independent variable and add them all together)
Nk is the number of subjects in group K
Xk is the mean of group K
Xgrand is the grand mean (average of all values)
The 2 means square the value inside the brackets
∑ means sum (add up across all groups)
How to calculate Dfm
will be one less than the number of groups (/conditions)
* written as k-1 where k is the number of groups/conditions
How do you calculate the residual sum of squares (SSr)
squared difference between each data point and its group mean, all added together
* Take every single data point minus grand mean, square it and sum it together
what is a shortcut that can be used to figure out the residual sum of square?
Variance (SD^2)
How can variance been calculated?
summed square error divided by N-1; therefore if we know the variance or SD we can calculate SS for each group, then add them up
S^2
SS / (N-1)
SS
S^2(N-1)
SSr
S^2 k(nk-1)
Can manipulate formular to allow us to understand sum squared from the variance
* N-1 (which is divided) but swing it up to variance side to multiple (variance * n-1 = the sum of squares)
* so the sum of squares for the residuals equals the variance for each group multiplied by the number of people in each group - 1
how do you calculate the residual degrees of freedom (dfr)
n-1 degrees of freedom in each group (where n is the number of subjects in each group) and add these up
- (or calculate the number of subjects - number of groups)
Why does calculating F tell us?
whether the between group variability of means is larger than the within the group variability of the individual values. If the ratio of between group and within group variation is sufficiently large, you can conclude that not all the means are equal
what do F ratios mean in ANOVAs?
the ratio of two mean square values
Calculating F
- difference between group means and why does that matter
- what does it tell us about the affects of the independent variable - and the between and within group variance
what about the p value?
- calculating the F ratio by hand will not give you the p value -> so you won’t know if it is significantly
what does a significant f ratio mean?
there’s a main effect of a group BUT it doesn’t tell us where the effect comes from so to find out where the effect comes from we must do further tests
what is the difference between F and T-tests?
t-test is used to compare the means of two groups and determine if they are significantly different, while the F-test is used to compare variances of two or more groups and assess if they are significantly different
when can you run follow up tests?
(only if) your main ANOVA is significant, you can run further tests to investigate the effect
what are the two types of follow up tests you can run?
Planned Contrasts (aka. planned comparisons) or Post-hoc tests
Planned Contrasts
- More systematic and used for testing specific hypotheses (allows you to make comparisons you really care about)
- Make a smaller number of comparisons, but can include multiple conditions in each comparison
Post-Hoc Test
- More general, allow you to test where the effect comes from when you don’t necessarily have a predictor where it’s coming from
Disadvantage of a Post-hoc tests:
BUT :/ more comparisons, more familywise errors (these tests are corrected for this error so if run posthoc tests and all possible comparisons, it’s corrected more than planned contrast so you’re more likely to find a type two error and miss an effect because the tests are a bit more constrained)
what are the selection of Post-Hoc tests you can select from?
Safe option, small sample: Bonferroni
Assumptions met: REGWQ or Tukey
Unequal Sample Sizes: Gabriel’s (small n) or Hochberg’s GT2 (large n)
Unequal Variances: Games-Howell
How do we interpret a post-hoc test?
- each group is compared with all other groups
- p values are already adjusted for multiple comparisons (so alpha .05) -> so you can see which one is significant between groups / conditions i.e. you can conclude where the main effect is being driven through the difference in conditions
how should you discuss post-hoc tests?
in relation to your hypothesis