Skip to main content
18 events
when toggle format what by license comment
Jun 5, 2019 at 16:41 vote accept chris
Apr 13, 2017 at 12:55 history edited CommunityBot
replaced http://mathematica.stackexchange.com/ with https://mathematica.stackexchange.com/
Dec 13, 2016 at 21:57 comment added JimB Clearly I don't understand your purpose. Giving mu and sigma to FindDistributionParameters without giving them numbers is essential. What is it about having your second example work when removing ?NumberQ doesn't work for you? (I'm not trying to be sarcastic. I'm just clearly missing something.)
Dec 13, 2016 at 21:53 answer added JimB timeline score: 2
Dec 13, 2016 at 21:35 comment added chris @JimBaldwin yes but it defeats the purpose. What if I am in a situation where my PDF cannot be known a priori, before mu and sigma have a numerical value?
Dec 13, 2016 at 15:57 comment added JimB Just to be clear about @J.M. 's comment: removing ?NumberQ makes all of your examples work.
Dec 13, 2016 at 8:33 comment added corey979 Related.
Dec 13, 2016 at 8:10 history edited chris CC BY-SA 3.0
added 386 characters in body
Dec 13, 2016 at 7:47 history edited chris CC BY-SA 3.0
added 187 characters in body
Dec 13, 2016 at 7:40 history edited chris CC BY-SA 3.0
added 856 characters in body
Dec 13, 2016 at 7:26 comment added J. M.'s missing motivation Somehow, I feel that the NumericQ[] is interfering with any symbolic attempts being done under the hood. In any event, you should have used ProbabilityDistribution[] like this: ProbabilityDistribution[Piecewise[{{Exp[-(x - μ)/σ], x >= μ}}, Exp[-(-x + μ)/σ]], {x, -∞, ∞}, Assumptions -> (μ ∈ Reals && σ > 0), Method -> "Normalize"]; note the specification of assumptions, and that the (not necessarily normalized) PDF expression itself should be the first argument.
Dec 13, 2016 at 7:21 comment added chris Ah! That might be a lead then. The question remains of interest?
Dec 13, 2016 at 7:19 comment added J. M.'s missing motivation Well, ProbabilityDistribution[] supports the setting Method -> "Normalize" so that the normalization is done on your behalf.
Dec 13, 2016 at 7:18 comment added chris @J.M. just tried while you commented. Seem to produce the same. The reason I want to have a delayed definition is that in real life my PDF is not normalized so I need to normalize it via numerical integration.
Dec 13, 2016 at 7:17 history edited chris CC BY-SA 3.0
added 484 characters in body
Dec 13, 2016 at 7:16 comment added J. M.'s missing motivation Have you tried using ProbabilityDistribution[] instead to express your custom distribution?
Dec 13, 2016 at 7:08 history edited chris CC BY-SA 3.0
added 100 characters in body
Dec 13, 2016 at 6:26 history asked chris CC BY-SA 3.0