Find the mean and the variance of a sum

60 Views Asked by At

Suppose Y_n is distributed (μ_n, σ^2), where the covariance between any pair (m, n) is 0.5*σ^2. Find the mean and the variance of B = sum(n=1 to N) of (k_n*Y_n), where the k_n (n=1 to N) are constants.

--- Not sure whether this is correct, I tried to solve it, but I have serious doubts about it. ---

In case of independence of the two variables Y_n and Y_m,

σ_mn=0 and therefore, σ_mn=0.5*σ^2=0 (is this true?)

The mean (expectation) of B is,

Ε(B)=Ε(∑_(n=1) up to N of (k_n Y_n )=∑_(n=1) up to N (k_n Ε(Y_n))

= ∑_(n=1) up to N of (k_n μ_n )

The variance of B is,

V(B)= Ε([B-Ε(B)]^2 ) = Ε[(∑_(n=1) up to N (k_n Y_n )-∑_(n=1) up to N of (k_n μ_n )^2 ]

= Ε[(∑_(n=1) up to N(k_n (Y_n-μ_n ) ))^2 ]

Looking for a more elegant, correct and detailed solution...

2

There are 2 best solutions below

0
On

Assuming the $y_n$ are elements of a Gaussian vector, that is $$ P(\mathbf{y} ) \propto e^{\mathbf{(y-\mu)}^T\mathbf{\Sigma}^{-1}\mathbf{(y-\mu)}/2 } $$ where $\mathbf{\mu}$ is the vector of mean values and $\mathbf{\Sigma}$ is the covariance matrix, which is equal to $$ \mathbf{\Sigma}= \pmatrix {1&\frac12&\frac12 &\cdots& \frac12 &\frac12\\ \frac12&1&\frac12 &\cdots& \frac12&\frac12\\ \frac12&\frac12 &1&\cdots& \frac12&\frac12\\ \frac12&\frac12&\frac12& \ddots& 1 &\frac12\\ \frac12&\frac12&\frac12&\cdots &\frac12&1 } $$ The the way to do this is to note that you can change variables based on the eigenvectors of $\mathbf{\Sigma}$, which are $$\frac1{\sqrt{N}}\pmatrix{1\\-1\\-1\\ \vdots \\-1\\-1}, \frac1{\sqrt{2}}\pmatrix{1\\1\\0\\ \vdots \\0\\0}, \frac1{\sqrt{2}}\pmatrix{1\\0\\1\\ \vdots \\0\\0}, \cdots, \frac1{\sqrt{2}}\pmatrix{1\\0\\0\\ \vdots \\1\\0}, \frac1{\sqrt{2}}\pmatrix{1\\0\\0\\ \vdots \\0\\1}, $$ to $$ x_1 = \frac1{\sqrt{N}}(y_1 - y_2-y_3-.\cdots-y_N)\\ x_2 = \frac1{\sqrt{2}}(y_1-y_2)\\ x_3 = \frac1{\sqrt{2}}(y_1-y_3)\\ \vdots\\ x_N = \frac1{\sqrt{2}}(y_1-y_N)\\ $$ These new variables are independent, and have $\sigma^2$ equal to the corresponding eigenvalues of $\mathbf{\Sigma}$ which are respectively $$ (\frac{N+1}{2}, \frac12,\frac12, \cdots \frac12$$

So the variance of the sum is $$ \sigma^2 = \frac{N+1}{2}+ (N-1) \frac12 = N $$ The mean of the sum is, of course, the sum of the means.

0
On

The random variable $B = \sum_{n=1}^Nk_nY_n$ is a linear combination of Guassian random variables. Its mean is given by $$E[B] = \sum_{n=1}^Nk_nE[Y_n] = \sum_{n=1}^Nk_n\mu_n.$$ And its variance is \begin{align*} & \text{Var}[B] = \text{Cov}(B, B) \\ = & \sum_{i=1}^N\sum_{j=1}^Nk_ik_j\text{Cov}(Y_i,Y_j). \end{align*} From your first assumption, $\text{Cov}(Y_i,Y_j) = \sigma^2(1+\delta_{ij})/2,$ thus $$\text{Var}[B] = \sum_{i=1}^N\sum_{j=1}^N\sigma^2k_ik_j(1+\delta_{ij})/2 = \sum_{i=1}^N\sum_{j=1}^N\sigma^2k_ik_j/2 + \sum_{i=1}^N\sigma^2k_i^2/2.$$ For the case where $Y_n$ and $Y_m$ are independent $(n \ne m)$, $\text{Cov}(Y_i,Y_j) = \sigma^2\delta_{ij}$, then $$\text{Var}[B] = \sigma^2\sum_{i=1}^Nk_i^2.$$