Distributios of Fuctios of Normal Radom Variables Versio 27 Ja 2004 The Uit or Stadard) Normal The uit or stadard ormal radom variable U is a ormally distributed variable with mea zero ad variace oe, i. e. U N0, 1). Note that if x Nµ, σ 2 ) that x µ σ U N0, 1) 1) Thus to simulate a ormal radom variable with mea µ ad variace σ 2, we ca simply trasform uit ormals, as x µ + σu Nµ, σ 2 ) 2) Cosider idepedet radom variables x i Nµ, σ 2 ), the x Nµ, σ 2 /), ad this x µ σ/ U N0, 1) 3) Example 1. Let s costruct a 95% cofidece iterval for the mea µ for Equatio 3). First, let s use R to compute a value U 0.975 such that PrU U 0.975 )= 0.975. IR, typig the commad qorm0.975) returs 1.96. Likewise, qorm0.025) returs -1.96 ad hece PrU 1.96)=0.025. Hece, Recallig Equatio 3), Rearragig gives Pr 1.96 U 1.96)=0.95 Pr 1.96 U 1.96) = Pr 1.96 x µ ) σ/ 1.96 Pr 1.96σ/ x µ 1.96σ/ ) or Pr x 1.96σ/ µ x+1.96σ/ )
2 Fuctios of Normal Radom Variables which ca also be writte as Pr x 1.96σ/ µ x +1.96σ/ ) =0.95 givig a 95% cofidece iterval for the mea µ. Cetral ad Nocetral χ 2 Distributios The χ 2 distributio arises from sums of squared, ormally distributed, radom variables if x i N0, 1), the u = x2 i χ2,acetral χ 2 distributio with degrees of freedom. It follows that the sum of two χ 2 radom variables is also χ 2 distributed, so that if u χ 2 ad v χ 2 m, the u + v χ 2 +m) 4a) Two other useful results are that if x i N0,σ 2 ), the x 2 i σ 2 χ 2 4b) ad for x = 1 x i, x i x ) 2 σ 2 χ 2 1) 4c) I this last case, subtractio of the mea causes the loss of oe degree of freedom. Note that a special case of Equatio 4c) is the sample estimate of the variace, so that Varx)= 1 1 x i x ) 2 1)Varx) σ 2 χ 2, implyig 1)Varx) σ 2 χ 2 4d) Example 2. We ca use Equatio 4d) to costruct a cofidece iterval o the true variace σ 2 give the sample variace Varx), provided the x i are draw from idepedet ormals with the same mea ad variace σ 2.
Fuctios of Normal Radom Variables 3 First, recall that the R commad qchisqp,df) returs a value X such that Prχ 2 df X )=p. Suppose sample size is =20. Sice qchisq0.975,19) returs a value of 32.85 ad qchisq0.025,19) returs 8.91, we have Pr8.91 χ 2 19 32.85)=0.95 From Equatio 4d, ) Pr8.91 χ 2 1)Varx) 19 32.85)=Pr 8.91 σ 2 32.85 Notig that for 1 Pra x b) =Pr a 1 ) x 1 b we have Pr 8.91 19Varx) ) 1 σ 2 32.85 =Pr 8.91 σ 2 19Varx) 1 ) 32.85 or or 19Var Pr 8.91 σ2 19Var ) =0.95 32.85 Pr 2.13Var σ 2 0.58Var ) =0.95 givig the 95% cofidece iterval o the variace as 0.58Var to 2.13Var. A ocetral χ 2 arises whe the radom variables beig cosidered have ozero meas. I particular, if x i Nµ i, 1), the u = x2 i follows a ocetral χ 2 distributio with degrees of freedom ad ocetrality parameter λ = µ 2 i 5a) ad we write u χ 2,λ. As show i Figure 1, icreasig the ocetrality parameter λ shifts the distributio to the right. This is also see by cosiderig the mea ad variace of u, Eu) =+λ ad σ 2 u) =2+2λ) 5b)
4 Fuctios of Normal Radom Variables λ = 0 λ = 1 λ = 5 0 5 10 15 20 25 Figure 1 The probability distributio fuctio for a ocetral χ 2.Asthe ocetrality parameter λ icreases, the distributio is pulled to the right. We plot here a χ 2 radom variable with = 5 degrees of freedom ad ocetrality parameters λ = 0 a cetral χ 2 ), 1, ad 5. It follows directly from the defiitio that sums of ocetral χ 2 variables also follows a ocetral χ 2 distributio, so that if u χ 2, λ 1 ad v χ 2 m, λ 2, the u + v) χ 2 +m),λ 1+λ 2) 5c) Fially, Equatios 4b,c ca be geeralized to ocetral χ 2 radom variables as follows. Suppose x i Nµ i,σ 2 ), the x 2 i σ 2 χ 2,λ where λ = µ 2 i σ 2 5d) Turig the distributio of x i x ) 2, defiig the λ = µ i µ ) 2 σ 2, where µ = 1 x 2 i x ) 2 σ 2 χ 2,λ 5e) Note that if all the x i have the same mea µ i = µ = µ ), λ =0ad the χ 2 is cetral, while if there is some variace i the meas of the x i, the distributio is a ocetral χ 2. R provides commads for quatities of iterest with ocetral χ 2 distributios. qchisqp,df,cp) returs a value X such that Prχ 2 df,cp X) =p µ i
Fuctios of Normal Radom Variables 5 pchisqx,df,cp) returs the probability that Prχ 2 df,cp X) leavig out the field for cp returs these values for a cetral χ 2. Studet s t Distributio If x Nµ, σ 2 ), the for Equatio 2, we have x µ)/σ/ ) N0, 1), which allows for both hypothesis testig ad costructio of cofidece itervals whe σ 2 is kow. Whe the variace is ukow, the above test statistic replaces the true but ukow) variace σ 2 with the sample variace Varx), t = x µ 6) Var/ Notice that t = ) ) x µ σ/ 1 = Var/σ 2 U χ 2 1 / 1) Thus, we defie a t distributed radom variable with ν degrees of freedom by U t ν = 7a) χ 2 ν /ν) A t radom variable has mea zero ad variace σ 2 t ν )=1+ 2 for ν>2 7b) ν 2 The coefficiet of kurtosis is k 4 =6/ν 4), implyig that the t distributio has heavier tails tha a ormal. The ocetral Studet s t distributio is defied as follows: If x Nµ o,σ 2 ), but we assume the correct mea is µ, the t ν,λ = x µ Var/ is distributed as a ocetral t radom variable with 1 degrees of freedom ad ocetrality parameter λ =µ µ 0 )/σ. Cetral ad Nocetral F Distributios The ratio of two χ 2 -distributed variables leads to the F distributio. I particular, if u χ 2 ad v χ 2 m, the the ratio of these two χ 2 variables divided by their respective degrees of freedom follows a cetral F distributio/ with umerator ad deomiator degrees of freedom ad m respectively), i.e., u/)/v/m) F,m. Sice lim m F,m χ2
6 Fuctios of Normal Radom Variables the F distributio ca be approximated by a χ 2 whe the deomiator degrees of freedom is large. R provides commads for quatities of iterest for F distributios. qfp,df1,df2) returs a value X such that PrF df 1,df2 X) =p pfx,df1,df2) returs the probability that PrF df 1,df2 X) The ocetral F distributio results whe the umerator χ 2 variable is ocetral. If u χ 2,λ ad v χ2 m, the F =u/)/v/m) follows a ocetral F distributed with ocetrality parameter λ, ad we write F F,m,λ. As with the ocetral χ 2, icreasig λ shifts the distributio further to the right. Agai, this is see i the mea ad variace, with EF )= m m 2 1+ 2λ ) m ) [ 2 +m) σ 2 2 ++2λ)m 2) F )=2 m 2) 2 m 4) ] A5.16a) A5.16b) R provides commads for quatities of iterest for ocetral F distributios. pfx,df1,df2,cp) returs the probability that PrF df 1,df2,cp X) the obvious commad qfp,df1,df2,cp) does ot work, as the same value is retured for all values of cp.