What is the One-Way ANOVA Test?
One-way ANOVA is a parametric statistical technique applied when we have one continuous dependent variable (e.g. level of anxiety, stress, etc.) and one categorical independent variable with three or more groups (e.g. level of education, marital status, etc.). This method examines the effect of one independent categorical variable on one quantitative dependent variable.
When Should a One-Way ANOVA be Used?
The One-Way ANOVA is used when you have three or more separate groups of individuals or cases in an among-participants design. It is used when you want to evaluate whether differences among 3 or more group means are statistically significant.
Why do we need ANOVA, when we already have the t-test as a way to compare group means?
Suppose you have 5 groups. You could assess the differences among the 5 means by doing all possible t-tests (group 1 vs 2, 1 vs 3, 2 vs 3, etc.). However, this would require a large number of tests (10 t-tests in this example), and that would be tedious to calculate. Doing a large number of significance tests also increases the risk of obtaining at least one Type I error (decision to reject the null hypothesis when it is true).
An Example Of One-Way ANOVA
For example, if we are examining the effect of the level of education (a categorical variable with three groups: High School, Bachelor’s degree, and Master’s Degree) on the level of anxiety at work (a quantitative variable that has a range of 1 to 10), then we will perform a one-way ANOVA to determine the effect of level education to the level of anxiety.
What are the use of null and alternative hypothesis for the One-Way ANOVA test?
Therefore, we test the following hypotheses:
Null hypothesis: There is no significant effect of education (High School, Bachelor’s degree, Master’s Degree) on anxiety level.
Alternative hypothesis: There is a significant effect of education (High School, Bachelor’s degree, Master’s Degree) on anxiety levels.
R function to Compute One-Way ANOVA
The code to run a One-Way ANOVA using R is as follows:
aov (DV~ IV, var.equal=TRUE, data = dataframe)
DV: dependent variable
IV: Independent variable
model: Results of the One-way ANOVA model that we obtained for the first function