In: Statistics and Probability
2. Manufacturers must test the amount of the active ingredient in medications before releasing the batch of pills. The data Pills represents the amount (in mg) of the active ingredient in n = 24 pills (from the same large batch).
y |
20.6 |
19.6 |
18.8 |
19.9 |
17.6 |
19.8 |
18.7 |
19.9 |
19.7 |
19 |
21 |
19.1 |
20.4 |
21.7 |
19.4 |
20.9 |
18.3 |
18.2 |
20.7 |
19 |
19.2 |
18.5 |
18.8 |
19.2 |
C. For this question, suppose that if there is evidence that the mean is different from 20mg, the batch of pills will not pass a certain standard. Is there significant evidence that the batch of pills has a mean amount different from 20mg? State your hypotheses, test statistic, p-value and make a conclusion. Use α = 0.05. (4 pts)
D. For this question, suppose that if there is evidence that the mean is less than 20mg, the batch of pills will not pass the standard. Is there significant evidence that the batch of pills has a mean amount less than 20mg? State your hypotheses, test statistic, p-value and make a conclusion. Use α = 0.05. (4 pts)
I really only need the p-values for c and d. I keep getting two different answers depending on the way I type the function in R.
part C)
H0 : = 20
Ha : 20
As Ha consist of sign , this is two tailed test.
From the given data set sample mean ( )= 19.5 and sample standard deviation (S) = 1.0039
Since population standard deviation is unknown, we have to perform t test .
t statistic =
To find t statistic and exact p value we can use TI-84 calculator.
Press STAT key ---> scroll to TESTS ----> Select T - Test and hit enter,
Then select Stat and hit enter, plug the given values accordingly.
= value of under H0.
= sample mean.
Sx = sample standard deviation.
n = sample size.
Then select appropriate sign under Ha and scroll to calculate and hit enter.
The output of the test is as follows :
So t statistic = -2.44 and p- value = 0.0228
Part d)
H0 : = 20
Ha : < 20
As Ha consist of < sign , this is one tailed test.
Now for this part we just need to select < sign in T test function in TI-84 calculator.
The output of the test is as follows :
So t statistic = -2.44 and p- value = 0.0114