Message Boards Message Boards

0
|
1422 Views
|
9 Replies
|
7 Total Likes
View groups...
Share
Share this post:

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??

POSTED BY: Dana Alamleh
9 Replies

When alpha is equal to 2, your probability density function is negative. When alpha is noninteger, your probability density function is complex-valued.

POSTED BY: Gianluca Gorni

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 BY: Gianluca Gorni
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 BY: Dana Alamleh
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 BY: Mariusz Iwaniuk

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 BY: Gianluca Gorni

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 BY: Gianluca Gorni
Posted 4 months ago

omgg thank you so much!!!

POSTED BY: Dana Alamleh
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 BY: Jim Baldwin
Posted 4 months ago

i am sorry for the inconvenience,i have attached the notebook :)

POSTED BY: Dana Alamleh
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract