Documentation Center

  • Trial Software
  • Product Updates

pdf

Class: piecewisedistribution

Probability density function for piecewise distribution

Syntax

P = pdf(obj,X)

Description

P = pdf(obj,X) returns an array P of values of the probability density function for the piecewise distribution object obj, evaluated at the values in the array X.

    Note:   For a Pareto tails object, the pdf is computed using the generalized Pareto distribution in the tails. In the center, the pdf is computed using the slopes of the cdf, which are interpolated between a set of discrete values. Therefore the pdf in the center is piecewise constant. It is noisy for a cdffun specified in paretotails via the 'ecdf' option, and somewhat smoother for the 'kernel' option, but generally not a good estimate of the underlying density of the original data.

Examples

Fit Pareto tails to a t distribution at cumulative probabilities 0.1 and 0.9:

t = trnd(3,100,1);
obj = paretotails(t,0.1,0.9);
[p,q] = boundary(obj)
p =
    0.1000
    0.9000
q =
   -1.7766
    1.8432

pdf(obj,q)
ans =
    0.2367
    0.1960

See Also

|

Was this topic helpful?