Practice Questions: Modules 1–5

statistical inference
sampling distribution
bootstrapping
CLT
confidence intervals
A fresh set of practice questions covering population/sample, sampling distribution, bootstrapping, the CLT, and confidence intervals — with detailed, worked feedback for every question.
Author

Rodolfo Lourenzutti

1 Practice Questions: Modules 1–5

Learning objectives

These questions review the material from Modules 1 through 5. By working through them, you should be able to:

  • Define and distinguish population, sample, parameter, statistic, estimator, and estimate, and identify each in a new scenario.
  • Distinguish between the population distribution, the sample distribution, and the sampling distribution — and correctly describe how each one behaves as the sample size \(n\) grows.
  • Explain what sampling variability, bias, and standard error are, and distinguish standard error from standard deviation.
  • Distinguish a statistic as a random variable (the estimator) from the specific value it takes in one sample (the estimate).
  • Explain the logic of bootstrapping: how a bootstrap sample and a bootstrap distribution are built, and when bootstrapping is unreliable.
  • State the Central Limit Theorem, list its conditions, and distinguish it from the Law of Large Numbers.
  • Construct and correctly interpret a confidence interval, whether obtained via bootstrapping or via the CLT.
  • Check the conditions (\(n\hat{p} \ge 10\) and \(n(1-\hat{p}) \ge 10\)) for trusting a Normal approximation to a sampling distribution of a proportion.
  • Write the infer pipeline (specify()generate()calculate()get_confidence_interval()) for a bootstrap confidence interval, for one mean, one proportion, a difference in means, and a difference in proportions.

How to use this page

Every multiple-choice question below gives you feedback the moment you select an answer. If you don’t know why an answer is wrong, select it to take a look at the feedback. The open-ended reasoning questions ask you to type your own answer first; once you have typed something, a Show Answer panel unlocks with a full worked solution. Take the time to write your reasoning before peeking.

Our running example: Sunridge Apiaries

Sunridge Apiaries is a beekeeping cooperative that manages \(N = 4{,}000\) hives spread across several farms this season. At the end of the season, the co-op wants to know the average amount of honey produced per hive, in kilograms, so it can plan how much to sell versus how much honey to leave behind so hives have enough stores to survive the winter. A hive that yields less than \(15\) kg this season does not have enough surplus honey to be harvested safely without risking colony starvation over winter, so the co-op also keeps a close eye on how many hives fall into that risky range. Extracting and weighing the honey from a hive takes a trained beekeeper the better part of an hour and mildly stresses the colony, so weighing all \(4{,}000\) hives before deciding how much honey to leave behind is not practical: by the time you finished weighing the last hive, winter would already have arrived.

Instead, the co-op weighs the honey yield of a random sample of hives and uses that sample to learn about the whole apiary network. We will use this scenario throughout the questions below.

As with the screens example from the notes, this population distribution is something we are pretending to see for learning purposes. In practice, the co-op would never weigh every hive. Let’s check the true population parameters, which we will refer back to throughout the questions below (again, only because this is a learning exercise — in a real study these would be unknown).

So \(\mu \approx 27.9\) kg, \(\sigma \approx 8.85\) kg, and \(p \approx 0.031\) (about \(3.1\%\) of hives fall below the \(15\) kg safety threshold this season).


1.1 Module 1 — Population, Sample, Parameter, Statistic

Exercise 1 Let’s start with the running example itself, re-read the description above if you need to.

(a) Which of the following could be a genuine variable of interest recorded for each individual hive, i.e., something that could be its own column in a data frame of hives? Select all that apply, then click Check my answer.


(b) What is the target population in this study?


Exercise 2 A podcast network wants to know how engaged its listeners are with a newly launched show. They ask: “What fraction of listeners who start an episode make it all the way to the end?”

(a) What is the variable of interest here, and is it numerical or categorical?


(b) The network defines its target population as “our listeners.” Which of the following best illustrates why this definition is dangerously vague?


Exercise 3 Back at Sunridge Apiaries: the co-op’s beekeeping manager says, “The average honey yield across all 4,000 hives this season is what I need.”

(a) What symbol should the manager use for this quantity, and is it a parameter or a statistic?


(b) The manager sends two assistants out to weigh honey from \(40\) randomly chosen hives each. Assistant A reports an average yield of \(26.3\) kg. Assistant B reports \(29.1\) kg. Why do the two assistants get different numbers even though both followed the same procedure?


Exercise 4 Recall the two ways of drawing a simple random sample: with replacement and without replacement.

Which of the following is the main reason we almost always sample without replacement in practice, even though with replacement sampling gives us cleaner independence guarantees?


A new co-op employee says: “An estimator and an estimate are basically the same thing — they both mean ‘our best guess for the parameter.’” Using the Sunridge Apiaries example, explain precisely why this is wrong. In your explanation, identify what the estimator is here, and what the estimate is, and say which one is random and which one is fixed.

They are related but not the same. The estimator is the general rule or procedure: “draw a random sample of hives and compute the sample mean of their honey yields.” This rule is a random variable, denoted \(\bar{X}\), because its value depends on which random sample happens to be drawn; before we actually go out and sample, we don’t know what number it will produce.

The estimate is the specific number you get once you actually apply that rule to one particular sample. If the co-op weighs 40 specific hives and computes an average of \(26.3\) kg, then \(26.3\) kg is the estimate, a single, fixed realization of the estimator \(\bar{X}\) for this particular sample.

Mathematically, you can think of the estimator as a function that takes a sample as input and produces a number as output. The estimate is the output of that function for one specific input (the actual sample drawn).

So the estimator (\(\bar{X}\), the rule) is random and could, in principle, take many different values across different samples; the estimate (\(\bar{x} = 26.3\) kg, the number) is fixed once it has been computed.


1.2 Module 2 — Sample Distribution vs. Sampling Distribution

This is the section where the three distributions (population, sample, sampling) are most likely to get tangled up. Read each question carefully: they are deliberately designed to test whether you can tell these three objects apart.

Exercise 5 Match each description to the correct term.

(a) “The collection of honey yields for the 55 specific hives that a beekeeper actually visited and weighed last Tuesday.”


(b) “If we repeated the process of drawing 55 hives and computing the average yield thousands of times, the collection of all those averages.”


(c) “The honey yield of every single one of the 4,000 hives the co-op manages, if we could somehow weigh them all.”


Exercise 6 Suppose the co-op repeatedly draws random samples of hives and increases the sample size \(n\) from \(20\) all the way up to \(2{,}000\).

(a) As \(n\) grows, what happens to the sample distribution?


(b) Now consider the sampling distribution of \(\bar{X}\): take many samples of size \(n\), compute the mean of each, and look at the distribution of those means. As \(n\) grows from \(20\) to \(2{,}000\), what happens to this distribution?


Explain, in your own words, why the sample distribution and the sampling distribution of \(\bar{X}\) behave in opposite ways as \(n\) increases: one converges to a fixed, non-degenerate distribution (the population distribution), while the other collapses toward a single point (the fixed parameter μ). Use the Sunridge Apiaries example in your explanation.

The key is to notice that these are distributions of two completely different things.

The sample distribution is a distribution of individual honey-yield values within one sample. As the sample size n grows, you are simply including more and more individual hives, so the collection of values you see starts to look just like the full population of 4,000 hives — same center, same spread (σ ≈ 8.85 kg), same right-skew. There is no reason for this spread to shrink: adding more hives to your sample doesn’t make each individual hive’s yield less variable, it just gives you a more complete and accurate picture of the population’s true, fixed variability.

The sampling distribution of X̄ is a distribution of sample means — one number per hypothetical sample, not one number per hive. Averaging is what does the work here: when you average honey yields across more and more hives, unusually high yields and unusually low yields increasingly cancel each other out. A sample mean computed from n = 2,000 hives is far less likely to be dragged around by a couple of unusually productive or unusually poor hives than a sample mean computed from n = 20 hives. That cancellation effect is exactly why the standard error, σ/√n, shrinks as n grows: the statistic X̄ becomes a more and more stable, precise estimate of the fixed parameter μ, even though the individual data it’s computed from remains exactly as variable as ever.


Exercise 7 The co-op’s data analyst computes the standard error of \(\bar{X}\) for two different sample sizes and gets \(SE_{n=30}(\bar{X}) \approx 1.60\) kg and \(SE_{n=150}(\bar{X}) \approx 0.70\) kg.

(a) A colleague says: “A standard error of 1.60 kg means that, roughly, the honey yield of any individual hive typically differs from the population mean by about 1.60 kg.” Is this correct?


(b) Which of the following correctly explains why \(SE_{n=150}(\bar{X})\) is smaller than \(SE_{n=30}(\bar{X})\)?


1.3 Module 2 continued — Bootstrapping

Exercise 8 The co-op only manages to weigh \(n = 25\) hives this season. They want to approximate the sampling distribution of \(\bar{X}\) using bootstrapping.

(a) Which of the following correctly describes how to build one bootstrap sample from these 25 observed hive weights?


(b) The co-op’s analyst generates \(5{,}000\) bootstrap samples from the \(25\) observed hives, computes the mean honey yield for each, and plots all \(5{,}000\) means. What is this collection of \(5{,}000\) means called, and what is it an approximation of?


Exercise 9 The co-op’s analyst builds the bootstrap distribution described above from the \(n = 25\) observed hives (\(\bar{x} = 26.61\) kg). The true population mean is \(\mu \approx 27.9\) kg, but remember, the analyst does not know this.

Where is the bootstrap distribution of \(\bar{X}\) centered?


A classmate says: “Since bootstrapping can approximate the sampling distribution, running the bootstrap with more and more replicates should let us improve our point estimate of μ, the true average honey yield — getting us closer to the truth than the original x̄ = 26.61 kg.” Is this correct? Explain.

No. Increasing the number of bootstrap replicates (say, from 5,000 to 50,000) makes the bootstrap distribution smoother and its estimated standard error more stable, but it does nothing to change what the bootstrap distribution is centered on. Every single bootstrap resample, no matter how many you generate, is drawn with replacement from the same fixed set of 25 observed hives. There is no new information entering the process: no new hive gets weighed, no new data is collected. Consequently, the bootstrap distribution stays centered at the original sample mean, \(\bar{x} = 26.61\) kg, regardless of how many replicates are used.

Bootstrapping’s job is to approximate the sampling distribution of \(\bar{X}\), and in particular its spread (the standard error), which is what lets us build a confidence interval and quantify uncertainty. It is not a tool for improving the point estimate itself. The only way to get a point estimate closer to the true \(\mu\) is to collect more real data, i.e., weigh more actual hives.


Exercise 10 The co-op also builds the sampling distribution of the median honey yield (instead of the mean) using their 5,000 bootstrap resamples. They read off the \(0.80\)-quantile of this bootstrap distribution and find it equals \(29.4\) kg.

What is the correct interpretation of this quantity?


Exercise 11 A student is bootstrapping the minimum honey yield (not the mean) from a small sample of \(n = 8\) hives, hoping to estimate how low a hive’s yield could plausibly be.

Why is this a risky use of the bootstrap?


1.4 Module 3 — The Central Limit Theorem

Exercise 12 Which of the following is the most accurate statement of the Central Limit Theorem (CLT), as it applies to the sample mean?


Exercise 13 Suppose the co-op wants to estimate \(p\), the population proportion of hives with honey yield below the \(15\) kg threshold, using the CLT-based Normal approximation for \(\hat{p}\).

(a) Which condition should they check before trusting the Normal approximation for \(\hat{p}\)?


(b) The co-op’s honey yields are known to be right-skewed, not Normal. Does this rule out using the CLT to approximate the sampling distribution of \(\bar{X}\)?


Exercise 14 Curious about how sample means behave, a colleague runs a simulation study using the full hives_pop population from above (recall we get to peek at it here only for learning purposes; in a real study, the co-op would not know μ). They repeatedly draw random samples, redoing this simulation for increasingly large sample sizes \(n\), and summarize their findings: “As the sample size n grew, the sample mean X̄ got closer and closer to μ, and its distribution (across many simulated samples of each size) became more bell-shaped.”

This statement is describing two different results at once. Which two?


1.5 Modules 4 & 5 — Confidence Intervals (Bootstrap and CLT)

Exercise 15 The co-op weighed \(n = 25\) hives this season and observed a sample mean of \(\bar{x} = 26.61\) kg with a sample standard deviation of \(s = 10.03\) kg. They want a \(95\%\) confidence interval for \(\mu\) using the CLT approach.

(a) First, compute the estimated standard error.

TipHint

The estimated standard error of the mean is \(\widehat{SE}(\bar{X}) = s / \sqrt{n}\), using the sample standard deviation \(s\) in place of the (unknown) population standard deviation \(\sigma\).

xbar <- 26.61
s <- 10.03
n <- 25

se_hat <- s / sqrt(n)
se_hat


(b) Compute the margin of error and the resulting confidence interval.

TipHint

\[\text{margin of error} = t^* \times \widehat{SE}(\bar{X}), \qquad \text{CI} = \bar{x} \pm \text{margin of error}\]

t_star <- 2.064
se_hat <- 10.03 / sqrt(25)

margin_error <- t_star * se_hat
ci_lower <- xbar - margin_error
ci_upper <- xbar + margin_error

cat("95% CI: [", round(ci_lower, 2), ",", round(ci_upper, 2), "] kg\n")


The co-op’s manager looks at the interval you just computed, roughly \([22.47, 30.75]\) kg, and says: “Great, so there’s a 95% probability that the true average honey yield μ is somewhere between 22.47 and 30.75 kg.” Explain what is wrong with this interpretation, and give the statement the manager should make instead.

The manager’s statement treats \(\mu\) as if it were random, assigning it a “95% probability” of falling in a particular range. But \(\mu\) is a fixed, unknown constant describing the true state of all \(4{,}000\) hives this season. It either lies inside \([22.47, 30.75]\) kg or it does not; there is no probability left to assign once the population exists, and there is nothing that “the interval has a 95% chance of catching it” like a random shot at a fixed target. The randomness in this problem lives entirely in the sample (and therefore in the interval’s endpoints), not in \(\mu\).

The correct interpretation is about the procedure, not about this one specific interval: if the co-op repeated this sampling-and-interval-construction process many times, drawing a new random sample of 25 hives each time, about 95% of the resulting intervals would contain the true μ, and about 5% would miss it. For this one particular sample, we simply don’t know whether we landed in the lucky 95% or the unlucky 5%, so the honest thing to say is: “we are 95% confident that μ lies in this interval,” where “confident” refers to the long-run reliability of the method, not a probability statement about this specific, already-computed interval.


Exercise 16 The co-op also builds a bootstrap \(95\%\) confidence interval from the same \(25\) observed hives, resampling \(5{,}000\) times.

(a) How is the bootstrap \(95\%\) confidence interval constructed from the \(5{,}000\) bootstrap means?


(b) Suppose the co-op increases the confidence level from \(95\%\) to \(99\%\), keeping the same sample. What happens to the width of the interval, and why?


Exercise 17 Suppose, instead, the co-op had managed to weigh \(n = 400\) hives (rather than 25) and constructed a \(95\%\) CLT-based confidence interval for \(\mu\) from that larger sample.

Compared to the \(n = 25\) interval, what would you expect to see, all else being equal?


Exercise 22 Alex, a co-op analyst, wants to study proportion of hives that yield less than the \(15\) kg safety threshold. They decided to compute a 95% CLT-based confidence interval. They collected a sample of \(n = 120\) hives and observed a sample proportion of hives below the threshold \(\hat{p} = 0.04\). The 95% confidence interval for \(\hat{p}\) is:

1.6 Coding Practice: The infer Workflow for Confidence Intervals

Exercise 18 Using hives_sample (the co-op’s random sample of \(n = 150\) hives, column honey_yield), obtain a \(95\%\) bootstrap confidence interval for the population mean honey yield \(\mu\). Use \(5{,}000\) bootstrap replicates. Store your result in ci_honey.

TipHint

The four verbs, in order, are specify(), generate(), calculate(), get_confidence_interval(). For a single numerical variable, specify() only needs a response; generate() needs reps and type = "bootstrap"; calculate() needs stat = "mean"; get_confidence_interval() needs level = 0.95.

ci_honey <-
  hives_sample |>
  specify(response = honey_yield) |>
  generate(reps = 5000, type = "bootstrap") |>
  calculate(stat = "mean") |>
  get_confidence_interval(level = 0.95)

ci_honey


Exercise 19 Using the same hives_sample, obtain a \(95\%\) bootstrap confidence interval for the population proportion \(p\) of hives below the \(15\) kg threshold (column below_threshold, with levels "yes"/"no"; treat "yes" as the success). Use \(5{,}000\) bootstrap replicates. Store your result in ci_below.

TipHint

For a single categorical variable, specify() needs both a response argument (the column) and a success argument (which level counts as a “success”); the values below_threshold and 'yes' are already filled in for you, you just need the argument names. The rest of the pipeline (generate(), calculate(), get_confidence_interval()) looks just like the mean example, except calculate(stat = "prop") instead of "mean".

ci_below <-
  hives_sample |>
  specify(response = below_threshold, success = "yes") |>
  generate(reps = 5000, type = "bootstrap") |>
  calculate(stat = "prop") |>
  get_confidence_interval(level = 0.95)

ci_below


Exercise 20 The co-op also wants to compare the two sub-farms. Using two_farms_sample (column honey_yield, grouping column farm with levels "North Ridge" and "South Hollow"), obtain a \(95\%\) bootstrap confidence interval for the difference in mean honey yield (North Ridge \(-\) South Hollow). Use \(5{,}000\) bootstrap replicates. Store your result in ci_diff_means.

TipHint

Comparing two groups uses a formula in specify(): response ~ explanatory, here honey_yield ~ farm. The calculate() step needs stat = "diff in means" and an order = c(first_group, second_group), which determines the sign of the difference (first group minus second group).

ci_diff_means <-
  two_farms_sample |>
  specify(honey_yield ~ farm) |>
  generate(reps = 5000, type = "bootstrap") |>
  calculate(stat = "diff in means", order = c("North Ridge", "South Hollow")) |>
  get_confidence_interval(level = 0.95)

ci_diff_means


Exercise 21 Finally, obtain a \(95\%\) bootstrap confidence interval for the difference in the proportion of hives below the \(15\) kg threshold between the two farms (North Ridge \(-\) South Hollow), using two_farms_sample (column below_threshold, success "yes"). Use \(5{,}000\) bootstrap replicates. Store your result in ci_diff_props.

TipHint

This combines the ideas from Exercises 2 and 3: specify() needs both a formula (response ~ explanatory) and a success level, since the response is categorical. calculate() needs stat = "diff in props" with the same order argument as before.

ci_diff_props <-
  two_farms_sample |>
  specify(below_threshold ~ farm, success = "yes") |>
  generate(reps = 5000, type = "bootstrap") |>
  calculate(stat = "diff in props", order = c("North Ridge", "South Hollow")) |>
  get_confidence_interval(level = 0.95)

ci_diff_props


1.7 Take-home points

  • Population, sample, parameter, statistic: The population is the complete group under study (all 4,000 hives); the sample is the subset actually observed. A parameter (e.g., μ, p) summarizes the population and is fixed but usually unknown; a statistic (e.g., x̄, p̂) summarizes a sample and varies from sample to sample.
  • Estimator vs. estimate: The estimator (e.g., X̄) is the general rule, a random variable, whose value is unknown before sampling. The estimate (e.g., x̄ = 26.61 kg) is the specific, fixed number obtained from one particular sample.
  • Three distributions: The population distribution (fixed, of individual values) and the sample distribution (of individual values in one sample) both describe raw data and share the same shape and spread once n is large. The sampling distribution (of a statistic like X̄, across many hypothetical samples) is a completely different object: it narrows around the true parameter as n grows.
  • Standard deviation vs. standard error: Standard deviation measures the spread of individual values (fixed at σ, the population’s own spread). Standard error measures the spread of a statistic across samples (SE = σ/√n for the mean), and it shrinks as n grows.
  • Bootstrapping: Resample with replacement, at the original sample size, from the one observed sample. The resulting bootstrap distribution approximates the sampling distribution, and is unreliable for extreme-value statistics with small samples.
  • CLT vs. LLN: The Law of Large Numbers says X̄ converges to μ as n grows (where it concentrates). The CLT says the sampling distribution of X̄ becomes approximately Normal as n grows (what shape it takes), regardless of the population’s shape.
  • Confidence intervals: A 95% CI is built either from the middle 95% of a bootstrap distribution (percentile method) or as estimate ± critical value × SE (CLT method). “95% confident” is a statement about the long-run reliability of the procedure across repeated samples, not a probability statement about one already-computed interval containing the fixed parameter.