I am trying to explore whether Mathematica can help me infer the parameters of a LogNormalDistribution
from observing the values of some integrals. For example, I construct the integral values by using
a1 = 3.9; b1 = .9;
val1 = Integrate[PDF[LogNormalDistribution[a1, b1], x] x, {x, 0, 40}]
val2 = Integrate[PDF[LogNormalDistribution[a1, b1], x] x, {x, 40, Infinity}]
(*9.5
64.5*)
Then, I try to work backwards from these values to see whether one of the minimizing functions can guess the a1
and b1
parameters. Using the NormalDistribution
(instead of the LogNormalDistribution
) produces success with FindMinimum
and trying to reduce sum of squared errors. When I do the same with the LogNormalDistribution
, however, Mathematica goes into a deep think and nothing happens (actually, I lose patience and abort the calculation). Here is what I try:
FindMinimum[
(val1 - (Integrate[PDF[LogNormalDistribution[al, be], x] x, {x, 0, 40}]))^2 +
(val2 - (Integrate[PDF[LogNormalDistribution[al, be], x] x, {x, 40, Infinity}]))^2
,{{al, 3.75}, {be, .8}}]
Replacing Infinity
with a large number helps the NormalDistribution
equivalent task (in part by avoiding some imaginary values; they need to be PositiveReals
) but does not seem to make a difference here. Many thanks for any ideas.