Given the problem, first, we denote the sample size, observed proportion of blue candies, claimed proportion of blue candies, and significance level as:
- n = 100
- p_observed = 0.21
- p_claimed = 0.28
- significance_level = 0.05
Our first step in the hypothesis testing process is to calculate the standard error. We do this using the formula:
standard_error = sqrt((p_claimed*(1 - p_claimed))/n)
which gives us a standard error of approximately 0.0449. The standard error measures the variability or dispersion of our sample proportion from the claimed proportion.
Next, we will calculate the z-score, which measures the number of standard deviations an observation (or in this case, the sample proportion) is away from the mean, or the claimed proportion. We do this using the formula:
z = (p_observed - p_claimed)/standard_error
which gives us a z-score of approximately -1.559. The negative sign indicates that the observed proportion is less than the hypothesized proportion.
Then, we need to calculate the p-value. The p-value is the probability of getting a sample as extreme, or more extreme, than the one we have, assuming the null hypothesis is true. In other words, it is the likelihood of observing our sample data if the candy company's claim of 28% blue candies is accurate.
As the observed proportion is less than the hypothesized proportion, we calculate the cumulative probability up to the z-score. Doing this gives us a p-value of approximately 0.0595.
Finally, we need to determine whether to accept or reject the null hypothesis based on the p-value and the significance level.
Here, we can see our p-value is slightly larger than the given significance level (0.0595 > 0.05), thus, we do not reject the null hypothesis. This means there is not enough evidence at the 5% significance level to reject the candy company's claim that 28% of their candies are blue.
In conclusion, given our sample and the given significance level, our analysis does not provide sufficient evidence to say with 95% confidence that the company's claim is false. Our data does not contradict the company's claimed proportion of 28%.