0
|
1444 Views
|
9 Replies
|
7 Total Likes
View groups...
Share

# Defining a new distribution on wolfram Mathematica

Posted 4 months ago
 Hello everyone!! How can i implement a new distribution in Mathematica ...i tried using the command Kiesdist[\[Lambda]_,\[Alpha]_]=ProbabilityDistribution[(\[Alpha] \[Lambda])/(x - 1)^2 (x/( x - 1))^(\[Alpha] - 1) Exp[-\[Lambda] (x/(x - 1))^\[Alpha]], {x, 0, 1}, Assumptions -> {\[Lambda] > 0, \[Alpha] > 0}]  As i am trying to simulate estimates for this distribution using the following command: FindDistributionParameters[data, testDistribution[\[Lambda], \[Alpha]], ParameterEstimator -> "MaximumLikelihood"]  but i keep on getting an error message that it isn't a recognized distribution anyone knows how can i define this distribution in a way that allows me to deal with it as the built in ones??
9 Replies
Sort By:
Posted 4 months ago
 When alpha is equal to 2, your probability density function is negative. When alpha is noninteger, your probability density function is complex-valued.
Posted 4 months ago
 Perhaps you forgot the underscores in Kiesdist[\[Lambda]_, \[Alpha]_]. However, your function has divergent integral: With[{\[Lambda] = 1, \[Alpha] = 1}, Integrate[(\[Alpha] \[Lambda])/(x - 1)^2 (x/(x - 1))^(\[Alpha] - 1) Exp[-\[Lambda] (x/(x - 1))^\[Alpha]], {x, 0, 1}]] it cannot be a probability distribution.
Posted 4 months ago
 here is the notebook ,will you please give it a look? :) the function i am working with is the pdf of the kies distribution ...i got this form of the pdf from a past research
Posted 4 months ago
 S = Integrate[(\[Alpha] \[Lambda])/(x - 1)^2 (x/(x - 1))^(\[Alpha] - 1) Exp[-\[Lambda] (x/(x - 1))^\[Alpha]], {x, 0, t}, Assumptions -> {0 < t <= 1, \[Alpha] > 0, \[Lambda] > 0}] (*Mathematica Can compute the CDF*) (* -1 + E^(-E^(I \[Pi] \[Alpha]) (-(t/(-1 + t)))^\[Alpha] \[Lambda]) *) (*Is not the same as: 1-\[ExponentialE]^(-\[Lambda]((t/(-1+t))^\[Alpha]) ) what you say ? *) 1 - E^(-\[Lambda] ((x/(-1 + x))^\[Alpha]) ) /. x -> 1/2 /. \[Alpha] ->1/3 /. \[Lambda] -> 2 // N (*1.05907 + 0.363107 I*) (* Can there be complex numbers ?*) Regards M.I.
Posted 4 months ago
 Your pdf is the opposite of the derivative of the cdf. Also your cdf as per the research 1 - E^(-\[Lambda] ((x/(-1 + x))^\[Alpha]) ) has some problems: it is complex-valued when alpha is noninteger. It is negative, decreasing and unbounded when alpha is an odd integer. It is only plausible when alpha is an even integer.
Posted 4 months ago
 Wait a minute, with a little change in sign the problems go away: kiesDistribution[\[Lambda]_, \[Alpha]_] := ProbabilityDistribution[(\[Alpha] \[Lambda])/(x - 1)^2 (x/(-x + 1))^(\[Alpha] - 1) Exp[-\[Lambda] (x/(-x + 1))^\[Alpha]], {x, 0, 1}, Assumptions -> {\[Lambda] > 0, \[Alpha] > 0}] 
Posted 4 months ago
 omgg thank you so much!!!
Posted 4 months ago
 Would you edit the code so that it can be pasted into a notebook? Alternatively, attaching a notebook would be helpful. What you've given is missing a few backslashes. For example: [Alpha] instead of \[Alpha].
Posted 4 months ago
 i am sorry for the inconvenience,i have attached the notebook :)