Probability of the error of type 2

Click For Summary
SUMMARY

The discussion focuses on calculating the probability of a Type II error in hypothesis testing using a sample of 100 people with a standard deviation of 20. The null hypothesis is defined as H0: μ ≤ 100, while the alternative hypothesis is H1: μ > 100, with a significance level of α = 0.1. The critical sample mean is determined to be 102.56, leading to a Type II error probability of approximately 0.6103 when the true mean is μ = 102. The participants clarify the distinction between Type II error and the power of the test, confirming the calculations presented.

PREREQUISITES
  • Understanding of hypothesis testing concepts, including null and alternative hypotheses.
  • Familiarity with Type I and Type II errors in statistical analysis.
  • Knowledge of Z-scores and their application in calculating probabilities.
  • Basic proficiency in statistical software or tools for hypothesis testing.
NEXT STEPS
  • Study the calculation of power in hypothesis testing to differentiate from Type II error.
  • Learn about the implications of varying sample sizes on Type II error rates.
  • Explore the use of statistical software like R or Python for conducting hypothesis tests.
  • Investigate the relationship between significance levels and Type I/II errors in depth.
USEFUL FOR

Statisticians, data analysts, and researchers involved in hypothesis testing and statistical inference will benefit from this discussion, particularly those interested in understanding Type II errors and their implications in research outcomes.

mathmari
Gold Member
MHB
Messages
4,984
Reaction score
7
Hey! :o

We have data of a sample of $100$ people from a population with standard deviation $\sigma=20$.

We consider the following test: \begin{align*}H_0 : \ \mu\leq 100 \\ H_1 : \ \mu>100\end{align*}

The real mean is $\mu=102$ and the significance level is $\alpha=0.1$.

I want to calculate the probability of the error of type 2. I have done the following:

The statistic function is: \begin{equation*}Z=\frac{\overline{X}-\mu}{\sigma_{\overline{X}}}=\frac{\overline{X}-\mu}{\frac{\sigma}{\sqrt{n}}}=\frac{\overline{X}-100}{\frac{20}{\sqrt{100}}}=\frac{\overline{X}-100}{\frac{20}{10}}=\frac{\overline{X}-100}{2}\end{equation*}
where $\overline{X}$ is the estimation of $\mu$.

For the significance level $\alpha=0.1$ the critical value is $Z_{c} = 1.28$ and the region of rejection of $Η_0$ is $R = \{Z\mid Z > 1.28\}$.

The critical value $Z_{c}$ corresponds to a critical value $\overline{X}_{c}$ such that \begin{equation*}P\left (Z>1.28\right )=P\left (\overline{X}>\overline{X}_c \mid \mu=100 , \sigma_{\overline{X}}=2\right ) =1-\alpha=0.9\end{equation*}

We can find the value of $\overline{X}_c$ solving th following equation: \begin{equation*}Z_c=1.28 \Rightarrow \frac{\overline{X}_c-100}{2}=1.28 \Rightarrow \overline{X}_c-100=2.56 \Rightarrow \overline{X}_c=102.56\end{equation*}

So incorrectly we fail to reject the null hypothesis if we take a sample mean greater than $102.56$.

The probability to take a sample mean greater than $102.56$ given $\mu=102$ and $\sigma_{\overline{X}}=2$, i.e. the probability of error of type II is \begin{align*}P\left (\overline{X}>102.56\mid \mu=102, \sigma_{\overline{X}}=2\right )&=P\left (Z>\frac{102.56-102}{2}\right )=P\left (Z>\frac{0.56}{2}\right )=P\left (Z>0.28\right )\\ & =1-P\left (Z\leq 0.28\right )=1-0.6103=0.3897\end{align*} Is everything correct? (Wondering)
 
Physics news on Phys.org
mathmari said:
We can find the value of $\overline{X}_c$ solving th following equation: \begin{equation*}Z_c=1.28 \Rightarrow \frac{\overline{X}_c-100}{2}=1.28 \Rightarrow \overline{X}_c-100=2.56 \Rightarrow \overline{X}_c=102.56\end{equation*}

So incorrectly we fail to reject the null hypothesis if we take a sample mean greater than $102.56$.

Hey mathmari!

If we fail to reject the null hypothesis, we keep the null hypothesis don't we?
Isn't that the case if we find a sample mean less than $102.56$? (Wondering)

mathmari said:
The probability to take a sample mean greater than $102.56$ given $\mu=102$ and $\sigma_{\overline{X}}=2$, i.e. the probability of error of type II is \begin{align*}P\left (\overline{X}>102.56\mid \mu=102, \sigma_{\overline{X}}=2\right )&=P\left (Z>\frac{102.56-102}{2}\right )=P\left (Z>\frac{0.56}{2}\right )=P\left (Z>0.28\right )\\ & =1-P\left (Z\leq 0.28\right )=1-0.6103=0.3897\end{align*}

Is everything correct?

I believe you have calculated the so called Power instead of the Type II error. (Worried)
 
Klaas van Aarsen said:
If we fail to reject the null hypothesis, we keep the null hypothesis don't we?
Isn't that the case if we find a sample mean less than $102.56$? (Wondering)

The error of type II is to accept the null hypothesis although it is wrong, isn't it?

I got stuck right now. We found the critival $\overline{X}$-value to be $102.56$ which is greater than $100$ and so we would accept the hypothesis $H_1$, or not? (Wondering)
 
mathmari said:
The error of type II is to accept the null hypothesis although it is wrong, isn't it?

Correct. (Nod)

mathmari said:
I got stuck right now. We found the critival $\overline{X}$-value to be $102.56$ which is greater than $100$ and so we would accept the hypothesis $H_1$, or not?

Not quite.

Let's denote the critical $\overline{X}$-value as $\overline{X_0}^c$ to avoid confusion.
Note that $\overline{X_0}^c$ is calculated based on the null hypothesis for a certain significance level and sample size.
Now if we take a sample $x$ and its mean $\overline x$ is greater than $\overline{X_0}^c$, then we accept the alternative hypothesis, don't we?
And if $\overline x$ is less than $\overline{X_0}^c$, then we keep the null hypothesis, don't we? (Thinking)

The Type II Error is the probability that a sample follows the alternative distribution, but has a mean so close to the null hypothesis that we keep the null hypothesis even though it is wrong.
In our case:
$$\beta = \text{Type II Error} = P(\overline X < \overline{X_0}^c \mid \mu = \mu_1 = 102)$$
where $\overline{X_0}^c$ is calculated based on the null hypothesis with $\mu=\mu_0=100$. (Thinking)
 
Klaas van Aarsen said:
Let's denote the critical $\overline{X}$-value as $\overline{X}^c$ to avoid confusion.
Now if we take a sample $x$ and its mean $\overline x$ is greater than $\overline{X}^c$, then we accept the alternative hypothesis, don't we?
And if $\overline x$ is less than $\overline{X}^c$, then we keep the null hypothesis, don't we? (Thinking)

The Type II Error is the probability that a sample follows the alternative distribution, but has a mean so close to the null hypothesis that we keep the null hypothesis even though it is wrong.
In our case:
$$\beta = \text{Type II Error} = P(\overline X < \overline X^c \mid \mu = \mu_1 = 102)$$
where $\overline X^c$ is calculated based on the null hypothesis with $\mu=\mu_0=100$. (Thinking)
Ah ok! So do we have the following? (Wondering)

\begin{equation*}\beta = P(\overline X < \overline X^c \mid \mu = \mu_1 = 102)=P\left (Z<\frac{102.56-102}{2}\right )=P\left (Z<\frac{0.56}{2}\right )=P\left (Z<0.28\right )=0.6103\end{equation*}
 
mathmari said:
Ah ok! So do we have the following?

\begin{equation*}\beta = P(\overline X < \overline X^c \mid \mu = \mu_1 = 102)=P\left (Z<\frac{102.56-102}{2}\right )=P\left (Z<\frac{0.56}{2}\right )=P\left (Z<0.28\right )=0.6103\end{equation*}

Yep. (Nod)
 
Klaas van Aarsen said:
Yep. (Nod)

Great! Thanks a lot! (Mmm)
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 1 ·
Replies
1
Views
1K
Replies
1
Views
4K
  • · Replies 10 ·
Replies
10
Views
3K
  • · Replies 8 ·
Replies
8
Views
3K
Replies
10
Views
3K
Replies
4
Views
2K