1. Learn
  2. /
  3. Courses
  4. /
  5. Foundations of Inference in Python

Connected

Exercise

Equal variance

Different industries have different levels of investment from venture capitalists (VCs). However, if you look at a sample of VC investments and see slightly different average investment amounts, is it reasonable to assume this difference is statistically significant? This is a perfect situation for ANOVA. However, a key condition for ANOVA is equal variance between all groups of samples. In this exercise you'll test for that using the Levene test of equal variance.

A pandas DataFrame of investments of three industries (Biotechnology, Enterprise Software and Health Care) has been loaded for you in investments_df. The packages pandas as pd, NumPy as np, Matplotlib as plt, and the stats package from SciPy have all been loaded as well.

Instructions

100 XP
  • Select the funding for each market individually from investments_df using the column names given.
  • Conduct Levene tests for equal variance between each pair of industries, in the following order: (i) Biotechnology and Enterprise Software, (ii) Biotechnology and Health Care, and (iii) Enterprise Software and Health Care, corresponding to statistic1, statistic2, and statistic3, respectively.
  • In each case, return a Boolean that indicates whether the null hypothesis of equal variance is rejected.