# scipy.special.ndtri#

scipy.special.ndtri(y, out=None) = <ufunc 'ndtri'>#

Inverse of `ndtr` vs x

Returns the argument x for which the area under the standard normal probability density function (integrated from minus infinity to x) is equal to y.

Parameters:
parray_like

Probability

outndarray, optional

Optional output array for the function results

Returns:
xscalar or ndarray

Value of x such that `ndtr(x) == p`.

`ndtr`

Standard normal cumulative probability distribution

`ndtri_exp`

Inverse of log_ndtr

Examples

`ndtri` is the percentile function of the standard normal distribution. This means it returns the inverse of the cumulative density `ndtr`. First, let us compute a cumulative density value.

```>>> import numpy as np
>>> from scipy.special import ndtri, ndtr
>>> cdf_val = ndtr(2)
>>> cdf_val
0.9772498680518208
```

Verify that `ndtri` yields the original value for x up to floating point errors.

```>>> ndtri(cdf_val)
2.0000000000000004
```

Plot the function. For that purpose, we provide a NumPy array as argument.

```>>> import matplotlib.pyplot as plt
>>> x = np.linspace(0.01, 1, 200)
>>> fig, ax = plt.subplots()
>>> ax.plot(x, ndtri(x))
>>> ax.set_title("Standard normal percentile function")
>>> plt.show()
```
{"ft_lang_label":"__label__en","ft_lang_prob":0.53194803,"math_prob":0.9884892,"size":1119,"snap":"2023-40-2023-50","text_gpt3_token_len":291,"char_repetition_ratio":0.11838565,"word_repetition_ratio":0.0,"special_character_ratio":0.28775692,"punctuation_ratio":0.1641791,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9986498,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-09-24T04:02:18Z\",\"WARC-Record-ID\":\"<urn:uuid:71afeabb-f922-4cdb-9f11-6c6267170081>\",\"Content-Length\":\"22544\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:330a3dec-1fbd-43e6-977b-fbeacc6f372c>\",\"WARC-Concurrent-To\":\"<urn:uuid:4b1e9713-1c31-48e1-98e5-7e441059caab>\",\"WARC-IP-Address\":\"185.199.111.153\",\"WARC-Target-URI\":\"http://scipy.github.io/devdocs/reference/generated/scipy.special.ndtri.html\",\"WARC-Payload-Digest\":\"sha1:BHO4VSQYP23G2BGUNGFWRJKQC4DUM2LU\",\"WARC-Block-Digest\":\"sha1:C6UL5M4YILPJP6YDVL7B7D36XSY4I4U5\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-40/CC-MAIN-2023-40_segments_1695233506559.11_warc_CC-MAIN-20230924023050-20230924053050-00095.warc.gz\"}"}