3
$\begingroup$

In type 2 error computation, why do we compute the standard deviation using the value assumed under the null hypothesis even if we provide the alternative hypothesis as possible true value?

If in null hypothesis u = 20, and in the alternative hypothesis u = 24, and sampled x = 21, H0σ (computed based on null hypothesis). We compute type 2 error by "(x-24)/H0σ". My questions is why not using H1σ...?

Example case - https://www.youtube.com/watch?v=BJZpx7Mdde4

Another example case from my textbook (EZ-101 Statistics by Mr. Martin Sternstein)

enter image description here

$\endgroup$
8
  • $\begingroup$ In the video you linked, $\sigma$ is already given there and thus they are computing the z score. Could you clarify what you are asking? $\endgroup$ Commented Jul 3 at 4:04
  • $\begingroup$ In the video (6.55 min): I wonder how did the author conclude while calculating probability of type 2 error that 𝜎 is 21 even for the population with a μ of 43. $\endgroup$
    – inhjop
    Commented Jul 3 at 4:30
  • $\begingroup$ The test is re $\mu$ assuming $\sigma$ is known. The latter was taken to be $21.$ $\endgroup$ Commented Jul 3 at 4:35
  • $\begingroup$ Apologize, you are right. 𝜎 is defined as 21 in the video. That makes sense. $\endgroup$
    – inhjop
    Commented Jul 3 at 4:43
  • 1
    $\begingroup$ $\sigma$ is purely a function of/is not independent of $\mu$ (aka $p$) when dealing with proportions. Assuming $\text{H}_0$ is true (which is part of null hypothesis testing's logic), then $\sigma = \sqrt{p(1-p)}$ by definition. $\endgroup$
    – Alexis
    Commented Jul 3 at 18:51

1 Answer 1

2
$\begingroup$

The latest example in the excerpt is a large sample test concerning a single population proportion.

Let's discuss briefly the framework involved in a generalized manner:

The null hypothesis is $\mathcal H_0: p=p_0$ and the alternative hypothesis $\mathcal H_1$ can be one-sided $p\lessgtr p_0$ or both sided $p\ne p_0.$

The test statistic is $\frac{\sqrt n\left(\hat p-p_0\right)}{\sqrt{p_0(1-p_0) }},$ which under $\mathcal H_0$ follows $\mathsf N(0, 1).$

The probability of type II error for $\mathcal H_1: p=p_1 ~(p_1> p_0)$ is

\begin{align}\beta(p_1)&= \Pr\left(\frac{\sqrt n\left(\hat p-p_0\right)}{\sqrt{p_0(1-p_0) }}\leq z_\alpha\mid \mathcal H_1\right)\\&= \Pr\left(\frac{\sqrt n\left(\hat p-p_1+p_1-p_0\right)}{\sqrt{p_0(1-p_0) }}\leq z_\alpha\mid \mathcal H_1\right)\\ &= \Pr\left(\frac{\sqrt n(\hat p-p_1)}{\sqrt{p_1(1-p_1)}}+\frac{\sqrt n(p_1-p_0)}{\sqrt{p_1(1-p_1)}} \leq z_\alpha\cdot\sqrt{\frac{{p_0(1-p_0)}}{{p_1(1-p_1)}}}\mid \mathcal H_1\right)\\&=\Phi\left(\frac{\sqrt n(p_0-p_1)+ z_\alpha\sqrt{p_0(1-p_0)}}{\sqrt{p_1(1-p_1)}}\right);\end{align} note that in the above calculation, the fact that under $\mathcal H_1,~\frac{\sqrt n(\hat p-p_1)}{\sqrt{p_1(1-p_1)}}\sim \mathsf N(0,1)$ was used, as per the definition of $\beta.$

In fact, as noted in $\rm[I], $ the other probabilities of type II errors can be similarly calculated:

Type II error table

--

Reference:

$\rm[I]$ Lecture 14: Tests for a population proportion $p,$ MSU-STT $351$–Sum$19\rm A,$ [link].

$\endgroup$
5
  • $\begingroup$ Thank you so much for detailed explanation. Kindly let me ask one more follow-up question here to ensure if I understand this correctly. If we want to apply the framework you suggested to the example (flight-delay-problem in the question) to compute the probability of β if true p is P1, then we should use √(p1q1/n) instead of √(p0q0/n) as noted in [I]. i.e. my text book is not correct since it's using √(p0q0/n)? $\endgroup$
    – inhjop
    Commented Jul 4 at 4:29
  • $\begingroup$ Yes, it seems so. The linked lecture slide is correct @inhjop. $\endgroup$ Commented Jul 4 at 4:30
  • 1
    $\begingroup$ Speaking in general, assuming $H_0$ in variance calculations will lose power. $\endgroup$ Commented Jul 4 at 12:11
  • $\begingroup$ @FrankHarrell That is an intriguing comment, can you give some reference? $\endgroup$ Commented Aug 20 at 15:47
  • 1
    $\begingroup$ See bottom paragraph of p. 112 of doi.org/10.1002/sim.3770 for example $\endgroup$ Commented Aug 20 at 19:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.