← return to practice.dsc10.com
This quiz was administered in-person. Students were allowed a
double-sided sheet of handwritten notes. Students had 20
minutes to work on the quiz.
This quiz covered Lectures
13-17 of the Winter 2025 offering
of DSC 10.
⚠️ PDF version available here .
A (a) provides insight into how much a (b) might vary across samples and is key for estimating the corresponding (c). This type of distribution is an example of a (d) because it is based on trials of an experiment, as opposed to a (e), which is based on theory.
The five terms that should fill in the blanks are parameter,statistic, probability distribution, empirical distribution, bootstrap distribution. Determine which word corresponds with each letter blank.
Answer (a): bootstrapped distribution
Answer (b): statistic
Answer (c): parameter
Answer (d): empirical distribution
Answer (e): probability distribution
| Blank | Answer | Why it fits |
|---|---|---|
| (a) | Bootstrapped distribution | Repeatedly resample the original sample with replacement, and find a statistic for each resample. The spread of the resulting statistics estimates how much the statistic would vary across fresh samples. |
| (b) | Statistic | A number computed from a sample, such as the mean visitor count over 50 sampled days, can change when we draw a new sample. |
| (c) | Parameter | The mean visitor count overall (not just 50 days) is a fixed population quantity. The sample mean estimates it. |
| (d) | Empirical distribution | The frequencies in the bootstrap distribution come from the resampling trials we actually ran. |
| (e) | Probability distribution | It gives the chance of each possible outcome, worked out from theory instead of from trials. For example, each face of a fair die has a probability of \frac{1}{6}, without our rolling it at all. |
The average score on this problem was 82%.
The DataFrame geisel contains a row for each day of this
academic year. The "Students" column contains the number of
students who visited Geisel Library on that day, as an
int.
Fill in the blanks below such that
geisel_sample is a simple random
sample of 50 rows of geisel, and
the code prints the endpoints of a 95% bootstrapped confidence
interval for the mean number of students at Geisel
Library, based on the data in geisel_sample.
geisel_sample = __(a)___
y = np.array([]):
for i in np.arange(10000):
x = __(b)__
y = np.append(y, x)
print(np.percentile(y, 2.5), np.percentile(y, 97.5))Answer (a): geisel.sample(50) or
geisel.sample(50, replace = False)
Answer (b):
geisel_sample.sample(50, replace = True).get("Students").mean()
or equivalent
For blank (a), each row of geisel is
one day. To take a simple random sample of 50 days, we sample 50 rows
without replacement, which is what .sample does by
default.
For blank (b), we are bootstrapping, so we draw 50
times from those same 50 days with replacement, and a day can
appear more than once in a resample. We take the mean of the resample’s
"Students" counts and append it to the array
y. We do this 10,000 times, so y ends up with
10,000 resample means. The 2.5th and 97.5th percentiles of these means
are the endpoints of the 95% bootstrap interval.
The average score on this problem was 75%.
Which of the following is the best description of x and
y in the code above?
x represents the original sample, and y
represents many resamples.
x represents the average student count for a single day,
and y represents the student count on all days.
x represents the sample statistic from a single
resample, and y represents the distribution of those
statistics across multiple resamples.
x represents the sample statistic for the original
sample, and y represents a distribution of statistics
across multiple resamples.
x represents the population parameter, and
y represents a bootstrapped distribution of sample
statistics.
Answer: Option 3: x represents the
sample statistic from a single resample, and y represents
the distribution of those statistics across multiple resamples.
x is one number, the mean daily attendance in the
current 50-day resample. When each loop runs, it appends one such mean
to y. By the end, y holds 10,000 means whose
distribution is the bootstrap distribution of the sample mean.
The average score on this problem was 72%.
Select all true statements below.
If geisel_sample had instead had 60 rows, the resulting 95\% confidence interval would have been
wider.
If we made 100 95\% confidence intervals based on
geisel_sample, about 95 of
them would contain the population mean.
On about 95\% of days, the number of students at Geisel Library falls between the endpoints of our confidence interval.
It would have also been appropriate to generate a confidence interval for this parameter using the Central Limit Theorem.
The standard deviation of geisel_sample should be
approximately the same as the standard deviation of
geisel
The data in geisel_sample is roughly normally
distributed.
Answer:
Option 4: It would have also been appropriate to generate a confidence interval for this parameter using the Central Limit Theorem.
Option 5: The standard deviation of geisel_sample should
be approximately the same as the standard deviation of
geisel
| Choice | Select? | Reason |
|---|---|---|
| 1. A 60-day sample gives a wider interval | No | Generally, averaging more days gives a mean closer to the actual mean when compared to averaging 50 days. A 60-day sample would typically give a narrower interval. |
2. About 95 of 100 intervals from geisel_sample contain
the population mean |
No | Bootstrapping the same 50 days again estimates approximately the same confidence interval endpoints. The 95 of 100 intervals contain the population mean when we repeatedly draw fresh 50-day samples and build one interval from each. |
| 3. About 95% of days fall inside the interval | No | The interval estimates one quantity, the mean daily attendance for the academic year. Individual days can have counts far above or below that mean. |
| 4. A Central Limit Theorem interval is appropriate | Yes | For the random sample of 50 days in this quiz, the CLT lets us approximate the sampling distribution of the sample mean by a normal distribution and construct an interval for the population mean. |
| 5. The sample SD should be close to the population SD | Yes | Both SDs describe the spread of individual daily
counts. The SD of the 50 randomly selected counts estimates the
SD of all daily counts in geisel. |
| 6. The sampled daily counts are roughly normal | No | The daily counts themselves could be skewed, so the sampled daily counts could be skewed. The CLT approximation in choice 4 works because it is concerned with the means we would get across many samples. |
The average score on this problem was 69%.
Your friend at SDSU records the number of students who visit their library each day, for 100 days. They tell you that the average is 6{,}000 and that the standard deviation is 500.
Without knowing anything about the distribution of your friend’s data, find the endpoints of the smallest interval which is guaranteed to contain at least 75\% of your friend’s data. Both endpoints should be given as integers.
Answer: [5000, 7000]
Chebyshev’s inequality guarantees that at least 1-1/k^2 of the observations lie within k standard deviations of the mean. To guarantee 75%, the smallest k given by this bound satisfies
1-\frac{1}{k^2}=0.75 \quad\Longrightarrow\quad k^2=4 \quad\Longrightarrow\quad k=2.
The daily counts have mean 6,000 and standard deviation 500. Moving two standard deviations in each direction gives the interval
[6{,}000-2(500),\;6{,}000+2(500)] = [5{,}000,\;7{,}000].
At least 75 of the 100 recorded days had between 5,000 and 7,000 visitors.

The average score on this problem was 64%.
If you then learn that your friend’s data is normally distributed, approximately what percentage of the data is actually contained in the interval you found above? Give your answer as an integer.
Answer: 95\%
The endpoints from 3(a) are exactly two standard deviations below and above the mean. So, approximately 95% of normally distributed daily counts fall in that range.

The average score on this problem was 75%.