From a042ecdd53942d71a605b53bc2b5f1bd80fb9f75 Mon Sep 17 00:00:00 2001 From: andyeisenberg Date: Thu, 26 Mar 2026 06:58:27 -0400 Subject: [PATCH] Quiz 4 solutions --- source/main.ptx | 1 + source/quizzes/quiz-04.ptx | 99 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 100 insertions(+) create mode 100644 source/quizzes/quiz-04.ptx diff --git a/source/main.ptx b/source/main.ptx index d2c8e33..7422001 100644 --- a/source/main.ptx +++ b/source/main.ptx @@ -41,6 +41,7 @@ + diff --git a/source/quizzes/quiz-04.ptx b/source/quizzes/quiz-04.ptx new file mode 100644 index 0000000..4d4ff43 --- /dev/null +++ b/source/quizzes/quiz-04.ptx @@ -0,0 +1,99 @@ + + + + + Quiz 4 + + + +

+ The following work should be completed individually. + Use of notes or textbooks is not allowed. + You may use a scientific calculator, not a graphing calculator or phone app. +

+ +

+ Show all work unless instructed otherwise. +

+
+ + + + + + +

+ Suppose we have a coin that we're told is not fair and has a probability of \theta = 0.6 of coming up heads. + We suspect the probability is even higher than this. +

+ +

+ Throughout the following parts, do not use a normal approximation. +

+
+ + + + +

+ We flip the coin 10 times and see 9 heads. + Should we use a 1-tailed test or a 2-tailed test? Find the p-value. + Do we have strong enough evidence to reject the null hypothesis at a 0.05 significance level? +

+
+ + +

+ Using a 1-tailed test, the p-value is \Pr( \geq 9 \text{ heads}): + + \Pr(9 \text{ heads}) \amp = {10 \choose 9} (0.6)^9 (1 - 0.6)^{10 - 9} = 10(0.6)^9(0.4)^1 \approx 0.04 + \Pr(10 \text{ heads}) \amp = {10 \choose 10} (0.6)^{10} (1 - 0.6)^{10 - 10} = 1(0.6)^{10}(0.4)^{0} \approx 0.006 + + The p-value is the sum: \Pr(\geq 9 \text{ heads}) \approx 0.046 \lt 0.05, so we can reject the null hypothesis. +

+
+
+ + + + +

+ What is the minimum number of heads we would need to see in 10 flips to reject the null hypothesis? +

+
+ + +

+ We saw in part (a) that at least 9 heads is enough to reject. + Then: + + \Pr(8 \text{ heads}) = {10 \choose 8} (0.6)^8 (1 - 0.6)^{10 - 8} = 45(0.6)^8(0.4)^2 \approx 0.121 + + Adding to the previous probabilities, \Pr(\geq 8 \text{ heads}) \approx 0.046 + 0.121 = 0.167 \gt 0.05. + So 8 heads would not be enough to reject the null hypothesis, therefore the minimum number of heads to reject would be 9. +

+
+
+ + + + +

+ What is the power of the test if the true value of the parameter is \theta = 0.8? +

+
+ + +

+ With \theta = 0.8: + + \Pr(9 \text{ heads}) \amp = {10 \choose 9} (0.8)^9 (1 - 0.8)^{10 - 9} = 10(0.8)^9(0.2)^1 \approx 0.268 + \Pr(10 \text{ heads}) \amp = {10 \choose 10} (0.8)^{10} (1 - 0.8)^{10 - 10} = 1(0.8)^{10}(0.2)^{0} \approx 0.107 + + So the power of the test is 0.268 + 0.107 = 0.375. +

+
+
+
+
+
\ No newline at end of file