Researchers in the early days of scientific investigation often used very simple approaches to experimentation. A common approach was known as "one factor at a time" (or OFAT) and involved changing one variable in an experiment and observing the results, then moving on to the next single variable. Modern day scientists use more sophisticated methods of carrying out trials where they consider different sources of variation that might affect results.

## Experiment Design

The process of experiment design is a method of putting together tests which provide the most possible information. Typically, a designed experiment is meant to find the effects of varying different factors on the outcome of a process. Scientists put together experiments that will show whether the variation between subjects exposed to different factors is greater than the variation within groups of subjects all exposed to the same factor. Some designed experiments can also show if there are any interactions between various factors.

## Within Subjects

Within subject variation in an experiment refers to the variation seen in a group of subjects which are all treated the same way. If a doctor is testing three medicines to look for a difference in their effectiveness, and is also interested in differences between genders, she might separate male subjects into three groups and treat each with a different medicine, then do the same with three female groups. Even within one group of subjects (same gender, same medicine), however, different patients will have different responses. This is the within subject variation.

## Between Subjects

The other type of variation in an experiment is between subject. This is the difference between different groups exposed to different factors. In the example of the doctor's tests, she would look at the difference in average recovery time between male and female groups and also between each of the groups taking one of the three medicines. In each case, there will likely be differences between the groups. The task of the designed experiment is to see if this difference is statistically significant.

## ANOVA

A researcher will use ANOVA, analysis of variance, statistics to compare within and between subject variation. The ANOVA test ratios the "within" to the "between" variations. If there is significant variation within the same groups, this suggests that the test itself tends to have a wide range of results. If the "within" variation is on a par with the "between" variation, the ANOVA test will conclude that the researcher cannot say that the factors had an effect, since any apparent effects could just be due to the random variation which was seen within test groups. A more sophisticated approach, known as two-way ANOVA, can also detect interactions between factors.