# Differentiating the variance.

• Oct 29th 2010, 07:17 AM
frog
Differentiating the variance.
I have a problem that involves differentiating the variance of a function in a lagrange multiplier problem!

I know that there are Summation terms in the variance....http://upload.wikimedia.org/math/c/e...23d885104a.png

what i don't know is what happens after you differentiate this with respect to ai??

It will still have summations and im wondering how you can get the value of what ai is equal to in the equation.....i.e something that would resemble an inner product.....

Any help would be greatly appreciated!!
• Oct 29th 2010, 11:56 PM
CaptainBlack
Quote:

Originally Posted by frog
I have a problem that involves differentiating the variance of a function in a lagrange multiplier problem!

I know that there are Summation terms in the variance....http://upload.wikimedia.org/math/c/e...23d885104a.png

what i don't know is what happens after you differentiate this with respect to ai??

Well, you can't differentiate with respect to $\displaystyle $$a_i because \displaystyle$$ i$ is a dummy index of summation, you have to differentiate with respect to a specific $\displaystyle $$a_k, and you might as well make it \displaystyle$$ a_1$ to be specific.

CB
• Oct 30th 2010, 09:05 AM
frog
Ok so if i set i = 1 am I also able to set j = 1?

So in the second summation i would effectively have 2a*the covariance?

which when differentiated would give me 2*the covariance?

Thanks so far(Nod)
• Oct 30th 2010, 02:40 PM
CaptainBlack
Quote:

Originally Posted by frog
Ok so if i set i = 1 am I also able to set j = 1?

So in the second summation i would effectively have 2a*the covariance?

which when differentiated would give me 2*the covariance?

Thanks so far(Nod)

$\displaystyle \displaystyle \text{Var}\left( \sum_{i=1}^n a_iX_i \right)= \sum_{i=1}^n a_i^2 \text{Var}(X_i)+2 \sum_{j\ne 1} a_1a_j\text{Cov}(X_1,X_j) +\text{terms independent of}\ a_1$

so differentiating wrt $\displaystyle$$a_1$:

$\displaystyle \displaystyle \dfrac{\partial}{\partial a_1}\text{Var}\left( \sum_{i=1}^n a_iX_i \right)=2a_1\text{Var}(X_1)+2 \sum_{j\ne 1} a_j\text{Cov}(X_1,X_j)$

so appealing to symmetry we can conclude:

$\displaystyle \displaystyle \dfrac{\partial}{\partial a_k}\text{Var}\left( \sum_{i=1}^n a_iX_i \right)=2a_k\text{Var}(X_k)+2 \sum_{j\ne k} a_j\text{Cov}(X_k,X_j)$

CB