Serving the Quantitative Finance Community

 
User avatar
robbie
Topic Author
Posts: 1
Joined: November 1st, 2002, 1:16 pm

E[X^-1], X~N(a,b^2]

November 13th, 2009, 4:49 pm

Dear all,I want to compute the expected value of 1/X where X is normally distributed with mean a and variance b^2.Any ideas are highly appreciated!
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

E[X^-1], X~N(a,b^2]

November 13th, 2009, 6:22 pm

It only exists as a Cauchy Principal Value. (p.v.)In Mathematica, to get a number, I write(*) f[a_, b_, xmax_] := NIntegrate[(1/x) E^(-(x - a)^2/(2 b^2)), {x, -xmax, -1, 0, 1, xmax}, Method-> "PrincipalValue", "SingularPointIntegrationRadius" -> 1/4}]/Sqrt[2 Pi b^2]which should converge to the p.v. as xmax -> infinity.For example, taking a = b = 1 and xmax larger and larger, I see convergence to f ~ 0.724778There may be a nice simple analytic expression for this p.v. integral -- left as an open question. ========================================================================= p.s. Played around a little more and resolved the open question. This can indeed be reduced to an analytic expression involving theImaginary Error Function erfi In terms of that special function, I find the likely analytic expression for the p.v. is(**) For those who have my Stoch. Vol. book, to get this result, I just used the same trick as on pg. 64.Note that, despite the name, for a real argument z, you can see from the defns thaterfi(z) is a real number with the same sign as z.To take another example without round numbers,f(a = 0.7,b = 1.3) = 0.376398 ... both by (*) and (**) f(a = -0.7,b = 1.3) = -0.376398 ... both by (*) and (**)
Last edited by Alan on November 12th, 2009, 11:00 pm, edited 1 time in total.
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

E[X^-1], X~N(a,b^2]

November 14th, 2009, 4:47 pm

Here is an alternative 2 line proof of my result. 1. Let x = a + b Sqrt[2] z in the defining PV integral.2. Recognize the resulting integral as a Hilbert transform of e^(-z^2), given in the linked table.
Last edited by Alan on November 13th, 2009, 11:00 pm, edited 1 time in total.
 
User avatar
Alan
Posts: 3050
Joined: December 19th, 2001, 4:01 am
Location: California
Contact:

E[X^-1], X~N(a,b^2]

November 15th, 2009, 5:32 pm

Here is a good challenge for students or anybody related to this interesting problem:1. Can you reasonably confirm either one of my numerical examples by Monte Carlo?. (Reasonable = 2 good digits)2. How many normal variate draws does it take you for the MC average to equal my analytic numerical results to just 2 digits?3. Can you develop a 95% confidence interval for the MC that does not require the existence of a second moment of Y = 1/X? (since E[Y^2]=\infty)If so, what is that confidence interval for the MC run that agreed with the analytical result to 2 digits?
Last edited by Alan on November 14th, 2009, 11:00 pm, edited 1 time in total.