Opened 8 years ago

Closed 8 years ago

#10179 closed Bugs (invalid)

wrong check on the Log Normal position parameter

Reported by: cristian.rabiti@… Owned by: John Maddock
Milestone: To Be Determined Component: math
Version: Boost 1.54.0 Severity: Problem
Keywords: lognormal Cc:

Description

In the Log normal there is a chaco that does not allow to use negative numbers for mu (in the manual reference page it is know as position) For the moment I would refer to it as mu. Mu is the mean value of the log(x) and should be therefore between ]-inf,inf] since the log is defined between ]0,inf]. The problem highlights when we are seeking to represent a random variable which logarithm is normal distributed with mean negative. BTW even in the web page of the manual there are example with mu negative: http://www.boost.org/doc/libs/1_35_0/libs/math/doc/sf_and_dist/html/math_toolkit/dist/dist_ref/dists/lognormal_dist.html

Change History (3)

comment:1 by John Maddock, 8 years ago

Using either Boost-1.54 or latest Git develop the following works OK for me:

   boost::math::lognormal d(-2.0, 1.0);
   std::cout << pdf(d, 0.5) << std::endl;
   std::cout << cdf(d, 0.5) << std::endl;
   std::cout << quantile(d, 0.5) << std::endl;

What am I missing?

comment:2 by John Maddock, 8 years ago

Ping???

comment:3 by John Maddock, 8 years ago

Resolution: invalid
Status: newclosed

No response so closing down, please reopen if you have a test case.

Note: See TracTickets for help on using tickets.