Skip to content

Phi Coefficient

The signed Pearson correlation of two varying binary variables, computed from the normalized cross-product difference of their 2×2 table.

Version
v1 · 2026-10-03 · History
Domain-specific #
13500
Domain group
Formal Sciences
Origin domain
Experimental Design & Statistics
Subdomains
Categorical Association, Binary Statistics → Experimental Design & Statistics

Core Idea

The phi coefficient is signed Pearson correlation for two paired, nonconstant binary variables. With counts \(a=n_{11}\), \(b=n_{10}\), \(c=n_{01}\) and \(d=n_{00}\), it is \(\phi=(ad-bc)/\sqrt{(a+b)(c+d)(a+c)(b+d)}\). All four margins must be positive; otherwise the statistic is undefined. The value is between \(-1\) and $1$ when defined, and swapping one variable's labels reverses its sign.[ref-391a1f8073b3][ref-34f5f14e33ec]

Scope of Application

NIST's hypothetical two-process by two-outcome table \((2,5;3,2)\) yields \(\phi=-11/35\) by applying the formula to its published counts; NIST itself uses the table to teach a separate Fisher test. Scikit-learn's four-case binary prediction example has \(TP=2\), \(FN=1\), \(FP=1\), \(TN=0\) and yields binary MCC/phi \(=-1/3\), rounded in its guide to \(-0.33\). Multiclass MCC is a different extension.[ref-7d0c0b608e6c][ref-34f5f14e33ec]

Clarity

State which cells are $11\(, \$10\), $01$ and $00$, and report both variables' margins. A zero cell is allowed; a zero margin makes the denominator vanish. Binary MCC is an exact formula match under truth/prediction labeling, but unsigned phi-squared, Youden's \(J\), Fowlkes–Mallows and Cramér's \(V\) are not signed-phi aliases. “Doolittle Skill Score” remains an unresolved historical naming question and is not adopted as an alias.[ref-34f5f14e33ec][ref-5fe6613b030a]

Manages Complexity

Phi compresses a fourfold table into one directional association score, while its algebraic equality to Pearson \(r\) checks the calculation. The compression hides marginal constraints: with fixed row-1 total \(r_1\) and column-1 total \(c_1\), \(a\) can range only from \(\max(0,r_1+c_1-n)\) to \(\min(r_1,c_1)\). Thus a fixed-margin table may not attain both \(-1\) and $1$ even though the general mathematical range is \([-1,1]\).[ref-7d0c0b608e6c][ref-34f5f14e33ec]

Abstract Reasoning

Pair both binary observations by unit, declare coding, count the four cells, check that every row/column margin is positive, then compute the signed normalized cross-product. Interpret the result as a sample binary correlation. A test, uncertainty statement or causal conclusion requires additional assumptions and methods: zero observed phi does not prove underlying population independence. The exact equality to Pearson correlation justifies the proposed strict live Pearson parent.[ref-391a1f8073b3][ref-7d0c0b608e6c]

Knowledge Transfer

Industrial process/outcome comparisons and classifier truth/prediction comparisons have the same paired-binary/four-cell/signed-normalization structure. Only the labels and evaluation purpose change. Do not transfer a classifier-quality verdict to a process comparison, or interpret NIST's separate Fisher-test result as phi's intrinsic significance. The statistic is descriptive in both settings.[ref-7d0c0b608e6c][ref-34f5f14e33ec]

[^ref-391a1f8073b3]: H. P. Edmundson, “A Correlation Coefficient for Attributes or Events,” in Statistical Association Methods for Mechanized Documentation, original National Bureau of Standards proceedings (1964), p.41 onward, Abstract and §3; only official indexed passages were inspectable because the full PDF exceeded viewer size. [^ref-7d0c0b608e6c]: NIST/SEMATECH, Engineering Statistics Handbook, §7.3.3, original fourfold hypothetical process table and separate Fisher test. [^ref-34f5f14e33ec]: Scikit-learn maintainers, “Metrics and scoring,” §3.4.4.13, original binary MCC formula, multiclass extension and worked example. [^ref-5fe6613b030a]: SciPy maintainers, scipy.stats.contingency.association, Notes on related Cramér's \(V\) and Tschuprow's \(T\).

Relationships to Other Abstractions

Local relationship map for Phi CoefficientParents appear above the current abstraction, mutual partners to the right, and children below. Node labels state whether each abstraction is prime or domain-specific; colors identify relation types.Phi CoefficientDOMAINDomain-specific abstraction: Pearson correlation coefficient — is a kind ofPearson correla…DOMAIN

Current abstraction Phi Coefficient Domain-specific

Parents (1) — more general patterns this builds on

Hierarchy path (1) — routes to 1 parentless root

Neighborhood in Abstraction Space

Phi Coefficient sits in a sparse region of the domain-specific corpus (76th percentile for distinctiveness): few abstractions share its structure, so a faithful description tends to retrieve it precisely.

Family — Clinical Trial & Research Methodology (20 abstractions)

Nearest neighbors

Computed from structural-signature embeddings · 2026-10-08