主要内容

pearsinv

Pearson inverse cumulative distribution function

Since R2025a

Description

x = pearsinv(p,mu,sigma,skew,kurt) returns the inverse of the Pearson cumulative distribution function (cdf), evaluated at the probability values in p, using the mean mu, standard deviation sigma, skewness skew, and kurtosis kurt.

example

[x,type] = pearsinv(p,mu,sigma,skew,kurt) also returns the type of the specified distribution within the Pearson system.

example

[x,type,coefs] = pearsinv(p,mu,sigma,skew,kurt) also returns the coefficients of the Pearson cdf.

example

Examples

collapse all

Compute the inverse of cdf values evaluated at the probability values in p for the Pearson distribution with mean mu, standard deviation sigma, skewness skew, and kurtosis kurt.

p = 0.25:0.25:1;
mu = 2;
sigma = 1;
skew = 1;
kurt = 4;
x = pearsinv(p,mu,sigma,skew,kurt)
x = 1×4

    1.2345    1.8045    2.5661   10.5249

Compute the cdf at x with the same parameter values.

p2 = pearscdf(x, mu, sigma, skew, kurt)
p2 = 1×4

    0.2500    0.5000    0.7500    1.0000

p2-p 
ans = 1×4
10-14 ×

    0.0056   -0.0056   -0.2220         0

The values in p2 and p are identical, with small floating point numerical differences. Hence, pearscdf and pearsinv are complements.

Compute the inverse of cdf values evaluated at 0.5 for various Pearson distributions with different mean parameters.

mu = [-2,-1,0,1,2];
[x,type,coefs] = pearsinv(0.5,mu,sigma,skew,kurt)
x = 1×5

   -2.1955   -1.1955   -0.1955    0.8045    1.8045

type = 
1
coefs = 1×3

    1.3000    0.7000   -0.1000

The Pearson distribution is of type 1. A type 1 Pearson distribution corresponds to the 4-parameter beta distribution. For more information, see Pearson Distribution.

Input Arguments

collapse all

Probability values at which to evaluate the inverse of the cdf (icdf), specified as a scalar value or an array of scalar values, where each element is in the range [0,1].

To evaluate the icdf at multiple values, specify p using an array. To evaluate the icdfs of multiple distributions, specify mu and sigma using arrays. If one or more of the input arguments p, mu, and sigma are arrays, then the array sizes must be the same. In this case, pearsinv expands each scalar input into a constant array of the same size as the array inputs. Each element in x is the icdf value of the distribution specified by the corresponding elements in mu and sigma, evaluated at the corresponding element in p.

Example: [0.1,0.5,0.9]

Data Types: single | double

Mean of the Pearson distribution, specified as a scalar, or numeric array.

To evaluate the icdf at multiple values, specify p using an array. To evaluate the icdfs of multiple distributions, specify mu and sigma using arrays. If one or more of the input arguments p, mu, and sigma are arrays, then the array sizes must be the same. In this case, pearsinv expands each scalar input into a constant array of the same size as the array inputs. Each element in x is the icdf value of the distribution specified by the corresponding elements in mu and sigma, evaluated at the corresponding element in p.

Example: [0 1 2; 0 1 2]

Data Types: single | double

Standard deviation of the Pearson distribution, specified as a positive scalar or an array of positive values.

To evaluate the icdf at multiple values, specify p using an array. To evaluate the icdfs of multiple distributions, specify mu and sigma using arrays. If one or more of the input arguments p, mu, and sigma are arrays, then the array sizes must be the same. In this case, pearsinv expands each scalar input into a constant array of the same size as the array inputs. Each element in x is the icdf value of the distribution specified by the corresponding elements in mu and sigma, evaluated at the corresponding element in p.

Example: [1 1 1; 2 2 2]

Data Types: single | double

Skewness for the Pearson distribution, specified as a scalar. The value of skew must be less than sqrt(kurt – 1). For more information, see Skewness.

Example: 3

Data Types: single | double

Kurtosis for the Pearson distribution, specified as a scalar. The value of kurt must be greater than skew^2 + 1. For more information, see Kurtosis.

Example: 11

Data Types: single | double

Output Arguments

collapse all

icdf values, evaluated at the probability values in p, returned as a scalar value or an array of scalar values. x is the same size as p, mu, and sigma after any necessary scalar expansion. Each element in x is the icdf value of the distribution specified by the corresponding elements in mu and sigma, evaluated at the corresponding element in p. The distribution has the specified scalar parameters skew and kurt.

Type of Pearson distribution used to calculate the cdf, returned as an integer from the interval [0 7] or NaN. If the distribution parameters are invalid, pearsinv returns NaN.

This table describes the distribution corresponding to each Pearson distribution type.

Pearson Distribution TypeDescription
0Normal
14-parameter beta
2Symmetric 4-parameter beta
33-parameter gamma
4Distribution specific to the Pearson system
5Inverse 3-parameter gamma
6F location-scale
7Student's t location-scale

Quadratic polynomial coefficients, returned as a numeric 1-by-3 vector. The ith element of coefs is the coefficient bi in the differential equation

p'(x)p(x)=a+(xμ)b0+b1(xμ)+b2(xμ)2,

which defines the Pearson distribution probability density function (pdf) p(x).

You can calculate the support for the Pearson distribution cdf using coefs. For more information, see Probability Density Function and Support.

More About

collapse all

Alternative Functionality

  • pearsinv is a function specific to Pearson distribution. Statistics and Machine Learning Toolbox™ also offers the generic function icdf, which supports various probability distributions. To use icdf, create a PearsonDistribution probability distribution object and pass the object as an input argument or specify the probability distribution name and its parameters. Note that the distribution-specific function pearsinv is faster than the generic function icdf.

Extended Capabilities

expand all

Version History

Introduced in R2025a