chi2inv

Compute chi-squared distribution inverse cumulative distribution function values.

Syntax

x=chi2inv(p,n)

Inputs

p
Probability values.
Type: double
Dimension: scalar | vector | matrix
n
Degrees of freedom.
Type: integer
Dimension: scalar | vector | matrix

Outputs

x
Values of the distribution random variable.

Examples

Single value chi2inv example:
p = 0.5;
n = 5;
x = chi2inv(p,n)
x = 4.3515
Vector chi2inv example:
p = [0.1:0.1:0.9];
n = 5;
x = chi2inv(p,n)
x = [Matrix] 1 x 9
1.6103 2.3425 2.9999 3.6555 4.3515 5.1319 6.0644 7.2893 9.2364