8.6 Comparing Two Samples

The one-sample t-test is used to compare one sample to a target value. It is common, for instance, in engineering when a product is developed to meet a certain specification limit. In science, it is more common to compare two samples to each other. Scientists are often interested in assessing the existence of an effect of an environmental condition, a medical procedure, an experimental treatment, or something similar. They do this by comparing samples drawn under different conditions. In such cases there are two scenarios that can occur, since two samples can either be independent of or dependent on each other. If we consider a medical study, we could assign one group of people to a certain treatment and use another group as a control group. This would produce two independent samples. If we instead test the same group before and after receiving the treatment we get two dependent samples, since every person is associated with an observation in each sample. In dependent samples an observation in one sample can be paired with a corresponding observation in the other.

When comparing two independent samples to each other, we use the so-called two-sample t-test. To familiarize ourselves with it we will analyze an experiment where the yield of a chemical synthesis is tested using two different solvents. To maintain the integrity of the significance test the solvent is chosen randomly before each run, in a manner that results in 10 observations for each solvent. ...

Get Experiment!: Planning, Implementing and Interpreting now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.