# Calculating type two error without std dev

I have this problem I’m working through that requires me to calculate the type two error but doesn’t supply the std Dev or any way to calculate it.

A preschool teacher wants to test to see if more than 10% of her students are allergic to wheat. Using a Ho: p=0.10 and Ha: p>0.10 she takes a random sample of 15 and plans to reject if more than three are allergic. If p = 0.20 . Calculate the type two error.

I have the typical “here’s how to calculate type II error” equation but I don’t have sigma so how do I get around this?

• The question asks you to compute the chance that three or fewer people are allergic in a sample of 15 from a population where 20% of people are allergic. Could you explain how you would use a standard deviation to do that calculation? – whuber May 8 '19 at 1:05
• @SwinMaster this looks like it is an assignment question - please use the "self-study" tag. – André.B May 8 '19 at 1:10
• If you find the exact binomial probability of Type II error, you don't need to compute the standard deviation. But if you use the normal approximation to the binomial, then you need to find the binomial SD. Some discussion about Type I and II errors and their computation in my Answer. // The main point seems to be to reinforce understanding of Type II error. – BruceET May 8 '19 at 16:23

Significance level: According to $$H_0: p = 0.1$$ the number of allergic students seen in a sample of $$n = 15$$ is $$X \sim \mathsf{Binom}(15, 0.1).$$

You plan to reject if "more than 3" are allergic. So the significance level $$\alpha = P(X > 3)$$ $$= P(X \ge 4)$$ $$= 1 - P(X \le 3) = 0.056,$$ as computed exactly in R below, where pbinom denotes a binomial CDF. The significance level is sometimes called the probability of Type I error.

[You might get a useful rough approximation to this probability with a normal distribution. I don't know whether you are expected to do that. If so, you need to find the standard deviation of this binomial distribution.]

1 - pbinom(3, 15, .1)
## 0.05555563


Probability of Type II error: Keeping that significance level and critical value 4 for a right-sided test against the alternative $$H_a: p = 0.2 > 0.1),$$ the Type II error is the probability of not rejecting. So you are assuming $$X \sim \mathsf{Binom}(15, 0.2),$$ and you seek $$P(X \le 3) = 0.648.$$ [A normal approximation with continuity correction gives $$\approx 0.63.]$$

pbinom(3, 15, .2)
## 0.6481621


Graphical summary: In the left panel below: The significance level is the sum of the heights of the bars to the right of the vertical broken line.

At right: the specified probability of Type II error is the sum of the heights of the bars to the left of the vertical broken line. [The 'best fitting' normal curve gives an idea why the normal approximation is a little too small.]

Note: Exact binomial computation using PDF. Using R as little more than a calculator. Not too difficult on an ordinary calculator.

k=0:3;  choose(15, k)*(.2)^k*.8^(15-k)
## 0.03518437 0.13194140 0.23089744 0.25013890
sum(choose(15, k)*(.2)^k*.8^(15-k))
## 0.6481621