Cl's : sum into a chi^2 when we have a sum of chi^2

Click For Summary
SUMMARY

This discussion centers on the mathematical formulation of the distribution of sums of random variables, specifically in the context of chi-squared distributions and gamma distributions. The key equation presented is the equivalence of the sum of squared normal variables to a chi-squared distribution, expressed as ∑ℓ=1N ∑m=−ℓℓ aℓm² ≈d ∑ℓ=1N(2ℓ+1)χ²(Cℓ). The conversation also highlights the importance of proper notation and the distinction between probability density functions (pdfs) and their sums, emphasizing that the sum of distributions does not equate to the sum of their pdfs. The use of the "coga" library in R for numerical computation of these distributions is also noted.

PREREQUISITES
  • Understanding of chi-squared distributions and their properties.
  • Familiarity with gamma distributions and their parameters.
  • Knowledge of statistical notation, particularly equality in distribution.
  • Experience with R programming, specifically the "coga" library for distribution computations.
NEXT STEPS
  • Explore the properties of chi-squared distributions in detail.
  • Learn about the Moschopoulos distribution and its applications in statistical analysis.
  • Study the "coga" library in R for advanced statistical computations.
  • Investigate the implications of summing random variables with different distribution parameters.
USEFUL FOR

Statisticians, data scientists, and researchers involved in statistical modeling, particularly those working with chi-squared and gamma distributions in R.

fab13
Messages
300
Reaction score
7
TL;DR
I would like to know if we the expression of a double sum on the squared of a_lm (harmonical spherics from Legendre transformation) allows to include the sum of chi^2 factors in a chi^2 of sum (in the sense of "following distribution").
1) If I take as definition of ##a_{lm}## following a normal distribution with mean equal to zero and ##C_\ell=\langle a_{lm}^2 \rangle=\text{Var}(a_{lm})##, and if I have a sum of ##\chi^2##, can I write the 2 lines below (We use ##\stackrel{d}{=}## to denote equality in distribution).

Important remark : ##C_{\ell}## depends on ##\ell## : ##C_{\ell} = C_{\ell}(\ell)##

\begin{aligned}
\sum_{\ell=1}^{N} \sum_{m=-\ell}^{\ell} a_{\ell m}^{2} & \stackrel{d}{=} \sum_{\ell=1}^{N}(2 \ell+1) \chi^{2}\left(C_{\ell}\right) \\
& \stackrel{d}{=} \chi^{2}\left(\sum_{\ell=1}^{N}(2 \ell+1) C_{\ell}\right)
\end{aligned}

that is to say, include the sum on ##N## into ##\chi^2## ?

Maybe I could write instead (with shape/scale convention for Gamma distribution):

##
\begin{aligned}
\sum_{\ell=1}^{N} \sum_{m=-\ell}^{\ell} a_{\ell m}^{2} & \stackrel{d}{=} \sum_{\ell=1}^{N} \sum_{m=-\ell}^{\ell} \Gamma\left(1 / 2,2 C_{\ell}\right) \\
& \stackrel{d}{=} \sum_{\ell=1}^{N} \Gamma\left((2 \ell+1) / 2,2 C_{\ell}\right)
\end{aligned}
##if not, is there a way to simplify the first line, i.e when adding the ##N## terms ##\chi^{2}## ?

2) I don't how to formulate correctly (on a level of vocabulary and notations) the notion of "equality in distribution", that is to say, is it correct to write :

##
\begin{aligned}
\sum_{\ell=1}^{N} \sum_{m=-\ell}^{\ell} a_{\ell m}^{2} & \stackrel{d}{=} \sum_{\ell=1}^{N}(2 \ell+1) \chi^{2}\left(C_{\ell}\right)
\end{aligned}
##

?

The key point is the symbol ##\stackrel{d}{=}## : maybe I should rather write a sentence of kind :

The random variable ##\sum_{\ell=1}^{N} \sum_{m=-\ell}^{\ell} a_{\ell m}^{2}## follows the distribution equal to ##\sum_{\ell=1}^{N}(2 \ell+1) \chi^{2}\left(C_{\ell}\right)##

?

To give a more explicit example, if ##X_1## follows ##\text{pdf}_1## and ##X_2## follows ##\text{pdf}_2##, then Can I write ##X_1+X_2## following ##\text{pdf}_1+\text{pdf}_2## or even write directly :

##(X_1+X_2) \stackrel{d}{=} (\text{pdf}_1+\text{pdf}_2)## ?

or I saw also often in litterature :

##(X_1+X_2)## ~ (##\text{pdf}_1+\text{pdf}_2##)

I think this way of expression is bad and false (for example by taking 2 uniform laws). How to circumvent this problem of formulation ?As you can see, there are subtilities that I have not yet grasped.

Any help to better understand is welcome.
 
Last edited:
Space news on Phys.org
The pdf of a sum of variables is not equal to the sum of the pdfs of the individual variables. Apart from anything else, that sum of functions would not integrate to 1. So you can't say
f(x1+x2) = f(x1)+f(x2)
or f(nx1) = nf(x1)
Thus I don't like your expression (2l + 1)χ2(Cl). What does it mean?
I'm more comfortable with your use of gamma distributions, but be careful with those summations - you can't have a sum of gamma distributions. For example, if
alm2 =d Γ(1/2, 2Cl) then
Σmalm2 =d Γ((2l+1)/2, 2Cl)
But I don't think it's right to say
ΣmΓ(1/2, 2Cl) = Γ((2l+1)/2, 2Cl)
because I think the LHS is meaningless.
It becomes more difficult when you want to do the sum over l, because Cl varies with l. The sum of gamma variables with different β parameters does not have a gamma distribution. It might approximate to a gamma distribution, in which case you might proceed as follows to estimate the "α" and "β" parameters.
If Yl = Σmalm2
Yl =d Γ((2l+1)/2, 2Cl)
E(Yl) = (2l+1)Cl
V(Yl) = 2(2l+1)Cl2
If Z = ΣlYl
E(Z) = Σl(2l+1)Cl
V(Z) = Σl2(2l+1)Cl2
Suppose Z ≈d Γ(α,β)
where β = V(Z)/E(Z)
and α = E(Z)2/V(Z)
I don't know how good this approximation would be.

(PS. Doesn't l vary from 0 to N-1? That's how it works with hydrogen orbitals anyway!)
 
  • Like
Likes   Reactions: ohwilleke
@mjc123 . Thanks for your quick answer.

I realize that my notations are bad.

So finally, the following distribution equality is not true ;## \sum_{m=-\ell}^{\ell} a_{\ell m}^{2} \stackrel{d}{=} \chi^{2}\left((2 \ell+1)\,C_{\ell}\right)##

Could you confirm it to me please ?

Regards
 
@mjc123 . Thanks for your support.

I think you are right in your expression :

If Yl = Σmalm2
Yl =d Γ((2l+1)/2, 2Cl)

Normally, I could write an equivalent with Gamma distribution (If I take the convention shape/rate for Gamma distribution) :

##\sum_{\ell=1}^N C_\ell \cdot \text{ChiSq}(2 \ell + 1)=\sum_{\ell=1}^N \,C_\ell\, \text{Gamma}\Big((2 \ell + 1)/2,\dfrac{1}{2}\Big)##

##=\sum_{\ell=1}^N \, \text{Gamma}\Big((2 \ell + 1)/2,\dfrac{1}{2C_\ell}\Big)##

Do you agree ?

If this is true, then we would have to consider the sum of gamma random variable with different shape and rate different : this is the work of Moschopoulos : The sum of 𝑁 random variables ##Y_\ell## following each one a Gamma((2ℓ+1)/2,2𝐶ℓ) distribution follows a Moschopulos distribution ((from paper The computation of Moschopoulos on https://www.ism.ac.jp/editsec/aism/pdf/037_3_0541.pdf)

Any confirmation or help is welcome !
 
Last edited:
I'm not familiar with Moschopoulos's work so can't comment on it. But I still don't like your notation. What do you mean by writing sums or multiples of pdfs? These are not pdfs. As I said above:
mjc123 said:
I don't think it's right to say
ΣmΓ(1/2, 2Cl) = Γ((2l+1)/2, 2Cl)
because I think the LHS is meaningless.
That is, unless it is taken by convention to mean "the sum of 2l+1 variables each distributed as Γ(1/2, 2Cl) is distributed as Γ((2l+1)/2, 2Cl)". In which case I don't like the convention.
 
@mjc123

ok, it is clearer for me. Jus a last point (but important) :

I am using "coga" library from R language. This library computes the distribution (numerically) of the sum of random variables follwoing for each one a Gamma distribution with different shape and rate parameters, like in our case when I say :

the sum of ##Y_\ell## random variable following each one a Gamma distribution ##\Gamma((2l+1)/2, 2C_\ell)## follows a Moschopoulos distribution (from paper The computation of Moschopoulos on https://www.ism.ac.jp/editsec/aism/pdf/037_3_0541.pdf).

The important thing that I have to guess is "coga" library takes as convention the shape/rate notations.

So, I wonder if the following translation in code is correct for the equality in distribution (with the symbol ##\stackrel{d}{=}##, caution) :

##\sum_{\ell=1}^N Y_{\ell} \stackrel{d}{=} \sum_{\ell=1}^N C_\ell \cdot \text{ChiSq}(2 \ell + 1)\stackrel{d}{=}\sum_{\ell=1}^N \, \text{Gamma}\Big((2 \ell + 1)/2,\dfrac{1}{2\,C_\ell}\Big)\stackrel{d}{=}\text{Moschopoulos distribution}##

Do you agree with this expression ?

Best regards
 
As I have already said, I don't like that expression because a sum of distributions is meaningless. However, if that is not strict mathematical notation but software code, in which "Σpdf1 = pdf2" means "the sum of variables each with distribution pdf1 has distribution pdf2", then it may be OK. I don't know coga or R language so I can't help you on that.

If what you are writing is not mathematical notation but computer language, you should have made that clear at the outset.
 

Similar threads

  • · Replies 36 ·
2
Replies
36
Views
4K
  • · Replies 0 ·
Replies
0
Views
2K
  • · Replies 5 ·
Replies
5
Views
1K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
1
Views
2K