Explanation:
Put hypotheses as:
\begin{gathered}H_0: mu =40 mg\\H_a: mu \\eq 40 mg.\end{gathered}
H
0
:mu=40mg
H
a
:mu
=40mg.
(Two tailed test at 4%)
Since population std deviation is given we can do Z test.
\begin{gathered}Sample size n =30\\Sample mean = 42.3 mg\\Mean diff = 2.3 mg\\Std error of sample = \frac{7.1}{\sqrt{30} } =1.296\end{gathered}
Samplesizen=30
Samplemean=42.3mg
Meandiff=2.3mg
Stderrorofsample=
30
7.1
=1.296
Test statistic t = mean diff/se = \frac{2.3}{1.296} =1.775
1.296
2.3
=1.775
p value=0.075
Since p >0.04 our alpha, we accept null hypothesis.
At alphaequals0.04, we cannot reject the company's claim