Type I error is rejecting a Null Hypothesis that is a true (should have been accepted).
Type 2 error is accepting a Null Hypothesis that is false (should have been rejected)
Let us discuss this question with an example.
Machine A and Machine B are producing certain part, and the weight of the part is a characteristic of interest. The weights of samples taken from these machines are as follows:
A – 10.8, 10.3. 10.7, 10.9, 10.4, 10.7, 11.0, 10.3, 10.8, 10.7.
B – 11.2, 11.3, 11.1, 11.6, 11.0, 11.6, 10.8, 11.4, 11.4, 11.6.
Mean weight for Machine A = 10.6
Mean weight for Machine B = 11.3
Situation - 1
Assume that in reality there is a significant weight difference on the output from Machine A and B. But we are trying to prove using a Hypothesis test.
Hypothesis statements:
H0 : Mean weight from Machine A = Mean weight from Machine B
H1 : Mean weight from Machine A Mean weight from Machine B
The true conclusion would have been to reject the Null Hypothesis, in this situation.
However, as a result of the test, if H0 gets retained, it is an incorrect acceptance of null hypothesis and is a Type-2 error
Situation - 2
Now let’s examine another situation. Here we want to test the effectiveness of an improvement action taken, which is expected to bring down the differences on the weight of their outputs. Our aim is to improve the process to reduce the difference. Assume that the difference between the machines continues to exist. The Hypothesis statements may be as follows:
H0 : (Mean weight from M/c B ) – (Mean weight from M/c A) = 0.7
H1 : (Mean weight from M/c B ) – (Mean weight of M/c A) ≤ 0.7
The true conclusion would be to accept the null hypothesis, in this situation and accept the difference is equal to 0.7
However, conducting the Hypothesis test, if H0 gets incorrectly rejected, it means that the means are having difference which is less than 0.7. This amounts to Type-1 error.
Thus, the null hypothesis in the situation in situation-2 is the alternate hypothesis in situation-1