Cumulative distribution function of a function of a random variable

1 回表示 (過去 30 日間)
Franziska
Franziska 2019 年 8 月 14 日
コメント済み: Franziska 2019 年 8 月 16 日
Hi everyone
I have the following issue:
X is a random variable uniform between
The variable Y is a function of X:
where α is a constant.
I can't solve the equation for X, so I can't find the cumulative distribution of Y analytically. Is there a possibility in Matlab to find the cdf of a function of a Random Variable with a known cdf?
Thanks for your help!
  2 件のコメント
Torsten
Torsten 2019 年 8 月 15 日
編集済み: Torsten 2019 年 8 月 15 日
As David shows, it is possible to solve your equation for X.
Thus you can get an analytical expression for the CFD of Y.
Franziska
Franziska 2019 年 8 月 16 日
True! Works perfectly. Thanks for the advice.

サインインしてコメントする。

採用された回答

David Goodmanson
David Goodmanson 2019 年 8 月 15 日
Hi Franziska,
a = 1.2;
x = .2
y = a*(1+x)*(2/(1+ (1+x)^(1/(a-1))))^(a-1)
xx = (y/a)/(2-(y/a)^(1/(a-1)))^(a-1) -1 % inverse function f(y)
x = 0.2000
y = 1.2884
xx = 0.2000 % same
try some values ,,,
  3 件のコメント
David Goodmanson
David Goodmanson 2019 年 8 月 16 日
編集済み: David Goodmanson 2019 年 8 月 16 日
Hi Franzisca,
It's just equation manipulation of the kind that isn't done as much as it once was due to the rise of algorithms, symbolic computation and so forth. There is probably more detail here than you need, but I wanted to put down the whole process, including a false start since that was part of it.
The right hand side has three factors:
a, (1+x) and the more complicated one (2/(1 + (1+x)^(1/(a-1))))^(a-1)
Notice that x appears only as (1+x). Also notice that taking both sides of the eqn to the (1/(a-1)) power has two effects: it turns the second factor into (1+x)^(1/(a-1)) which has the same form as occurrence of x in the third factor. That's the key. It also makes the ^(a-1) power in the third factor go away. This looks promising.
Now we have
y^(1/(a-1)) = a^(1/(a-1)) (1+x)^(1/(a-1)) ( 2/(1 + (1+x)^(1/(a-1))) ).
Realize that the first factor can go to the left hand side and that we really should have divided both sides by 'a' before taking both sides to the (1/(a-1)) power. Make that adjustment, so now
(y/a)^(1/(a-1)) = (1+x)^(1/(a-1)) ( 2/(1+(1+x)^(1/(a-1))) )
Hide some distracting clutter by creating two new objects
(y/a)^(1/(a-1)) = y1
and (1+x)^(1/(a-1)) = x1
Now we have y1 = x1 (2/(1+x1))
Use high school algebra to solve for x1
x1 = y1/(2-y1)
Plug the identities back in
(1+x)^(1/(a-1)) = (y/a)^(1/(a-1)) (2-(y/a)^(1/(a-1)))
Solve for x by taking both sides to the (a-1) power and subtracting 1
x = (y/a)/(2-(y/a)^(1/(a-1)))^(a-1) -1
Franziska
Franziska 2019 年 8 月 16 日
Fantastic! Thanks for explaining the steps, that was very helpful.

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by