1. Learn
  2. /
  3. Courses
  4. /
  5. Improving Your Data Visualizations in Python

Exercise

Bootstrapped regressions

While working for the Long Beach parks and recreation department investigating the relationship between NO2 and SO2 you noticed a cluster of potential outliers that you suspect might be throwing off the correlations.

SO2 NO2 scatter

Investigate the uncertainty of your correlations through bootstrap resampling to see how stable your fits are. For convenience, the bootstrap sampling is complete and is provided as no2_so2_boot along with no2_so2 for the non-resampled data.

Instructions

100 XP
  • Let sns.lmplot() know that it needs to draw a separate regression line for each bootstrap sample.
  • Color every regression line 'steelblue' and make them 20% opaque.
  • Disable the default Seaborn confidence bands around the regression lines.