DA2. Hypothesis Testing Exercises¶
Question 1¶
List errors in the following hypotheses: H0: P̂ > 0.20 and HA: P̂ ≥ 0.25.
The main issue with this hypothesis is the overlap between the null and alternative hypotheses; this means that at value of P̂ = 0.25, both hypotheses are true. This may cause confusion or maybe invalidate the test at att; however, according to Diez, Barr, and Çetinkaya-Rundel (2014), there are two types of errors that can occur in hypothesis testing:
- Type 1 error: Rejecting the null hypothesis when it is actually true: null hypothesis is true but we choose the alternative hypothesis.
- Type 2 error: Failing to reject the null hypothesis when the alternative is actually true: null hypothesis is false but we choose the null hypothesis.
Let’s try to construct a scenario for each type of error:
- Type 1 error: H0 is true, then P̂ > 0.20, but we reject it, and accept the alternative hypothesis. This means that P is actually between 0.20 and 0.25.
- Type 2 error: H0 is false, but we fail to reject it; and accept the null hypothesis. This means that P is actually greater than 0.25.
Question 2¶
What is wrong with the following statement?
“If p-value is small we reject the null hypothesis and accept the alternative hypothesis”.
The p-value is a way of quantifying the strength of the evidence supporting the null hypothesis and against the alternative hypothesis; this means that when the p-value is small there is little evidence supporting the null hypothesis, so we reject it (Diez, Barr, & Çetinkaya-Rundel, 2019).
However, there must be a reference to how small the p-value is; this is the significance level (α), which is the value that we should compare the p-value to.
The correct statement should be:
If the p-value is less than the significance level (α), we reject the null hypothesis and accept the alternative hypothesis.
Question 3¶
Identify a research question in a topic that interests you related to the concepts covered in this unit.
The topic of interest will be concerning the minimum wage of the United States. A Rasmussen Reports survey of 1,000 US adults found that 42% believe it will help the economy (Rasmussen Reports, 2019).
Define the population parameter and the statistics that will be used to conduct the inference on the population. State and explain the hypotheses.
The population parameter is the number of US adults who believe that raising the minimum wage will be helpful to the economy. The statistic that will be used is to conduct a survey of 1000 US adults and calculate the proportion of those who supports raising the minimum wage, and then use this sample proportion to make inferences about the population.
Explain how you will collect the data and carry out a hypothesis test of the research question you have identified.
The data will be collected through surveying 1000 US adults, the sampling process must be random and representative of the population. The survey will ask the question: “Do you believe that raising the minimum wage will help the economy?” and the responses will be recorded.
The hypotheses will be:
- H0: null hypothesis: No majority of US adults believe that raising the minimum wage will help the economy. P = 0.5.
- HA: alternative hypothesis: A majority of US adults believe (or don’t believe) that raising the minimum wage will help the economy. P != 0.5.
Draw a conclusion based on the hypothesis test you have described in the previous question.
- We can verify that the Central Limit Theorem applies to the sample proportion, so the sampling distribution will be approximately normal.
- Then calculate the standard error of the proportion using
p=0.5
andn=1000
and find thatSE=0.015
. - Then we compute the
z-score
using the formula:z = (p̂ - p) / SE
and find thatz = (0.42 - 0.5) / 0.015 = -5.333
. - Finally, we use the z-score and z-table to find the tail area below z-score which almost equals
0
. We double this value to get the p-value which is0
. - Since the
p-value < the significance level (α) = 0.05
, we reject the null hypothesis and accept the alternative hypothesis.
Therefore, we can conclude that there is enough evidence to suggest that a majority of US adults believe (or don’t believe) that raising the minimum wage will help the economy.
Since the sample proportion is 0.42
, we can conclude that there is a 42% support for raising the minimum wage; thus, the majority of US adults DO NOT believe that raising the minimum wage will help the economy.
Question 4¶
If we want to decrease the margin of error, and hence have a more precise confidence interval, should we increase or decrease the sample size? Justify your answer with relevant examples.
The margin of error is computed using the formula: z* SE
where z*
is the critical value and SE
is the standard error of the statistic. The standard error of the statistic is calculated as sqrt(p(1-p)/n)
where p
is the population proportion (or sample point estimate if we can substitute it for the population proportion) and n
is the sample size.
From the formula above, the margin of error is inversely proportional to the sample size; this means that as the sample size increases, the margin of error decreases, and vice versa. However, sampling is usually expensive and time-consuming, so the practicality of increasing the sample size should be considered.
So, when we start the study, we should agree on error margin that we can tolerate; 0.05
is a common value; we can plug that into the formula and solve for n
to find the appropriate sample size within the desired margin of error. Margin error is at biggest when p = 0.5
and decreases as p
moves away from 0.5
; so plugging in p = 0.5
is a good way to evaluating the worst-case scenario.
For example, suppose we have z*=1.96
and we want to decrease the margin of error to 0.01
, we can plug in the values and solve for n
:
So, we need a sample size of at least 9604
to achieve a margin of error of 0.01
with a confidence level of 95%
.
References¶
- Diez, D. M., Barr, C. D., & Çetinkaya-Rundel, M. (2019). Openintro statistics - Fourth edition. Open Textbook Library. https://www.biostat.jhsph.edu/~iruczins/teaching/books/2019.openintro.statistics.pdf
- Rasmussen Reports survey. (2019). Most Favor Minimum Wage of $10.50 Or Higher. Rasmussenreports.com. https://www.rasmussenreports.com/public_content/business/jobs_employment/april_2019/most_favor_minimum_wage_of_10_50_or_higher