Inferensys

Glossary

Pearson Correlation

A statistical metric measuring the linear correlation between predicted and experimentally observed gene expression values, commonly used to evaluate the performance of sequence-to-expression models.
ML engineer running AI model benchmarks, performance charts on multiple screens, late night home office setup.
STATISTICAL METRIC

What is Pearson Correlation?

A foundational statistical measure for quantifying the linear relationship between two continuous variables, widely used in genomics to benchmark model accuracy.

Pearson Correlation is a statistical metric measuring the strength and direction of the linear relationship between two continuous variables, producing a coefficient r ranging from -1 (perfect negative correlation) to +1 (perfect positive correlation). In gene expression prediction, it quantifies how closely a model's predicted transcript abundance aligns with experimentally observed values from techniques like RNA-seq.

The coefficient is calculated as the covariance of the two variables divided by the product of their standard deviations, making it sensitive only to linear dependencies. While a high Pearson r indicates strong agreement in the direction of expression changes, it does not capture non-linear relationships or systematic biases in magnitude, often necessitating complementary metrics like Spearman correlation for robust model evaluation.

Statistical Foundations

Key Properties of Pearson Correlation

Pearson correlation quantifies the strength and direction of a linear relationship between two continuous variables. Understanding its core properties is essential for evaluating gene expression prediction models.

01

Scale Invariance

The Pearson coefficient is invariant to changes in the location and scale of the variables. Adding a constant to all values or multiplying by a positive constant does not alter the correlation.

  • Formula basis: Standardization of values into z-scores (mean=0, std=1)
  • Practical implication: Comparing TPM-normalized vs. raw count data yields the same correlation
  • Exception: Non-linear transformations (log, square root) will change the coefficient
02

Sensitivity to Outliers

Pearson correlation is highly sensitive to extreme values. A single outlier can dramatically inflate or deflate the coefficient, making it an unreliable measure for noisy genomic data without preprocessing.

  • A single data point far from the regression line can dominate the sum of squared deviations
  • Mitigation: Winsorization or robust alternatives like Spearman's rank correlation
  • In RNA-seq, lowly expressed genes with high variance often act as influential outliers
03

Linearity Assumption

Pearson correlation only captures linear relationships. It will fail to detect strong non-linear dependencies, returning a value near zero even when a clear functional relationship exists.

  • Example: A perfect parabolic relationship (y = x²) can yield r ≈ 0
  • Diagnostic: Always inspect scatter plots before relying on r alone
  • Genomic context: Gene regulatory networks often exhibit sigmoidal or switch-like behavior that Pearson misses
04

Bounded Range

The coefficient is strictly bounded between -1 and +1, providing an intuitive, normalized measure of association strength and direction.

  • +1: Perfect positive linear relationship
  • 0: No linear relationship
  • -1: Perfect negative linear relationship
  • Interpretation benchmarks: |r| > 0.7 is generally considered strong, 0.3-0.7 moderate, < 0.3 weak in biological contexts
05

Symmetry Property

Pearson correlation is symmetric: the correlation between X and Y is identical to the correlation between Y and X. It does not imply directionality or causation.

  • Corr(X, Y) = Corr(Y, X)
  • This distinguishes it from regression coefficients, which are asymmetric
  • Critical note: In gene expression prediction, high correlation between predicted and observed values does not mean the model captures causal regulatory mechanisms
06

Relationship to R-squared

The square of the Pearson correlation coefficient equals the coefficient of determination (R²) in simple linear regression, representing the proportion of variance explained.

  • r = 0.8 implies R² = 0.64, meaning 64% of variance is explained
  • This squared relationship penalizes moderate correlations: r = 0.5 explains only 25% of variance
  • Model evaluation: R² provides a more interpretable measure of predictive power than r alone
PEARSON CORRELATION IN GENOMICS

Frequently Asked Questions

Clear, technical answers to common questions about using the Pearson correlation coefficient to evaluate gene expression prediction models.

Pearson correlation is a statistical metric that measures the linear relationship between predicted and experimentally observed gene expression values. In the context of sequence-to-expression models, it quantifies how well a model's continuous output (e.g., predicted log-transformed TPM or FPKM values) tracks with the ground truth from assays like RNA-seq. The coefficient, denoted as r, ranges from -1 to +1, where +1 indicates a perfect positive linear correlation, 0 indicates no linear correlation, and -1 indicates a perfect inverse correlation. For a model predicting transcript abundance across thousands of genes, the Pearson correlation is typically calculated per-gene across samples or per-sample across genes, providing a global measure of predictive accuracy that is sensitive to the direction and strength of the linear association, not just the absolute error magnitude.

MODEL EVALUATION COMPARISON

Pearson vs. Other Genomic Evaluation Metrics

Comparison of statistical metrics used to evaluate the performance of sequence-to-expression prediction models against experimental ground truth.

MetricPearson CorrelationSpearman CorrelationMean Squared Error

Measures

Linear relationship strength

Monotonic relationship strength

Absolute prediction error magnitude

Output Range

-1.0 to 1.0

-1.0 to 1.0

0 to ∞ (lower is better)

Sensitive to Outliers

Assumes Normal Distribution

Captures Non-Linear Patterns

Scale-Dependent

Typical Use in Genomics

Comparing predicted vs. observed expression across genes

Ranking gene expression levels across conditions

Quantifying per-gene prediction deviation

Interpretability for CTOs

Intuitive: 0.9 = strong linear agreement

Intuitive: 0.9 = strong rank agreement

Requires context: depends on expression units

Prasad Kumkar

About the author

Prasad Kumkar

CEO & MD, Inference Systems

Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.

His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.