Get startedGet started for free

Confidence intervals of rainfall data

A confidence interval gives bounds on the range of parameter values you might expect to get if we repeated our measurements. For named distributions, you can compute them analytically or look them up, but one of the many beautiful properties of the bootstrap method is that you can just take percentiles of your bootstrap replicates to get your confidence interval. Conveniently, you can use the np.percentile() function.

Using your bootstrap replicates you just generated to compute the 95% confidence interval. That is, give the 2.5th and 97.5th percentile of your bootstrap replicates stored as bs_replicates.

This exercise is part of the course

Statistical Thinking in Python (Part 2)

View Course

Exercise instructions

(765, 776) mm/year,(780, 821) mm/year,(761, 817) mm/year,(761, 841) mm/year

Hands-on interactive exercise

Turn theory into action with one of our interactive exercises

Start Exercise