Probability, Bayesian reasoning, and uncertainty / personal lessonsLesson 9 of 14
Probability · Lesson 9

Model repeated samples, not just individual outcomes

The sampling distribution describes how an estimate changes across hypothetical repeated datasets.

By the end: Use the binomial model, derive the standard error of a proportion, and separate precision from representativeness.

From one trial to a count

A Bernoulli trial has two outcomes, coded one and zero, with success probability p. The count of successes in n independent trials with the same p has a binomial distribution. A particular sequence with k successes has probability p to the kth power times one minus p to the n minus kth power.

There are C(n,k) sequences with that count. Multiplying by this count gives the binomial probability of exactly k successes. If probabilities change, trials influence one another, or sampling removes a substantial fraction of a finite population, this binomial model may not apply.

Count sequences before grouping their results

Consider three inspections of independently selected items from a process whose fault probability is 20%. Call a fault one and a sound item zero. The particular sequence one, zero, zero has probability 0.2 times 0.8 times 0.8, which is 0.128. The order zero, one, zero has the same probability under these assumptions. Multiplying follows the conditional probability rule; independence lets each next factor remain 0.2 or 0.8 regardless of earlier outcomes.

Exactly one fault includes three distinct sequences, so its probability is three times 0.128, or 0.384. Exactly two faults also includes three sequences, but each now has weight 0.2 times 0.2 times 0.8, or 0.032. Their combined probability is 0.096. Equal numbers of sequences do not imply equal count probabilities when faults and sound items have different probabilities. The weights must travel with the sequences when we group them by count.

The remaining possibilities are no faults, with probability 0.8 cubed, or 0.512, and three faults, with probability 0.2 cubed, or 0.008. Adding 0.512, 0.384, 0.096, and 0.008 gives one. The expected count is three times 0.2, or 0.6 faults. That fractional average is consistent with an integer count on each run. It does not require any batch to contain 0.6 faults, and it does not guarantee six faults across ten batches.

Group weighted sequences by fault count

Sequences grouped by count0 faults0000.512 eachTotal 0.5121 faults1000100010.128 eachTotal 0.3842 faults1101010110.032 eachTotal 0.0963 faults1110.008 eachTotal 0.0081 = fault; 0 = sound
Three independent inspections with constant fault probability 0.2. Brackets group sequences, not equal probability areas. Sequence weights differ across fault counts.

The count loses the order information. That is harmless for calculating how many faults occur under this independent, constant probability model. It can matter for checking the model. A long uninterrupted run of faults might suggest a temporary machine problem, even if its total count matches another dataset with faults scattered throughout. The binomial distribution answers a count question under specified assumptions. It does not establish those assumptions merely because the observations can be coded as zeros and ones.

Changing probabilities gives a concrete contrast. Suppose the three fault probabilities are 0.1, 0.2, and 0.3, with independence preserved. No faults then has probability 0.9 times 0.8 times 0.7, or 0.504. The expected count remains 0.1 plus 0.2 plus 0.3, which is 0.6. This is not the same binomial distribution as before. A matching expected count cannot replace the assumption of the same probability on every trial when calculating the full distribution.

Sampling without replacement introduces another difference. If a tray contains exactly two faulty and eight sound items, the chance that two random draws are both faulty is 2/10 times 1/9, or 1/45. Replacing the first item before drawing again instead gives 2/10 times 2/10, or 1/25. In a huge population, removing a few items changes the remaining proportions very little. In this small tray the change is substantial, so the independent trial approximation misses a visible part of the mechanism.

Two draws from two faulty and eight sound items

ProcedureFirst faultSecond given firstBoth faulty
Replace first item2/102/101/25 = 4%
Keep first item out2/101/91/45 ≈ 2.22%
Uniform random draws. Without replacement, one faulty item and nine total items remain after a first fault. These are probabilities, not guaranteed frequencies.

The estimate varies between datasets

For independent Bernoulli trials, the sample proportion is the success count divided by n. Its expected value is p and its standard deviation is the square root of p times one minus p divided by n. This standard deviation across repeated samples is called its standard error. It is not the standard deviation of individual zero-one observations.

Quadrupling sample size halves this standard error. The experiment enumerates all possible counts, rather than drawing one lucky random path. As n grows, proportions concentrate near p even though there are more possible count values and the probability of any single count can decrease. A normal approximation may be useful when expected successes and failures are sufficiently large; exact discrete probabilities are used here.

Separate the spread of observations from the spread of averages

For a single zero or one observation with success probability 0.5, the mean is 0.5. Either outcome lies 0.5 from that mean. Squaring gives 0.25 in both cases, so variance is 0.25 and standard deviation is 0.5. An average of many such observations is a different variable. It can take intermediate values because it divides a count by sample size. Its spread describes repeated datasets, rather than variation between individual people or items within one dataset.

For nine independent observations, the variance of their count is nine times 0.25, or 2.25. Dividing that count by nine divides each deviation by nine, and therefore divides each squared deviation by 81. The variance of the sample proportion is 2.25/81, or 1/36. Its standard deviation is 1/6, about 0.1667. This is the standard error. The individual outcomes still have standard deviation 0.5; taking an average has not made each individual outcome less variable.

Compare nine with thirty-six observations at the same success probability. Count variance grows to 36 times 0.25, or nine, so count standard deviation grows from 1.5 to three successes. Proportion standard error nevertheless falls to 3/36, or about 0.0833. Absolute count uncertainty grows while proportional uncertainty shrinks. This explains why a larger poll can have a wider range of plausible vote counts but a narrower range of plausible percentages. Always identify whether an axis shows counts or proportions before comparing spread.

Count spread and proportion spread differ

Fair independent trialsCount SD, successesProportion SEIndividual SD
91.51/6 ≈ 0.16670.5
3631/12 ≈ 0.08330.5
SD means standard deviation; SE means standard error. Dividing count SD by sample size gives proportion SE. Four times the sample size halves SE, while individual variability stays unchanged.

The probability itself also affects spread. At success probability 0.1 and sample size nine, the proportion variance is 0.1 times 0.9 divided by nine, which is 0.01. Its standard error is 0.1, smaller than at probability 0.5. There is less absolute variation because most observations are zeros. Relative to the small mean of 0.1, however, that uncertainty is substantial. A ten percentage point standard error is not the same statement as a ten percent relative error in the estimate.

A standard error is a standard deviation, not a bound. Some samples lie more than one standard error from the generating probability. Nor does multiplying it by two automatically produce an exact 95% interval. Such shortcuts depend on distributional approximations and on how the unknown probability is handled. Near zero or one, discrete asymmetry becomes especially visible. An arithmetic formula for spread remains useful without implying that every sampling distribution has the same shape or the same tail probabilities.

There is also a difference between using a known probability to study a procedure and estimating uncertainty from data. The chart below fixes the generating probability at 0.5, so its displayed standard error follows directly from that known model. In an actual survey, the population proportion is usually unknown. Substituting the observed proportion into a spread formula is an additional estimation step. It does not turn the observed percentage into the true percentage, and its performance needs evaluation as part of the whole procedure.

Work through the mechanism

1. Count sequences with k successes
P(count = k)=C(n,k)×pk×(1−p)n−k

C(n,k) counts unordered selections of k success positions among n. Trials are independent with constant success probability p.

2. Standard error of the sample proportion
SE=p(1−p)n

For independent Bernoulli observations, each variance is p(1 − p). Variances add for the sum; dividing the sum by n divides its variance by n squared.

Enumerate every possible sample proportion

Probability mass for each possible proportion0%10%20%30%40%00.250.50.751Sample proportion = success count / n

Mean proportion: 0.5. Standard error: approximately 0.1581 in proportion units, or 15.81 percentage points.

Every count and its probability
CountProportionProbability
000.1%
10.10.98%
20.24.39%
30.311.72%
40.420.51%
50.524.61%
60.620.51%
70.711.72%
80.84.39%
90.90.98%
1010.1%
p = 0.5, independent identical trials. Horizontal position uses the same proportion scale across sample sizes; bar height is probability mass, not density. More possible values can lower individual peaks while proportions concentrate. No random sample is generated. Controls immediately replace sample size.
Independent fair trialsExpected proportionStandard error
40.50.25
100.5≈ 0.1581
200.5≈ 0.1118
The chart uses p = 0.5 throughout. It shows probability masses, not a continuous density.

Read concentration on a common proportion scale

Use the small sample preset and then compare it with twenty trials. The horizontal coordinate is the success count divided by sample size in both cases. Thus the center at 0.5 has the same meaning in both pictures. Four trials allow only five proportions, separated by 0.25. Twenty trials allow twenty-one proportions, separated by 0.05. More possible values do not themselves mean greater uncertainty. What matters is how much total probability lies far from the generating probability.

The bars show probability masses at those permitted proportions. They are not pieces of a continuous density whose areas must be added. For four fair trials, the bar at proportion 0.25 represents the event of one success and has mass 4/16. For twenty fair trials, that same horizontal coordinate represents five successes and has mass 15,504/1,048,576, about 0.0148. Bar widths are presentation choices. Changing their drawn width would not change these event probabilities or create probability between attainable proportions.

Compare the central band from 0.25 through 0.75, including both endpoints. With four trials, it contains counts one through three. Its probability is 14/16, or 87.5%. With twenty trials, it contains counts five through fifteen. The excluded lower tail has sequence counts 1 plus 20 plus 190 plus 1,140 plus 4,845, which sum to 6,196. The upper excluded tail has the same weight by symmetry. The included probability is therefore 1 minus 12,392/1,048,576, about 98.82%.

A fixed band collects more mass

Mass at each proportion4 trials0.00.20.400.250.50.75120 trials0.00.20.400.250.50.751Success proportion
Gold dots mark proportions from 0.25 through 0.75 inclusive. Their total mass is 87.5% for four trials and about 98.82% for twenty. The same axes are used in both panels. Stems show discrete probability mass; drawn areas have no probability meaning.

This band comparison measures concentration without relying on the height of the tallest bar. The middle bar can get shorter as sample size grows because probability is distributed among more nearby proportions. Meanwhile a fixed neighborhood around 0.5 can gain total probability. That combination is possible because a peak describes one exact event, whereas a band combines many events. A lower peak is therefore not evidence of a less precise estimator when the set of attainable values has also changed.

Before changing the preset, predict what happens to the probability of an all-success dataset. It is 0.5 raised to the sample size because every trial must succeed. For four trials this is 1/16. For twenty it is 1/1,048,576. The upper endpoint stays at proportion one, but its mass becomes much smaller. The same holds at zero. The plot describes these possibilities even when their bars become hard to see; lack of visible height is not mathematical impossibility.

The display enumerates possible results rather than producing a history of observed samples. Switching presets changes the experiment being described. It does not show a real dataset growing from four observations to twenty, and it does not force an estimate toward 0.5 along one particular path. If the next few observations happen to be successes, a running proportion can move away from 0.5. Concentration concerns probabilities across possible datasets of a given size, not guaranteed improvement after each additional observation in one sequence.

Extreme proportions remain possible

Fair independent trialsAll succeedAll failEither extreme
41/161/162/16 = 12.5%
201/1,048,5761/1,048,5762/1,048,576 ≈ 0.000191%
Both experiments permit proportions zero and one. Their locations stay fixed while their probability masses shrink. Tiny mass is not zero mass.

More observations do not repair selection bias

A sample can be precise about the wrong population. Ten thousand volunteers who choose to answer a survey need not represent everyone eligible. Increasing that sample can shrink random sampling error without removing systematic differences in who responds.

Clustering also reduces the information gained from additional observations. Twenty measurements from one household are not generally equivalent to twenty independently sampled households. Before trusting a standard-error formula, identify the sampling unit, recruitment process, nonresponse, and dependence.

Identify which observations provide new information

Imagine collecting twelve responses by independently selecting twelve households and asking one person in each. Contrast this with selecting three households and recording four copies of each household's answer. Suppose each household independently answers yes with probability 0.5. Both files contain twelve entries with the same marginal chance of yes. In the copied file, however, the possible success counts are only zero, four, eight, and twelve. Treating its twelve rows as twelve independent observations invents distinctions that the collection procedure cannot produce.

The copied proportion equals the proportion of yes answers among three households. Its standard error is the square root of 0.25/3, about 0.2887. Twelve independent households would give the square root of 0.25/12, about 0.1443. Copying has not reduced uncertainty at all. Real household members need not agree perfectly, so their dependence may lie between these examples. The relevant correction depends on that dependence and the sampling design, rather than on the mere number of rows in a file.

Copied rows do not add households

Independent householdsThree household answers1A2A3A4A5B6B7B8B9C10C11C12CSE ≈ 0.1443SE ≈ 0.2887Each household: P(yes) = 0.5
Each circle is one data entry. Distinct numbers represent twelve independent household answers. Repeated letters represent four identical copies of each of three independent answers. Circle area is not probability; SE refers to the resulting sample proportion.

Dependence can persist even after specifying the measured state. Two instruments might both be more likely to fail on faulty items, which creates association across a mixed population. They might also share a power supply and fail together among sound items. Independence conditional on true status would remove the first mixture effect, but not the shared supply effect. Calling two readings separate measurements does not establish either kind of independence. To justify multiplying their conditional probabilities, inspect how each reading was generated.

Selection bias requires a different diagnosis. Suppose a population contains equal numbers of subscribers and nonsubscribers. In a constructed recruitment model, subscribers respond with probability 0.8 and nonsubscribers with probability 0.2. Per thousand invitations, expected responses are 400 subscribers and 100 nonsubscribers. Subscribers then form 80% of respondents although they form 50% of the invited population. More invitations can make the respondent percentage stable near 80%. That precision would describe the selected group, not repair the missing representation of nonsubscribers.

Random sampling and random assignment address different parts of an argument. Sampling people at random can support estimating a population's existing opinion. Assigning sampled people at random to two messages can support comparing the messages' causal effects within the study, provided the intervention and follow-up satisfy the design assumptions. Assignment does not make an unrepresentative volunteer pool representative. Sampling does not make voluntary exposure to a message equivalent to assignment. A narrow uncertainty interval cannot supply either missing connection by itself.

To audit a reported percentage, identify the target population and the unit selected before using the sample size. Ask whether rows represent independent units, repeated observations, or copies. Then distinguish random variation under that design from systematic differences between respondents and nonrespondents. If the study compares actions, also identify the assignment mechanism. These checks can change the appropriate probability model or the claim it supports. They do not amount to adding one universal margin of error to every source of uncertainty in the study.

Selection changes the respondent mixture

1,000 invitationsExpected respondents500 subscribers500 nonsubscribers× 0.8× 0.2400 subscribers100 nonsubscribersSubscribers: 400/500 = 80%
Constructed response model. Paths show selection, not scaled probability widths. Counts are expectations under the stated rates, not guaranteed responses. Equal invitation groups become unequal respondent groups.

Exercises

Exactly two successes

In four independent trials with success probability 0.5, find the probability of exactly two successes.

Hint

Count the orders as well as the probability of one order.

Worked answer
Probability, fixed 0–100% scale0 successes6.25%1 success25%2 successes37.5%3 successes25%4 successes6.25%
CountSequencesProbability
011/16
144/16
266/16
344/16
411/16
The sequence counts sum to sixteen.

Each four-outcome sequence has probability 1/16. There are C(4,2) = 6 sequences with two successes. The probability is 6/16 = 0.375. The sequence success, success, failure, failure is only one of them.

Halve the standard error

A valid independent-sample design gives standard error 0.05 at n = 100. How many observations are needed for 0.025 under the same p? Would that fix nonresponse bias?

Hint

The standard error scales with one over the square root of n.

Worked answer
Sample sizeRelative sizeStandard error
1001×0.05
2002×≈ 0.0354
4004×0.025
Precision and representativeness require separate checks.

Use n = 400, four times as many observations. Doubling n is not enough. This calculation assumes the same independent-trial model. It does not remove bias if people with different outcomes respond at different rates.

Sources and further reading

The explanations and exercises are complete without these optional links. The references distinguish probability identities from inference procedures and reporting guidance. The examples are constructed teaching models, not empirical estimates or professional decision advice.