# Hypothesis Tests II

You will be practicing using the `infer`

library to perform hypothesis tests. The tests we will perform are:

- A test using an “independence” null hypothesis
- A test using a “point” null hypothesis

#### 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.

Write the null and alternative hypothesis.

Compute the observed test statistic.

Visualize the observed data using an appropriate plot.

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).Construct and save the null distribution of statistics.

Visualize the null distribution.

Compute the p-value.

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.

Write the null and alternative hypothesis.

Compute the observed test statistic.

Visualize the observed data using an appropriate plot.

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?

Construct and save the null distribution of statistics.

Visualize the null distribution.

Compute the p-value.

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