Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Contingency table

From Wikipedia, the free encyclopedia
Table that displays the frequency of variables
For cross-tabulation that aggregates by summing, averaging, etc. (rather than only by counting), seePivot table.

Instatistics, acontingency table (also known as across tabulation orcrosstab) is a type oftable in amatrix format that displays the multivariatefrequency distribution of the variables. They are heavily used in survey research, business intelligence, engineering, and scientific research. They provide a basic picture of the interrelation between two variables and can help find interactions between them. The termcontingency table was first used byKarl Pearson in "On the Theory of Contingency and Its Relation to Association and Normal Correlation",[1] part of theDrapers' Company Research Memoirs Biometric Series I published in 1904.

A crucial problem ofmultivariate statistics is finding the (direct-)dependence structure underlying the variables contained in high-dimensional contingency tables. If some of theconditional independences are revealed, then even the storage of the data can be done in a smarter way (see Lauritzen (2002)). In order to do this one can useinformation theory concepts, which gain the information only from the distribution of probability, which can be expressed easily from the contingency table by the relative frequencies.

Apivot table is a way to create contingency tables using spreadsheet software.

Example

[edit]

Suppose there are two variables, sex (male or female) andhandedness (right- or left-handed). Further suppose that 100 individuals are randomly sampled from a very large population as part of a study of sex differences in handedness. A contingency table can be created to display the numbers of individuals who are male right-handed and left-handed, female right-handed and left-handed. Such a contingency table is shown below.

Handed-
ness
Sex
Right-handedLeft-handedTotal
Male43952
Female44448
Total8713100

The numbers of the males, females, and right- and left-handed individuals are calledmarginal totals. The grand total (the total number of individuals represented in the contingency table) is the number in the bottom right corner.

The table allows users to see at a glance that the proportion of men who are right-handed is about the same as the proportion of women who are right-handed although the proportions are not identical. The strength of the association can be measured by theodds ratio, and the population odds ratio estimated by thesample odds ratio. Thesignificance of the difference between the two proportions can be assessed with a variety of statistical tests includingPearson's chi-squared test, theG-test,Fisher's exact test,Boschloo's test, andBarnard's test, provided the entries in the table represent individuals randomly sampled from the population about which conclusions are to be drawn. If the proportions of individuals in the different columns vary significantly between rows (or vice versa), it is said that there is acontingency between the two variables. In other words, the two variables arenot independent. If there is no contingency, it is said that the two variables areindependent.

The example above is the simplest kind of contingency table, a table in which each variable has only two levels; this is called a 2 × 2 contingency table. In principle, any number of rows and columns may be used. There may also be more than two variables, but higher order contingency tables are difficult to represent visually. The relation betweenordinal variables, or between ordinal and categorical variables, may also be represented in contingency tables, although such a practice is rare. For more on the use of a contingency table for the relation between two ordinal variables, seeGoodman and Kruskal's gamma.

Standard contents of a contingency table

[edit]
  • Multiple columns (historically, they were designed to use up all the white space of a printed page). Where each row refers to a specific sub-group in the population (in this case men or women), the columns are sometimes referred to asbanner points orcuts (and the rows are sometimes referred to asstubs).
  • Significance tests. Typically, eithercolumn comparisons, which test for differences between columns and display these results using letters, or,cell comparisons, which use color or arrows to identify a cell in a table that stands out in some way.
  • Nets ornetts which are sub-totals.
  • One or more of: percentages, row percentages, column percentages, indexes or averages.
  • Unweighted sample sizes (counts).

Measures of association

[edit]

The degree of association between the two variables can be assessed by a number of coefficients. The following subsections describe a few of them. For a more complete discussion of their uses, see the main articles linked under each subsection heading.

Odds ratio

[edit]
Main article:Odds ratio

The simplest measure of association for a 2 × 2 contingency table is theodds ratio. Given two events, A and B, the odds ratio is defined as the ratio of the odds of A in the presence of B and the odds of A in the absence of B, or equivalently (due to symmetry), the ratio of the odds of B in the presence of A and the odds of B in the absence of A. Two events are independent if and only if the odds ratio is 1; if the odds ratio is greater than 1, the events are positively associated; if the odds ratio is less than 1, the events are negatively associated.

The odds ratio has a simple expression in terms of probabilities; given the joint probability distribution:

B=1B=0A=1p11p10A=0p01p00{\displaystyle {\begin{array}{c|cc}&B=1&B=0\\\hline A=1&p_{11}&p_{10}\\A=0&p_{01}&p_{00}\end{array}}}

the odds ratio is:

OR=p11p00p10p01.{\displaystyle OR={\frac {p_{11}p_{00}}{p_{10}p_{01}}}.}

Phi coefficient

[edit]
Main article:Phi coefficient

A simple measure, applicable only to the case of 2 × 2 contingency tables, is thephi coefficient (φ) defined by

ϕ=±χ2N,{\displaystyle \phi =\pm {\sqrt {\frac {\chi ^{2}}{N}}},}

whereχ2 is computed as inPearson's chi-squared test, andN is the grand total of observations. φ varies from 0 (corresponding to no association between the variables) to 1 or −1 (complete association or complete inverse association), provided it is based on frequency data represented in 2 × 2 tables. Then its sign equals the sign of the product of themain diagonal elements of the table minus the product of the off–diagonal elements. φ takes on the minimum value −1.0 or the maximum value of +1.0if and only if every marginal proportion is equal to 0.5 (and two diagonal cells are empty).[2]

Cramér'sV and the contingency coefficientC

[edit]
Main article:Cramér's V

Two alternatives are thecontingency coefficientC, andCramér's V.

The formulae for theC andV coefficients are:

C=χ2N+χ2{\displaystyle C={\sqrt {\frac {\chi ^{2}}{N+\chi ^{2}}}}} and
V=χ2N(k1),{\displaystyle V={\sqrt {\frac {\chi ^{2}}{N(k-1)}}},}

k being the number of rows or the number of columns, whichever is less.

C suffers from the disadvantage that it does not reach a maximum of 1.0, notably the highest it can reach in a 2 × 2 table is 0.707 . It can reach values closer to 1.0 in contingency tables with more categories; for example, it can reach a maximum of 0.870 in a 4 × 4 table. It should, therefore, not be used to compare associations in different tables if they have different numbers of categories.[3]

C can be adjusted so it reaches a maximum of 1.0 when there is complete association in a table of any number of rows and columns by dividingC byk1k{\displaystyle {\sqrt {\frac {k-1}{k}}}} wherek is the number of rows or columns, when the table is square[citation needed], or byr1r×c1c4{\displaystyle {\sqrt[{\scriptstyle 4}]{{r-1 \over r}\times {c-1 \over c}}}} wherer is the number of rows andc is the number of columns.[4]

Tetrachoric correlation coefficient

[edit]
Main article:Polychoric correlation

Another choice is thetetrachoric correlation coefficient but it is only applicable to 2 × 2 tables.Polychoric correlation is an extension of the tetrachoric correlation to tables involving variables with more than two levels.

Tetrachoric correlation assumes that the variable underlying eachdichotomous measure is normally distributed.[5] The coefficient provides "a convenient measure of [the Pearson product-moment] correlation when graduated measurements have been reduced to two categories."[6]

The tetrachoric correlation coefficient should not be confused with thePearson correlation coefficient computed by assigning, say, values 0.0 and 1.0 to represent the two levels of each variable (which is mathematically equivalent to the φ coefficient).

Lambda coefficient

[edit]
Main article:Goodman and Kruskal's lambda

Thelambda coefficient is a measure of the strength of association of the cross tabulations when the variables are measured at thenominal level. Values range from 0.0 (no association) to 1.0 (the maximum possible association).

Asymmetric lambda measures the percentage improvement in predicting the dependent variable. Symmetric lambda measures the percentage improvement when prediction is done in both directions.

Uncertainty coefficient

[edit]
Main article:Uncertainty coefficient

Theuncertainty coefficient, or Theil's U, is another measure for variables at the nominal level. Its values range from −1.0 (100% negative association, or perfect inversion) to +1.0 (100% positive association, or perfect agreement). A value of 0.0 indicates the absence of association.

Also, the uncertainty coefficient is conditional and an asymmetrical measure of association, which can be expressed as

U(X|Y)U(Y|X){\displaystyle U(X|Y)\neq U(Y|X)}.

This asymmetrical property can lead to insights not as evident in symmetrical measures of association.[7]

Others

[edit]
Main articles:Goodman and Kruskal's gamma andKendall rank correlation coefficient

Gamma, Tau-b and Tau-c are used when the categories or levels of both variables have a natural order.

See also

[edit]
  • Confusion matrix
  • Pivot table, in spreadsheet software, cross-tabulates sampling data with counts (contingency table) and/or sums.
  • TPL Tables is a tool for generating and printing crosstabs.
  • Theiterative proportional fitting procedure essentially manipulates contingency tables to match altered joint distributions or marginal sums.
  • Themultivariate statistics in special multivariate discrete probability distributions. Some procedures used in this context can be used in dealing with contingency tables.
  • OLAP cube, a modern multidimensional computing form of contingency tables
  • Panel data, multidimensional data over time

References

[edit]
  1. ^Karl Pearson, F.R.S. (1904).Mathematical contributions to the theory of evolution. Dulau and Co.
  2. ^Ferguson, G. A. (1966).Statistical analysis in psychology and education. New York: McGraw–Hill.
  3. ^Smith, S. C., & Albaum, G. S. (2004)Fundamentals of marketing research. Sage: Thousand Oaks, CA. p. 631
  4. ^Blaikie, N. (2003)Analyzing Quantitative Data. Sage: Thousand Oaks, CA. p. 100
  5. ^Ferguson.[full citation needed]
  6. ^Ferguson, 1966, p. 244
  7. ^"The Search for Categorical Correlation". 26 December 2019.

Further reading

[edit]

External links

[edit]
Wikimedia Commons has media related toContingency tables.
Continuous data
Center
Dispersion
Shape
Count data
Summary tables
Dependence
Graphics
Study design
Survey methodology
Controlled experiments
Adaptive designs
Observational studies
Statistical theory
Frequentist inference
Point estimation
Interval estimation
Testing hypotheses
Parametric tests
Specific tests
Goodness of fit
Rank statistics
Bayesian inference
Correlation
Regression analysis (see alsoTemplate:Least squares and regression analysis
Linear regression
Non-standard predictors
Generalized linear model
Partition of variance
Categorical
Multivariate
Time-series
General
Specific tests
Time domain
Frequency domain
Survival
Survival function
Hazard function
Test
Biostatistics
Engineering statistics
Social statistics
Spatial statistics
National
Other
Retrieved from "https://en.wikipedia.org/w/index.php?title=Contingency_table&oldid=1303449303"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp