ANOVA
Now that you've established equal variance using a Levene test and assessed visually the approximate normality of the log-transformed salaries, it's time to conduct an ANOVA test! Recall that the purpose of the ANOVA test is to determine if biotech, enterprise software and health care companies had equal average funding. Since these three groups satisfy the conditions of an ANOVA test, you know the conclusions from that test will be valid.
The DataFrames you created (biotech_df
, enterprise_df
and health_df
) have been loaded for you. The packages pandas as pd
, NumPy as np
, Matplotlib as plt
, and the stats
package from SciPy have all been loaded as well. The log-transforms of the funding values that you computed in a previous exercise are provided for you.
This exercise is part of the course
Foundations of Inference in Python
Exercise instructions
- Conduct a one-way ANOVA test using each of the three log-transformed fundings in the following order of arguments: Biotechnology, Enterprise Software, Health Care.
- Print out if the p-value is significant at 5%.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
biotech_log_funding = np.log(biotech_df['funding_total_usd'])
enterprise_log_funding = np.log(enterprise_df['funding_total_usd'])
health_log_funding = np.log(health_df['funding_total_usd'])
# Conduct a one-way ANOVA test to compare the log-funding
s, p_value = ____
# Print if the p-value is significant at 5%
____