Squared deviations from the mean

From HandWiki
Short description: Calculations in probability theory

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 (when considering a theoretical distribution) or its average value (for actual experimental data). Computations for analysis of variance involve the partitioning of a sum of SDM.

Background

An understanding of the computations involved is greatly enhanced by a study of the statistical value

E(X2), where E is the expected value operator.

For a random variable X with mean μ and variance σ2,

σ2=E(X2)μ2.[1]

(Its derivation is shown here.) Therefore,

E(X2)=σ2+μ2.

From the above, the following can be derived:

E((X2))=nσ2+nμ2,
E((X)2)=nσ2+n2μ2.

Sample variance

The sum of squared deviations needed to calculate sample variance (before deciding whether to divide by n or n − 1) is most easily calculated as S=x2(x)2n.

From the two derived expectations above the expected value of this sum is E(S)=nσ2+nμ2nσ2+n2μ2n, which implies E(S)=(n1)σ2.

This effectively proves the use of the divisor n − 1 in the calculation of an unbiased sample estimate of σ2.

Partition — analysis of variance

In the situation where data is available for k different treatment groups having size ni where i varies from 1 to k, then it is assumed that the expected mean of each group is

E(μi)=μ+Ti

and the variance of each treatment group is unchanged from the population variance σ2.

Under the Null Hypothesis that the treatments have no effect, then each of the Ti will be zero.

It is now possible to calculate three sums of squares:

Individual
I=x2
E(I)=nσ2+nμ2
Treatments
T=i=1k((x)2/ni)
E(T)=kσ2+i=1kni(μ+Ti)2
E(T)=kσ2+nμ2+2μi=1k(niTi)+i=1kni(Ti)2

Under the null hypothesis that the treatments cause no differences and all the Ti are zero, the expectation simplifies to

E(T)=kσ2+nμ2.
Combination
C=(x)2/n
E(C)=σ2+nμ2

Sums of squared deviations

Under the null hypothesis, the difference of any pair of I, T, and C does not contain any dependency on μ, only σ2.

E(IC)=(n1)σ2 total squared deviations aka total sum of squares
E(TC)=(k1)σ2 treatment squared deviations aka explained sum of squares
E(IT)=(nk)σ2 residual squared deviations aka residual sum of squares

The constants (n − 1), (k − 1), and (n − k) are normally referred to as the number of degrees of freedom.

Example

In a very simple example, 5 observations arise from two treatments. The first treatment gives three values 1, 2, and 3, and the second treatment gives two values 4, and 6.

I=121+221+321+421+621=66
T=(1+2+3)23+(4+6)22=12+50=62
C=(1+2+3+4+6)25=256/5=51.2

Giving

Total squared deviations = 66 − 51.2 = 14.8 with 4 degrees of freedom.
Treatment squared deviations = 62 − 51.2 = 10.8 with 1 degree of freedom.
Residual squared deviations = 66 − 62 = 4 with 3 degrees of freedom.

Two-way analysis of variance

In statistics, the two-way analysis of variance (ANOVA) is used to study how two categorical independent variables effect one continuous dependent variable.[2] It extends the One-way analysis of variance (one-way ANOVA) by allowing both factors to be analyzed at the same time. A two-way ANOVA evaluates the main effect of each independent variable and if there is any interaction between them.[2]

Researchers use this test to see if two factors act independent or combined to influence a Dependent variable. Its used in fields like Psychology, Agriculture, Education, and Biomedical research.[3] For example, it can be used to study how fertilizer type and water level together affect plant growth. The analysis produces F-statistics that indicate whether observed differences between groups are statistically significant.[4][3]

See also

References

  1. Mood & Graybill: An introduction to the Theory of Statistics (McGraw Hill)
  2. 2.0 2.1 Cite error: Invalid <ref> tag; no text was provided for refs named :1
  3. 3.0 3.1 Cite error: Invalid <ref> tag; no text was provided for refs named :4
  4. Cite error: Invalid <ref> tag; no text was provided for refs named :0