Sums of Radom Varables xpected Values ad Varaces of Sums ad Averages of Radom Varables The expected value of a sum of radom varables, say S, s the sum of the expected values: ( ) ( ) S Ths s always true (as log as the s have expected values). The s do ot have to be depedet,... or to have the same dstrbuto,... or to have the same expected values,... or aythg. For example, f has mea µ ad has mea µ the ( + ) µ + µ ad ( - ) µ - µ Authors: Blume, Greevy Bos 3 Lecture Notes Page of 5
Sums of Radom Varables O the other had, The varace of a sum of depedet radom varables, S s the sum of the varaces: Var S ( ) Var Var( ) For example, f has varace ad has varace ad ad are depedet, the Var( + ) + ad Var( - ) + Why? Authors: Blume, Greevy Bos 3 Lecture Notes Page of 5
Sums of Radom Varables If,,..., are depedet radom varables wth commo mea µ ad varace,, the for ther sum, S, ( ) S µ Var ( S ) ad ther average, S, Var ( ) ( ) µ Why? The varace of the mea from a sample of sze (.e., observatos o depedet radom varables, all wth the same probablty dstrbuto) s / tmes the varace of a sgle observato. Authors: Blume, Greevy Bos 3 Lecture Notes Page 3 of 5
Sums of Radom Varables The stadard devato of the mea,, s / SD ( ) NOTIC: May wrters use the term "stadard devato" to refer to the square root of the varace for a sgle observato oly (say ). For a mea,, they call the square root of the varace the "stadard error." (say / ) That s, they call the stadard devato of the "stadard error." It equals / whch ame s used., regardless of ( ) SD s the stadard devato SD ( ) s the stadard rror Authors: Blume, Greevy Bos 3 Lecture Notes Page 4 of 5
Sums of Radom Varables Questo: If ad Y,,..., m all have mea µ x ad varace x,,,..., all have mea ad varace Y Y µ y y, ad f all of the s ad Ys are depedet, the what s the mea, varace, ad stadard devato of m Y? Aswer: ( m Y ) µ x µ y Var( m Y )Var( m ) + Var( Y ) x m + y SD( m Y ) x m + y. Why? Authors: Blume, Greevy Bos 3 Lecture Notes Page 5 of 5
Sums of Radom Varables Sums ad Averages of Normal Radom Varables The above facts about expected values ad varaces of radom varables are true for all probablty dstrbutos. Addtoally, there are two very mportat facts that are specfc to ormally dstrbuted radom varables. These are () If ~ ormal (µ, ), the a + b Q ~ ormal ( aµ+b, a ) The mea ad varace of the trasformed radom varable Q are just what we kow they must be. What s ew () s that the dstrbuto of Q s also ormal wth that mea ad varace. Authors: Blume, Greevy Bos 3 Lecture Notes Page 6 of 5
Sums of Radom Varables () If ad Y are ormal R.V.s, the so s ther sum, + Y. So: If Q+Y the Q ~ N( ()+(Y), Var(+Y) ) Note that so far, we ca oly calculate Var(+Y) whe ad Y are depedet. Nevertheless () holds eve f ad Y are ot depedet. Although we wll ot prove umber () t s especally mportat because t tells us that the dstrbuto of the sample average of ormal RVs s tself ormal. So whe we have ormal radom varables,,,...,, ther sum ad average must also have a ormal dstrbuto. Ad whe the s ad Ys are ormal, the dfferece betwee the averages, Y, also has a ormal dstrbuto. Authors: Blume, Greevy Bos 3 Lecture Notes Page 7 of 5
Sums of Radom Varables Authors: Blume, Greevy Bos 3 Lecture Notes Page 8 of 5 xample If,,, are..d. N(µ, ) ad the () ( ) ( ) µ Justfcato: property of expected values () ( ) ( ) Var Var Var Justfcato: property of varaces for depedet RVs (3) ( ) ( ),, ~ Var N N µ Justfcato: umbers () ad () above, sum of ormal RVs s also ormal.
Sums of Radom Varables Revew For ay costats, a ad b, ( a + b ) a( ) + b Var( a + b ) a Var( ) If,,..., are depedet radom varables that have the same dstrbuto wth () ad Var(), the for the average, /, ( ) ( ) Var( ) Var() S( ) Var() Ths s true regardless of what probablty dstrbuto has ( Bomal, Normal, etc. ). Authors: Blume, Greevy Bos 3 Lecture Notes Page 9 of 5
Sums of Radom Varables For example, f has the Beroull(θ) dstrbuto (whose mea ad varace are θ ad θ(-θ) ), the ( )θ Var( ) θ ( θ ) / S( ) θ ( θ ) / I words, these last three results are: () The mea ( or average ),, of a sample of sze has the same expected value as a sgle observato. () The mea of a sample of sze,, has a varace, Var ( ), that s / tmes the varace of a sgle observato. (3) The mea of a sample of sze,, has a stadard devato (or stadard error), ) that s / tmes the stadard devato of a sgle observato. S(, Authors: Blume, Greevy Bos 3 Lecture Notes Page 0 of 5
Sums of Radom Varables Covarace ad Correlato Whe two Radom Varables, say ad Y, are ot depedet we ca measure ther depedece by assessg ther covarace. Cov (, Y ) [( ( ))( Y ( Y ))] Cov (, ) Var ( ) The covarace measures the stregth of the lear relatoshp betwee ad Y. It s drectly related to a more famlar measure of depedece called the correlato betwee ad Y: Corr (, Y ) Cov(, Y ) Var( ) Var( Y ) ad Corr (, Y ) Smply put, correlato s scaled covarace. They are the same measure but o dfferet scales. Authors: Blume, Greevy Bos 3 Lecture Notes Page of 5
Sums of Radom Varables Covarace s mportat because t allows us to accout for the depedece betwee radom varables. For ay two Radom Varables, ad Y, ( + Y ) Var ( ) + Var ( Y ) Cov (, Y ) Var + Var ( Y ) Var ( ) + Var ( Y ) Cov (, Y ) Ths s always true (as log as the s have expected values). The s do ot have to be depedet,... or to have the same dstrbuto,... or to have the same expected values,... or aythg. Importat Note: It s always true that f two RVs are depedet, the ther covarace s ZRO ad so s ther correlato. (If depedet Y the Cov(,Y)0). However, the reverse s ot true!! That s, zero covarace or zero correlato does ot mply that two varables are depedet. Authors: Blume, Greevy Bos 3 Lecture Notes Page of 5
Sums of Radom Varables Just lke expected values ad varaces there are some geeral rules for calculatg the covarace. For ay costats a,b,c,d, ad RV s ad Y: Cov ( a + c, by + d ) abcov (, Y ) ad for RV s,y,z,w Cov ( + W, Y + Z ) Cov (, Y ) + Cov (, Z ) + Cov ( W, Y ) + Cov ( W, Z ) xample: Suppose we have two samples,,,..d. (depedet detcally dstrbuted) ad Y, Y,,Y..d. wth Cov(,Y )ρ x y. The Cov ( ), Y Cov, Y j Cov, Y j j j (, Y ) Cov( Y ) ρ Y Cov j, j What s a cosequece of the fal result? Authors: Blume, Greevy Bos 3 Lecture Notes Page 3 of 5
Sums of Radom Varables We ve prove, but ca we show t? R xample: # Geerate a lot of data wth r 0.8 ad var (,) covarace matrx( c(,0.8,0.8,), row ) lbrary(mass) mvrorm(0^6, c(0,0), covarace) # a ce cosequece of usg var(,) s cov cor roud( cov(), ) roud( cor(), ) # loot at t (ths wll take a whle to plot) plot() # Take the mea over N 00 N 00 a rep( :(0^6/N), N ) # to help get the meas Y aggregate(, bylst(a), FUNmea) Y Y[,:3] # drop the aggregatg varable, a # Before rug, what does our math say # the cov ad cor should be? optos(scpe0) # prevet scetfc otato roud( cov(y), 3 ) roud( cor(y), 3 ) # look at t plot(y) Authors: Blume, Greevy Bos 3 Lecture Notes Page 4 of 5
Sums of Radom Varables # look at t aga o the same scale # as the orgal data, plottg over that data lmts c( m(), max() ) plot(, xlmlmts, ylmlmts ) par(ewt) # plot o top of the exstg plot plot(y, xlmlmts, ylmlmts, col'orage', xlab'', ylab'' ) Authors: Blume, Greevy Bos 3 Lecture Notes Page 5 of 5