Once we know the sampling distribution of the mean, we can also use it to estimate the probability of observing a particular range of sample means, given some information (either known or assumed) about the population. To do this, we can use the Cumulative Distribution Function, or (CDF) of the normal distribution.
Let’s work through this with our salmon fish example. Let’s say we are transporting the salmon and want to make sure the crate we carry the fish in will be strong enough to hold the weight.
- Suppose we estimate that the salmon population has an average weight of 60 lbs with a standard deviation of 40 lbs.
- We have a crate that supports 750 lbs, and we want to be able to transport 10 fish at a time.
- We want to calculate the probability that the average weight of those 10 fish is less than or equal to 75 (750/10).
Using the CLT, we first estimate that the mean weight of 10 randomly sampled salmon from this population is normally distributed with mean = 60 and standard error = 40/10^.5. Then, we can use this probability distribution to calculate the probability that 10 randomly sampled fish will have a mean weight less than or equal to 75.
x = 75 mean = 60 std_dev = 40 samp_size = 10 standard_error = std_dev / (samp_size**.5) # remember that **.5 is raising to the power of one half, or taking the square root stats.norm.cdf(x,mean,standard_error)
This returns 0.882, or a probability of 88.2% that the average weight of our sample of 10 fish will be less than or equal to 75.
Let’s calculate the same probability for our cod fish population.
We know that cod have an average weight of 36 lbs with a standard deviation of 20. We want to try to fit 25 cod fish into our same crate that can hold up to 750 lbs.
Our first step is to calculate the standard error for a sample size of 25. Using the above information, calculate the standard error and assign it to a variable called
Awesome! Now that we have our standard error, we can use the normal CDF to calculate the probability that a sample of 25 fish has a mean weight of 30 lbs. Using the function
stats.norm.cdf(), calculate this probability and assign it to a variable
Given the probability you calculated in the last checkpoint, would you recommend trying to carry 25 cod in the crate?
Click Run to move onto the next exercise.