Math 2.0

Statistics Definition

Contingency table

Builds on Partition of a setRandom variable

Definition

Let XX and YY be categorical variables with values in {1,…,r}\set{1, \ldots, r} and {1,…,c}\set{1, \ldots, c}, observed on nn units. The r×cr \times c contingency table of the sample is the matrix N=(nij)N = (n_{ij}), where nijn_{ij} is the number of units with X=iX = i and Y=jY = j. The row totals are ni+=∑jnijn_{i+} = \sum_j n_{ij}, the column totals are n+j=∑inijn_{+j} = \sum_i n_{ij}, and ∑i,jnij=n\sum_{i,j} n_{ij} = n. A contingency table of m≥3m \ge 3 variables is defined in the same way as an mm-way array of counts.

Remarks

The cells correspond to a partition of the sample: each unit is counted in exactly one cell. Example: among 100100 people, 1010 smoke and exercise, 2020 smoke and do not exercise, 4040 do not smoke and exercise, and 3030 do neither. The table is (10204030)\begin{pmatrix} 10 & 20 \\ 40 & 30 \end{pmatrix}, with row totals 30,7030, 70, column totals 50,5050, 50, and grand total 100100. Non-example: in a survey where people may tick several sports, a table of persons by sport counts some people more than once. Then the cells do not partition the sample, and the entries need not add up to nn. To test independence, the expected counts are Eij=ni+n+j/nE_{ij} = n_{i+} n_{+j} / n, and Pearson's statistic is ∑i,j(nij−Eij)2/Eij\sum_{i,j} (n_{ij} - E_{ij})^2 / E_{ij}. Under independence and for large nn, it is approximately chi-squared with (r−1)(c−1)(r - 1)(c - 1) degrees of freedom.

Reading path

To understand this page from the ground up, read these 3 pages in order. The foundations come first.

Show the path as a graph
Each page uses the pages above it. The colour of the bar on a box shows how strong the evidence is, and the box also gives it as text. The list has the same pages.
  • no evidence level
  1. Partition of a set concept
  2. Random variable concept
  3. Contingency table definition

Further reading

  1. Web https://en.wikipedia.org/wiki/Contingency_table
About this page
TagRZHB962EMF
URIm2://RZHB962EMF
Kinddefinition
WritingW0 stub
MSC62H17
DefinesContingency table
UsesPartition of a set, Random variable

Markdown · JSON · Edit on GitHub

What this page needs for W1

  • a source with a locator (0 of 1)

The writing levels say how complete the text of a page is. They do not measure its truth.

What links here

No page links to this page yet.