Bug introduced in 10.1 and fixed in 10.3
I have created a probability distribution that follows a general normal distribution, given by:
$$ \frac{b *e^{-\left(\frac{\sqrt{(x-u )^2}}{a }\right)^{b }}}{2 a \Gamma \left(\frac{1}{b }\right)} $$
When I define the Probability Distribution and generate Random values for it:
modelDrPD =ProbabilityDistribution[modelDr/.{β->4.2,α-> 0.39, μ->0.06}, {x, -∞, ∞}]
Histogram[RandomVariate[modelDrPD, 1000000], "FreedmanDiaconis"]
And I get the following histogram:
The PDF integrates to 1, as needed... Why there is a second peak in the Histogram? It happens with many PDF I try
Thank you
Update: Here is my complete code:
modelDr = ( b /(2 a Gamma[1/b]) Exp[-(Sqrt[(x - u)^2]/a)^b])
modelDrPD = ProbabilityDistribution[ modelDr /. {b -> 4.2, a -> 0.39, u -> 0.06}, {x, -Infinity, Infinity}]
Histogram[RandomVariate[modelDrPD, 1000000], "FreedmanDiaconis"]
modelDr = \[Beta] Exp[-(Abs[ x - \[Mu]]/\[Alpha])^\[Beta]]/(2 \[Alpha] Gamma[1/\[Beta]]);
, it works fine on 10.2 Windows 7. What is your definition ofmodelDr
? $\endgroup$RandomVariate
throwing the errors. Making the parameters rational doesn't help.RandomVariate
won't accept aWorkingPrecision
option for some reason. $\endgroup$