Public
Edited
Jul 11, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
{
const program_a_pdf = [...new Array(graphSteps)].map((_, i) => ({x: lerp(i), y: jstat.normal.pdf(lerp(i), lerp(i), program_a_sd), type: "Program A Mean Estimate Alt"}));
const program_b_pdf = [...new Array(graphSteps)].map((_, i) => ({x: lerp(i), y: jstat.normal.pdf(lerp(i), program_b_alt_mean, program_b_sd), type: "Program B Mean Estimate Alt"}));
return Plot.plot({
color: {
legend: true,
},
marks: [
Plot.ruleY([0]),
Plot.lineY(program_a_pdf.concat(program_b_pdf), {x: "x", y: "y", stroke: "type"}),
]
})
}
Insert cell
Insert cell
sample_size = 16
Insert cell
program_a_pop_sd = program_a_sd * Math.sqrt(sample_size)
Insert cell
program_b_pop_sd = program_b_sd * Math.sqrt(sample_size)
Insert cell
Insert cell
Insert cell
Insert cell
viewof prior_mean_mean = Inputs.range([0, 10], {label: "Prior mean", step: 0.1})
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
formatPercent = x => Intl.NumberFormat({style: "percent"}).format(x)
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more