Public
Edited
Apr 9, 2023
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
function surpass_probability(left, right, z) {
let a = right.top - left.bottom
let b = left.top - right.bottom
let c = right.top - left.top
let d = left.bottom - right.bottom
let w1 = left.top - left.bottom
(a * I(a <= z <= c) + b * I(b >= z >= w1) + (a - x + z)/2 * I(d < z < c))/(w1 * (y2 - y1))
}
Insert cell
function I(x) {
return x ? 1 : 0
}
Insert cell
Insert cell
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