← return to practice.dsc10.com
This quiz was administered in-person. It was closed-book; students
were not allowed to use the DSC 10 Reference Sheet.
Students had 20 minutes to work on the
quiz.
This quiz covered Lectures 21-24 of the Spring 2025 offering
of DSC 10.
You want to test the following hypotheses:
Null Hypothesis: Everyone who applies for an internship at Google has a 20% chance of receiving a job offer, independently of all other applicants.
Alternative Hypothesis: Everyone who applies for an internship at Google has a more than 20% chance of receiving a job offer, independently of all other applicants.
To test these hypotheses, you collected information from 50 applicants and found that 16 of them received a job offer.
Fill in the blanks in the code below to calculate the p-value for a hypothesis test where the test statistic is the number of applicants, out of 50, who receive a job offer.
= np.array([])
offers_array
for i in np.arange(10000):
= ___(a)___
num_offers = ___(b)___
offers_array
= ___(c)___
p_value p_value
Answer:
(a)
:
np.random.multinomial(50,[0.2,0.8])[0] or np.random.choice([0,1], 50, p = [0.80, 0.20]).sum()
(b)
: np.append(offers_array, num_offers)
(c)
:
np.count_nonzero(offers_array >= 16)/10000 or np.mean(offers_array >= 16)
The average score on this problem was 70%.
Suppose the p-value comes out to 0.03. What conclusion do we draw?
We reject the null hypothesis at both the 0.01 and 0.05
We fail to reject the null hypothesis at the 0.01 significance
We reject the null hypothesis at the 0.01 significance level and
We fail to reject the null hypothesis at both the 0.01 and 0.05
Answer: Option 2
The average score on this problem was 62%.
Which of the following test statistics would have also been appropriate to test these hypotheses? Select all that apply.
Number of applicants, out of 50, who do not receive a job offer.
Proportion of applicants that receive a job offer.
The sum of the absolute differences between [0.2, 0.8] and the
Absolute difference between 20 and the number of applicants, out
None of the above.
Answer: Options 1 and 2
The average score on this problem was 68%.
According to Indeed, a popular job website, the hourly pay for data science interns across the US has a mean of 24 and a standard deviation of 6. You take a random sample of 64 data science interns. In your sample, the hourly pay has a mean of 25 and a standard deviation of 4. Suppose you bootstrap your sample 10,000 times, calculate the mean hourly pay from each resample, and plot a histogram of these resampled means. Which of the following best describes this histogram?
Roughly normal with a mean of 24 and a standard deviation of 0.75.
Roughly normal with a mean of 25 and a standard deviation of 4.
Roughly normal with a mean of 25 and a standard deviation of 0.5.
None of the above.
Answer: Option 4
The average score on this problem was 50%.
You are interested in estimating the average wait time between an interview and an internship offer being made. You take a random sample of n internship offers and find that in this sample, the average wait time is d days and the standard deviation is 4 days.
You construct a 95% CLT-based confidence interval for the true average wait time, in days, which comes out to [10.4, 13.6]. Find n and d.
Answer:
n = 25
d = 12
The average score on this problem was 65%.