Interactive Graph:
Random Sampling

By Elena Llaudet, co-author of Data Analysis for Social Science (DSS)

Random sampling creates a representative sample of the target population when the sample size n is large enough.

Suppose the population consists of 1,000 individuals, where 20% of them are orange, 10% are blue, 20% are pink, 30% are green, and 20% are purple. If we randomly select a sample of n individuals from this population, the sample will have similar proportions of each type of individual as long as n is large enough. Let's take a closer look:

STEP 1: Look at the graphs below. If the sample size is set to only 20 individuals, the sample might end up with no blue or purple individuals, even though these groups represent 10% and 20% of the population, respectively, making the sample clearly not representative despite random sampling.
STEP 2: Move the slider to increase the sample size and observe how the composition of the sample starts to match that of the population. When n reaches 300, the sample closely mirrors the population's proportions, making it representative.

Move the slider to see how random sampling creates a representative sample of the population as sample size increases.

20
Population
N = 1000
Sample
n = 20

Note: N is the total population size and n is the sample size. The white numbers on top of each bar show the actual count of individuals of that type in each group.