Exercise

Making a confidence band

Vandenberg Air Force Base is often used as a location to launch rockets into space. You have a theory that a recent increase in the pace of rocket launches could be harming the air quality in the surrounding region. To explore this, you plotted a 25-day rolling average line of the measurements of atmospheric NO2. To help decide if any pattern observed is random-noise or not, you decide to add a 99% confidence band around your rolling mean. Adding a confidence band to a trend line can help shed light on the stability of the trend seen. This can either increase or decrease the confidence in the discovered trend.

Instructions

100 XP
  • Construct upper and lower 99% interval bands by adding and subtracting 2.58 standard errors from the mean.
  • Make the point-estimate line white.
  • Make the point-estimate line semi-transparent by setting alpha to 0.4.
  • Tell plt.fill_between() what values to fill between for each day.