# Variance

**Category:** metrics  
**Short Description:** The average of the squared differences from the mean.  
**Last Updated:** 2026-07-07T00:00:00Z

## Definition

Variance is the average of the squared differences between each data point and the mean — the foundational measure of how spread out a metric's values are. In digital advertising, variance quantifies the volatility of metrics like daily CPA, ROAS, or CTR: a campaign averaging a $50 CPA with low variance delivers predictable results, while the same average with high variance swings between cheap and expensive days. Because the differences are squared, variance is expressed in squared units, so practitioners usually report its square root — the standard deviation — while variance itself powers significance tests and sample-size math.

## Formula

**Formula:** `σ² = Σ(x − μ)² / N`

Average of the squared gaps between each value and the mean, expressed in squared units (a CPA variance is in dollars squared) — the spread measure that underpins standard deviation, confidence intervals, and sample-size math.

## Calculation

**Formula:** `σ² = Σ(x - μ)² / N`

**Explanation:** Sum of squared differences from the mean (μ) divided by the number of observations (N). Use N for a full population and N − 1 (sample variance) when estimating from a sample. The result is in squared units of the metric (a CPA variance is in dollars squared). Higher values indicate greater data spread and volatility.

### Components

- **Values**: The individual values in the dataset
- **Mean**: The mean of the dataset
- **Sample Size**: The number of observations in the dataset

## Examples

- Four days of CPA at $20, $30, $25, $25: mean = $25; squared deviations 25 + 25 + 0 + 0 = 50; variance = 50 / 4 = 12.5 (dollars squared), so standard deviation ≈ $3.54
- High CPC variance indicating unstable auction conditions
- Budget allocation based on ROAS variance across campaigns

## How AdSights Helps

**Tracking Variance:** Creative test readouts live and die on variance: the more a metric swings day to day, the more data you need before a 'winner' means anything. AdSights measures per-variant volatility alongside averages, so a variant leading on a noisy metric isn't mistaken for a proven winner because it had one great day.

## FAQs

### What does variance tell you about ad performance?

How consistent a metric is, independent of its average. Two campaigns can both average a 3.0 ROAS while one delivers 2.8–3.2 daily and the other swings between 1.5 and 4.5 — the second carries far more risk for the same expected return. High variance means you need longer windows and larger samples before trusting any change.

### What is the difference between variance and standard deviation?

Standard deviation is the square root of variance. Variance's units are squared (dollars squared), making it hard to read directly — a CPA variance of 12.5 means little, but the matching standard deviation of ~$3.54 reads naturally as 'a typical day lands within a few dollars of the mean.' Use standard deviation for interpretation and thresholds; variance appears inside significance tests and sample-size formulas.

### How do you calculate variance? (worked example)

Compute the mean, square each value's deviation from it, then average the squares. With four days of CPA at $20, $30, $25, and $25: the mean is $25; deviations are −5, +5, 0, 0; squared deviations are 25 + 25 + 0 + 0 = 50; variance = 50 / 4 = 12.5. Its square root, about $3.54, is the campaign's typical day-to-day CPA wobble.

### Should I divide by N or N − 1 when calculating variance?

Divide by N when you have the complete population (every day the campaign ran) and by N − 1 when estimating from a sample — dividing a sample by N systematically understates spread, and Bessel's correction fixes that. Most ad-metric windows are treated as samples of ongoing performance, so N − 1 is the safer default; beyond ~30 observations the difference is negligible.

## Related Terms

### Component Terms

- **[Standard Deviation](/resources/glossary/metrics/standard-deviation)**: Square root of variance, providing more interpretable measure of spread
- **[Population Mean](/resources/glossary/metrics/population-mean)**: The mean (μ) at the center of the variance formula — variance measures spread around it
- **[Statistical Significance](/resources/glossary/metrics/statistical-significance)**: Variance helps determine required sample sizes for significant results
- **[Sample Size](/resources/glossary/metrics/sample-size)**: Sample size affects the precision of variance estimates

### Similar Terms

- **[Anomaly Detection](/resources/glossary/metrics/anomaly-detection)**: Expected variance defines the normal range that anomaly detection flags deviations from
