In statistics, the phi coefficient, also known as the mean square contingency coefficient or Yule coefficient of correlation and commonly denoted by φ or rφ, is a measure of association between two binary variables. In machine learning and bioinformatics, it is known as the Matthews correlation coefficient (MCC). In meteorology and elsewhere, it is referred to as the Doolittle Measure of Association or Doolittle Skill Score. Described by Udny Yule in 1912 and given the name phi by Karl Pearson in the 1930s, it is a special case of the Pearson correlation coefficient.
Definition A Pearson correlation coefficient estimated for two binary variables will return the phi coefficient. Two binary variables are considered positively associated if most of the data falls along the diagonal cells. In contrast, two binary variables are considered negatively associated if most of the data falls off the diagonal. If we have a 2×2 table for two random variables x and y
where n11, n10, n01, n00, are non-negative counts of numbers of observations that sum to n, the total number of observations. The phi coefficient that describes the association of x and y is
φ = n 11 n 00 − n 10 n 01 n 1 ∙ n 0 ∙ n ∙ 0 n ∙ 1 . {\displaystyle \varphi ={\frac {n_{11}n_{00}-n_{10}n_{01}}{\sqrt {n_{1\bullet }n_{0\bullet }n_{\bullet 0}n_{\bullet 1}}}}.}
Phi is related to the point-biserial correlation coefficient and Cohen's d and estimates the extent of the relationship between two variables (2×2). The phi coefficient can also be expressed using only n {\displaystyle n} , n 11 {\displaystyle n_{11}} , n 1 ∙ {\displaystyle n_{1\bullet }} , and n ∙ 1 {\displaystyle n_{\bullet 1}} , as
φ = n n 11 − n 1 ∙ n ∙ 1 n 1 ∙ n ∙ 1 ( n − n 1 ∙ ) ( n − n ∙ 1 ) . {\displaystyle \varphi ={\frac {nn_{11}-n_{1\bullet }n_{\bullet 1}}{\sqrt {n_{1\bullet }n_{\bullet 1}(n-n_{1\bullet })(n-n_{\bullet 1})}}}.}
Maximum values In general, the Pearson correlation coefficient ranges from −1 to +1, where ±1 indicates perfect agreement or disagreement, and 0 indicates no relationship. The range of the phi coefficient—a special case of the Pearson correlation coefficient—is more tightly bound when either of the binary variables are class-imbalanced.
Machine learning The Matthews correlation coefficient (MCC) is widely used in the fields of bioinformatics and machine learning to evaluate the quality of binary (two-class) classifications. It is named for biochemist Brian W. Matthews, who described the measure in a foundational 1975 paper. An equivalent quantity, the Doolittle Measure of Association or Doolittle Skill Score, was used by M. H. Doolittle in the 1880s to rate the accuracy of meteorologist John Park Finley's tornado predictions and other weather forecasts. The coefficient accounts for true and false positives and negatives and is generally regarded as a balanced measure which can be used even if the classes are of very different sizes. The MCC is in essence a correlation coefficient between the observed and predicted binary classifications; it returns a value between −1 and +1. A coefficient of +1 represents a perfect prediction, 0 no better than random prediction and −1 indicates total disagreement between prediction and observation. However, if MCC equals neither −1, 0, or +1, it is not a reliable indicator of how similar a predictor is to random guessing because MCC is dependent on the dataset. MCC is closely related to the chi-square statistic for a 2×2 contingency table
| MCC | = χ 2 n {\displaystyle |{\text{MCC}}|={\sqrt {\frac {\chi ^{2}}{n}}}}
… excerpt ends here. Continue reading the full article.
