Cov(x, y)

cov(x, y) is the covariance of two random variables in Intro to Probability. It measures whether they tend to move together or in opposite directions, using how each value differs from its mean.

Last updated July 2026

What is cov(x, y)?

cov(x, y) is the covariance of two random variables, and in Intro to Probability it tells you whether the variables tend to move together, move opposite each other, or show no linear tendency at all. The sign matters first: positive covariance means large values of x usually pair with large values of y, while negative covariance means large values of one usually pair with small values of the other.

The formula is cov(x, y) = E[(x - E[x])(y - E[y])]. That looks formal, but the idea is simple. You compare each variable to its own mean, multiply those deviations, and then average the result. If both variables are above their means at the same time, or both below at the same time, the product is positive. If one is above its mean while the other is below, the product is negative.

That is why covariance is about joint movement, not just separate variation. In a data table or probability model, you are not asking whether x is large or y is large by itself. You are asking whether the two random variables rise and fall together across outcomes in the sample space.

A quick example makes the sign easier to see. Suppose x is hours studied and y is quiz score. If students who study more usually score higher, the covariance is positive. If x were hours spent on a distracting activity and y were quiz score, the covariance might be negative because more time on x goes with lower y.

Covariance can be any real number, so its size is hard to compare across different variables. A big covariance does not automatically mean a stronger relationship if the variables are measured on bigger scales. That is why Intro to Probability often pairs covariance with correlation later on, since correlation rescales covariance into a standardized number between -1 and 1.

One common mistake is reading covariance = 0 as independence. Zero covariance only says there is no linear relationship. Two variables can still be related in a curved or otherwise non-linear way, so covariance is a first check, not the whole story.

Why cov(x, y) matters in Intro to Probability

cov(x, y) shows up whenever Intro to Probability moves from one random variable to two random variables at the same time. Once you start working with joint distributions, you need a way to describe whether outcomes rise and fall together, and covariance is the standard tool for that.

It also sets up several later ideas. Variance is really the one-variable version of the same deviation-from-the-mean logic, and covariance extends that pattern to pairs of variables. If you can read covariance correctly, you are in a better spot to understand correlation, which standardizes the same relationship so it is easier to compare across datasets.

In problem sets, covariance helps you judge whether two quantities are linked by a positive or negative linear pattern. That shows up in probability tables, distribution questions, and modeling situations where one random variable may help predict another. It is also a basic building block in statistical modeling, where relationships between variables matter more than isolated values.

A lot of confusion comes from the scale issue. Since covariance depends on units, you cannot compare the covariance of exam scores and height to the covariance of exam scores and sleep hours without thinking carefully about measurement. Knowing that limitation keeps you from overreading the number and pushes you to ask the better question, which is what the sign and structure of the relationship actually say.

Keep studying Intro to Probability Unit 11

How cov(x, y) connects across the course

Variance

Variance measures how one random variable spreads around its mean, while covariance measures how two variables vary together around their means. The formulas look similar because covariance is basically the two-variable version of the same deviation idea. If you already understand variance, covariance becomes less mysterious, since you are just multiplying two centered deviations instead of squaring one.

Correlation

Correlation is the standardized form of covariance. It keeps the same sign and direction, but removes the unit problem so values are easier to compare across different datasets. If covariance tells you whether two variables move together, correlation tells you how strongly they do so on a common scale.

Joint Distribution

Covariance depends on the joint distribution of x and y, because it comes from how the pair of variables behaves across all outcomes. You cannot compute or interpret covariance without knowing something about how the variables are paired. Joint distributions give the full picture, and covariance compresses part of that picture into one number.

positive covariance

Positive covariance is the specific case where x and y tend to be above their means at the same time or below their means at the same time. It is the easiest sign to recognize in word problems and data tables. When you see two quantities rise and fall together, you are looking at positive covariance rather than negative covariance.

Is cov(x, y) on the Intro to Probability exam?

A quiz or problem-set question on cov(x, y) usually asks you to calculate it from a table, a probability distribution, or a list of paired values, then interpret the sign. You may need to compute each variable’s mean first, find centered deviations, multiply them, and average the result with probabilities or frequencies.

Sometimes the question is conceptual instead of computational. Then you identify whether the covariance is positive, negative, or zero from a graph or a joint distribution, and explain what that says about the variables moving together. If the relationship is not linear, be careful not to call it independence just because the covariance is near zero.

The safest move is to connect the sign to the story in the problem. If one variable tends to rise when the other rises, say the covariance is positive. If one rises while the other falls, say it is negative. If the prompt asks for comparison across datasets, remember that raw covariance is scale-dependent, so you may need correlation instead.

Cov(x, y) vs Correlation

Covariance and correlation both describe how two variables move together, but they are not the same. Covariance keeps the original units, so its size changes when the scale of x or y changes. Correlation rescales that relationship, which makes it easier to compare strengths across different problems. Use covariance for raw joint movement, and correlation when you need a standardized measure.

Key things to remember about cov(x, y)

  • cov(x, y) measures how two random variables move together around their means.

  • A positive covariance means the variables tend to be high together or low together, while a negative covariance means one tends to be high when the other is low.

  • Covariance can be any real number, so its magnitude depends on the units of x and y.

  • Zero covariance means no linear relationship, but it does not automatically mean independence.

  • In Intro to Probability, covariance is a bridge from single-variable variation to joint behavior in two-variable models.

Frequently asked questions about cov(x, y)

What is cov(x, y) in Intro to Probability?

cov(x, y) is the covariance between two random variables. It measures whether they tend to move together, move in opposite directions, or show no linear tendency. The calculation uses each variable’s distance from its mean, so it focuses on paired variation rather than separate values.

How do you interpret a positive covariance?

A positive covariance means the two variables usually move in the same direction. When x is above its mean, y also tends to be above its mean, and when x is below its mean, y tends to be below its mean. In a probability or data problem, that usually describes a positive linear association.

Does covariance of 0 mean the variables are independent?

No. Covariance equal to 0 only says there is no linear relationship. Two variables can still depend on each other in a curved or more complicated way, so independence is a stronger condition than zero covariance.

How is covariance different from correlation?

Covariance gives the raw direction of a relationship, but it depends on the scale of the variables. Correlation is a standardized version of covariance, so it is easier to compare across datasets and always stays between -1 and 1.