[R] Tail area of sum of Chi-square variables

Peter Dalgaard P.Dalgaard at biostat.ku.dk
Thu Mar 29 15:37:46 CEST 2007


S Ellison wrote:
>> I was wondering if there are any R functions that give the tail area
>> of a sum of chisquare distributions of the type:
>>         a_1 X_1 + a_2 X_2
>> where a_1 and a_2 are constants and X_1 and X_2 are independent 
>> chi-square variables with different degrees of freedom.
>>     
>
> You might also check out Welch and Satterthwaite's (separate) papers on effective degrees of freedom for compound estimates of variance, which led to a thing called the welch-satterthwaite equation by one (more or less notorious, but widely used) document called the ISO Guide to Expression of Uncertainty in Measurement (ISO, 1995). The original papers are
> B. L. Welch, J. Royal Stat. Soc. Suppl.(1936)  3 29-48
> B. L. Welch, Biometrika, (1938) 29 350-362
> B. L. Welch, Biometrika, (1947) 34 28-35
>
> F. E. Satterthwaite, Psychometrika (1941) 6 309-316
> F. E. Satterthwaite, Biometrics Bulletin, (1946) 2 part 6 110-114
>
> The W-S equation - which I believe is a special case of Welch's somewhat more general treatment - says that if you have multiple independent estimated variances v[i] (could be more or less equivalent to your a_i X_i?) with degrees of freedom nu[i], the distribution of their sum is approximately a scaled chi-squared distribution with effective degrees of freedom nu.effective given by
>
> nu.effective =  sum(v[i])^2 / sum(    (v[i]^2)/nu[i]     )
>
> If I recall correctly, with an observed variance s^2 (corresponding to the sum(v[i] above if those are observed varianes), nu*(s^2 /sigma^2) is distributed as chi-squared with degrees of freedom nu, so the scaling factor for quantiles would come out of there (depending whether you're after the tail areas for s^2 given sigma^2 or for a confidence interval for sigma^2 given s^2)
>
> However, I will be most interested to see what a more exact calculation provides!
>   

I believe this is also in Box, 1954, in the guise of sums of squares
under heteroscedsticity and correlation.

@Article{box54ptI,
  author =       {G. E. P. Box},
  title =        {Some Theorems on Quadratic Forms Applied in the
                  Study of Analysis of Variance Problems, I. Effect of
                  Inequality of Variance in the One-Way
                  Classification},
  journal =      {Annals of Mathematical Statistics},
  year =         1954,
  volume =       25,
  number =       2,
  pages =        {290-302}
}

IIRC (I seem to have temporarily misplaced the actual paper...), there
is a trick by which the characteristic function of a linear combination
of chi-squared variables can be expanded in a  (weighted) _sum_ of
chisquare characteristic functions, which gives you an exact expression
for the density and CDF.   

> Steve Ellison
>
>
> *******************************************************************
> This email and any attachments are confidential. Any use, co...{{dropped}}
>
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>   


-- 
   O__  ---- Peter Dalgaard             Øster Farimagsgade 5, Entr.B
  c/ /'_ --- Dept. of Biostatistics     PO Box 2099, 1014 Cph. K
 (*) \(*) -- University of Copenhagen   Denmark          Ph:  (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)                  FAX: (+45) 35327907



More information about the R-help mailing list