MathGroup Archive 2008

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Definition of new distribution

  • To: mathgroup at smc.vnet.net
  • Subject: [mg94659] Re: [mg94639] Definition of new distribution
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Fri, 19 Dec 2008 07:23:55 -0500 (EST)
  • Reply-to: hanlonr at cox.net

Clear[GeneralizedExtremeValueDistribution];

GeneralizedExtremeValueDistribution::usage = 
  "GeneralizedExtremeValueDistribution[m, s, c] is the generalized \
extreme value distribution (GEV) with location parameter m, scale \
parameter s, and shape parameter c.";
Clear[GeneralizedExtremeValueDistribution];

GeneralizedExtremeValueDistribution::usage = 
  "GeneralizedExtremeValueDistribution[m, s, c] is the generalized \
extreme value distribution (GEV) with location parameter m, scale \
parameter s, and shape parameter c.";

GeneralizedExtremeValueDistribution /: 
  CDF[GeneralizedExtremeValueDistribution[m_, s_, c_], x_] := 
  Exp[-(1 + c ((x - m)/s))^(-1/c)];

GeneralizedExtremeValueDistribution /: 
  PDF[GeneralizedExtremeValueDistribution[m_, s_, c_], x_] = 
  D[CDF[GeneralizedExtremeValueDistribution[m, s, c], x], x];

dist = GeneralizedExtremeValueDistribution[m, s, c];

PDF[dist, x]

((c*(x - m))/s + 1)^(-(1/c) - 1)/
   (E^((c*(x - m))/s + 1)^(-c^(-1))*s)

CDF[dist, x]

E^(-((c*(x - m))/s + 1)^(-c^(-1)))


Bob Hanlon

---- janos <janostothmeister at gmail.com> wrote: 

=============
I wonder if I can define a new cotinuous or discrete distribution,
to make it possible to use it in the same way as the built-in ones.
I can define e.g. CDFGeneralizedExtremeValueDistribution,
or PDFGeneralizedExtremeValueDistribution,
but not the distribution itself.
FullForm of a known distribution does not help either.
Should I use it in an earlier version of Mathematica,
where the distributions came form a package,
therefore you could see the structure of the definition?

Could you give me some better advice please?

Thank you,

J=E1nos


--

Bob Hanlon



  • Prev by Date: Re: Re: Need Help
  • Next by Date: Re: Do I have to worry about "Left" division for matrices?
  • Previous by thread: Re: Definition of new distribution
  • Next by thread: Elliptic Modular Function