Published
Edited
Apr 25, 2019
Insert cell
md`# Detective Bayes Trial Data for Part 2`
Insert cell
cost_per_day = [5,10,20,40,80]
Insert cell
prior_prob_red_is_guilty = [0.1, 0.3, 0.5, 0.7, 0.9]
Insert cell
// matrix to hold all trials
all_trials = [];
Insert cell
{
// build trial matrix of all probabilities
for (let x = 0; x < cost_per_day.length; x++) {
for (let y = 0; y < prior_prob_red_is_guilty.length; y++) {
all_trials.push([cost_per_day[x], prior_prob_red_is_guilty[y]]);
}
}

}
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