Mathematica has a lot of machinery for working with predefined probability distributions. It is not clear how to make that machinery work with a new distribution.
Suppose I want to define a brand new distribution
MyDistribution[a, b, c]
What is the minimum I need to specify for all the other machinery to kick in?
Do I just need to specify a PDF or CDF? How do I associate it with MyDistribution
?
ProbabilityDistribution
does some of what I want, but has limitations.
Suppose I define
MyDistribution[a_, b_, c_] := ProbabilityDistribution[SomeFun[a,b,c,x], {x, -Infinity, Infinity}]
then MyDistribution[a, b, c]
will automatically be rewritten to ProbabilityDistribution[SomeFun[a,b,c,x], {x, -Infinity, Infinity}]
,
losing information about what the parameters of the distribution are. This makes it hard to have general purpose Fisher information function that works with user defined distributions.
Here is an example of the information loss I am thinking of.
Mathematica has a FisherInformation
function that uses the explicit distribution parameters to structure the resulting matrix
AppendTo[$ContextPath, "Statistics`Library`"]
FisherInformation[NormalDistribution[m, s]] // MatrixForm
The row and columns of the resulting matrix correspond to the explicit parameters.
It is unclear this function should be extended to work on distributions defined using ProbabilityDistribution
?MyDistribution
, you'll get the complete definition. What are the limitations ofProbabilityDistribution
you mention? (I'm not suggesting that there aren't any but rather that it is not obvious what limitations affect what you want to do.) $\endgroup$ProbabilityDistribution[1/(E^((m - x)^2/(2*s^2))*(Sqrt[2*Pi]*s)), {x, -Infinity, Infinity}]
does not tell you the order ofm
ands
, whereasNormalDistribution[m,s]
does. AlsoSomeFun
may additionally refer tod
,e
,f
which are just undefined constants and not actual parameters of the family. After the rewriting this distinction is lost. $\endgroup$