Cumulative distribution function. P(X <= x)
(self, x)
| 1204 | return exp(diff * diff / (-2.0 * variance)) / sqrt(tau * variance) |
| 1205 | |
| 1206 | def cdf(self, x): |
| 1207 | "Cumulative distribution function. P(X <= x)" |
| 1208 | if not self._sigma: |
| 1209 | raise StatisticsError('cdf() not defined when sigma is zero') |
| 1210 | return 0.5 * (1.0 + erf((x - self._mu) / (self._sigma * _SQRT2))) |
| 1211 | |
| 1212 | def inv_cdf(self, p): |
| 1213 | """Inverse cumulative distribution function. x : P(X <= x) = p |