Exercise

# Which loan purpose mean is different?

Before we examine other factors besides `purpose_recode`

that might influence the amount of loan funded, let's examine which means of `purpose_recode`

are different. This is the post-hoc test referred to in the last exercise.

The result of that ANOVA test was statistically significant with a very low p-value. This means we can reject the null hypothesis and accept the alternative hypothesis that at least one mean was different. But which one?

We should use Tukey's HSD test, which stands for Honest Significant Difference. To conduct Tukey's HSD test in R, you can use `TukeyHSD()`

:

```
TukeyHSD(aov_model, "outcome_variable_name", conf.level = 0.9)
```

This would conduct Tukey's HSD test on some `aov_model`

, looking at a specific `"outcome_variable_name"`

, with a `conf.level`

of 90%.

Instructions

**100 XP**

- Build a model using
`aov()`

that examines`funded_amnt`

by`purpose_recode`

. Save it as`purpose_aov`

. - Use
`TukeyHSD()`

to conduct the Tukey's HSD test on`purpose_aov`

with a confidence level of 0.95. Save as an object called`tukey_output`

. - Tidy
`tukey_output`

with`tidy()`

from the`broom`

package (which has been loaded for you.)