1. Hypothesis testing

The producer of an electric machine wants to make a test to see how many of their machines that are working correct. The hypothesis are the following:

$H_0$: the proportion of defect machines is at most 8%
$H_a$: the true proportion of defect machines is more than 8%

The producer decides to reject $H_0$ if the sample proportion of defect machines are more than 12%.

i) If we draw a sample of 100 machines, then what is the probability of making a type I error?

I'm thinking of a Z-transformation.

$P(type 1)=P(phat{>0.12}\mid p=0.08) = P(Z>z)$

$z = (0.12-0.08)/\sqrt{0.08(0.92)/100)}$

And then I look up P(Z>z) in a table. Is that correct?

ii) If we know that the true proportion of defective machines is 15%. Then what is the probability of a type II error with a random sample of 100?

$P(type 2)=P(phat{<0.12}\mid p=0.15) = P(Z>z)$

$z = (0.12-0.15)/\sqrt{0.15(0.85)/100)}$

Since this will be negative, I look up the probability that Z(<-z) in a table. Do I think in the right way?

Thanks a lot for your help.

2. Originally Posted by mirrormirror
The producer of an electric machine wants to make a test to see how many of their machines that are working correct. The hypothesis are the following:

$H_0$: the proportion of defect machines is at most 8%
$H_a$: the true proportion of defect machines is more than 8%

The producer decides to reject $H_0$ if the sample proportion of defect machines are more than 12%.

i) If we draw a sample of 100 machines, then what is the probability of making a type I error?

I'm thinking of a Z-transformation.

$P(type 1)=P(phat{>0.12}\mid p=0.08) = P(Z>z)$

$z = (0.12-0.08)/\sqrt{0.08(0.92)/100)}$

And then I look up P(Z>z) in a table. Is that correct?

ii) If we know that the true proportion of defective machines is 15%. Then what is the probability of a type II error with a random sample of 100?

$P(type 2)=P(phat{<0.12}\mid p=0.15) = P(Z>z)$

$z = (0.12-0.15)/\sqrt{0.15(0.85)/100)}$

Since this will be negative, I look up the probability that Z(<-z) in a table. Do I think in the right way?

Thanks a lot for your help.
this looks OK, for the second case as $z$ is negative you want $P(Z|z|)$ for your probability, if that makes any sense?

.