Tetrachoric Correlation Calculator

Inputs

Tetrachoric correlation0.707
Odds ratio9.00
Phi coefficient0.492
Total observations100
How this was calculated
  1. Inputs: the 2x2 table a 30, b 15, c 10, d 45 (n 100).
  2. Digby's approximation sets the angle from the odds structure: sqrt(bc) 12.247 against sqrt(ad) 36.742.
  3. The cosine of pi times that share gives the latent correlation; the odds ratio is 9.00 and phi only 0.492.
  4. Tetrachoric correlation = 0.707, the bivariate-normal correlation the two splits are assumed to hide.

Two yes/no variables can hide a strong relationship that their own correlation cannot show. Phi, computed on the 2x2 table, is throttled by the two splits; the tetrachoric correlation asks what correlation between two underlying normal traits would have produced this table, and answers with a number that can be far larger. This calculator uses Digby's cosine approximation - accurate across the practical range - and returns the tetrachoric r with the odds ratio and phi coefficient beside it, so the observed and latent stories can be read together.

Worked examples

Strong positive table

(30 · 15 · 10 · 45)

Tetrachoric correlation0.707
Odds ratio9.00
Phi coefficient0.492
Total observations100

Moderate table

(52 · 28 · 31 · 49)

Tetrachoric correlation0.401
Odds ratio2.94
Phi coefficient0.263
Total observations160

Negative table

(8 · 22 · 25 · 5)

Tetrachoric correlation-0.786
Odds ratio0.07
Phi coefficient-0.570
Total observations60

Two splits, one hidden correlation

The setup is everywhere in the survey and testing world: two traits, each recorded only as above or below a threshold. Item responses on a test, symptoms present or absent, risk factors carried or not. If the traits themselves are continuous and jointly normal - the model's one big assumption - then the four cell counts of the table are determined by the two thresholds and a single correlation, and that correlation can be recovered from the counts.

Pearson's original recovery used a series expansion that taxed hand computation for decades. Digby's 1983 shortcut noticed that the cosine of a particular angle built from the odds structure tracks the series solution closely: r = cos(pi x sqrt(bc) / (sqrt(ad) + sqrt(bc))). One angle, one cosine, and the estimate that factor analysis of item pools runs on becomes arithmetic a spreadsheet can do.

  • r_tet estimates the correlation of the two latent continua
  • Digby's form: cos(pi sqrt(bc) / (sqrt(ad) + sqrt(bc)))
  • Phi is the correlation of the table itself - always smaller
  • Zero cells break the estimate; add a continuity correction

Digby's cosine approximation

The formula's intuition is angular. When the traits are independent, the off-diagonal cells balance the diagonal ones and the angle is a right angle - cosine zero. As association strengthens, the diagonal cells swell, the angle closes, and the cosine climbs toward 1. In the first worked example the table 30/15/10/45 has an odds ratio of 9.00, the angle closes accordingly, and the tetrachoric r comes out at 0.707.

The approximation's error against the full series solution is small across the range practitioners meet, and largest exactly where the estimate itself is least trustworthy - extreme splits and near-perfect association. The second example's milder table (odds ratio 2.94) gives 0.401, and the third's inverted table gives -0.786: the cosine handles negative association symmetrically, the angle opening past 90 degrees.

Worked examples

Example 1: Cell a (both traits present) 30; Cell b (trait 1 only) 15; Cell c (trait 2 only) 10; Cell d (neither trait) 45. Tetrachoric correlation = 0.707. Supporting values: Odds ratio 9.00; Phi coefficient 0.492; Total observations 100. Inputs: the 2x2 table a 30, b 15, c 10, d 45 (n 100). Digby's approximation sets the angle from the odds structure: sqrt(bc) 12.247 against sqrt(ad) 36.742. The cosine of pi times that share gives the latent correlation; the odds ratio is 9.00 and phi only 0.492. Tetrachoric correlation = 0.707, the bivariate-normal correlation the two splits are assumed to hide.

Example 2: Cell a (both traits present) 52; Cell b (trait 1 only) 28; Cell c (trait 2 only) 31; Cell d (neither trait) 49. Tetrachoric correlation = 0.401. Supporting values: Odds ratio 2.94; Phi coefficient 0.263; Total observations 160. Inputs: the 2x2 table a 52, b 28, c 31, d 49 (n 160). Digby's approximation sets the angle from the odds structure: sqrt(bc) 29.462 against sqrt(ad) 50.478. The cosine of pi times that share gives the latent correlation; the odds ratio is 2.94 and phi only 0.263. Tetrachoric correlation = 0.401, the bivariate-normal correlation the two splits are assumed to hide.

Example 3: Cell a (both traits present) 8; Cell b (trait 1 only) 22; Cell c (trait 2 only) 25; Cell d (neither trait) 5. Tetrachoric correlation = -0.786. Supporting values: Odds ratio 0.07; Phi coefficient -0.570; Total observations 60. Inputs: the 2x2 table a 8, b 22, c 25, d 5 (n 60). Digby's approximation sets the angle from the odds structure: sqrt(bc) 23.452 against sqrt(ad) 6.325. The cosine of pi times that share gives the latent correlation; the odds ratio is 0.07 and phi only -0.570. Tetrachoric correlation = -0.786, the bivariate-normal correlation the two splits are assumed to hide.

Reading r against phi

Phi on the first example's table is 0.492; the tetrachoric r is 0.707. Both are correct answers, to different questions. Phi describes the association between the two recorded dichotomies - the variables as they exist in the dataset. The tetrachoric describes the association between the traits the dichotomies were cut from - the variables as they exist in the world, if the model's normality story is true.

The gap between them is the price of dichotomisation, and it grows as the splits leave the medians. That is why item analysts prefer tetrachoric matrices for factor analysis: factoring phi coefficients manufactures spurious difficulty factors out of the items' differing split points, an artefact the latent correlations do not contain. It is also why the two should never be mixed in one matrix or one meta-analysis without saying so.

Where tetrachoric estimates are used

Psychometrics is the home ground: item pools, symptom checklists and attitude scales are dichotomous by design and continuous by theory, and the tetrachoric matrix is the standard input to their factor models. Epidemiology uses the same machinery more cautiously, for co-occurrence of conditions recorded as present or absent. In both fields the estimate's role is identical - to compare associations on the latent scale, where differing prevalences and thresholds do not masquerade as differing relationships.

The total count matters to how seriously a single estimate can be taken. The first example's 100 observations pin the odds ratio down moderately; the third example's 60, with cells of 8 and 5, leave it loose - the standard error of a tetrachoric r from such a table is wide, and the -0.786 should be read as strongly negative, not as a precise coordinate.

Failure modes: zero cells and wild splits

A zero in any cell sends the odds ratio to zero or infinity and the cosine to a degenerate answer. The standard repair is a continuity correction - adding a half to each cell - which biases the estimate slightly toward zero in exchange for it existing at all; with small samples that trade is usually worth it, and it should be reported. The deeper failure is a split so extreme that one row or column is nearly empty: the latent correlation is then identified by a handful of observations and no correction manufactures the missing information.

The assumption itself is the last failure mode. Two traits can be dichotomised without being normal underneath - truly categorical conditions, threshold effects with real discontinuities - and then the tetrachoric r is a precise answer to a question about a fiction. The defence is the same as everywhere in latent-variable work: the estimate is a model-based reading of the table, offered next to the table's own phi so the reader can see both the data and the interpretation laid over it.

A note on what the estimate is for, in modern pipelines. Item-response theory and factor analysis of binary items begin from tetrachoric matrices because the alternative - factoring phi coefficients - confounds the items' difficulty (their split points) with their relationships, manufacturing factors that merely sort items by prevalence. The tetrachoric matrix removes the split points from the correlations, leaving the factor model to explain association rather than marginal frequency. When a tetrachoric matrix misbehaves in that pipeline - a non-positive-definite result, usually - the cause is estimation noise in sparse tables, and the standard repairs begin from the cell counts this page asks for.

The estimate also has a distinguished second career in genetics and epidemiology, where the liability-threshold model - a continuous liability, a threshold, an observed diagnosis - is exactly the tetrachoric setup wearing medical clothes. Heritability estimates for binary diseases rest on it. The assumption travels with the application: liability really should be roughly normal and multifactorial for the number to mean what it claims, and the calculator's pairing of r with phi and the odds ratio keeps the observed table in view beside its latent interpretation.

Computation has one more chapter worth recording. Pearson's original series was so laborious that tetrachoric correlations were once computed from published tables and nomograms, cell by cell, and a large matrix could take weeks. Digby's approximation and then direct numerical integration collapsed that to nothing, which changed the science: matrices that were previously estimated for a handful of variable pairs became routine for whole item pools, and the factor-analytic literature of the late twentieth century is partly a story of this arithmetic becoming cheap. The formula on this page is the inexpensive descendant of a table-lookup industry.

FAQs

What tetrachoric correlation does the first worked example give?

0.707 for the table 30/15/10/45 - far above its phi of 0.492, because both splits discarded information the latent estimate restores.

What odds ratio does the first example have?

9.00 - the diagonal product outweighs the off-diagonal nine to one, which is what closes Digby's angle and lifts the cosine.

What phi coefficient does the first example give?

0.492. Phi is the correlation of the recorded dichotomies; the tetrachoric 0.707 estimates the correlation of the traits behind them.

How many observations does the first example use?

100. Enough to pin the estimate moderately; the third example's 60, with cells of 8 and 5, leave its -0.786 much looser.

What tetrachoric correlation does the weak second example give?

0.401, from an odds ratio of 2.94 and phi of 0.263 - the same ordering, a milder table.

What tetrachoric correlation does the negative third example give?

-0.786. The inverted table (odds ratio 0.07) opens the angle past 90 degrees and the cosine goes negative.

Sources

Related calculators

Odds Ratio Calculator
Odds ratio and relative risk from a 2x2 table (exposed/unexposed × outcome/no outcome), with the 95% confidence interval for the odds ratio by the log method.
Point-Biserial Correlation Calculator
Point-biserial correlation between a dichotomous grouping and a continuous score, from the two group means, the overall standard deviation and the group sizes - with the equivalent t statistic.
Matthews Correlation Coefficient Calculator
The Matthews correlation coefficient (phi coefficient) of a binary classifier from its confusion matrix - the single score that uses all four cells and stays honest on unbalanced data.