MCPcopy Index your code
hub / github.com/python/cpython / cdf

Method cdf

Lib/statistics.py:1266–1270  ·  view source on GitHub ↗

Cumulative distribution function. P(X <= x)

(self, x)

Source from the content-addressed store, hash-verified

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

Callers 4

test_pdfMethod · 0.95
test_cdfMethod · 0.95
test_inv_cdfMethod · 0.95
overlapMethod · 0.80

Calls 1

StatisticsErrorClass · 0.85

Tested by 3

test_pdfMethod · 0.76
test_cdfMethod · 0.76
test_inv_cdfMethod · 0.76