Matthews Correlation Coefficient

The Matthews correlation coefficient (MCC) rates a binary classifier, such as an AI screener, from minus 1 to 1 using all four confusion matrix cells.

Status
Published, version 1.0.0
Last reviewed
10 Nov 2026, by Dr Darrin Baines
Report a problem
Tell us if something is wrong or out of date

Concept Architecture

Matthews Correlation Coefficient for AI Classifier Evaluation

The Matthews correlation coefficient is the ordinary correlation between two yes or no variables, the class an AI model predicts for each item and the class a reference standard assigns to it. HTA analysts meet it in validation studies of AI tools that screen records for a systematic review, classify studies or flag patients in routine data. Its appeal is that a classifier scores well only when it does well on both classes, which simple classification accuracy cannot guarantee when one class is rare. NICE ECD20 (2026), the NICE AI methods for evidence framework, accepts that it may help model developers but keeps it in a supporting role for screening.

Correlation between predicted and true labels

Each item in an evaluation set falls into one cell of a confusion matrix, the two-by-two contingency table of predicted against true class covered on the Confusion Matrix page. Chicco and Jurman (2020) describe the coefficient as a way of computing the Pearson correlation between actual and predicted values directly from that table, and as a special case of the phi coefficient.

MCC=TP⋅TN−FP⋅FN(TP+FP)(TP+FN)(TN+FP)(TN+FN)\text{MCC} = \frac{TP \cdot TN - FP \cdot FN}{\sqrt{(TP + FP)(TP + FN)(TN + FP)(TN + FN)}}

where TP is the number of true positives, TN the number of true negatives, FP the number of false positives and FN the number of false negatives, all counted against the reference standard. The four sums under the root are the totals predicted positive, truly positive, truly negative and predicted negative.

Chicco and Jurman (2020) give the range as minus 1 for perfect misclassification to plus 1 for perfect classification, with 0 the expected value for a classifier that tosses a coin. Because each class enters the formula in the same way, the coefficient does not change if the positive and negative labels are swapped.

Matthews (1975) used such coefficients to compare predicted and observed secondary structure in a protein, reporting values from 0.14 to 0.42 across eleven helix predictions. Chicco and Jurman (2020) trace its later adoption as a general machine learning metric to a 2000 review of prediction accuracy measures.

What a high value requires

Chicco, Tötsch and Jurman (2021) show that the coefficient can also be written as the geometric mean of informedness and markedness. This form explains its behaviour.

MCC=±BM×MK,BM=TPR+TNR−1,MK=PPV+NPV−1\text{MCC} = \pm\sqrt{\text{BM} \times \text{MK}}, \qquad \text{BM} = \text{TPR} + \text{TNR} - 1, \qquad \text{MK} = \text{PPV} + \text{NPV} - 1

where BM is bookmaker informedness, MK is markedness, TPR is the true positive rate or sensitivity, TNR is the true negative rate or specificity, PPV is the positive predictive value and NPV is the negative predictive value. The sign is that of BM, and the two always agree in sign.

Informedness depends only on the classifier, and the same authors note that it equals Youden's index. Markedness depends on the predictive values, which move with prevalence. A high MCC therefore needs most positives and negatives found and most positive and negative calls right.

How NICE ECD20 places the coefficient

For AI title and abstract screening, NICE ECD20 (2026) makes the false negative rate, or the true positive rate that complements it, the primary metric. Where AI performs a first sift and humans screen everything it keeps, missing relevant evidence matters more than keeping irrelevant records. The framework accepts that aggregate scores such as the MCC, accuracy and the F-score may help developers, but says they should not replace those two rates as the primary reported metrics.

Its validation principles ask for any aggregate measure to be justified and pre-specified, and for 95% confidence intervals where possible, with bootstrapped estimates among the alternatives, so an MCC from a validation set should carry its uncertainty. For data extraction the framework makes overall concordance the primary metric, and suggests that in a secondary analysis of extraction errors the true positive rate and positive predictive value may be the most informative aggregate pair, since measures resting on true negatives may tell less when many items are simply not reported, and the MCC also draws on true negatives. Its chapter on health economic evaluation names no performance metric.

Worked example with 1,000 screened abstracts

All numbers in this example are illustrative. A search for a review that will feed a cost-effectiveness model returns 1,000 records, and double screening with adjudication marks 40 as relevant, a prevalence of 4%. Two AI screening tools are run on the same records.

ToolTPFNFPTN
Inclusive tool A382160800
Strict tool B301030930

1. Tool A. The numerator is 38 × 800 minus 160 × 2, which is 30,400 minus 320, or 30,080. The four totals are 198 predicted positive, 40 relevant, 960 irrelevant and 802 predicted negative. Their product is 198 × 40 × 960 × 802 = 6,097,766,400, whose square root is 78,088.2, so the MCC is 30,080 / 78,088.2 = 0.385.

2. Tool B. The numerator is 30 × 930 minus 30 × 10, which is 27,900 minus 300, or 27,600. The totals are 60, 40, 960 and 940, with product 2,165,760,000 and square root 46,537.7, so the MCC is 27,600 / 46,537.7 = 0.593.

3. Ranking. The coefficient prefers tool B by a wide margin. Tool B misses 10 of the 40 relevant studies, a false negative rate of 0.25, while tool A misses 2, a false negative rate of 0.05. Under the NICE ECD20 (2026) priority for a first sift tool A is better, but the MCC attaches no extra cost to a missed study, so tool A's 130 extra irrelevant records count against it more than tool B's 8 extra missed studies count against B.

4. Check by the geometric mean. For tool A, informedness is 0.9500 + 0.8333 minus 1, or 0.7833, and markedness is 0.1919 + 0.9975 minus 1, or 0.1894. The square root of 0.7833 × 0.1894 is 0.385, matching step 1.

5. A rule that excludes everything. It gives TP = 0, FN = 40, FP = 0 and TN = 960. Its accuracy is 960 / 1,000 = 0.96, the same as tool B's (30 + 930) / 1,000 = 0.96. The MCC is undefined because no record is predicted positive, and Chicco and Jurman (2020) show its limiting value in such cases is 0, the coin-toss score, so it separates this useless rule from tool B where accuracy cannot.

6. Swapping the classes. Treating irrelevant records as the positive class gives tool A TP = 800, FN = 160, FP = 2 and TN = 38. The numerator and the totals are unchanged, so the MCC stays 0.385, while the F1 score rises from 76 / 238 = 0.319 to 1,600 / 1,762 = 0.908.

7. A larger search. With 9,600 irrelevant records instead of 960 and the same rates, tool A has TP = 38, FN = 2, FP = 1,600 and TN = 8,000. The numerator is 304,000 minus 3,200, or 300,800, the totals are 1,638, 40, 9,600 and 8,002, and the MCC falls to 300,800 / 2,243,478 = 0.134. Informedness stays 0.783, so only the prevalence has changed.

8. Interpretation. Tool A is the safer first sift, though its 2 missed studies are lost unless later checks, such as quality assurance sampling of the records it excludes, find them. The MCC is a fair summary when both errors matter equally, which in screening they do not, and it also depends on how many irrelevant records the search returned.

Choices and limits that change the score

Prevalence matters most. Chicco, Tötsch and Jurman (2021) note that the share of positives in a test set is often arbitrary, for example when cases and controls are sampled separately, and that metrics resting on predictive values then say little about the population of interest. In that case, and when comparing classifiers across datasets, they consider informedness more suitable. In their example, true positive and true negative rates of 0.99 and 0.95 at very low prevalence give an MCC of only 0.136 against an informedness of 0.94.

Several analyst choices also move the value, and a report should state each of them.

  1. Threshold. Each cut-off on a model's score gives a different matrix and a different value.
  2. Undefined cases. A matrix with a whole row or column of zeros has no defined MCC, and Chicco and Jurman (2020) note that very imbalanced results can make the value fluctuate.
  3. Sample size. Few positives make the true positive and false negative counts, and so the MCC, uncertain, so intervals and absolute error counts belong alongside the value.
  4. More than two classes. Gorodkin (2004) proposed an extension to K categories, since forcing several categories into two loses information.

Where the coefficient sits among other measures

Chicco and Jurman (2020) recommend the MCC over accuracy and F1 for binary problems with a fixed threshold, on the grounds that only a classifier doing well on both classes gets a high score. The F-Score ignores true negatives, and accuracy is inflated by a large majority class. Chicco and Jurman (2023) go further and argue that the MCC should replace the area under the ROC curve as the standard summary, partly because the ROC curve says nothing about predictive values.

The kappa statistic also corrects agreement for chance, but Chicco and Jurman (2020) set it aside for classifier evaluation because it depends heavily on the marginal totals. Kappa suits agreement between two raters, such as two human screeners, where neither is the reference standard.

None of these scores values the consequences of errors. In a health technology assessment of an AI diagnostic, the two errors carry different costs and health outcomes, which decision curve analysis or a full economic model weigh explicitly. A high MCC is a diagnostic accuracy result. It shows that a classifier separates the classes in one dataset and does not by itself measure AI diagnostic value.

Common misreadings

Some misreadings recur in validation reports. Most come from treating the coefficient as a proportion or as free of context.

  1. Reading 0.5 as halfway. An MCC of 0.5 does not mean half the items were classified correctly.
  2. Assuming balance-free. The MCC handles imbalance better than accuracy, yet it still moves with prevalence, as step 7 shows.
  3. Equal weights by default. In screening this can favour a tool that loses studies, as step 3 shows.
  4. Comparing across datasets. Values from sets with different prevalence or reference standards are not directly comparable.

Sources

  • Chicco D, Jurman G. The advantages of the Matthews correlation coefficient (MCC) over F1 score and accuracy in binary classification evaluation. BMC Genomics. 2020;21:6. https://doi.org/10.1186/s12864-019-6413-7
  • Chicco D, Jurman G. The Matthews correlation coefficient (MCC) should replace the ROC AUC as the standard metric for assessing binary classification. BioData Mining. 2023;16:4. https://doi.org/10.1186/s13040-023-00322-4
  • Chicco D, Tötsch N, Jurman G. The Matthews correlation coefficient (MCC) is more reliable than balanced accuracy, bookmaker informedness, and markedness in two-class confusion matrix evaluation. BioData Mining. 2021;14:13. https://doi.org/10.1186/s13040-021-00244-z
  • Gorodkin J. Comparing two K-category assignments by a K-category correlation coefficient. Computational Biology and Chemistry. 2004;28(5-6):367-374. https://doi.org/10.1016/j.compbiolchem.2004.09.006
  • Matthews BW. Comparison of the predicted and observed secondary structure of T4 phage lysozyme. Biochimica et Biophysica Acta. 1975;405(2):442-451. https://doi.org/10.1016/0005-2795(75)90109-9
  • National Institute for Health and Care Excellence. AI methods for evidence framework (ECD20). Published 9 November 2026. Principles, evidence synthesis and health economic evaluation chapters, and Appendix A. https://www.nice.org.uk/corporate/ecd20

Frequently Asked Questions (6)

  • What is Matthews Correlation Coefficient?

    The Matthews correlation coefficient (MCC) rates a binary classifier, such as an AI screener, from minus 1 to 1 using all four confusion matrix cells.

    Source: Chicco & Jurman 2020

  • How is the Matthews correlation coefficient calculated from a confusion matrix?

    A confusion matrix has four cells, which count true positives, true negatives, false positives and false negatives against a reference standard. The numerator is the product of true positives and true negatives less the product of false positives and false negatives. The denominator is the square root of the product of four totals, namely the items predicted positive, truly positive, truly negative and predicted negative. Chicco and Jurman describe the result as the Pearson correlation between actual and predicted classes, running from minus 1 for perfect misclassification to plus 1 for perfect classification, with 0 expected from a coin toss.

    Source: Chicco & Jurman 2020

  • How does NICE ECD20 treat the Matthews correlation coefficient when AI screens titles and abstracts for a systematic review?

    NICE ECD20 makes the false negative rate, or the true positive rate that complements it, the primary metric for AI title and abstract screening. When AI performs a first sift and humans screen every record it keeps, losing relevant studies matters more than keeping irrelevant ones. The framework names the Matthews coefficient among aggregate scores that may help model developers, but says such scores should not take the place of those two rates in a screening report. Its validation principles also ask for any aggregate measure to be justified and pre-specified, with 95% confidence intervals reported where possible.

    Source: NICE ECD20 (2026)

  • Why can ranking AI screening tools by the Matthews correlation coefficient mislead in a review that feeds a cost-effectiveness model?

    In an illustrative screen of 1,000 records with 40 relevant, an inclusive tool that misses 2 studies and keeps 160 irrelevant records scores an MCC of 0.385. A strict tool that misses 10 studies and keeps 30 irrelevant records scores 0.593, so the coefficient prefers it although it loses a quarter of the relevant evidence. The MCC attaches no extra cost to a missed study. NICE ECD20 notes that missing relevant studies can alter the evidence base and the findings of a review, and so it puts the false negative rate first when AI performs the first sift.

    Source: NICE ECD20 (2026)

  • How does the Matthews correlation coefficient differ from accuracy and the F1 score?

    Accuracy can be inflated by a large majority class, and the F1 score ignores true negatives altogether. Chicco and Jurman show that the Matthews coefficient draws on all four confusion matrix cells and gives a high score only when a classifier does well on both classes. Unlike the F1 score, it stays the same when the positive and negative labels are swapped. In an illustrative screen, a rule that excludes every record matches a working tool's accuracy of 0.96, yet its Matthews coefficient is undefined, with a limiting value of 0, the coin toss value. For binary problems with a fixed threshold, Chicco and Jurman recommend the Matthews coefficient over both alternatives.

    Source: Chicco & Jurman 2020

  • Why can the Matthews correlation coefficient of the same AI tool differ between validation datasets used in HTA?

    Chicco, Tötsch and Jurman show that the coefficient is the geometric mean of informedness, which depends only on the true positive and true negative rates, and markedness, which depends on predictive values that move with prevalence. In their example, rates of 0.99 and 0.95 at very low prevalence give an MCC of only 0.136 against an informedness of 0.94. The share of positives in a test set is often arbitrary, for example when cases and controls are sampled separately. For comparing classifiers across datasets they consider informedness more suitable, and an MCC needs the prevalence of its dataset reported beside it.

    Source: Chicco et al. 2021

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 10 Nov 2026

Content version: 1.0.0

Canonical Identity

Term code
HS-HP-DH-095

Stable URI · Machine-readable · Resolvable · CC BY 4.0

This article is licensed under Creative Commons Attribution 4.0 International (CC BY 4.0).

Author: Dr Darrin Baines · Publisher: Intelligent Parameters Ltd · Identifier: https://healtheconomics.wiki/concept/matthews-correlation-coefficient