liveBook · Manning

Variance

As explained in Bayesian Optimization in Action

Variance is the expected squared deviation of a random variable from its mean and measures the spread of its distribution.

Variance measures spread by describing the expected squared deviation of a random variable from its mean. In a multivariate Gaussian, each variable’s variance appears on the covariance matrix’s diagonal. section 2.2.1

Read variance in a multivariate Gaussian as follows:

  • The mean vector records the expected value of each variable. section 2.2.1
  • The i-th diagonal entry of the covariance matrix gives the variance of variable Xi. section 2.2.1
  • Larger variance corresponds to a wider marginal normal distribution and greater uncertainty around its mean. section 2.2.1 section 2.2.2

Updating uncertainty after an observation

Suppose A, B, and C represent jointly modeled house prices. Conditioning the Gaussian on an observed value such as B = 4 changes A’s posterior mean and reduces its error-bar range when A and B are positively correlated. At the observed variable, uncertainty becomes zero; variables with no relevant correlation may retain their marginal distributions. section 2.2.2

Figure 2.4 An MVN distribution groups multiple normally distributed random variables together. While the mean vector of the MVN concatenates the mean values, the covariance matrix models the correlations between the individual variables.

Shows how a multivariate Gaussian groups individual normal variables while its covariance matrix represents their variances and correlations. section 2.2.1

Figure 2.5 Parallel coordinates plot visualizing a mean-normalized MVN from the housing price example. The error bars indicate 95% CIs of corresponding normal distributions, while the faded lines show samples drawn from the multivariate Gaussian.

Visualizes marginal uncertainty with 95% confidence intervals and samples from a multivariate Gaussian. section 2.2.1

Figure 2.8 Conditioning a Gaussian on an observation is similar to tying a knot around that observation. All samples from the posterior distribution need to pass through the knot, and there’s no uncertainty at the observed point.

Illustrates conditioning as forcing posterior samples through an observed value, leaving no uncertainty at that point. section 2.2.2

How Bayesian Optimization in Action covers it

How deep it goes
Defines variance through covariance-matrix diagonals and explains posterior changes, but defers the math-heavy conditioning derivation.
Examples
Uses a three-variable house-price Gaussian, parallel-coordinate plots, confidence intervals, samples, and observations such as B = 4.
What it assumes
Assumes familiarity with normal distributions and random variables while introducing multivariate Gaussian notation, means, covariance, and correlation.
What you can do after
Understand variance as marginal uncertainty and interpret how observations change posterior uncertainty in correlated Gaussian variables.
How it connects
Connects variance to multivariate Gaussian distributions, covariance matrices, correlation, conditional distributions, and Gaussian processes.

Also explained in

Compare how 19 books explain variance →

Related concepts

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