In the design of experiments and analysis of variance, a main effect is the effect of an independent variable on a dependent variable averaged across the levels of any other independent variables. The term is frequently used in the context of factorial designs and regression models to distinguish from interaction effects.

Relative to a factorial design, under an analysis of variance, a main effect test will test the hypotheses expected such as H0, the null hypothesis. Running this hypothesis will test whether there is evidence of an effect of different treatments. However this test is nonspecific and will not allow for a localization of specific mean pairwise comparisons (simple effects). A main effect test will merely look at whether overall there is something about a particular factor that is making a difference. In other words, it is a test examining differences amongst the levels of a single factor (averaging over the other factor and/or factors).

Some other definitions are; the specific effect of a factor or independent variable regardless of other parameters in the experiment or the average change of the output observed during a change from one level of an input to another level. In the design of experiment, it is referred to as a factor but in regression analysis it is referred to as the independent variable. 


In factorial designs, thus two levels each of factor A and B in a factorial design, A and B be can be calculated given by

Main Effect formula

Where n is total number of replicates. The letter “a” represents the factor combination of level 1 of A and level 2 of B and “b” represents the factor combination of A level 2 of A and level 1 of B. “ab” is the represents both factors at level 1.