Fall 2023 Quiz 3

← return to practice.dsc10.com


This quiz was administered in-person. It was closed-book and closed-note; students were not allowed to use the DSC 10 Reference Sheet. Students had 20 minutes to work on the quiz.

This quiz covered Lectures 14-17 of the Fall 2023 offering of DSC 10.


Ciro is an avid fan of Costco, a members-only warehouse store. On his recent trip to the Morena Boulevard location near campus, he was surprised by how full shoppers’ carts were and was inspired to investigate how much people typically spend at Costco.


Problem 1

Among all Costco members in San Diego, the average monthly spending in October 2023 was $350 with a standard deviation of $40.


Problem 1.1

The amount Ciro spent at Costco in October 2023 was -1.5 in standard units. What is this amount in dollars? Give your answer as an integer.

Answer: 290


Difficulty: ⭐️

The average score on this problem was 93%.


Problem 1.2

What is the minimum possible percentage of San Diego members that spent between $250 and $450 in October 2023?

Answer: 84%


Difficulty: ⭐️⭐️⭐️

The average score on this problem was 61%.


Problem 1.3

Now, suppose we’re given that the distribution of monthly spending in October 2023 for all San Diego members is roughly normal. Given this fact, fill in the blanks:

"In October 2023, 95% of San Diego members spent between __(m)__ dollars and __(n)__ dollars."


What are m and n? Give your answers as integers rounded to the nearest multiple of 10.

Answer: m: 270, n: 430


Difficulty: ⭐️⭐️

The average score on this problem was 81%.



Problem 2

Suppose we have access to a simple random sample of all US Costco members of size 145. Our sample is stored in a DataFrame named us_sample, in which the "Spend" column contains the October 2023 spending of each sampled member in dollars.


Problem 2.1

Fill in the blanks:

"The average of the "Spend" column in us_sample is a ____, while the average October 2023 spending of all US members is a ____."


Answer: sample statistic; population parameter


Difficulty: ⭐️

The average score on this problem was 94%.


Problem 2.2

Fill in the blanks below so that us_left and us_right are the left and right endpoints of a 46% confidence interval for the average October 2023 spending of all US members.

costco_means = np.array([])
for i in np.arange(5000):
    resampled_spends = __(x)__
    costco_means = np.append(costco_means, resampled_spends.mean())
left = np.percentile(costco_means, __(y)__)
right = np.percentile(costco_means, __(z)__)

Which of the following could go in blank (x)? Select all that apply.

What goes in blanks (y) and (z)? Give your answers as integers.

Answer:

  • x:
    • us_sample.sample(145, replace=True).get("Spend")
    • np.random.choice(us_sample.get("Spend"), 145)
    • np.random.choice(us_sample.get("Spend"), 145, replace=True)
  • y: 27
  • z: 73

Difficulty: ⭐️⭐️

The average score on this problem was 79%.


Problem 2.3

True or False: 46% of all US members in us_sample spent between us_left and us_right in October 2023.

Answer: False


Difficulty: ⭐️⭐️

The average score on this problem was 85%.


Problem 2.4

True or False: If we repeat the code from part (b) 200 times, each time bootstrapping from a new random sample of 145 members drawn from all US members, then about 92 of the intervals we create will contain the average October 2023 spending of all US members.

Answer: True


Difficulty: ⭐️⭐️⭐️

The average score on this problem was 51%.


Problem 2.5

True or False: If we repeat the code from part (b) 200 times, each time bootstrapping from us_sample, then about 92 of the intervals we create will contain the average October 2023 spending of all US members.

Answer: False


Difficulty: ⭐️⭐️⭐️⭐️

The average score on this problem was 30%.



👋 Feedback: Find an error? Still confused? Have a suggestion? Let us know here.