Skip to main content
General cleanup, reformulation, and addition of TeX formatting.
Source Link
cardinal
  • 27.4k
  • 8
  • 105
  • 140

Is it possible to analytically integrate(univariate) x $x$ multiplied by the lognormal probability distributiondensity function?

Firstly, by analytically integrate, I mean, is there an integration rule to solve this as opposed to numerical analyses (such as trapezoidtrapezoidal, gaussGauss-legendreLegendre or simpsonsSimpson's rules)?

I have a function $f(x) = x*lognormal(mu, sigma, x)$. Mu$\newcommand{\rd}{\mathrm{d}}f(x) = x g(x; \mu, \sigma)$ where $$ g(x; \mu, \sigma) = \frac{1}{\sigma x \sqrt{2\pi}} e^{-\frac{1}{2\sigma^2}(\log(x) - \mu)^2} $$ is the probability density function of a lognormal distribution with parameters $\mu$ and sigma remain constant$\sigma$. Below, while x variesI'll abbreviate the notation to $g(x)$ and use $G(x)$ for the cumulative distribution function.

I need to integrate f(x) over a positive range (a, b).calculate the integral $$ \int_{a}^{b} f(x) \,\rd x \>. $$

Currently, I'm doing this with numerical analysesintegration using the gaussGauss-legendreLegendre method. Because I need to run this a large number of times, performance is important. Before I look into optimizing the numerical analyses/other pieces, I would like to know if there are any integration rules to solve this.

I tried applying the integration by parts-by-parts rule, and I got to this, where I'm stuck again -,

  1. $\int udv = uv - \int(vdu)$$\int u \,\mathrm{d}v = u v - \int v \mathrm{d}u$.

  2. $u=x => du = dx$$u=x \implies \rd u = \rd x$

  3. $dv = lognormal(x)dx => v = lognormalCDF(x)$$\rd v = g(x) \rd x \implies v = G(x)$

  4. $uv - \int vdx = x*lognormalCDF(x) - \int lognormalCDF(x)dx$$u v - \int v \rd x = x G(x) - \int G(x) \rd x$

I'm stuck, as I can't evaluate the $\int lognormalCDF(x)dx$$\int G(x) \rd x$.

This is for a software package I'm building.

Is it possible to analytically integrate(univariate) x multiplied by the lognormal probability distribution?

Firstly, by analytically integrate, I mean, is there an integration rule to solve this as opposed to numerical analyses (such as trapezoid, gauss-legendre or simpsons rules)?

I have a function $f(x) = x*lognormal(mu, sigma, x)$. Mu and sigma remain constant, while x varies.

I need to integrate f(x) over a positive range (a, b).

Currently, I'm doing this with numerical analyses using the gauss-legendre method. Because I need to run this a large number of times, performance is important. Before I look into optimizing the numerical analyses/other pieces, I would like to know if there are any integration rules to solve this.

I tried applying the integration by parts rule, and I got to this, where I'm stuck again -

  1. $\int udv = uv - \int(vdu)$

  2. $u=x => du = dx$

  3. $dv = lognormal(x)dx => v = lognormalCDF(x)$

  4. $uv - \int vdx = x*lognormalCDF(x) - \int lognormalCDF(x)dx$

I'm stuck, as I can't evaluate the $\int lognormalCDF(x)dx$.

This is for a software package I'm building.

Is it possible to analytically integrate $x$ multiplied by the lognormal probability density function?

Firstly, by analytically integrate, I mean, is there an integration rule to solve this as opposed to numerical analyses (such as trapezoidal, Gauss-Legendre or Simpson's rules)?

I have a function $\newcommand{\rd}{\mathrm{d}}f(x) = x g(x; \mu, \sigma)$ where $$ g(x; \mu, \sigma) = \frac{1}{\sigma x \sqrt{2\pi}} e^{-\frac{1}{2\sigma^2}(\log(x) - \mu)^2} $$ is the probability density function of a lognormal distribution with parameters $\mu$ and $\sigma$. Below, I'll abbreviate the notation to $g(x)$ and use $G(x)$ for the cumulative distribution function.

I need to calculate the integral $$ \int_{a}^{b} f(x) \,\rd x \>. $$

Currently, I'm doing this with numerical integration using the Gauss-Legendre method. Because I need to run this a large number of times, performance is important. Before I look into optimizing the numerical analyses/other pieces, I would like to know if there are any integration rules to solve this.

I tried applying the integration-by-parts rule, and I got to this, where I'm stuck again,

  1. $\int u \,\mathrm{d}v = u v - \int v \mathrm{d}u$.

  2. $u=x \implies \rd u = \rd x$

  3. $\rd v = g(x) \rd x \implies v = G(x)$

  4. $u v - \int v \rd x = x G(x) - \int G(x) \rd x$

I'm stuck, as I can't evaluate the $\int G(x) \rd x$.

This is for a software package I'm building.

Source Link
Rosh
  • 123
  • 1
  • 1
  • 4

Is it possible to analytically integrate(univariate) x multiplied by the lognormal probability distribution?

Firstly, by analytically integrate, I mean, is there an integration rule to solve this as opposed to numerical analyses (such as trapezoid, gauss-legendre or simpsons rules)?

I have a function $f(x) = x*lognormal(mu, sigma, x)$. Mu and sigma remain constant, while x varies.

I need to integrate f(x) over a positive range (a, b).

Currently, I'm doing this with numerical analyses using the gauss-legendre method. Because I need to run this a large number of times, performance is important. Before I look into optimizing the numerical analyses/other pieces, I would like to know if there are any integration rules to solve this.

I tried applying the integration by parts rule, and I got to this, where I'm stuck again -

  1. $\int udv = uv - \int(vdu)$

  2. $u=x => du = dx$

  3. $dv = lognormal(x)dx => v = lognormalCDF(x)$

  4. $uv - \int vdx = x*lognormalCDF(x) - \int lognormalCDF(x)dx$

I'm stuck, as I can't evaluate the $\int lognormalCDF(x)dx$.

This is for a software package I'm building.