Questions tagged [covariance]

Questions about covariance, a measure of (linear) association between two random variables.

Covariance is a measure which shows how much two RVs are dependent. If they are fully independent it would be zero and as much as they are dependent it would have a greater value. You can have a much powerful insight by description of the following formula:

The covariance of the random variables $X$ and $Y$ is the difference of the Expected value of their product ($E(XY)$) by the product of their expected values ($E(X)E(Y)$).

\begin{align*} \sigma(X,Y) = E(XY)-E(X)E(Y) \end{align*}

If they are independent then $E(XY)=E(X)E(Y)$ and therefore the covariance would be zero. Also, as much as they depend on each other their distance would be higher.

Though the main formula for definition of co-variance is \begin{align*} \sigma(X,Y) = E \left[ \left(X-E(X)\right) \left(Y-E(Y)\right) \right] \end{align*}

we can convert it to the pre-explained one (for the finite-domain random variables):

\begin{align*} \sigma(X,Y) &= E \left[ \left(X-E(X)\right) \left(Y-E(Y)\right) \right] \\\ &= E \left[ X Y - X E(Y) - E(X) Y + E(X) E(Y) \right]\\\ &= E (X Y) - E(X) E(Y) - E(X) E(Y) + E(X) E(Y) \\\ &= E (X Y) - E(X) E(Y) \end{align*}

Also, for two vectors of random variables ($\mathbb{X}$ and $\mathbb{Y}$) the covariance matrix has been defined as a matrix which each cell shows the covariance of corresponding cell in the matrix ($\mathbb{X} \times \mathbb{Y}^T$).

Reference:

2065 questions
6
votes
1 answer

Is cov(x,y) and cov(y,x) the same thing?

I am learning the concepts of covariance and covariance matrix. It seems to me that: Cov(x, y) = E((x - E(x))(y-E(y))) = E((y-E(y))(x-E(x))) = Cov(y,x) Is that the case? If so, why do we need to write them in two different formats in the Cov…
Lance Shi
  • 175
2
votes
0 answers

Development of a covariance

I have to compute a covariance. But I have some difficulties. My covariance has the following shape…
Lizzi
  • 21
2
votes
1 answer

Covariant and contravariant components of vectors

I am struggling with the covariance and contravariance of vectors. In my physics classes, the professor explained that if covariant components transform with a certain matrix, then contravariant components transform with its inverse. However, I find…
fresh
  • 331
  • 1
  • 10
2
votes
0 answers

The covariance between sum of random variables and maximum of random variables

Let $X_1,\ldots,X_n,\; n\ge1$ — independent random variables $U(0,1),$ $S_n=\sum_{i=1}^n X_i,$ $Z_n=\max(X_1,\ldots,X_n).$ Calculate $\mathrm{cov}(S_n,Z_n).$ Solution: $\mathrm{cov}(S_n,Z_n)=\mathrm E(S_nZ_n)-\mathrm ES_n \mathrm EZ_n,$ $\mathrm…
2
votes
1 answer

Covariance Question

$X$ and $Y$ are two independent variables, with variances $\sigma^2_x$ and $\sigma^2_y$ respectively. Two other variables $W$ and $V$ are defined by $W=X+Y$ and $V=X-Y$. Find $Cov(X,V)$ and $Cov(W,V)$
2
votes
2 answers

Find the covariance of $X$ and $Y$ given $Z = 3x - 2y$ and the standard deviation of $x, y$ and $z$.

This is the exact problem: Suppose that $X, Y$ are random variables with $Sx =2, Sy = 3$. Let $Z = 3X - 2Y$, and assume that $Sz = 6$. Find the covariance, $\text{cov}(X, Y)$. I have equations for covariance but they involve the means of $X$ and…
wakey
  • 121
1
vote
1 answer

Variance changes proof

I have, say a vector of data, A of size(N*1). How do I prove or disprove: if some of the data in A, say A(1:N/2), their variance becomes large, the whole vector A's variance becomes larger? That is to ask, if a subset of population's variance…
Grace
  • 11
1
vote
1 answer

Finding Error with many Cartesian coordinate values

I have around 1000 values for a gps receiver position like follows: All of these values represent the SAME POINT. want to find error in values? What I am doing right now is that I am finding cartesian distance between the actual value and the mean…
orange14
  • 553
1
vote
0 answers

Covariance of $X$, $Y^2$?

I have an expression in terms of the empirical covariance of $(X,Y)$, where X and Y are two variables in some data that I have. I want to be able to say what happens to this expression as a function of the covariance of $(X,Y^2)$. Anyone have any…
chasmani
  • 133
1
vote
1 answer

(Basic) Confusion about usage of covariance formula

What is the intuition behind this expected covariance formula? Why we do not use the first one (first line) and we use the last one. E[X] and E[Y] are means and easy to find. Why we derive the last equation. I do not get the idea.
Mas A
  • 109
  • 5
1
vote
1 answer

How to calculate the covariance matrix?

This is the equation given to me in the lectures, which doesn't make sense to me when I think about it. The $x_n$ are D dimensional vectors for D features. So subtracting the mean will again result in a vector. Then taking the transpose…
1
vote
0 answers

Show that $\text{Cov}(\mu_X+X,\mu_Y+Y)=\text{Cov}(X,Y)$

I have a problem in my textbook: Show that $\text{Cov}(\mu_X+X,\mu_Y+Y)=\text{Cov}(X,Y)$ for all deterministic $\mu_X,\mu_Y$ of the appropriate size. My…
user926287
1
vote
1 answer

Show that $\text{Cov}(X,Y)=(\text{Cov}(Y,X))^T$

I have a problem in my textbook: Show that $\text{Cov}(X,Y)=(\text{Cov}(Y,X))^T$ My approach: We have that $\text{Cov}(X,Y) =…
user895986
1
vote
0 answers

Formula wrong for calculating covariance matrix

This article Mean Vector and Covariance Matrix explains the calculation of Covariance Matrix for this input data: \begin{equation*} X = \begin{bmatrix} 4.0 & 2.0 & 0.60 \\ 4.2 & 2.1 & 0.59 \\ 3.9 & 2.0 & 0.58 \\ 4.3 & 2.1 & 0.62 \\ 4.1 & 2.2 &…
hello.wjx
  • 111
1
vote
1 answer

What is the Cov(A,B)?

I am working on a problem: $Y = A+B+C$. I know that $Cov(A,B+C)=0$,$Cov(B,C)=0$, $E(B)=0$ and $E(C)=0$. Can I get the $Cov(A,B)=0$? Now I can only get $Cov(A,B)=-Cov(A,C)$. But it seems to be intuitive that both $Cov(A,B)$ and $Cov(A,C)$ should be…
1
2 3 4 5