I'll post my answer with the assumption that this is not part of a homework assignment for a class.
The question provides information on the mean and variance of the distribution, which are 38 and 5, respectively. Assuming a Gaussian distribution, we can answer the question by plugging in appropriate values to the cumulative distribution function. To calculate the CDF, we use scipy
.
The first question is asking for "the proportion of farmers using more than 50 liters of pesticide a week." In code, this translates into:
from scipy.stats import norm
print(1 - norm.cdf(50, 38, 5)) # 0.008197535924596155, or ~ 0.8 percent
Note that we subtract from 1 since the question asks for 50 or more, not up to 50, which is what we would get if we used the value returned by the CDF as it is.
For (b), we can do
print(norm.cdf(10, 38, 5)) # 1.0717590258310887e-08
This will give us the proportion of farmers using 10 liters of pesticides or less.
For the last question, we can take the same approach, with just a slight bit of alteration:
print(norm.cdf(60, 38, 5) - norm.cdf(30, 38, 5)) # 0.9451952957565343
We first calculate norm.cdf(60, 38, 5)
, which gives us the proportion of farmers using 60 liters of pesticide or less. From this, we subtract norm.cdf(30, 38, 5)
, which is the proportion of farmers who use 30 liters or less. By definition, this will give us farmers using the amount of pesticide within the range of [30, 60]
, which is what the question asks for.
As for plotting, there are already a plethora of excellent answers here on SO, such as this one. I'll reserve my answer for threads of the likes.