# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English version of the page.

# norminv

Normal inverse cumulative distribution function

## Syntax

```X = norminv(P) X = norminv(P,mu,sigma) [X,XLO,XUP] = norminv(P,mu,sigma,pcov,alpha) ```

## Description

`X = norminv(P)` computes the inverse of the standard normal cdf. The standard normal distribution has parameters `mu = 0` and ```sigma = 1```. `P` can be a vector, matrix, or multidimensional array, and the values in `P` must lie in the interval [0 1].

`X = norminv(P,mu,sigma)` computes the inverse of the normal cdf using the corresponding mean `mu` and standard deviation `sigma` at the corresponding probabilities in `P`. `P`, `mu`, and `sigma` can be vectors, matrices, or multidimensional arrays that all have the same size. A scalar input is expanded to a constant array with the same dimensions as the other inputs. The parameters in `sigma` must be positive, and the values in `P` must lie in the interval [0 1].

`[X,XLO,XUP] = norminv(P,mu,sigma,pcov,alpha)` produces confidence bounds for `X` when the input parameters `mu` and `sigma` are estimates. `pcov` is the covariance matrix of the estimated parameters. `alpha` specifies 100(1 - `alpha`)% confidence bounds. The default value of `alpha` is `0.05`. `XLO` and `XUP` are arrays of the same size as `X` containing the lower and upper confidence bounds.

The function `norminv` computes confidence bounds for `P` using a normal approximation to the distribution of the estimate

`$\stackrel{^}{\mu }+\stackrel{^}{\sigma }q$`

where q is the `P`th quantile from a normal distribution with mean 0 and standard deviation 1. The computed bounds give approximately the desired confidence level when you estimate `mu`, `sigma`, and `pcov` from large samples, but in smaller samples other methods of computing the confidence bounds may be more accurate.

The normal inverse function is defined in terms of the normal cdf as

`$x={F}^{-1}\left(p|\mu ,\sigma \right)=\left\{x:F\left(x|\mu ,\sigma \right)=p\right\}$`

where

`$p=F\left(x|\mu ,\sigma \right)=\frac{1}{\sigma \sqrt{2\pi }}{\int }_{-\infty }^{x}{e}^{\frac{-{\left(t-\mu \right)}^{2}}{2{\sigma }^{2}}}dt$`

The result, x, is the solution of the integral equation above where you supply the desired probability, p.

## Examples

Find an interval that contains 95% of the values from a standard normal distribution.

```x = norminv([0.025 0.975]) x = -1.9600 1.9600```

Note that the interval `x` is not the only such interval, but it is the shortest.

```xl = norminv([0.01 0.96]) xl = -2.3263 1.7507```

The interval `xl` also contains 95% of the probability, but it is longer than `x`.