Skip to content →

Uncensored

Home
Up
Censored
Uncensored

Analysis of Variance

Two-way ANOVA or Other ANOVA

    The two-way analysis of variance allows comparison of means between groups when there are two or more independent variables.  It allows the researcher to answer the following questions about the effects of the variables A and B on the dependent variable C:

  1. Does C depend on A?
  2. Does C depend on B?
  3. Does C depend on a combination of A and B but not either individual variable?

The first two questions can be answered using a one-way ANOVA, but the last question requires a two-way analysis.  The calculations for the two-way ANOVA are similar to those of the one-way ANOVA but are much more tedious.  Therefore, they will not be discussed here.  Most statistical software packages include a function that will perform these calculations.  For example,  Microsoft Excel includes two-way ANOVA in the Data Analysis tool. 

The user provides that appropriate information,

and Excel returns an ANOVA table for the data.

Kruskal-Wallis One-way ANOVA

    This nonparametric method is useful for non normal data.  It ranks the observations in the same way as the Wilcoxon rank-sum test.  Once a rank is assigned to each observation, the sum of the ranks of each group is calculated.  That is

where xij is the ith sample in group j.

    Now the null hypothesis that all groups follow the same distribution function can be tested using the test statistic

where N is the total number of samples. 

Critical values can be found in the xdistribution with k-1 degrees of freedom at the desired confidence interval.

Friedman

   The Friedman method is also useful for non-normally distributed data.  This nonparametric method tests for a difference between blocks where each member of a block receives a different treatment as in the table below.

Treatment
Block12k
1x11x12x1k
2x21x22x2k
3x31x32x3k
bxb1xb2xbk

It first ranks the observations in the same way as the Wilcoxon rank-sum test. Then it determines the sum of the ranks within each block using the equation

Now the null hypothesis that all treatments are the same, or R1=R2=…=R3, can be tested using the test statistic

where

Use the F distribution to find the critical values at the desired confidence level with k-1 and (b-1)(k-1) degrees of freedom.

Skip to toolbar