Some Chap 5 answers
This commit is contained in:
+134
-78
@@ -2,7 +2,8 @@
|
||||
<title>Power of a Test</title>
|
||||
|
||||
<p>
|
||||
Recall that the power of a test is the probability of rejecting a false null hypothesis.
|
||||
Recall that the power of a test is the probability of rejecting a false null
|
||||
hypothesis.
|
||||
To understand the power, we must know:
|
||||
<ol>
|
||||
<li>
|
||||
@@ -23,20 +24,25 @@
|
||||
<statement>
|
||||
<p>
|
||||
We find a coin and wonder if it's fair.
|
||||
Let <m>\theta</m> be the probability of the coin coming up heads on a flip.
|
||||
Let <m>\theta</m> be the probability of the coin coming up heads on a
|
||||
flip.
|
||||
Let <m>S</m> count the number of heads in 100 flips.
|
||||
Under the null hypothesis that <m>\theta = 0.5</m>, <m>S</m> is binomial, with:
|
||||
Under the null hypothesis that <m>\theta = 0.5</m>, <m>S</m> is
|
||||
binomial, with:
|
||||
<md>
|
||||
<mrow> \E(S) \amp = (n)(\theta) = (100)(0.5) = 50 </mrow>
|
||||
<mrow> \Var(S) \amp = (n)(\theta)(1 - \theta) = (100)(0.5)(0.5) = 25 </mrow>
|
||||
</md>
|
||||
Using a normal approximation, <m>S \approx \Norm(50, 25)</m>.
|
||||
In the calculation of the <m>p</m>-value for a 2-tailed test, we will eventually reach the expression:
|
||||
In the calculation of the <m>p</m>-value for a 2-tailed test, we will
|
||||
eventually reach the expression:
|
||||
<md>
|
||||
<mrow> \Pr(Z \geq z) + \Pr(Z \leq -z) </mrow>
|
||||
</md>
|
||||
for some <m>z</m>-score.
|
||||
To address the first question above, we can calculate, for a specified significance level <m>\alpha</m>, the <m>z</m>-score that represents data at the cutoff between accepting and rejecting the null hypothesis:
|
||||
To address the first question above, we can calculate, for a specified
|
||||
significance level <m>\alpha</m>, the <m>z</m>-score that represents
|
||||
data at the cutoff between accepting and rejecting the null hypothesis:
|
||||
<md>
|
||||
<mrow> \alpha \amp = \Pr(Z \geq z) + \Pr(Z \leq -z) </mrow>
|
||||
<mrow> \amp = \Phi(-z) + (1 - \Phi(z)) </mrow>
|
||||
@@ -44,27 +50,35 @@
|
||||
<mrow> \Rightarrow \Phi(-z) \amp = \frac{\alpha}{2} </mrow>
|
||||
<mrow> -z \amp = \Phi^{-1}\left(\frac{\alpha}{2}\right) </mrow>
|
||||
</md>
|
||||
For the significance level <m>\alpha = 0.05</m>, we'll have <m>z = 1.96</m>.
|
||||
Now, we convert back to values of <m>S</m>, keeping in mind that a continuity correction would be involved:
|
||||
For the significance level <m>\alpha = 0.05</m>, we'll have
|
||||
<m>z = 1.96</m>.
|
||||
Now, we convert back to values of <m>S</m>, keeping in mind that a
|
||||
continuity correction would be involved:
|
||||
<md>
|
||||
<mrow> \frac{S - 0.5 - 50}{\sqrt{25}} \amp = 1.96 </mrow>
|
||||
<mrow> S \amp = 50.5 + 1.96 \sqrt{25} = 60.3. </mrow>
|
||||
</md>
|
||||
We can't flip a fractional number of heads, so it would take a result of 61 or more heads (or, equally extreme in the other direction, 39 heads or fewer) to reject the null hypothesis.
|
||||
We can't flip a fractional number of heads, so it would take a result of
|
||||
61 or more heads (or, equally extreme in the other direction, 39 heads
|
||||
or fewer) to reject the null hypothesis.
|
||||
</p>
|
||||
</statement>
|
||||
</example>
|
||||
|
||||
<p>
|
||||
To address the second question, we find a obstacle.
|
||||
How can we calculate the probability of seeing data extreme enough data to reject <m>H_0</m> without knowing the true value of <m>\theta</m>? In fact, the power is not a single number, but a function of <m>\theta</m>.
|
||||
For each hypothetical value of <m>\theta</m>, we'll calculate the probability of seeing extreme enough data to reject <m>H_0</m>.
|
||||
How can we calculate the probability of seeing data extreme enough data to
|
||||
reject <m>H_0</m> without knowing the true value of <m>\theta</m>?
|
||||
In fact, the power is not a single number, but a function of <m>\theta</m>.
|
||||
For each hypothetical value of <m>\theta</m>, we'll calculate the
|
||||
probability of seeing extreme enough data to reject <m>H_0</m>.
|
||||
</p>
|
||||
|
||||
<example>
|
||||
<statement>
|
||||
<p>
|
||||
Continuing the previous example, we know that, if <m>S \geq 61</m> or <m>S \leq 39</m>, we would reject <m>H_0</m>.
|
||||
Continuing the previous example, we know that, if <m>S \geq 61</m> or
|
||||
<m>S \leq 39</m>, we would reject <m>H_0</m>.
|
||||
For a given value of <m>\theta</m>:
|
||||
<md>
|
||||
<mrow> \E(S) \amp = n\theta = 100\theta </mrow>
|
||||
@@ -83,97 +97,139 @@
|
||||
<mrow> \amp \approx (1 - 0.5398) + 0 </mrow>
|
||||
<mrow> \amp = 0.4602 </mrow>
|
||||
</md>
|
||||
(Note: for the <m>z</m>-score <m>-4.18</m>, which is below the range covered by <xref ref="app-Phi-table"/>, we will treat the <m>\Phi</m> value as close enough to 0.
|
||||
For a <m>z</m>-score outside the range on the other side, we would treat the <m>\Phi</m> value as 1.
|
||||
If we needed more precision than that, we would consult an expanded table.)
|
||||
(Note: for the <m>z</m>-score <m>-4.18</m>, which is below the range
|
||||
covered by <xref ref="app-Phi-table"/>, we will treat the <m>\Phi</m>
|
||||
value as close enough to 0.
|
||||
For a <m>z</m>-score outside the range on the other side, we would treat
|
||||
the <m>\Phi</m> value as 1.
|
||||
If we needed more precision than that, we would consult an expanded
|
||||
table.)
|
||||
</p>
|
||||
</statement>
|
||||
</example>
|
||||
|
||||
<p>
|
||||
We can see in the example that the power of the test was greater when <m>\theta = 0.6</m> than when <m>\theta = 0.55</m>.
|
||||
We can see in the example that the power of the test was greater when
|
||||
<m>\theta = 0.6</m> than when <m>\theta = 0.55</m>.
|
||||
The null hypothesis was <m>\theta = 0.5</m>.
|
||||
It is reasonable that, if the coin is <em>more different</em> from the null hypothesis, then it will have a higher probabiilty of producing data extreme enough to reject the null hypothesis.
|
||||
It is reasonable that, if the coin is <em>more different</em> from the null
|
||||
hypothesis, then it will have a higher probabiilty of producing data extreme
|
||||
enough to reject the null hypothesis.
|
||||
</p>
|
||||
|
||||
<exercises xml:id="exercises-Power">
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose we find a coin and wonder whether it's fair.
|
||||
As a first test, we decide to flip the coin 200 times and count the number of heads, <m>S</m>.
|
||||
What values of <m>S</m> would be extreme enough to reject the null hypothesis of a fair coin? If the coin actually has a 0.6 probability of coming up heads, what is the power of this test?
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose we have a coin which we suspect comes up heads more often than a fair coin would.
|
||||
As a first test, we decide to flip the coin 200 times and count the number of heads, <m>S</m>.
|
||||
What values of <m>S</m> would be extreme enough to reject the null hypothesis of a fair coin? If the coin actually has a 0.6 probability of coming up heads, what is the power of this test?
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<introduction>
|
||||
<p>
|
||||
Suppose we find a six-sided die and wonder whether it's fair.
|
||||
As a first test, we decide to roll the die 100 times and count the number of times it comes up 1.
|
||||
The expected number of 1's is 50/3, with a variance of 125/9.
|
||||
</p>
|
||||
</introduction>
|
||||
|
||||
|
||||
<task>
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Using a normal approximation, what is the smallest number of 1's greater than 50/3 that would be extreme enough to reject the null hypothesis of a fair die?
|
||||
Suppose we find a coin and wonder whether it's fair.
|
||||
As a first test, we decide to flip the coin 200 times and count the
|
||||
number of heads, <m>S</m>.
|
||||
What values of <m>S</m> would be extreme enough to reject the null
|
||||
hypothesis of a fair coin?
|
||||
If the coin actually has a <m>0.6</m> probability of coming up heads,
|
||||
what is the power of this test?
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
<answer>
|
||||
<p>
|
||||
(Note: Normal approximation was used for these calculations.)
|
||||
</p>
|
||||
|
||||
<task>
|
||||
<p>
|
||||
We can reject the null hypothesis if we see greater than or equal to
|
||||
<m>115</m> heads, or if we see less than or equal to <m>85</m> heads.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
If the coin has a <m>0.6</m> probability of coming up heads, then the
|
||||
power of the test is <m>0.7852</m>.
|
||||
</p>
|
||||
</answer>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Using a normal approximation, what is the greatest number of 1's less than 50/3 that would be extreme enough to reject the null hypothesis of a fair die?
|
||||
Suppose we have a coin which we suspect comes up heads more often than
|
||||
a fair coin would.
|
||||
As a first test, we decide to flip the coin 200 times and count the
|
||||
number of heads, <m>S</m>.
|
||||
What values of <m>S</m> would be extreme enough to reject the null
|
||||
hypothesis of a fair coin?
|
||||
If the coin actually has a 0.6 probability of coming up heads, what is
|
||||
the power of this test?
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<introduction>
|
||||
<p>
|
||||
Suppose we find a six-sided die and wonder whether it's fair.
|
||||
As a first test, we decide to roll the die 100 times and count the
|
||||
number of times it comes up 1.
|
||||
The expected number of 1's is 50/3, with a variance of 125/9.
|
||||
</p>
|
||||
</introduction>
|
||||
|
||||
<task>
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Using a normal approximation, what is the smallest number of 1's
|
||||
greater than 50/3 that would be extreme enough to reject the null
|
||||
hypothesis of a fair die?
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Using a normal approximation, what is the greatest number of 1's
|
||||
less than 50/3 that would be extreme enough to reject the null
|
||||
hypothesis of a fair die?
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose that this die is weighted so that it rolls a 1 with
|
||||
probability 0.2.
|
||||
What would be the power of our test?
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose we roll the die 100 times and see 23 1's.
|
||||
Use the maximum likelihood value for the probability of rolling a 1
|
||||
to calculate the power of the test.
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose that this die is weighted so that it rolls a 1 with probability 0.2.
|
||||
What would be the power of our test?
|
||||
Suppose a particular plant when grown outdoors has an average height
|
||||
of 39 in with a variance of 20 in<m>^2</m>.
|
||||
We suspect that growing this plant in a greenhouse will increase its
|
||||
height.
|
||||
We take the average height of a sample of 50 plants grown in a
|
||||
greenhouse.
|
||||
What is the minimum average height of this sample that would be
|
||||
extreme enough to reject the null hypothesis of equal means at the
|
||||
<m>p = 0.05</m> significance level?
|
||||
If the plants, when grown in a greenhouse, would truly have an average
|
||||
height of 41 in, what is the power of our test?
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
|
||||
|
||||
<task>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose we roll the die 100 times and see 23 1's.
|
||||
Use the maximum likelihood value for the probability of rolling a 1 to calculate the power of the test.
|
||||
</p>
|
||||
</statement>
|
||||
</task>
|
||||
</exercise>
|
||||
|
||||
<exercise>
|
||||
<statement>
|
||||
<p>
|
||||
Suppose a particular plant when grown outdoors has an average height of 39 in with a variance of 20 in<m>^2</m>.
|
||||
We suspect that growing this plant in a greenhouse will increase its height.
|
||||
We take the average height of a sample of 50 plants grown in a greenhouse.
|
||||
What is the minimum average height of this sample that would be extreme enough to reject the null hypothesis of equal means at the <m>p = 0.05</m> significance level? If the plants, when grown in a greenhouse, would truly have an average height of 41 in, what is the power of our test?
|
||||
</p>
|
||||
</statement>
|
||||
</exercise>
|
||||
</exercise>
|
||||
</exercises>
|
||||
</section>
|
||||
Reference in New Issue
Block a user