You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
Expectation of inverse of complex Gaussian variables
17 views (last 30 days)
Show older comments
mingcheng nie
on 3 Jan 2023
Hi there, I just have a mathematic problem. If we consider a Gaussian complex random variable vector , where each element in follows zeros mean and variance γ. Is there any close form with γ for ? where is the norm-2 operation. I have asked the same question in MathOverflow at https://mathoverflow.net/questions/436733/expectation-of-inverse-of-complex-gaussian-variables?noredirect=1#comment1125524_436733.
the people in mathoverflow showed that this expectation is infinity mathematically. But in matlab, we can find out that the above expectation can converge to a certain value. So there must be some error that I couldn't find out and misunderstanding. Really appreciate for any comments!
clc;close all;clear all;
num_loop=5000;
N=5;Eh=0;
for i=1:num_loop
h=sqrt(1/2)*(randn(N,1)+1i*randn(N,1));
Eh=Eh+1/norm(h)^2;
end
Eh=Eh/num_loop
8 Comments
Bruno Luong
on 3 Jan 2023
Edited: Bruno Luong
on 3 Jan 2023
People in mathoverflow are correct. Your code does not compute the expextation. It estimates the expectation for random variable that has an expectation, which is NOT the case.
Matt J
on 3 Jan 2023
Edited: Matt J
on 3 Jan 2023
@Bruno Luong Still, though, the empirical means do seem to converge to something as we take more and more samples. It would be good to know if there is a mathematical reason for that, and if that limit can be predicted, even if it is not the statistical mean.
M=1e7;
N=5;
h=sqrt(1/2)*(randn(N,M)+1i*randn(N,M));
x=1./vecnorm(h).^2;
Eh=cumsum(x,2)./(1:M);
loglog(Eh)
Bruno Luong
on 3 Jan 2023
Edited: Bruno Luong
on 3 Jan 2023
@Matt J I think randn cannot capture the math correctness (true), sine it is diverge theoreticlly because normal random variable can get arrbitrally small create singular 1/r close to 0. However for whatever reason, randn rarely create number smaller than this
r=randn(1,1e7);
min(abs(r))
ans = 1.5919e-07
which is very far from arbitrary small to my book. The imperfect of randn() does not matter in most case, matter here.
Note that rand has the same imperfect filling toward 0
r=rand(1,1e7);
min(abs(r))
ans = 5.5373e-08
Paul
on 3 Jan 2023
As I understand the linked mathoverflow page, if h is a complex scalar then the expectation is infinite (or does not exist?). But if h is a complex vector, then the expectation is finite.
Bruno Luong
on 3 Jan 2023
Edited: Bruno Luong
on 3 Jan 2023
@Paul, the singularity is 1/r when r goes to 0 for all cases. So the expectation is Inf for all cases as long as P(0) > 0.
John D'Errico
on 3 Jan 2023
Edited: John D'Errico
on 3 Jan 2023
The problem is, if you compute a sample mean from a Monte Carlo simulation, you will get some finite (and random) result. But that does not tell you anything about the population mean. And you are asking how to compute an EXPECTATION, so the population mean. And that has no finite value.
Paul
on 3 Jan 2023
Edited: Paul
on 3 Jan 2023
Then I guess you disagree with the commen on the mathoverflow page?
link to comment (make sure to click on "Show 6 more comments"
Accepted Answer
Matt J
on 3 Jan 2023
Edited: Matt J
on 3 Jan 2023
So there must be some error that I couldn't find out and misunderstanding.
The misunderstanding is that the expectation is infinite for when n=1, but for higher dimensions, it is finite. The general formula can be derived by adapting the material from here, leading to,
The integral can be evaluated for n>1 by integration by parts.
22 Comments
Bruno Luong
on 3 Jan 2023
Thinking more I believe you are correct with r^(n-3) = r^-2 * r^(n-1). The first term is from 1/h^2 the second from volumic integration in r. Well done Matt.
Paul
on 3 Jan 2023
Edited: Paul
on 3 Jan 2023
Why do you think there is an error or misunderstanding?
That r^(2n-3) is exactly what's stated in the comments section in the mathoverflow page for the case of vector h. Are you sure that it shouldn't be 2/gamma(N) out front?
N=5;
Gamma = 0.5
Gamma = 0.5000
2/gamma(N)*integral(@(r) exp(-r.^2/2/Gamma).*r.^(2*N-3),0,inf)
ans = 0.2500
Matches result above.
Matt J
on 3 Jan 2023
Why do you think there is an error or misunderstanding?
Well, a misunderstanding on our part, because only you seem to have seen the additional comments!
Are you sure that it shouldn't be 2/gamma(N) out front?
Fixed it.
Paul
on 3 Jan 2023
Looking through those comments I learned more about LatEx formatting than math!
Looks like there is a closed form solution:
syms r sigma real positive
syms n integer positive
E = int(exp(-r^2/2/sigma^2)*r^(2*n-3),r,0,inf)/sigma^(2*n)/2^(n-1)/gamma(n)
E =
E = simplify(E)
E =
simplify(subs(E,[n sigma],[5 sqrt(1/2)]))
ans =
mingcheng nie
on 4 Jan 2023
Thank you all guys for your wonderful arguments, answers and explanantions!!
Now I know that when I have vector , then the solution of the formula in the question is finite and has closed-form.
Paul
on 4 Jan 2023
In your development is there an assumption that all of the random variables are independent? Rerunning the numerical experiment appears to show that assumption makes a difference.
Assume h is 3 x 1, all RVs are independent, standard normal.
M=1e7;
N=3;
sigma = 1;
h = sigma*(randn(N,M)+1i*randn(N,M));
x = 1./vecnorm(h).^2;
Eh = cumsum(x,2)./(1:M);
figure
loglog(Eh)
hold on
Closed form expression, matches blue curve
1/2/sigma^2/(N-1)
ans = 0.2500
Make the real RVs not independent, same for the imaginary RVs.
Sigma = sigma^2*[1 .8 .9; .8 1 .7;.9 .7 1];
Xr = mvnrnd(zeros(1,3),Sigma,M);
Xi = mvnrnd(zeros(1,3),Sigma,M);
h = (Xr + 1i*Xi).';
x = 1./vecnorm(h).^2;
Eh = cumsum(x,2)./(1:M);
loglog(Eh)
Paul
on 4 Jan 2023
Alternative derivation, which at heart is probably the same as @Matt J's, but just makes use of known results rather than deriving from scratch.
Let c(x,k) be the pdf of the Chi-square distribution with k degrees of freedom
syms sigma real positive
syms k n integer positive
syms x real positive
c(x,k) = x^(k/2-1)*exp(-x/2)/2^(k/2)/gamma(k/2)
c(x, k) =
Let Xi, i = 1:k be i.i.d. normal random variables with mean = 0 and variance sigma^2.
Let Z = sum(Xi^2). The pdf of Z is then
z(x,k) = c(x/sigma^2,k)/sigma^2;
Let H = 1/Z. The expected value of H is
Eh = simplify(int(simplify(z(x,k)/x),x,0,inf))
Eh =
If the vector h is n x 1, then k = 2*n
Eh = simplify(subs(Eh,k,2*n))
Eh =
Bruno Luong
on 4 Jan 2023
Wait a minute, I though the expectation is Inf for n=2 from the integral with r^(n-3) inside the integral, so it diverges like a log. Why I can't see this in the simplified formula?
Paul
on 4 Jan 2023
n is the dimension of the vector, not the number of variables, which is 2*n (real + imaginary). So if h is a scalar, then n = 1 and Eh is undefined.
mingcheng nie
on 26 Jan 2023
Edited: mingcheng nie
on 26 Jan 2023
Dear Pual@Paul, I just a bit confuse that may I know if is a complex Guassian variables vector, which means 5 elements in this vector, then should it be n=2 or n=5? Here n=2 is due to h is real+imaginary; n=5 is that you memtioned 'if h is n×1....'.
mingcheng nie
on 26 Jan 2023
Edited: mingcheng nie
on 28 Jan 2023
Hi guys@Matt J, @Paul,I have one more question that if the variance of Guassian complex is random, not fixed, for example, if we consider the exponential delay profile ,where we have a total number of P of τ and they are independently uniformly distributed from . Then can can we compute the close form ?
mingcheng nie
on 15 Oct 2024
@Matt J@Paul Sorry guys I have an add-on question. What if in this question, n > 1, but each entry in has different variance, i.e., , is different for i= 1....n. Here, each entry of is still complex Gaussian with zero mean. How would the answer presented above changed in this siutation? I still assume there exist a closed-form solution as from the simulation I got fixed results.
Thank you guys so much for your patience!
Paul
on 27 Oct 2024 at 13:54
Edited: Paul
on 27 Oct 2024 at 16:08
If you can find the probability density function for the sum of independent, normal random variables that are not identically distributed, then you can try to proceed as shown above. Maybe there is a closed form expression. As to finding that density function, maybe this link will be of use. I think, but am not positive, that the Generalized Chi-Squared Distribution is what you're looking for.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)