scipy.special.nrdtrisd#
- scipy.special.nrdtrisd(mn, p, x, out=None) = <ufunc 'nrdtrisd'>#
Calculate standard deviation of normal distribution given other params.
- Parameters:
- mnscalar or ndarray
The mean of the normal distribution.
- parray_like
CDF values, in range (0, 1].
- xarray_like
Quantiles, i.e. the upper limit of integration.
- outndarray, optional
Optional output array for the function results
- Returns:
- stdscalar or ndarray
Standard deviation.
See also
scipy.stats.normNormal distribution
ndtrStandard normal cumulative probability distribution
ndtriInverse of standard normal CDF with respect to quantile
nrdtrimnInverse of normal distribution CDF with respect to mean
Examples
nrdtrisdcan be used to recover the standard deviation of a normal distribution if we know the CDF value p for a given quantile x and the mean mn. First, we calculate the normal distribution CDF for an exemplary parameter set.>>> from scipy.stats import norm >>> mean = 3. >>> std = 2. >>> x = 6. >>> p = norm.cdf(x, loc=mean, scale=std) >>> p 0.9331927987311419
Verify that
nrdtrisdreturns the original value for std.>>> from scipy.special import nrdtrisd >>> nrdtrisd(mean, p, x) 2.0000000000000004