Hypothesis Tests II

You will be practicing using the infer library to perform hypothesis tests. The tests we will perform are:

Question 1

In order to study gender bias in promotion decisions, researchers took 48 resumes and randomly assigned them to 48 bank managers who were asked whether they would promote this candidate or not. The resumes were identical except the name: 24 of them had names generally associated with women, 24 of them had names generally associated with men.

The data from this study can be found in the promote data frame. Use this data to determine whether gender played a role in promotion decisions.

  1. Write the null and alternative hypothesis.

  2. Compute the observed test statistic.

  3. Visualize the observed data using an appropriate plot.

  4. Construct a plot featuring 9 subplots, each one featuring a visualization of a data set generated under the null hypothesis. Does your visualization of the observed data from the previous part look like it be one of these plots? (Hint: Go up through the generate() step and then make the plot).

  5. Construct and save the null distribution of statistics.

  6. Visualize the null distribution.

  7. Compute the p-value.

  8. Interpret the p-value. What does it say about the consistency between the null hypothesis and the observed data?

Question 2

In the 2016 NBA season, it was noted that professional basketball player Steph Curry had a remarkable basket-shooting performance beyond 30 feet. The curry data frame contains his long range shooting performance across 27 attempts. By comparison, the long range shooting percentage of NBA players that season was 7.5%.

Assess whether this data is consistent with the notion that Steph Curry has a long range shooting percentage that is no different from the average NBA player. Said another way, assess just how remarkable Curry’s shooting performance was in 2016.

  1. Write the null and alternative hypothesis.

  2. Compute the observed test statistic.

  3. Visualize the observed data using an appropriate plot.

  4. Construct a plot featuring 9 subplots, each one featuring a visualization of a data set generated under the null hypothesis. Does your visualization of the observed data from the previous part look like it be one of these plots?

  5. Construct and save the null distribution of statistics.

  6. Visualize the null distribution.

  7. Compute the p-value.

  8. Interpret the p-value. What does it say about the consistency between the null hypothesis and the observed data?