@@ -1238,7 +1238,7 @@ To calculate a 95\% percentile bootstrap confidence interval, we will do the fol
1238
1238
To do this in Python, we can use the ` quantile ` function of our DataFrame.
1239
1239
Quantiles are expressed in proportions rather than percentages,
1240
1240
so the 2.5th and 97.5th percentiles
1241
- would be quantiles 0.025 and 0.975, respectively.
1241
+ would be the 0.025 and 0.975 quantiles , respectively.
1242
1242
1243
1243
``` {index} numpy; percentile, pandas.DataFrame; df[]
1244
1244
```
@@ -1251,8 +1251,8 @@ ci_bounds
1251
1251
``` {code-cell} ipython3
1252
1252
:tags: [remove-cell]
1253
1253
1254
- glue("ci_lower", "{:.1f }".format(ci_bounds[0.025]))
1255
- glue("ci_upper", "{:.1f }".format(ci_bounds[0.975]))
1254
+ glue("ci_lower", "{:.2f }".format(ci_bounds[0.025]))
1255
+ glue("ci_upper", "{:.2f }".format(ci_bounds[0.975]))
1256
1256
```
1257
1257
1258
1258
Our interval, \$ {glue: text }` ci_lower ` to \$ {glue: text }` ci_upper ` , captures
@@ -1300,7 +1300,7 @@ estimate and our confidence interval's lower and upper bounds. Here the sample
1300
1300
mean price-per-night of 40 Airbnb listings was
1301
1301
\$ {glue: text }` one_sample_mean ` , and we are 95\% "confident" that the true
1302
1302
population mean price-per-night for all Airbnb listings in Vancouver is between
1303
- \$ ( {glue: text }` ci_lower ` , {glue: text }` ci_upper ` ) .
1303
+ \$ {glue: text }` ci_lower ` and \$ {glue: text }` ci_upper ` .
1304
1304
Notice that our interval does indeed contain the true
1305
1305
population mean value, \$ {glue: text }` population_mean ` \! However, in
1306
1306
practice, we would not know whether our interval captured the population
0 commit comments