liveBook · Manning

Covariance

Covariance is an unstandardized measure of how two random variables vary together relative to their means, indicating the direction of their linear association.

How 5 Manning books explain it

Causal Inference for Data Science

Covariance is a measure of the joint variation of two random variables.

How it is used
Connects joint variation to correlation, linear regression, causal diagrams, and instrumental-variable estimators.
How deep it goes
Defines algebraic identities and regression formulas, then applies them to causal graphs and instrumental variables without software implementation.
Examples
Uses confounder, mediator, and collider diagrams alongside regression calculations and an instrumental-variable covariance ratio.
What you can do after
Evaluate/understand covariance identities, interpret standardized correlations, and follow covariance-based regression and instrumental-variable calculations.

Read how Causal Inference for Data Science explains covariance →

Build a Robo-Advisor with Python (From Scratch)

Covariance is a measure of how two asset returns vary together, combining their volatilities with their correlation.

How it is used
Calculates portfolio volatility from asset weights and pairwise return relationships.
How deep it goes
Explains formulas, matrix construction, portfolio aggregation, and historical estimation, but defers sophisticated time-varying volatility methods.
Examples
Uses three-asset NumPy matrices, weighted portfolio volatility, and AAPL, FE, and WMT historical covariance estimates.
What you can do after
Apply covariance with NumPy or pandas to build covariance matrices and calculate portfolio standard deviation.

Read how Build a Robo-Advisor with Python (From Scratch) explains covariance →

Bayesian Optimization in Action

Covariance is a measure of how two random variables vary together.

How it is used
Uses covariance to jointly model multiple random variables with a multivariate Gaussian distribution.
How deep it goes
Defines covariance through matrix entries, distinguishing individual variances on the diagonal from pairwise relationships off the diagonal.
Examples
Uses a housing-price multivariate Gaussian and visualizations of samples, confidence intervals, and variable relationships.
What you can do after
Evaluate covariance matrices by identifying variable variances and pairwise relationships in multivariate Gaussian models.

Read how Bayesian Optimization in Action explains covariance →

Investing for Programmers

Covariance is a statistical measure of how two variables vary together, with positive values indicating movement in the same direction and negative values indicating opposite movement.

How it is used
Measures how asset returns move together when assessing relationships among investments in a portfolio.
How deep it goes
Defines covariance, demonstrates annualized calculation, and stops short of treating it as a strength measure.
Examples
Compares annualized covariance among Microsoft, Amazon, and Alphabet using return matrices and tables.
What you can do after
Apply it via pandas to calculate and interpret an annualized covariance matrix from asset log returns.

Read how Investing for Programmers explains covariance →

Data Without Labels

Covariance is a measure of how two variables vary together.

How it is used
Uses covariance as a Gaussian mixture parameter during probabilistic clustering.
How deep it goes
Defines covariance and places it in EM parameter updates, but does not develop its formula or numerical computation.
Examples
Uses a dataset of n items fitted with k Gaussian distributions and iteratively updated parameters.
What you can do after
Evaluate/understand covariance's role in fitting Gaussian mixture clusters through EM updates.

Read how Data Without Labels explains covariance →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.