Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p><a href="http://support.microsoft.com/kb/826772" rel="noreferrer">NORMSINV</a> (mentioned in a comment) is the inverse of the CDF of the standard normal distribution. Using <code>scipy</code>, you can compute this with the <code>ppf</code> method of the <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.norm.html" rel="noreferrer"><code>scipy.stats.norm</code></a> object. The acronym <code>ppf</code> stands for <a href="http://www.itl.nist.gov/div898/handbook/eda/section3/eda362.htm#PPF" rel="noreferrer"><em>percent point function</em></a>, which is another name for the <a href="https://en.wikipedia.org/wiki/Quantile_function" rel="noreferrer"><em>quantile function</em></a>.</p> <pre><code>In [20]: from scipy.stats import norm In [21]: norm.ppf(0.95) Out[21]: 1.6448536269514722 </code></pre> <p>Check that it is the inverse of the CDF:</p> <pre><code>In [34]: norm.cdf(norm.ppf(0.95)) Out[34]: 0.94999999999999996 </code></pre> <p>By default, <code>norm.ppf</code> uses mean=0 and stddev=1, which is the "standard" normal distribution. You can use a different mean and standard deviation by specifying the <code>loc</code> and <code>scale</code> arguments, respectively.</p> <pre><code>In [35]: norm.ppf(0.95, loc=10, scale=2) Out[35]: 13.289707253902945 </code></pre> <p>If you look at the source code for <code>scipy.stats.norm</code>, you'll find that the <code>ppf</code> method ultimately calls <a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.special.ndtri.html" rel="noreferrer"><code>scipy.special.ndtri</code></a>. So to compute the inverse of the CDF of the standard normal distribution, you could use that function directly:</p> <pre><code>In [43]: from scipy.special import ndtri In [44]: ndtri(0.95) Out[44]: 1.6448536269514722 </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload