liveBook · Manning

Variance

As explained in Grokking Bayes

Variance is the expected squared deviation of a random variable from its mean and equals the square of its standard deviation.

Variance measures how widely possible values spread around their mean. It equals the expected squared deviation from the mean and the square of the standard deviation. section 3.12

For a normal distribution, variance is written σ². A larger variance means a broader distribution and greater uncertainty; a smaller variance means a more concentrated distribution. section 3.12

Variance in a Bayesian regression update

A prior slope with μ = 100 and σ = 100 has variance σ² = 100². After observing square-footage and price data, the posterior variance is updated with the data and typically decreases, expressing greater confidence in the slope. Python computes this posterior variance with the prior variance, feature values, and noise variance. section 3.14 section 3.12

Figure 3.4 The prior distribution of the slope 𝑚 in the linear regression model, which gives the highest probability to the value 100 but there’s a high level of uncertainty in this value, quantified by the large spread of the distribution.

Visualize how variance appears as the spread of a normal prior around its mean. section 3.12

Variance is useful for continuous quantities, but it is not a universal uncertainty measure. It does not naturally describe categories such as “dog” and “cat,” and it can change when numerical possibilities are relabeled or rescaled even when uncertainty remains the same. section 13.3

How Grokking Bayes covers it

How deep it goes
Defines variance through standard deviation, applies it to normal priors and posteriors, and notes limitations for discrete uncertainty.
Examples
Uses a square-footage price slope, a normal prior with variance 100², posterior updating, and categorical or relabeled discrete possibilities.
What it assumes
Assumes means, standard deviations, probability distributions, and random variables; distinguishes variance from entropy for discrete uncertainty.
What you can do after
Evaluate uncertainty in continuous distributions and interpret changing prior or posterior spread.
How it connects
Connects variance with mean, standard deviation, normal distribution, credible intervals, posterior distributions, linear regression, and entropy.

Also explained in

Compare how 24 books explain variance →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking Bayes. The section links point to the parts of the book it draws on.