Cumulative distribution function. P(X <= x)
(self, x)
| 1264 | return exp(diff * diff / (-2.0 * variance)) / sqrt(tau * variance) |
| 1265 | |
| 1266 | def cdf(self, x): |
| 1267 | "Cumulative distribution function. P(X <= x)" |
| 1268 | if not self._sigma: |
| 1269 | raise StatisticsError('cdf() not defined when sigma is zero') |
| 1270 | return 0.5 * erfc((self._mu - x) / (self._sigma * _SQRT2)) |
| 1271 | |
| 1272 | def inv_cdf(self, p): |
| 1273 | """Inverse cumulative distribution function. x : P(X <= x) = p |