필터 지우기
필터 지우기

calculating power of a random variable following any distribution (specifically Gamma Gamma distribution)

조회 수: 11 (최근 30일)
I have generated a gamma gamma random variable using
y=[1,10];
g1=gamrnd(4.08,1/4.08,y);
g2=gamrnd(1.47,1/1.47,y);
g3=g1.*g2;
How to calculate power of this GG random variable??
Answer is appreciated.
Thank you.
  댓글 수: 4
Jeff Miller
Jeff Miller 2020년 6월 4일
If you want, you can compute
x = mean(g3.^2)
but that is just a sample value corresponding to the particular random g1 and g2 that you generated. Computing the expected value of g3.^2 over all possible samples is much more work, if that is what you actually need.
kunal
kunal 2020년 6월 4일
Will it give me the power of random variable g3.? And Is this the same way to compute power of a random variable of any distribution?

댓글을 달려면 로그인하십시오.

답변 (1개)

Shivam Kumar Singh
Shivam Kumar Singh 2020년 6월 11일
Assuming that by power you mean Mean Squared value of the distribution.
You can use
mean(x.^2)
Notice .^ and not ^. It means you are dowing an element wise operation.
  댓글 수: 2
kunal
kunal 2020년 6월 12일
@Shivam, Is there any other way to calculate the power of Random variable??
Shivam Kumar Singh
Shivam Kumar Singh 2020년 6월 14일
I assume by power you mean X^n where n is a number. For this you can use E(x^n). In matlab you can use mean(X.^n) to get it.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by