μX=x1p1+x2p2+⋯
σ2X=(x1-μX)2p1+(x2-μX)2p2+⋯
The means and variances of random variables obey the following rules. If a and b are fixed numbers, then
μa+bX=a+bμXσ2a+bX=b2σ2X
If X and Y are any two random variables having correlation ρ, then
μX+Y=μX+μYμX-Y=μX-μYσ2X+Y=σ2X+σ2Y+2ρσXσYσ2X-Y=σ2X+σ2Y-2ρσXσY
If X and Y are independent, then ρ=0. In this case,
σ2X+Y=σ2X+σ2Yσ2X-Y=σ2X+σ2Y