scipy.stats.norm.cdf evaluates the cumulative probability, or area under a normal-distribution curve, up to a supplied value. For a standardized score z, it returns the probability that a normally distributed value is less than or equal to z. section 3.1.1
The function is useful when a normal-model result must become a percentile, threshold probability, or decision estimate. Standardize a raw value first with z = (value − mean) / standard deviation, then pass z to norm.cdf(). section 13.4 section 3.1.1
Estimate completion by a deadline
For a project with a mean duration of 29 weeks, a standard deviation of 1.41 weeks, and a 30-week deadline: z_score = (30 - 29) / 1.41; probability = stats.norm.cdf(z_score). The resulting z-score is 0.709 and SciPy returns 0.7609, or a 76.09% estimated chance of finishing within 30 weeks. section 13.4
Calculate a probability range
Compute two cumulative probabilities and subtract them: norm.cdf(1.5) - norm.cdf(1.0) = 0.091848..., giving roughly a 9.18% probability between 1.0 and 1.5 standard deviations above the mean. section 3.1.1
>>> import scipy.stats as stats
>>> due_date = 30
>>> mean = 29
>>> standard_deviation = 1.41
>>> z_score = (due_date - mean) / standard_deviation
>>> probability = stats.norm.cdf(z_score)
>>> print(f'z-score: {z_score:.3f}')
z-score: 0.709
>>> print(f'Probability of completing the project within '
>>> f'{due_date} weeks: {probability:.2%}')
Probability of completing the project within 30 weeks: 76.09%
Inspect the complete Python calculation, including imports, standardization, formatted output, and the 76.09% result. section 13.4
Figure 13.5 Normal probability distribution of project completion time, where the mean duration is 29 weeks and the standard deviation is 1.41 weeks. The due date of 30 weeks is marked, showing a 78.5% probability (using the z-table results) of completing the project within this timeframe.
Use the normal-distribution visualization to relate the cumulative area through the deadline to the modeled completion probability. section 13.4

