Randomness & Sample Size
@BootstrapWorld
#BootstrapCS
Flip the Script: Inference v. Probability
One of the most useful tasks in Data Science is using sample data to infer (guess) what’s true about the larger population from which the sample was taken.
This process, called statistical inference, is used to gain information in practically every field of study you can imagine: medicine, business, politics, history; even art!
Early on, statisticians discovered that random samples almost always work best.
@BootstrapWorld
#BootstrapCS
Flip the Script: Inference v. Probability
Suppose we want to estimate what percentage of all Americans plan to vote for a certain candidate.
We can’t ask everyone who they’re voting for, so pollsters instead take a sample of Americans, and generalize the opinion of the sample to estimate how Americans as a whole feel.
But choosing a sample can be tricky…
@BootstrapWorld
#BootstrapCS
Flip the Script: Inference v. Probability
@BootstrapWorld
#BootstrapCS
Flip the Script: Inference v. Probability
Before we infer something unknown about a population from a sample, we need to know what makes a "good" sample!
Sampling is a complicated issue!
@BootstrapWorld
#BootstrapCS
Flip the Script: Inference v. Probability
The main reason for doing inference is to guess about something that’s unknown for the whole population.
But a useful step along the way is to practice with situations where we happen to know what’s true for the whole population. As an exercise, we can keep taking random samples from that population and see how close they tend to get us to the truth.
@BootstrapWorld
#BootstrapCS
Flip the Script: Inference v. Probability
Another discovery (besides the value of randomness) that statisticians made early on was something that’s perfectly consistent with common sense: Larger samples are better than smaller ones, because they tend to get us closer to the truth about the larger population.
@BootstrapWorld
#BootstrapCS
Flip the Script: Inference v. Probability
Save a copy of the Random Samples Starter File and Click Run.
Complete Sampling and Inference (Page 40) with your group.
@BootstrapWorld
#BootstrapCS
Flip the Script: Inference v. Probability
How did your results for the small sample compare with your results for the large?
@BootstrapWorld
#BootstrapCS
Additional Exercises
@BootstrapWorld
#BootstrapCS