# Math Help - subtraction of normal distributed stochastic variables

1. ## subtraction of normal distributed stochastic variables

hello
if we have set of stochastic variables representing the random time it takes to do something: X,Y,Z,W and C where C is the sum of X Y Z W, thus the time it takes to do these things in sequence. If:
X: N(30,5)
Y: N(30,3)
Z: N(20,2)
W: N(40,7)

makes C adding these together right, mean plus mean and std dev + std dev?
C: N(30+30+20+40,5+3+2+7)=N(120,17) is this correct?

subtraction is analogically, assuming we want to subtract W from C, naming it S we get:
S: N(120-40,17-7)=N(80,10)

is this also correct?

would these operations also work for lognormally distributions?

edit: it seems like, in the case when the variables are independent, that the std deviation is ADDED also when subtracting. but i dont think these variables are independent. if they are not independent. is adding and subtraction of means same as before? here is adding std dev when they are dependent but it only explains the addition not subtraction

to simplify my question. will variation(std dev) be reduced to any extend if subtracting a dependent random variable from a sum of random dependent variables?

2. NO, what if you subtract the other way? Would that give you a negative variance?

If they aren't independent, then you need to know the covariance.

$V(X+Y)=V(X)+V(Y)+2Cov(X,Y)$

while

$V(X-Y)=V(X)+V(Y)-2Cov(X,Y)$

Thus, if you have independence, then $V(X+Y)=V(X-Y)=V(X)+V(Y)$

And this have nothing to do with normality or any other underlying distribution.

3. Originally Posted by matheagle
NO, what if you subtract the other way? Would that give you a negative variance?

If they aren't independent, then you need to know the covariance.

$V(X+Y)=V(X)+V(Y)+2Cov(X,Y)$

while

$V(X-Y)=V(X)+V(Y)-2Cov(X,Y)$

Thus, if you have independence, then $V(X+Y)=V(X-Y)=V(X)+V(Y)$

And this have nothing to do with normality or any other underlying distribution.
thank you but...
this doesnt make sense to me. assume first do tasks X Y Z in a row many times over, the times will be distributed as X+Y+Z=N(80,10). then you do X Y Z W in a row many times, this is distributed as C: N(120,17). then you go back doing X Y Z again (basically subtracting W) then we get N(80,17+7=24)?!?!? even though we're doing the same thing as before we get larger variation than last time? it would be reasonable that going back to doing sequence X Y Z would again generate the same distribution as the first time N(80,10)

anyway another question
covariance variates between 0 to 1 right. and 0 is when they are independent and 1 when they are dependent? is that right? this means that when subtracting to totally dependent random variables will you get the smallest increase in variation?

assuming variance V1=5 V2=3 and dependence 1
subtracting them : 5+3-2*1=6 correct? std dev is sqrt(6)

but basically subtracting random variables will always lead to an increase in variation?

4. CORRELATION is between -1 and 1.
Covariance can be anything.
INDEPENDENCE implies corr=cov=0.
The opposite is true ONLY when you have normality

5. Originally Posted by matheagle
CORRELATION is between -1 and 1.
Covariance can be anything.
INDEPENDENCE implies corr=cov=0.
The opposite is true ONLY when you have normality

ok. but the answer is yes to the question that
X+Y+Z generates std dev 10
but X+Y+Z+W-W=X+Y+Z generates std dev 24??

assuming independence

edit: think like this....
you have a washing machine and a drying machine, the time they take for doing a batch can be represented by a stochastic variable that are normally distributed and independent of each other.
time it takes to wash your clothes Normaldist 45min std dev 5min
time it takes to dry the clothes Normaldist 50min std dev 10min

time it takes to wash and dry the clothes N(45+50,5+10)

then if we want to subtract the time it takes to dry the clothes again we get N(45+50-50,5+10+5)=
N(45,20) this does not make sense, why would it suddenly be more variation when washing the clothes? we use the same washing machine as before. The thing here is that washing and drying are separate processes in a sequence and they are not mixed together. you get my point?