This problem from ISI MStat 2016 is an application of the ideas of indicator and independent variables and covariance of two summative random variables.

## Problem- Covariance Problem

Let \(X_{1}, \ldots, X_{n}\) ~ \(X\) be i.i.d. random variables from a continuous distribution whose density is symmetric around 0. Suppose \(E\left(\left|X\right|\right)=2\) . Define \( Y=\sum_{i=1}^{n} X_{i} \quad \text { and } \quad Z=\sum_{i=1}^{n} 1\left(X_{i}>0\right)\).

Calculate the covariance between \(Y\) and \(Z\).

This problem is from ISI MStat 2016 (Problem #6)

### Prerequisites

- X has Symmetric Distribution around 0 \( \Rightarrow E(X) = 0\).
- \( |X| = X.1( X > 0 ) – X.1( X \leq 0 ) = 2X.1( X > 0 ) – X\), where \(X\) is a random variable.
- \( X_i\) and \(X_j\) are independent \(\Rightarrow\) \(g( X_i)\) and \(f(X_j)\) are independent.
- \(A\) and \(B\) are independent \(\Rightarrow Cov(A,B) = 0\).

## Solution

\( 2 = E(|X|) = E(X.1(X >0)) – E(X.1(X \leq 0)) = E(2X.1( X > 0 )) – E(X) = 2E(X.1( X > 0 ))\)

\( \Rightarrow E(X.1( X > 0 )) = 1 \overset{E(X) = 0}{\Rightarrow} Cov(X, 1( X > 0 )) = 1\).

Let’s calculate the covariance of \(Y\) and \(Z\).

\( Cov(Y, Z) = \sum_{i,j = 1}^{n} Cov( X_i, 1(X_{j}>0))\)

\( = \sum_{i = 1}^{n} Cov( X_i, 1(X_{i}>0)) + \sum_{i,j = 1, i \neq j}^{n} Cov( X_i, 1(X_{j}>0)) \)

\( \overset{X_i \text{&} X_j \text{are independent}}{=} \sum_{i = 1}^{n} Cov( X_i, 1(X_{i}>0)) = \sum_{i = 1}^{n} 1 = n \).

Google