LECTURE 22

Expectation, Variance, and Error

The gap between calculation and observation

The Hook

You measure the C-C bond length in ethane. Ten measurements:

1.532, 1.528, 1.535, 1.530, 1.527, 1.534, 1.529, 1.531, 1.533, 1.528 A

Questions: What is THE bond length? How confident are you?

The uncomfortable answer: There is no single "true" value you can access. Every measurement has uncertainty. The best you can do is characterize the distribution of possible values.

The Fundamental Distinction

-13.6 eV
Calculated (exact in model)
-13.598 +/- 0.002
Observed (uncertain)
SourceTypeReducible?
Instrument precisionSystematic/RandomPartially
Environmental fluctuationRandomPartially
Sampling variationRandomWith more data
Quantum uncertaintyFundamentalNo
Model approximationSystematicWith better theory

Sample Mean vs Population Mean

The sample mean x estimates the true mean mu. With more samples, our estimate becomes more precise.

Sampling from a Normal Distribution
-
Sample Mean x
-
Sample Std s
-
Std Error SE
-
95% CI contains mu?
5
1

Standard Error = s/sqrt(n)

More samples reduce SE, making the mean estimate more precise. The 95% CI should contain mu about 95% of the time.

Expectation and Variance

Expectation (Mean):

$$\langle X \rangle = \sum_i x_i P(x_i) \quad \text{or} \quad \int x \, f(x) \, dx$$

Variance:

$$\sigma^2 = \langle (X - \mu)^2 \rangle = \langle X^2 \rangle - \langle X \rangle^2$$

Example: Fair Die

X = number rolled

Error Propagation

General Formula (independent uncertainties):

$$\delta f = \sqrt{\left(\frac{\partial f}{\partial x}\right)^2 \delta x^2 + \left(\frac{\partial f}{\partial y}\right)^2 \delta y^2 + \cdots}$$
Error Propagation Calculator

-

Common Cases

OperationFormula
f = x +/- ydelta f = sqrt(delta x^2 + delta y^2)
f = x * y or x/ydelta f/f = sqrt((delta x/x)^2 + (delta y/y)^2)
f = x^ndelta f/f = |n| * delta x/x
f = e^xdelta f = |f| * delta x
f = ln(x)delta f = delta x / x

Adding uncertainties linearly is WRONG!

delta(x+y) != delta x + delta y

delta(x+y) = sqrt(delta x^2 + delta y^2) (add in quadrature)

Monte Carlo Error Propagation

When formulas get complicated, simulate! Generate random samples and see the distribution of f.

Monte Carlo: f = x^2/y with x = 4.0 +/- 0.2, y = 2.0 +/- 0.1
-
MC Mean
-
MC Std
-
Analytical f
-
Analytical delta f

Monte Carlo naturally handles non-linear functions, correlated uncertainties, and non-Gaussian distributions.

Weighted Averages

When measurements have different precisions, weight by 1/sigma^2.

$$\bar{x}_w = \frac{\sum_i w_i x_i}{\sum_i w_i} \quad \text{where } w_i = \frac{1}{\sigma_i^2}$$
Weighted Average Calculator
-
Weighted Avg
-
Uncertainty
-
Simple Avg

The more precise measurement dominates the weighted average!

Summary

ConceptSymbolMeaning
ExpectationE[X] or muProbability-weighted average
Variancesigma^2E[(X - mu)^2]
Standard deviationsigmasqrt(Var)
Standard errorSEsigma/sqrt(n)

Every measurement is uncertain. Reporting a value without uncertainty is incomplete. Understanding error propagation connects calculated predictions to experimental reality.