Custom continuous distributions

Revision as of 20:17, 7 August 2017 by Lchrisman (talk | contribs) (Keelin)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

These functions let you specify a continuous probability distribution by specifying any number of points on its cumulative or density function.

CumDist(p, r, i)

Specifies a continuous probability distribution as an array of cumulative probabilities, «p», for an array of corresponding outcome values, «r». The values of «p» must be non decreasing and should start with 0 and end with 1. The values of «r» must also be be non decreasing over their common index. If «p» is an index of «r», or «r» is an index of «p», or if both have the same single index, the correspondence is clear and so you can omit «i». Otherwise, if «p» or «r» have more than one index, you must specify the common index «i» to link «p» and «r».

By default, it fits the cumulative distribution using piecewise cubic monotonic interpolation between the specified points, so that the PDF is also continuous. If you set the optional parameter Smooth to False, it uses piecewise linear interpolation for the CDF, so that the PDF is piecewise uniform. See also Cumdist().


Variable Array_b :=
Index_a ▶
1 2 3
0 0.6 1.0
Variable Array_x :=
Index_a ▶
1 2 3
10 20 30
CumDist(Array_b, Array_x) →
Chapter15 25.png

ProbDist(p, r, i)

Specifies a continuous probability distribution as an array of probability densities, «p», for an array of corresponding values, «r». The values of «r» must be increasing. The probability densities «p» must be non-negative. It normalizes the densities so that the total probability integrates to 1.

Usually the first and last values of «p» should be 0. If not, it assumes zero at 2r1 - Rr (or 2rn - rn-1).

Either «r» must be an index of «p», or «p» and «r» must have an index in common. If «p» or «r» have more than one index, you must specify the index «i» to link «p» and «r».

It produces the density function using linear interpolation between the points on the density function (quadratic on CDF). See also ProbDist().


Variable Array_r :=
Index_a ▶
1 2 3 4 5 6
0 0.4 0.2 0.5 0.2 0
Variable Array_p :=
Index_a ▶
1 2 3 4 5 6
10 15 20 25 30 35
ProbDist(Array_p, Array_r) →
Chapter15 26.png

Keelin(values, percentiles, I, lb, ub)

Also known as the MetaLog distribution, the Keelin distribution is a flexible, smooth, continuous distribution (in unbounded, semi-bounded and fully bounded variations) that can be used to fit a sample of data when you don't know what underlying distribution type to use, or can be specified by an arbitrary set of quartiles. It is capable of taking on the shape of almost any common parametric distribution if the data justifies it, including any combination of skewness and kurtosis. Hence, it can be viewed as somewhat of a non-parametric distribution.

When you have a sample of data, x indexed by I, for a univariate quantity, you can use:

Keelin( values, I:I )

When you have a lot of value-quartile pairs, indexed by I, use

Keelin( value, quartile, I )

When «lb» and «ub» are omitted, the distribution is unbounded (with infinite tails in both directions). When both «lb» and «ub» are specified, a fully-bounded distribution results. When one or the other is specified, it is a semi-bounded distribution. For example, setting «lb» to 0 results in a positive-only distribution.

The distribution includes additional optional parameters. See Keelin for more details.

See Also


You are not allowed to post comments.