import numpy as np
from scipy import stats
The probabilities in this problem can be evaluated with the cumulative distribution function, or $C_{DF}$, of a normal distribution. (This $C_{DF}$ also has the name $\mbox{Erf}(x)$.)
I will use the $C_{DF}$ from the stats
sub-module of scipy
.
mean = 502
sigma = 14
stats.norm.cdf(500, mean, sigma)
The probability is about 44%.
1 - stats.norm.cdf(530, mean, sigma)
The probability is about 2.3%, and so, out of 1000 bags, you would expect about 23 to have a mass greater than 530 g.
version_information
is from J.R. Johansson (jrjohansson at gmail.com); see Introduction to scientific computing with Python for more information and instructions for package installation.
version_information
is installed on the linux network at Bucknell
%load_ext version_information
%version_information numpy, scipy