In statistics, the two-way analysis of variance (ANOVA) is an extension of the one-way ANOVA that examines the influence of two different categorical independent variables on one continuous dependent variable. The two-way ANOVA not only aims at assessing the main effect of each independent variable but also if there is any interaction between them.
In 1925, Ronald Fisher mentions the two-way ANOVA in his celebrated book, Statistical Methods for Research Workers (chapters 7 and 8). In 1934, Frank Yates published procedures for the unbalanced case. [1] Since then, an extensive literature has been produced. The topic was reviewed in 1993 by Yasunori Fujikoshi. [2] In 2005, Andrew Gelman proposed a different approach of ANOVA, viewed as a multilevel model. [3]
Let us imagine a data set for which a dependent variable may be influenced by two factors which are potential sources of variation. The first factor has levels () and the second has levels (). Each combination defines a treatment, for a total of treatments. We represent the number of replicates for treatment by , and let be the index of the replicate in this treatment ().
From these data, we can build a contingency table, where and , and the total number of replicates is equal to .
The experimental design is balanced if each treatment has the same number of replicates, . In such a case, the design is also said to be orthogonal, allowing to fully distinguish the effects of both factors. We hence can write , and .
Upon observing variation among all data points, for instance via a histogram, "probability may be used to describe such variation". [4] Let us hence denote by the random variable which observed value is the -th measure for treatment . The two-way ANOVA models all these variables as varying independently and normally around a mean, , with a constant variance, (homoscedasticity):
.
Specifically, the mean of the response variable is modeled as a linear combination of the explanatory variables:
,
where is the grand mean, is the additive main effect of level from the first factor (i-th row in the contingency table), is the additive main effect of level from the second factor (j-th column in the contingency table) and is the non-additive interaction effect of treatment for samples from both factors (cell at row i and column j in the contingency table).
Another equivalent way of describing the two-way ANOVA is by mentioning that, besides the variation explained by the factors, there remains some statistical noise. This amount of unexplained variation is handled via the introduction of one random variable per data point, , called error. These random variables are seen as deviations from the means, and are assumed to be independent and normally distributed:
.
Following Gelman and Hill, the assumptions of the ANOVA, and more generally the general linear model, are, in decreasing order of importance: [5]
To ensure identifiability of parameters, we can add the following "sum-to-zero" constraints:
In the classical approach, testing null hypotheses (that the factors have no effect) is achieved via their significance which requires calculating sums of squares.
Testing if the interaction term is significant can be difficult because of the potentially-large number of degrees of freedom. [6]
The following hypothetical example gives the yields of 15 plants subject to two different environmental variations, and three different fertilisers.
Extra CO2 | Extra humidity | |
---|---|---|
No fertiliser | 7, 2, 1 | 7, 6 |
Nitrate | 11, 6 | 10, 7, 3 |
Phosphate | 5, 3, 4 | 11, 4 |
Five sums of squares are calculated:
Factor | Calculation | Sum | N |
---|---|---|---|
Individual | 641 | 15 | |
Fertilizer × Environment | 556.1667 | 6 | |
Fertilizer | 525.4 | 3 | |
Environment | 519.2679 | 2 | |
Composite | 504.6 | 1 |
Finally, the sums of squared deviations required for the analysis of variance can be calculated. [7]
Factor | Sum | N | Total | Environment | Fertiliser | Fertiliser × Environment | Residual |
---|---|---|---|---|---|---|---|
Individual | 641 | 15 | 1 | 1 | |||
Fertiliser × Environment | 556.1667 | 6 | 1 | −1 | |||
Fertiliser | 525.4 | 3 | 1 | −1 | |||
Environment | 519.2679 | 2 | 1 | −1 | |||
Composite (correction factor [8] ) | 504.6 | 1 | −1 | −1 | −1 | 1 | |
Squared deviations () | 136.4 | 14.668 | 20.8 | 16.099 | 84.833 | ||
Degrees of freedom | 14 | 1 | 2 | 2 | 9 | ||
Mean square variance | 14.668 | 10.4 | 8.0495 | 9.426 |
Analysis of variance (ANOVA) is a collection of statistical models and their associated estimation procedures used to analyze the differences among means. ANOVA was developed by the statistician Ronald Fisher. ANOVA is based on the law of total variance, where the observed variance in a particular variable is partitioned into components attributable to different sources of variation. In its simplest form, ANOVA provides a statistical test of whether two or more population means are equal, and therefore generalizes the t-test beyond two means. In other words, the ANOVA is used to test the difference between two or more means.
In probability theory and statistics, a normal distribution or Gaussian distribution is a type of continuous probability distribution for a real-valued random variable. The general form of its probability density function is The parameter is the mean or expectation of the distribution, while the parameter is the variance. The standard deviation of the distribution is (sigma). A random variable with a Gaussian distribution is said to be normally distributed, and is called a normal deviate.
In probability theory and statistics, variance is the expected value of the squared deviation from the mean of a random variable. The standard deviation (SD) is obtained as the square root of the variance. Variance is a measure of dispersion, meaning it is a measure of how far a set of numbers is spread out from their average value. It is the second central moment of a distribution, and the covariance of the random variable with itself, and it is often represented by , , , , or .
The weighted arithmetic mean is similar to an ordinary arithmetic mean, except that instead of each of the data points contributing equally to the final average, some data points contribute more than others. The notion of weighted mean plays a role in descriptive statistics and also occurs in a more general form in several other areas of mathematics.
Analysis of covariance (ANCOVA) is a general linear model that blends ANOVA and regression. ANCOVA evaluates whether the means of a dependent variable (DV) are equal across levels of one or more categorical independent variables (IV) and across one or more continuous variables. For example, the categorical variable(s) might describe treatment and the continuous variable(s) might be covariates (CV)'s, typically nuisance variables; or vice versa. Mathematically, ANCOVA decomposes the variance in the DV into variance explained by the CV(s), variance explained by the categorical IV, and residual variance. Intuitively, ANCOVA can be thought of as 'adjusting' the DV by the group means of the CV(s).
In statistics, an effect size is a value measuring the strength of the relationship between two variables in a population, or a sample-based estimate of that quantity. It can refer to the value of a statistic calculated from a sample of data, the value of a parameter for a hypothetical population, or to the equation that operationalizes how statistics or parameters lead to the effect size value. Examples of effect sizes include the correlation between two variables, the regression coefficient in a regression, the mean difference, or the risk of a particular event happening. Effect sizes are a complement tool for statistical hypothesis testing, and play an important role in power analyses to assess the sample size required for new experiments. Effect size are fundamental in meta-analyses which aim to provide the combined effect size based on data from multiple studies. The cluster of data-analysis methods concerning effect sizes is referred to as estimation statistics.
In statistics, propagation of uncertainty is the effect of variables' uncertainties on the uncertainty of a function based on them. When the variables are the values of experimental measurements they have uncertainties due to measurement limitations which propagate due to the combination of variables in the function.
In statistics, multivariate analysis of variance (MANOVA) is a procedure for comparing multivariate sample means. As a multivariate procedure, it is used when there are two or more dependent variables, and is often followed by significance tests involving individual dependent variables separately.
Linear discriminant analysis (LDA), normal discriminant analysis (NDA), or discriminant function analysis is a generalization of Fisher's linear discriminant, a method used in statistics and other fields, to find a linear combination of features that characterizes or separates two or more classes of objects or events. The resulting combination may be used as a linear classifier, or, more commonly, for dimensionality reduction before later classification.
ANOVA gauge repeatability and reproducibility is a measurement systems analysis technique that uses an analysis of variance (ANOVA) random effects model to assess a measurement system.
In statistics, particularly in analysis of variance and linear regression, a contrast is a linear combination of variables whose coefficients add up to zero, allowing comparison of different treatments.
In statistics, a random effects model, also called a variance components model, is a statistical model where the model parameters are random variables. It is a kind of hierarchical linear model, which assumes that the data being analysed are drawn from a hierarchy of different populations whose differences relate to that hierarchy. A random effects model is a special case of a mixed model.
Squared deviations from the mean (SDM) result from squaring deviations. In probability theory and statistics, the definition of variance is either the expected value of the SDM or its average value. Computations for analysis of variance involve the partitioning of a sum of SDM.
In statistics, the intraclass correlation, or the intraclass correlation coefficient (ICC), is a descriptive statistic that can be used when quantitative measurements are made on units that are organized into groups. It describes how strongly units in the same group resemble each other. While it is viewed as a type of correlation, unlike most other correlation measures, it operates on data structured as groups rather than data structured as paired observations.
In statistics, one-way analysis of variance is a technique to compare whether two or more samples' means are significantly different. This analysis of variance technique requires a numeric response variable "Y" and a single explanatory variable "X", hence "one-way".
Tukey's range test, also known as Tukey's test, Tukey method, Tukey's honest significance test, or Tukey's HSDtest, is a single-step multiple comparison procedure and statistical test. It can be used to correctly interpret the statistical significance of the difference between means that have been selected for comparison because of their extreme values.
In probability and statistics, the Tweedie distributions are a family of probability distributions which include the purely continuous normal, gamma and inverse Gaussian distributions, the purely discrete scaled Poisson distribution, and the class of compound Poisson–gamma distributions which have positive mass at zero, but are otherwise continuous. Tweedie distributions are a special case of exponential dispersion models and are often used as distributions for generalized linear models.
In statistics, Tukey's test of additivity, named for John Tukey, is an approach used in two-way ANOVA to assess whether the factor variables are additively related to the expected value of the response variable. It can be applied when there are no replicated values in the data set, a situation in which it is impossible to directly estimate a fully general non-additive regression structure and still have information left to estimate the error variance. The test statistic proposed by Tukey has one degree of freedom under the null hypothesis, hence this is often called "Tukey's one-degree-of-freedom test."
In statistics, the standardized mean of a contrast variable , is a parameter assessing effect size. The SMCV is defined as mean divided by the standard deviation of a contrast variable. The SMCV was first proposed for one-way ANOVA cases and was then extended to multi-factor ANOVA cases.
In statistics, expected mean squares (EMS) are the expected values of certain statistics arising in partitions of sums of squares in the analysis of variance (ANOVA). They can be used for ascertaining which statistic should appear in the denominator in an F-test for testing a null hypothesis that a particular effect is absent.