Suppose the scientists are interested in determining whether the median amount of caffeine in Breakfast Blend coffee exceeds 300 milligrams. Set up the null and alternative hypotheses of interest.
How many of the cups in the sample have a caffeine content that exceeds 300 milligrams?
Suppose your answer in (b) is x. Find the p-value using pbinom in R. Note: the p-value here is P (X ≥ x), where X ∼ Bin(6, 0.5). What is your conclusion?
Hi,
Here we have to determine whether the median amount of caffeine in breakfast blend coffee exceeds 300 milligrams.
Setting up the null and alternative hypothesis,
Null hypothesis: The median amount of caffeine in breakfast blend coffee is equal to 300 milligrams.
Alternative hypothesis: The median amount of caffeine in breakfast blend coffee is greater than 300 milligrams.
Arrange all the observations in increasing order
259 300 303 307 498 564
Median = (3rd observation + 4th observation)/2
Median of sample = (303 + 307)/2
Median = 305
4 cups in the sample have a caffeine content that exceeds 300milligrams.
Use lower.tail = FALSE if we want the probability of values x or larger. P[X >= x]
> pbinom(4, size = 6, prob = 0.5, lower.tail = FALSE)
[1] 0.109375
P-value = 0.109375
Here, p-value is greater than level of significance 0.05 hence we accept nul hypothesis.
Hence we conclude that the median amount of caffeine in breakfast blend coffee is equal to 300 milligrams.
Suppose the scientists are interested in determining whether the median amount of caffeine in Breakfast Blend...