AllenDowney/ElementsOfDataScience

interval error

DongGilKim opened this issue · 2 comments

Hello Allen,

I just found a minor typo in the book.
From the topic of resampling and bootstrapping:
You express "np.percentile(t2, [5, 95])" as 90% confidence interval which is in fact 95% confidence interval.

ex)
np.percentile(t2, [5, 95])

ex)
def summarize(t, digits=2):
table = pd.DataFrame(columns=['Estimate', 'SE', 'CI90'])
est = np.mean(t).round(digits)
SE = np.std(t).round(digits)
CI90 = np.percentile(t, [5, 95]).round(digits)
table.loc[''] = est, SE, CI90
return table

Your book is amazing. Thank you for sharing!

Sincerely,
Dong Gil Kim

Thanks for your kind words.

I think what's written there is correct: The interval from the 5th to the 95th percentile contains 90% of the probability mass, right?

Oh, you are absolutely correct!!!