Custom continuous distributions

Revision as of 03:54, 31 December 2015 by Bbecane (talk | contribs)

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().

Library: Distribution

Example:

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().

Library: Distribution

Example:

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

See Also


Comments


You are not allowed to post comments.