# Thread: Calculating variance of u_n - u_2n

1. ## Calculating variance of u_n - u_2n

Let u_n = (sum_(k=1,n) X_k)/n where X_i is an numerical observation of a random variable with density function f.

Similarily let u_2n = (sum_(k=1,2n) X_k)/2n where again X_i is an observation of a random variable with same density function f

Determine the value of E( (u_n - u_2n)^2 ) where 'E' represents the expected value.

2. Hello,

Let's assume that $X_i$ and $X_j$ are independent $\forall \ i \neq j$. If it is not, tell me and throw my solution in the bin

This implies that $\text{cov}(X_i,X_j)=0$ (it will be used later)

$u_n=\frac{\sum_{k=1}^n X_k}{n}$

$u_{2n}=\frac{\sum_{k=1}^{2n} X_k}{2n}$

Therefore $u_n-u_{2n}=\frac{\sum_{k=1}^n X_k}{n}-\frac{\sum_{k=1}^{2n} X_k}{2n}=\frac{\sum_{k=1}^n 2X_k-\sum_{k=1}^{2n} X_k}{2n}$

$u_n-u_{2n}=\frac{1}{2n} \left(\sum_{k=1}^n X_k-\sum_{k=n+1}^{2n} X_k\right)$

-----------------------------
Properties of the variance :

$\text{var}(aX)=a^2 \text{var}(X)$, where a is a constant.

$\text{var}(X+Y)=\text{var}(X)+\text{var}(Y)+2 \text{cov}(X,Y)$
-----------------------------

Since the covariance between any $X_i$ and $X_j$ is 0, we can write :

$\text{var}(u_n-u_{2n})=\frac{1}{4n^2} \cdot \left(\sum_{k=1}^{n} \text{var}(X_k)+\sum_{k=n+1}^{2n} (-1)^2 \text{var}(X_k)\right)$

$\text{var}(u_n-u_{2n})=\frac{1}{4n^2} \cdot \sum_{k=1}^{2n} \text{var}(X_k)=\frac{1}{4n^2} \cdot \left(2n \cdot \text{var}(X_i)\right)$

$\boxed{\text{var}(u_n-u_{2n})=\frac{\text{var}(X_i)}{2n}}$

I hope I have not mistaken somewhere...

3. Moo

Yes there is a mistake somewhere but its my fault for not clarifying in my initial thread.

Every single one of the X_i in the second sum (from 1 to 2n ) is different from those in the first sum of X_i (ie its not just the second half from n + 1 to 2n which are different).

I hope this helps.