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

Thomas Lumley tlumley at u.washington.edu
Thu Mar 29 16:45:15 CEST 2007


The Satterthwaite approximation is surprisingly good, especially in the 
most interesting range in the right tail (say 0.9 to 0.999). There is also 
another, better, approximation with a power of a chi-squared distribution 
that has been used in the survey literature.

However, since it is easy to write down the characteristic function and 
perfectly feasible to invert it by numerical integration, we might as well 
use the right answer.

 	-thomas

On Thu, 29 Mar 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!
>
> 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.
>

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle



More information about the R-help mailing list