TransformedDistribution in Mathematica

谁都会走 提交于 2019-12-04 11:18:41

Your approach using transformed distribution is just fine, but since distribution's PDF does not exist in closed form, PDF[TransformedDistribution[..],x] is not the way to go, as for every x a symbolic solver will be applied. It is better to massage your distribution to arrive at pdf. Let X be LogNormal-Stable random variate. Then

CDF[LogNormalStableDistribution[params], x] == Probability[X <= x] 

But X==U*V + delta hence X<=x translates into V<=(x-delta)/U. This gives

LogNormalStableCDF[{\[Alpha]_, \[Beta]_, \[Gamma]_, \[Sigma]_, \
\[Delta]_}, x_Real] := 
 Block[{u}, 
  NExpectation[
   CDF[StableDistribution[\[Alpha], \[Beta], \[Gamma], \[Sigma]], (x \
- \[Delta])/u], 
   u \[Distributed] LogNormalDistribution[Log[\[Gamma]], \[Sigma]]]]

Differentiating with respect to x we get PDF:

LogNormalStablePDF[{\[Alpha]_, \[Beta]_, \[Gamma]_, \[Sigma]_, \
\[Delta]_}, x_Real] := 
 Block[{u}, 
  NExpectation[
   PDF[StableDistribution[\[Alpha], \[Beta], \[Gamma], \[Sigma]], (x \
- \[Delta])/u]/u, 
   u \[Distributed] LogNormalDistribution[Log[\[Gamma]], \[Sigma]]]]

Using this, here is the plot

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!