homework 5: hypothesis tests and confidence intervals...

4
Homework 5: Hypothesis tests and confidence intervals Due in class of week 10. Group work is permitted, but each member should write up and hand in their own solutions. 1. In 1960, census results indicated that the age at which American men first married had a mean of 23.3 years. It is widely suspected that young people today are waiting longer to get married. We want to find out if the mean age at first marriage has increased during the past 50 years. We plan to test our hypothesis by selecting a random sample of 40 men who married for the first time last year. The men in our sample married at an average age of 24.2 years, with a standard deviation of 5.3 years. (a) At a 5% level, test the hypothesis that average age of first marriage has increased in the past 50 years. (b) Give a symmetric 95% confidence interval for the difference in average marriage age between the two populations. 2. A SurveyUSA poll conducted on March 1, 2011 asked randomly sampled Los Angeles resi- dents about their views on American vs. foreign-made products. One of the questions on the survey was “If an American-made product cost slightly more than a foreign-made product, which would you be more likely to buy?”. 81 out of the 166 respondents between the ages of 18 and 34, and 248 out of the 334 respondents 35 years and older said they would prefer the American-made product. We are interested to see if younger people are less likely to choose American-made products. Test this hypothesis at the 5% level. 3. A small poll of 40 randomly selected Kansans gave 21 responses in favor of Rick Santorum for the Republican presidential candidate. (a) Give a symmetric 90% confidence interval for the true proportion of Kansans in favor of Santorum. (b) Assuming that all Kansans favor either Santorum or Mitt Romney, does this poll sug- gest a statistically significant lead for Santorum at the 10% level?

Upload: truongkhanh

Post on 04-Feb-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Homework 5: Hypothesis tests and confidence intervals …faculty.chicagobooth.edu/richard.hahn/teaching/hw5.pdf · Hypothesis tests and confidence intervals ... their own solutions

Homework 5:Hypothesis tests and confidence intervals

Due in class of week 10. Group work is permitted, but each member should write up and hand intheir own solutions.

1. In 1960, census results indicated that the age at which American men first married had amean of 23.3 years. It is widely suspected that young people today are waiting longer to getmarried. We want to find out if the mean age at first marriage has increased during the past 50years. We plan to test our hypothesis by selecting a random sample of 40 men who marriedfor the first time last year. The men in our sample married at an average age of 24.2 years,with a standard deviation of 5.3 years.

(a) At a 5% level, test the hypothesis that average age of first marriage has increased in thepast 50 years.

(b) Give a symmetric 95% confidence interval for the difference in average marriage agebetween the two populations.

2. A SurveyUSA poll conducted on March 1, 2011 asked randomly sampled Los Angeles resi-dents about their views on American vs. foreign-made products. One of the questions on thesurvey was “If an American-made product cost slightly more than a foreign-made product,which would you be more likely to buy?”. 81 out of the 166 respondents between the ages of18 and 34, and 248 out of the 334 respondents 35 years and older said they would prefer theAmerican-made product. We are interested to see if younger people are less likely to chooseAmerican-made products. Test this hypothesis at the 5% level.

3. A small poll of 40 randomly selected Kansans gave 21 responses in favor of Rick Santorumfor the Republican presidential candidate.

(a) Give a symmetric 90% confidence interval for the true proportion of Kansans in favorof Santorum.

(b) Assuming that all Kansans favor either Santorum or Mitt Romney, does this poll sug-gest a statistically significant lead for Santorum at the 10% level?

Page 2: Homework 5: Hypothesis tests and confidence intervals …faculty.chicagobooth.edu/richard.hahn/teaching/hw5.pdf · Hypothesis tests and confidence intervals ... their own solutions

4. We run a regression trying to understand the impact of OBP (on base percentage) on RPG(runs per game). The results for each team in the American League are shown below.

Coefficients:Estimate Std. Error t value Pr(>|t|)

(Intercept) -8.247 1.921 -4.294 0.00104 **OBP[League == "American"] 38.817 5.506 7.050 1.34e-05 ***

Residual standard error: 0.2099 on 12 degrees of freedom. R-squared: 0.8055.

(a) Give an approximate 90% confidence interval for the slope.

(b) Test the hypothesis that OBP is unrelated to RPG at the 10% level.

(c) What is the correlation between RPG and OBP?

(d) Give the plug-in 95% prediction interval for RPG when OBP is 0.400.

(e) Test the hypothesis that the true slope is exactly 30 at the 5% level. Count as extremeonly values greater than the null hypothesis value of 30.

5. The fertility rate is defined as the average number of children a woman citizen bears in herlifetime. Researchers examined data on 27 developing countries, regressing the fertility rateon contraceptive availability, defined as the percentage of married women who use contra-ception.

lm(formula = fertility_rate ˜ contraceptive_availability)

Coefficients:Estimate Std. Error

(Intercept) 6.731929 0.290343contraceptive_availability -0.054610 0.006335

Residual standard error: 0.6957 on 25 degrees of freedom. R-squared: 0.7483.

(a) What is the correlation between fertility rate and contraceptive availability?

(b) Give a symmetric 90% confidence interval for the intercept parameter.

(c) Researchers believe that fertility rate should be negatively associated with contraceptiveavailability. To demonstrate this, they want to show that if in fact there were no relation,the observed correlation would be unlikely. Compute a z-score and use it to argue foror against the hypothesis of independence.

Page 3: Homework 5: Hypothesis tests and confidence intervals …faculty.chicagobooth.edu/richard.hahn/teaching/hw5.pdf · Hypothesis tests and confidence intervals ... their own solutions

6. Your factory makes umbrellas. You know from past experience that 2% are defective. Youthink, however, that the process may have changed since you hired a bunch of new employeesten days ago. In the 10 days previous to the new hires arriving you observed 25 defects outof a batch of 1000. In the 10 days since, there have been 29 defects out of 1000. At the 5%level, using two-sided tests, do the following:

(a) Test H0 : p1 = 0.02 based on the first 10 days of data.

(b) Test H0 : p2 = 0.02 based on the last 10 days of data.

(c) Test H0 : p = 0.02 based on all the data combined.

(d) Test H0 : p1 − p2 = 0 by comparing data from the two samples.

(e) Explain in words the discrepancy between the various tests.

7. A classroom of twenty-five individuals are asked aloud and in turn what their political partyaffiliation is; 16 answer Democrat and 9 answer Republican. There is a concern that lack ofanonymity could have impacted the accuracy of the responses. To test the hypothesis that theresponses were provided independently of one another, we count the number of times thatadjacent responses differ. In the observed sequence of responses

(D,D,D,D,R,R,R,R,R,D,D,D,D,D,R,D,D,D,R,R,R,D,D,D,D)

this number is 6. By randomly shuffling these 25 observations, we get a distribution for thenumber of “switches” under the null hypothesis that the ordering of the responses was ran-dom, which has the following quantiles:

0.5% 1% 2.5% 5% 10% 50% 60% 95% 97.5% 99% 99.5%6 6 7 8 9 12 12 15 16 17 17

(a) Is the p-value of the observed data under the hypothesis of independent responses aboveor below 5%? Explain why.

(b) Do you reject the null hypothesis of independent responses at the 1% level?

(c) If friends tend to share political affiliation and friends also tend to sit together, wouldthe above test be able to answer the question of whether or not honest responses wereelicited?

Page 4: Homework 5: Hypothesis tests and confidence intervals …faculty.chicagobooth.edu/richard.hahn/teaching/hw5.pdf · Hypothesis tests and confidence intervals ... their own solutions

8. Your dad claims that he shoots better than 50% from the three point line. You bet him $100that doesn’t, based on a challenge where he attempts 10 shots. After making 8 of his shots,he claims that you owe him $100. You say that you do not, because you cannot reject the nullhypothesis that he shoots exactly 50%.

(a) Use the normal approximation to the binomial to compute the p-value of his perfor-mance under the null hypothesis that p = 0.5, against the alternative that p > 0.5.

(b) Compute the exact p-value of his observed performance (relative to the same test asabove) using the binomial distribution.

(c) Use this scenario to argue why it is important to set the level of your test before youobserve your data.

Hint: use the pnorm() and pbinom() or dbinom() functions in R.

9. Answer TRUE or FALSE. Provide a brief explanation of your reasoning.

(a) If a p-value is greater than 1%, we fail to reject.

(b) A ‘statistically significant effect’ means that the null hypothesis was not rejected.

(c) Assume you observe 30 i.i.d. observations from a normal distribution with unknownmean µ and known standard deviation σ2. To decrease the width of your confidenceinterval for µ by a factor of 4, you must collect 90 additional data points.

(d) A null hypothesis contained within the confidence interval implies a test statistic notcontained in the corresponding rejection region.

(e) If a 98% confidence interval for a normal mean µ is given by (X−b,X+a) for a singleobservation of a random variable distributedX ∼ N(µ, σ2), the corresponding 2% levelrejection region for the null hypothesis H0 : µ = µ0 is X < µ0 − b and X > µ0 + a.

(f) A confidence interval for β1 is centered at β1.

(g) Least squares residuals are uncorrelated with each predictor variable.

(h) Linear regression assumes error variance that is the same at all values of the predictorvariable.

(i) A linear regression model implies a normally distributed marginal distribution of theresponse variable.