Skip to content

Commit fb3184b

Browse files
committed
Switch to orange annotations for better contrast
1 parent c718eac commit fb3184b

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

source/inference.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -638,7 +638,7 @@ reliable—is there any way to improve the estimate? One way to improve a
638638
point estimate is to take a *larger* sample. To illustrate what effect this
639639
has, we will take many samples of size 20, 50, 100, and 500, and plot the
640640
sampling distribution of the sample mean. We indicate the mean of the sampling
641-
distribution with a red vertical line.
641+
distribution with a orange vertical line.
642642

643643
```{code-cell} ipython3
644644
:tags: [remove-input]
@@ -665,10 +665,10 @@ glue(
665665
alt.X('price', bin=alt.Bin(maxbins=30)),
666666
alt.Y('count()')
667667
),
668-
base.mark_rule(color='coral', size=3).encode(
668+
base.mark_rule(color='#f58518', size=3).encode(
669669
x='mean(price)'
670670
),
671-
base.mark_text(align='left', color='coral', size=12, fontWeight='bold', dx=10).transform_aggregate(
671+
base.mark_text(align='left', color='#f58518', size=12, fontWeight='bold', dx=10).transform_aggregate(
672672
mean_price = 'mean(price)',
673673
).transform_calculate(
674674
label = "'Mean = ' + round(datum.mean_price * 10) / 10"
@@ -699,7 +699,7 @@ glue(
699699
:name: fig:11-example-means7
700700
:figclass: caption-hack
701701
702-
Comparison of sampling distributions, with mean highlighted as a vertical red line.
702+
Comparison of sampling distributions, with mean highlighted as a vertical orange line.
703703
```
704704

705705
+++
@@ -1069,17 +1069,17 @@ the true sampling distribution—which corresponds to taking many samples fr
10691069
alt.vconcat(
10701070
alt.layer(
10711071
sampling_distribution,
1072-
sampling_distribution.mark_rule(color='coral', size=2).encode(x='mean(sample_mean)', y=alt.Y()),
1073-
sampling_distribution.mark_text(color='coral', size=12, align='left', dx=16, fontWeight='bold').encode(
1072+
sampling_distribution.mark_rule(color='#f58518', size=2).encode(x='mean(sample_mean)', y=alt.Y()),
1073+
sampling_distribution.mark_text(color='#f58518', size=12, align='left', dx=16, fontWeight='bold').encode(
10741074
x='mean(sample_mean)',
10751075
y=alt.value(7),
10761076
text=alt.value(f"Mean = {sampling_distribution['data']['sample_mean'].mean().round(1)}")
10771077
)
10781078
).properties(title='Sampling distribution', height=150),
10791079
alt.layer(
10801080
boot_est_dist,
1081-
boot_est_dist.mark_rule(color='coral', size=2).encode(x='mean(sample_mean)', y=alt.Y()),
1082-
boot_est_dist.mark_text(color='coral', size=12, align='left', dx=18, fontWeight='bold').encode(
1081+
boot_est_dist.mark_rule(color='#f58518', size=2).encode(x='mean(sample_mean)', y=alt.Y()),
1082+
boot_est_dist.mark_text(color='#f58518', size=12, align='left', dx=18, fontWeight='bold').encode(
10831083
x='mean(sample_mean)',
10841084
y=alt.value(6),
10851085
text=alt.value(f"Mean = {boot_est_dist['data']['sample_mean'].mean().round(1)}")
@@ -1194,14 +1194,14 @@ visualize the interval on our distribution in {numref}`fig:11-bootstrapping9`.
11941194
```{code-cell} ipython3
11951195
alt.layer(
11961196
boot_est_dist,
1197-
alt.Chart().mark_rule(color='coral', size=3, strokeDash=[5]).encode(x=alt.datum(ci_bounds[0.025])),
1198-
alt.Chart().mark_text(color='coral', size=12, fontWeight='bold').encode(
1197+
alt.Chart().mark_rule(color='#f58518', size=3, strokeDash=[5]).encode(x=alt.datum(ci_bounds[0.025])),
1198+
alt.Chart().mark_text(color='#f58518', size=12, fontWeight='bold').encode(
11991199
x=alt.datum(ci_bounds[0.025]),
12001200
y=alt.value(-10),
12011201
text=alt.datum(f'2.5th percentile ({ci_bounds[0.025].round(2)})')
12021202
),
1203-
alt.Chart().mark_rule(color='coral', size=3, strokeDash=[5]).encode(x=alt.datum(ci_bounds[0.975])),
1204-
alt.Chart().mark_text(color='coral', size=12, fontWeight='bold').encode(
1203+
alt.Chart().mark_rule(color='#f58518', size=3, strokeDash=[5]).encode(x=alt.datum(ci_bounds[0.975])),
1204+
alt.Chart().mark_text(color='#f58518', size=12, fontWeight='bold').encode(
12051205
x=alt.datum(ci_bounds[0.975]),
12061206
y=alt.value(-10),
12071207
text=alt.datum(f'97.5th percentile ({ci_bounds[0.975].round(2)})')

0 commit comments

Comments
 (0)