The null hypothesis (H0) is that the machine is filling the bags of pretzels to the correct weight, that is, the mean weight of the bags is 8 ounces:
H0: μ = 8
The alternative hypothesis (Ha) is that the machine is not filling the bags to the correct weight, that is, the mean weight of the bags is different from 8 ounces:
Ha: μ ≠ 8
In this case, the worker's observation of a mean weight of 8.4 ounces in a sample of 40 bags suggests that the bags may be overfilled. To test this hypothesis, the worker would need to conduct a hypothesis test using appropriate statistical methods and a significance level to determine whether the observed difference is statistically significant or not.