A contingency table may arise from an experiment (where one variable is controlled by the experimentor) or a survey (where there is no control over the individuals).

Example (from experiment)

To test whether vitamin C reduces the risk of catching a cold, a 1961 French study involved 279 skiers over two periods of 5-7 days. Skiers in one group of 139 were given 1 gram ascorbic acid (vitamin C) per day whereas those in the other group were given a tablet that looked similar but had no active ingredient (called a placebo). None of the skiers knew which of the treatments they had received.

     Cold      No cold  
Ascorbic acid 17 122
Placebo 31 109

Example (from survey)

A health survey was conducted in the UK in 2000. The contingency table below gives the main reason for not using contraception by the 410 women aged 16-49 who were in a sexual relationship, not using contraception and not sterilised.

  Age
  16-29 30-39 40-49
Partner sterilised 6 81 127
Wants to become pregnant 12 28 11
Pregnant now 15 20 2
Menopause 0 2 11
Possibly infertile 6 18 19
Doesn't like contraception 3 7 6
Other reason 15 8 13