MCDMModel EvaluationClassification MetricMath steps

Matthews Correlation Coefficient

Also known as: Phi Coefficient, Binary Classification Correlation

OriginatorBrian W. MatthewsYear1975Sources2Related methods10

The Matthews Correlation Coefficient (MCC) is a correlation measure between predicted and actual binary classifications. It ranges from -1 to 1 and is considered one of the most reliable single-score metrics for evaluating binary classifiers, especially on imbalanced datasets.

Key highlights

  • Symmetric metric treating both classes equally regardless of imbalance.
  • High only when the model performs well on both positive and negative classes.
  • Insensitive to class imbalance, making it ideal for imbalanced datasets.
  • Accounts for all four elements of the confusion matrix.

Intuition

This section is available to Pro members. Upgrade to Pro

How it works

This section is available to Pro members. Upgrade to Pro

When to use it

Use MCC as the primary metric for binary classification on imbalanced datasets. MCC is insensitive to class imbalance and does not reward predicting the majority class. It is particularly useful when you need a single score that accounts for all types of predictions and errors.

Strengths & limitations

Strengths
  • Symmetric metric treating both classes equally regardless of imbalance.
  • High only when the model performs well on both positive and negative classes.
  • Insensitive to class imbalance, making it ideal for imbalanced datasets.
  • Accounts for all four elements of the confusion matrix.
Limitations
  • Not interpretable as a probability, which can confuse some practitioners.
  • Can be undefined (denominator = 0) on edge cases with perfect or zero predictions for one class.
  • Less intuitive than metrics like precision or recall for practitioners unfamiliar with correlation statistics.
  • Less commonly reported than F1-score or balanced accuracy, making comparison with other studies challenging.

Common pitfalls

This section is available to Pro members. Upgrade to Pro

Applications

This section is available to Pro members. Upgrade to Pro

Frequently asked

How does MCC compare to F1-score for imbalanced datasets?

Both are robust to imbalance, but they emphasize different aspects. MCC is a symmetric correlation treating both classes equally. F1-score focuses on the positive class only. For binary imbalanced problems, MCC is often preferred because it ensures performance on both classes. For problems where the positive class is the only concern (e.g., fraud detection), F1-score may be preferable.

What does negative MCC mean?

Negative MCC indicates systematic inverse predictions: the model tends to predict positive when cases are actually negative and vice versa. An MCC of -1 would mean perfect but inverted predictions. Negative MCC is worse than random (MCC = 0) and indicates a fundamentally broken classifier.

Can MCC be computed for multi-class problems?

The original MCC formula applies to binary classification. For multi-class problems, you can compute per-class MCC (treating each class as positive vs. all others) or use extensions like the multi-class MCC, but these are less common and require careful interpretation.

Sources

  1. 1.
    Matthews, B. W. (1975). Comparison of predicted and observed secondary structure of T4 phage lysozyme. Biochimica et Biophysica Acta (BBA)-Protein Structure, 405(2), 442-451.
  2. 2.
    Powers, D. M. (2011). Evaluation: From Precision, Recall and F-Measure to ROC, Informedness, Markedness and Correlation. Journal of Machine Learning Technologies, 2(1), 37-63.

You have read it. What now?

Cite this page

ScholarGate. (2026, June 3). Matthews Correlation Coefficient. ScholarGate. https://scholargate.app/model-evaluation/matthews-correlation-coefficient