Accelerating the pace of engineering and science

# icdf

Class: prob.TruncatableDistribution
Package: prob

Inverse cumulative distribution function of probability distribution object

## Syntax

y = icdf(pd,prob)

## Description

y = icdf(pd,prob) returns the inverse cumulative distribution function (icdf) values of the probability distribution pd at the probabilities in prob.

## Input Arguments

expand all

### pd — Probability distributionprobability distribution object

Probability distribution, specified as a probability distribution object. Create a probability distribution object with specified parameter values using makedist. Alternatively, for fittable distributions, create a probability distribution object by fitting it to data using fitdist or the Distribution Fitting app.

### prob — Probabilitiesarray of scalar values in the range [0,1]

Probabilities at which to compute the icdf, specified as an array of scalar values in the range [0,1]. For example, specifying [.25 .5 .75] returns a vector containing three icdf values corresponding to these probabilities.

Data Types: single | double

## Output Arguments

expand all

### y — Inverse cumulative distribution functionarray

Inverse cumulative distribution function (icdf) values of the specified probability distribution, evaluated at the probabilities in prob, returned as an array. y has the same dimensions as x.

## Examples

expand all

### Compute Standard Normal Critical Values

Create a standard normal distribution object.

`pd = makedist('Normal')`
```pd =

NormalDistribution

Normal distribution
mu = 0
sigma = 1```

Determine the critical values at the 5% significance level for a test statistic with a standard normal distribution, by computing the upper and lower 2.5% values.

`y = icdf(pd,[.025,.975])`
```y =

-1.9600    1.9600```

Plot the cdf and shade the critical regions.

`p = normspec(y,0,1,'outside')`