@@ -638,7 +638,7 @@ reliable—is there any way to improve the estimate? One way to improve a
638
638
point estimate is to take a * larger* sample. To illustrate what effect this
639
639
has, we will take many samples of size 20, 50, 100, and 500, and plot the
640
640
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.
642
642
643
643
``` {code-cell} ipython3
644
644
:tags: [remove-input]
@@ -665,10 +665,10 @@ glue(
665
665
alt.X('price', bin=alt.Bin(maxbins=30)),
666
666
alt.Y('count()')
667
667
),
668
- base.mark_rule(color='coral ', size=3).encode(
668
+ base.mark_rule(color='#f58518 ', size=3).encode(
669
669
x='mean(price)'
670
670
),
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(
672
672
mean_price = 'mean(price)',
673
673
).transform_calculate(
674
674
label = "'Mean = ' + round(datum.mean_price * 10) / 10"
@@ -699,7 +699,7 @@ glue(
699
699
:name: fig:11-example-means7
700
700
:figclass: caption-hack
701
701
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.
703
703
```
704
704
705
705
+++
@@ -1069,17 +1069,17 @@ the true sampling distribution—which corresponds to taking many samples fr
1069
1069
alt.vconcat(
1070
1070
alt.layer(
1071
1071
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(
1074
1074
x='mean(sample_mean)',
1075
1075
y=alt.value(7),
1076
1076
text=alt.value(f"Mean = {sampling_distribution['data']['sample_mean'].mean().round(1)}")
1077
1077
)
1078
1078
).properties(title='Sampling distribution', height=150),
1079
1079
alt.layer(
1080
1080
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(
1083
1083
x='mean(sample_mean)',
1084
1084
y=alt.value(6),
1085
1085
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`.
1194
1194
``` {code-cell} ipython3
1195
1195
alt.layer(
1196
1196
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(
1199
1199
x=alt.datum(ci_bounds[0.025]),
1200
1200
y=alt.value(-10),
1201
1201
text=alt.datum(f'2.5th percentile ({ci_bounds[0.025].round(2)})')
1202
1202
),
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(
1205
1205
x=alt.datum(ci_bounds[0.975]),
1206
1206
y=alt.value(-10),
1207
1207
text=alt.datum(f'97.5th percentile ({ci_bounds[0.975].round(2)})')
0 commit comments