## variance of weighed sum of random variables

For the discussion of math. Duh.

Moderators: gmalivuk, Moderators General, Prelates

>-)
Posts: 527
Joined: Tue Apr 24, 2012 1:10 am UTC

### variance of weighed sum of random variables

how do i find the variance of a weighed sum of random variables?

http://stats.stackexchange.com/question ... -variables

the question in this link suggests it's the sum of the (w_i*std_i)^2 given that correlation is 0

the first answer suggests it's the square of the sum of the (w_i*std_i)

my intuition tells me it's the sum of w_i*std_i^2, since iirc variances linearly add.

what's correct?

arbiteroftruth
Posts: 481
Joined: Wed Sep 21, 2011 3:44 am UTC

### Re: variance of weighed sum of random variables

The variances do linearly add, but the weighting coefficient scales the standard deviation, not the variance. So each variance is effectively weighted by the square of the weighting coefficient, giving you the sum of (w_i*std_i)^2 for the total variance.

>-)
Posts: 527
Joined: Tue Apr 24, 2012 1:10 am UTC

### Re: variance of weighed sum of random variables

let sum = 2*A = A + A

if variances linearly add
var(sum) = var(A) + var(A) = 2*var(A)

but if weights scale standard deviation
std(sum) = std(A) + std(A) = 2*std(A)
var(sum) = sqrt(std(sum)) = sqrt(2)*sqrt(std(A)) = sqrt(2)*var(A)

this is a contradiction though

edit: whoops i see where i messed up now because var(A) + var(A) =/= 2*var(A)
it all makes sense now

arbiteroftruth
Posts: 481
Joined: Wed Sep 21, 2011 3:44 am UTC

### Re: variance of weighed sum of random variables

>-) wrote:edit: whoops i see where i messed up now because var(A) + var(A) =/= 2*var(A)

Well, var(A)+var(A)=2*var(A), since var(A) is just another variable. I think what you mean is that var(A+A) = var(2*A) =/= 2*var(A) = var(A)+var(A). Variances add linearly only with uncorrelated variables, but A is perfectly correlated with itself. It comes out that var(A+A)=4*var(A)

ConMan
Shepherd's Pie?
Posts: 1690
Joined: Tue Jan 01, 2008 11:56 am UTC
Location: Beacon Alpha

### Re: variance of weighed sum of random variables

The addition rule for variances is var(aX + bY) = a² var(X) + b² var(Y) + 2ab cov(X, Y), which you can then extend to an arbitrary number of such variables. So they don't really add linearly, it just looks like it if you're only directly adding two completely uncorrelated variables.
pollywog wrote:
Wikihow wrote:* Smile a lot! Give a gay girl a knowing "Hey, I'm a lesbian too!" smile.
I want to learn this smile, perfect it, and then go around smiling at lesbians and freaking them out.

>-)
Posts: 527
Joined: Tue Apr 24, 2012 1:10 am UTC

### Re: variance of weighed sum of random variables

I just realized what I really needed wasn't what I thought I was looking for here.

What I actually want is the variance of the weighed average of two probability mass functions X and Y. In other words, the variance of the probability mass function Z = aX+bY, given a+b = 1.

I'm not exactly sure what the difference is between this and just the variance of aX + bY but I think there is one.
Suppose X was just 0 with p = 1 and Y was just 1 with p = 1.
The variance of X/2+Y/2 is 0, obviously, but what I want is the variance of Z = {0 with p = 0.5, 1 with p = 0.5}, which is 1/4.

I'm not sure how this can be done. Or even what the name for this is.

I'm willing to make any necessary assumptions about X and Y (normality or whatever else)

Nitrodon
Posts: 497
Joined: Wed Dec 19, 2007 5:11 pm UTC

### Re: variance of weighed sum of random variables

What you're looking for is the variance of a mixture of X and Y.

>-)
Posts: 527
Joined: Tue Apr 24, 2012 1:10 am UTC

### Re: variance of weighed sum of random variables

Thanks, that's the word I was looking for, and http://stats.stackexchange.com/a/16609 gives a nice expression for it.

Return to “Mathematics”

### Who is online

Users browsing this forum: No registered users and 4 guests