Random Sampling Distributions
📖 Scenario: Imagine you are a scientist studying the heights of plants in a garden. You want to understand how the average height changes when you take different random samples from the garden.
🎯 Goal: You will create a list of plant heights, set a sample size, take many random samples from the list, calculate the average height for each sample, and finally display the list of these sample averages.
📋 What You'll Learn
Create a list called
plant_heights with exact values: 10, 15, 14, 20, 18, 22, 17, 19, 16, 21Create a variable called
sample_size and set it to 4Use a
for loop to take 5 random samples of size sample_size from plant_heights using numpy.random.choiceCalculate the average height of each sample and store these averages in a list called
sample_averagesPrint the list
sample_averages to see the results💡 Why This Matters
🌍 Real World
Scientists and researchers often take random samples from a population to estimate average values without measuring everyone.
💼 Career
Understanding sampling distributions is important for data analysts and scientists to make predictions and decisions based on sample data.
Progress0 / 4 steps