2
$\begingroup$

I am trying to find the product of normal distribution and Exponential distribution (Both are independent). Could we do analytically?

This question is linked with Link 1, and Link 2. But still not yet answered.

$\endgroup$
6
  • 1
    $\begingroup$ Welcome to MMA StackExchange. This question doesn't seem to be related to the software Mathematica? Have you tried anything yet ? $\endgroup$
    – Dunlop
    Commented Jul 29, 2019 at 9:12
  • $\begingroup$ Wolfram is unable to find this one$f(z)=\int_0^{\infty}\frac{\lambda}{x\sqrt{2\pi\sigma^2}}e^{-\frac{(x-\mu)^2}{2\sigma^2}-\frac{\lambda z}{x}}$. $\endgroup$
    – dtc348
    Commented Jul 29, 2019 at 9:14
  • 4
    $\begingroup$ Mathematica finds PDF[TransformedDistribution[ x*y, {x [Distributed] NormalDistribution[0, [Sigma]], y [Distributed] ExponentialDistribution[[Lambda]]}], t] in terrms of MeijerG function $$\frac{\lambda G_{0,3}^{3,0}\left(\frac{t^2 \lambda ^2}{8 \sigma ^2}| \begin{array}{c} 0,0,\frac{1}{2} \\ \end{array} \right)}{2 \sqrt{2} \pi \sigma } .$$ There are wishes and there is reality. $\endgroup$
    – user64494
    Commented Jul 29, 2019 at 9:50
  • $\begingroup$ @user64494 I am sorry, I don't know, how to change above integration function in to Meijer G function. Do we analytically change into Meijer G function? $\endgroup$
    – dtc348
    Commented Jul 29, 2019 at 9:55
  • $\begingroup$ Possible duplicate of the linked question. $\endgroup$
    – lirtosiast
    Commented Jul 29, 2019 at 13:25

1 Answer 1

4
$\begingroup$
Clear["Global`*"]

distx = NormalDistribution[0, σ];

disty = ExponentialDistribution[λ];

assume = DistributionParameterAssumptions[distx] &&
  DistributionParameterAssumptions[disty]

(* σ > 0 && λ > 0 *)

(cdf[z_] = 
   Probability[
    x*y <= z, {x \[Distributed] distx, 
     y \[Distributed] disty}]) //
 TraditionalForm

enter image description here

(pdf[z_] = Assuming[assume, D[cdf[z], z]]) //
 TraditionalForm

enter image description here

The expressions for z < 0 and z > 0 are identical

Assuming[assume,
 Equal @@ (Simplify[pdf[z], #] & /@ {z < 0, z > 0}) //
  Simplify]

(* True *)

Consequently, simplify the expression to

(pdf[z_] = Simplify[pdf[z], z > 0]) //
 TraditionalForm

enter image description here

Alternatively,

distz = TransformedDistribution[x*y,
   {x \[Distributed] NormalDistribution[0, σ],
    y \[Distributed] ExponentialDistribution[λ]}];

(pdf2[z_] = PDF[distz, z]) // TraditionalForm

enter image description here

Although it is difficult to show that the expressions for the PDF are equivalent, the numeric difference between the two expressions is zero:

Plot[pdf[z] - pdf2[z] /. {σ -> λ}, {z, -4, 4},
 PlotRange -> {-10^-6, 10^-6},
 WorkingPrecision -> $MachinePrecision]

enter image description here

$\endgroup$
1
  • $\begingroup$ Nice to see that MMA pulls this off. Springer showed that such a product is a MeijerG function back in the 70s... $\endgroup$
    – ciao
    Commented Jul 29, 2019 at 21:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.