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