Skip to content

Commit 5cbc443

Browse files
committed
Add description about quantiles
1 parent f8de446 commit 5cbc443

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

source/inference.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,10 @@ To calculate a 95\% percentile bootstrap confidence interval, we will do the fol
11871187
2. Find the value such that 2.5\% of observations fall below it (the 2.5\% percentile). Use that value as the lower bound of the interval.
11881188
3. Find the value such that 97.5\% of observations fall below it (the 97.5\% percentile). Use that value as the upper bound of the interval.
11891189

1190-
To do this in Python, we can use the `percentile()` function from the `numpy` package:
1190+
To do this in Python, we can use the `quantile` function of our DataFrame.
1191+
Quantiles are expressed in proportions rather than percentages,
1192+
so the 2.5th and 97.5th percentiles
1193+
would be quantiles 0.025 and 0.975, respectively.
11911194

11921195
```{index} numpy; percentile, pandas.DataFrame; df[]
11931196
```

0 commit comments

Comments
 (0)