Skip to content

Commit 3bced8e

Browse files
fix dollar sign printing in inference
1 parent 6c28d23 commit 3bced8e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

source/inference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1238,7 +1238,7 @@ To calculate a 95\% percentile bootstrap confidence interval, we will do the fol
12381238
To do this in Python, we can use the `quantile` function of our DataFrame.
12391239
Quantiles are expressed in proportions rather than percentages,
12401240
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.
12421242

12431243
```{index} numpy; percentile, pandas.DataFrame; df[]
12441244
```
@@ -1251,8 +1251,8 @@ ci_bounds
12511251
```{code-cell} ipython3
12521252
:tags: [remove-cell]
12531253
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]))
12561256
```
12571257

12581258
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
13001300
mean price-per-night of 40 Airbnb listings was
13011301
\${glue:text}`one_sample_mean`, and we are 95\% "confident" that the true
13021302
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`.
13041304
Notice that our interval does indeed contain the true
13051305
population mean value, \${glue:text}`population_mean`\! However, in
13061306
practice, we would not know whether our interval captured the population

0 commit comments

Comments
 (0)