Learning objectives

  • Begin grappling with hypothesis testing.

Work through these practice exercises

  • It’s a good idea to work through these on your own, but if you get very stuck, solutions can be found here

1.

Suppose that researchers for a popular social media platform are interested maximising the amount of time that users spend on their app, and that they are faced with a tough decision about whether or not the app should use a continuous scroll feature. Since opinions on the research team are split on the issue, they decide to perform an experiment to clear things up. They implement the continuous scroll feature and push it to their users. The average time that a user spends on app currently is 58 minutes per day. Thus they are interested in whether or not continuous scroll increases this number. Suppose they obtain the following sample from this experiment:

\[ x = \{ 63.97, 60.29, 85.60, 72.57, 54.65, 53.74, 69.13, 70.07, 67.19, 53.95 \} \]

Test the hypothesis that infinite scroll increased time on app beyond 58 minutes per day assuming that the population variance of \(X\) is \(\sigma_X^2 = 10\). Do not use t.test, binim.test or any other built in full test function unless explicitly instructed to do so.

  • Store the value of your observed test statistic in a variable named ans_1_test_stat_obs.

  • Store the critical value of your test in a variable named ans_1_critical_value.

  • Store the p-value of your test in a variable named ans_1_p_value.

2.

Test the hypothesis that \(\theta\) is greater than 6, where \(\theta\) is a parameter of some random variable. The sampling distribution for \(\hat{\theta}\) is shown in the following figure and the observed test statistic \(\hat{\theta}_{obs}\) is shown in blue. Ensure that the type I error rate of your test is no greater than \(\alpha=0.05\).

  • Store the critical value of your test in a variable named ans_3_critical_value.

  • Store the p-value of this test in a variable named ans_3_p_value.

3.

Please respond by assigning "confidence", "alpha", "beta", or "power" to the variables requested below. Note that the dashed line in the above figure is the critical value. Please also note that the colour of region I is a bit hard to resolve due to the transparency and colour blurring, so look carefully.

  • What quantity does region I in the above plot correspond to? Store your answer in a variable named ans_4a.

  • What quantity does region II in the above plot correspond to? Store your answer in a variable named ans_4b.

  • What quantity does region III in the above plot correspond to? Store your answer in a variable named ans_4c.

  • What quantity does region IV in the above plot correspond to? Store your answer in a variable named ans_4d.

  • What is the numeric value (to two decimal places) of the power in this example? Store your answer in a variable named ans_4e.

  • Assuming a type I error rate of 0.05, what is the numeric value (to two decimal places) of confidence of this example? Store your answer in a variable named ans_4f.

  • Assuming that the illustrated distributions correspond to the distribution of sample means, will increasing the sample size increase the distance between the mean of H1 and H0 distributions? Store your answer using ans_4g <- "YES" or ans_4g <- "NO".