# Mean of inverse probability distribution does not agree with explicit integral

I tried to work with the inverse exponential distribution and encountered the following, which I think is an inconsistency in Mathematica (version 10.0.2):

dist = ExponentialDistribution[l];
distInv = TransformedDistribution[1/x, x\[Distributed]dist];

pdfInv[y_] = PDF[distInv, y] ;
pdfInv[y] // InputForm
(*Out: Piecewise[{{l/(E^(l/y)*y^2), y > 0}}, 0] *)

Mean@distInv
(*Out: -l (EulerGamma + Log[l]) *)

int = Assuming[yMax > 0 && l > 0, Integrate[y pdfInv[y], {y, 0, yMax}]]
(* l Gamma[0, l / yMax] *)

Limit[int, yMax->\[Infinity]]
(* l \[Infinity] *)


Basically, Mathematica claims that the mean of the inverse exponential distribution can be calculated and it gives an explicit expression for it (see above). However, I then tried to solve the integral of the expectation value explicitly and I think I showed that it diverges. Is there any flaw in my argumentation or is this a problem with Mathematica?

• What version are you using? In 10.1.0 I get Mean@distInv evaluates to Infinity. – Stefan R May 8 '15 at 19:16
• David, @StefanR I am on v.10.1.0 as well, and Mean@distInv returns Infinity for me as well. I have also noticed that you may be missing a : in your definition of pdfInv. – MarcoB May 8 '15 at 19:41
• I'm on v. 10.0.2, which might be the cause of the problem. I try to update and will report later. – David Zwicker May 8 '15 at 20:05

It turns out this was a bug with version 10.0.2 of Mathematica. Upgrading to 10.1.0 resolved the issue and Mean@distInv now returns infinity.
• @DavidZwicker: That is covered in the ExperimentalUmm,Maybe` context... – ciao May 8 '15 at 22:17