Hypothesis Testing (Hypothesis Testing)
Using the nlsw88 data, this exercise asks you to apply the five-step hypothesis testing procedure from the Creating Theoretical Distributions lecture:
Test whether women work 40 hours per week on average. The variable hours records usual hours worked per week.
- Use
sumto find the sample mean, standard deviation, and sample size. - As a comment in your do-file, write down the hypotheses for testing whether women work 40 hours per week on average:
- $H_0: \mu = 40$
- $H_1: \mu \neq 40$
1. Use ttest to perform a one-sample t-test of this hypothesis.
- What is the sample mean of
hours? - What is the t-statistic?
- How many degrees of freedom are there?
- What is the two-sided p-value?
- At the 5% significance level, do you reject or fail to reject the null hypothesis that women work 40 hours per week on average?
Now we will test a hypothesis about the mean hourly wage for college graduates only.
- Use
tabwith and without thenolaboption to determine which numerical value college grade takes. - Use
sumwithifto summarize the wages of just college graduates. - Suppose someone claims that college graduates in this sample earn $10 per hour on average. Set up the hypotheses:
- $H_0: \mu = 10$
- $H_1: \mu \neq 10$
2. Use a one-sample t-test restricted to college graduates to test this claim.
- What is the sample mean of
hours? - What is the t-statistic?
- How many degrees of freedom are there?
- What is the two-sided p-value?
- At the 5% significance level, what is your decision about $H_0$?