Fall 2023 Quiz 4

← 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 18-22 of the Fall 2023 offering of DSC 10.

⚠️ PDF version available here .


That's the end of the quiz.

Video streaming services, such as Netflix and Hulu, are more popular than ever. Let’s investigate trends in the video streaming habits of UCSD students.


Problem 1

Lecture 20

You survey 100 DSC majors and 140 CSE majors to ask them which video streaming service they use most. The resulting distributions are given in the table below. Note that each column sums to 1.

Service DSC Majors CSE Majors
Netflix 0.4 0.35
Hulu 0.25 0.2
Disney+ 0.1 0.1
Amazon Prime Video 0.15 0.3
Other 0.1 0.05

For example, 20% of CSE Majors said that Hulu is their most used video streaming service. Note that if a student doesn’t use video streaming services, their response is counted as Other.


Problem 1.1

What is the total variation distance (TVD) between the distribution for DSC majors and the distribution for CSE majors? Give your answer as an exact decimal.

Answer: 0.15

The TVD is half the sum of the absolute differences in proportions across all categories between two distributions. In this case, we are comparing the distributions for DSC Majors, and CSE Majors. First, find the absolute difference for each service:

  • Netflix: |0.4 - 0.35| = 0.05
  • Hulu: |0.25 - 0.2| = 0.05
  • Disney+: |0.1 - 0.1| = 0
  • Amazon Prime Video: |0.15 - 0.3| = 0.15
  • Other: |0.1 - 0.05| = 0.05

The sum of these is 0.05 + 0.05 + 0 + 0.15 + 0.05 = 0.30. Then,

\text{TVD} = \frac{1}{2} \cdot 0.30 = \boxed{0.15}.


Difficulty: ⭐️⭐️

The average score on this problem was 89%.


Problem 1.2

Suppose we only break down video streaming services into four categories: Netflix, Hulu, Disney+, and Other (which now includes Amazon Prime Video). Now we recalculate the TVD between the two distributions. How does the TVD now compare to your answer to part (a)?

Answer: less than (a)

When Amazon Prime Video is combined with Other, the proportions for the new “Other” category are:

  • DSC majors: 0.15 + 0.1 = 0.25
  • CSE majors: 0.3 + 0.05 = 0.35

Netflix, Hulu, and Disney+ are unchanged, so they still contribute 0.05, 0.05, and 0 to the sum of absolute differences. The new “Other” category contributes |0.25 - 0.35| = 0.10. So the sum is 0.05 + 0.05 + 0 + 0.10 = 0.20, and

\text{TVD} = \frac{1}{2} \cdot 0.20 = 0.10,

which is less than the 0.15 from part (a).


Difficulty: ⭐️

The average score on this problem was 93%.



Problem 2

Lecture 18

You want to estimate the proportion of DSC majors who have a Netflix subscription. To do so, you will survey a random sample of DSC majors and ask them whether they have a Netflix subscription. You will then create a 95% confidence interval for the proportion of “yes" answers in the population, based on the responses in your sample. You decide that your confidence interval should have a width of at most 0.10.


Problem 2.1

In order for your confidence interval to have a width of at most 0.10, the standard deviation of the distribution of the sample proportion must be at most T. What is T? Give your answer as an exact decimal.

Answer: 0.025

By the Central Limit Theorem, the distribution of the sample proportion is roughly normal (similar to a distribution of sample means from a population). In a normal distribution, about 95% of values fall within 2 standard deviations of the mean. So a 95% confidence interval extends about 2 standard deviations on each side of the center, which means

\text{width of interval} = 4 \cdot \text{SD of the distribution of the sample proportion}.

We want the width to be at most 0.10, so

4 \cdot T = 0.10 \implies T = \frac{0.10}{4} = \boxed{0.025}.


Difficulty: ⭐️⭐️⭐️⭐️

The average score on this problem was 46%.


Problem 2.2

Using the fact that the standard deviation of any dataset of 0s and 1s is no more than 0.5, calculate the minimum number of people you would need to survey so that the width of your confidence interval is at most 0.10. Give your answer as an integer.

Answer: 400

The standard deviation of the distribution of the sample proportion (a sample mean of 0s and 1s) is

\text{SD of distribution of sample proportion} = \frac{\text{SD of the population}}{\sqrt{\text{sample size}}}.

Each response is a 0 or a 1, so the population SD is at most 0.5. We want the confidence interval width to be at most 0.10, which requires the SD of the sample proportion to be at most 0.025 (from part (a)). Because the interval width is proportional to this SD, setting an upper bound on it caps the width. This gives the inequality:

\frac{0.5}{\sqrt{n}} \le 0.025

Solving for n gives the minimum sample size:

\sqrt{n} \geq \frac{0.5}{0.025} = 20 \implies n \geq 20^2 = \boxed{400}.


Difficulty: ⭐️⭐️

The average score on this problem was 81%.



Problem 3

Lecture 20

Arya was curious how many UCSD students used Hulu over Thanksgiving break. He surveys 250 students and finds that 130 of them did use Hulu over break and 120 did not.

Using this data, Arya decides to test following hypotheses:


Problem 3.1

Which of the following could be used as a test statistic for the hypothesis test?

Answer: The proportion of students who did use Hulu minus the proportion of students who did not use Hulu.

Our test statistic should be that high observed values point towards one hypothesis and low observed values lean towards the other. The alternative says more students used Hulu than did not, so this is a one-sided test. The statistic

(\text{proportion who did use Hulu}) - (\text{proportion who did not})

is around 0 if the null hypothesis is true, and large and positive when the alternative is true.


Difficulty: ⭐️⭐️

The average score on this problem was 81%.


Problem 3.2

For the test statistic that you chose in part (a), what is the observed value of the statistic? Give your answer either as an exact decimal or a simplified fraction.

Answer: 0.04

Of the 250 students surveyed, 130 used Hulu and 120 did not. The proportions are

\frac{130}{250} = 0.52 \quad \text{and} \quad \frac{120}{250} = 0.48.

The observed value of the test statistic is

0.52 - 0.48 = \boxed{0.04}.


Difficulty: ⭐️

The average score on this problem was 90%.


Problem 3.3

If the p-value of the hypothesis test is 0.053, what can we conclude, at the standard 0.05 significance level?

Answer: We fail to reject the null hypothesis.

We reject the null only when the p-value is less than the significance level. Here, 0.053 > 0.05, so we do not have enough evidence to reject the null hypothesis. We never say we “accept” the null hypothesis. A hypothesis test can only provide evidence to reject the null. Therefore, we say “we fail to reject the null hypothesis.”


Difficulty: ⭐️⭐️

The average score on this problem was 87%.



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