Public
Edited
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
coloured_formulas_2 = md`We can see that the ${tex`\colorbox{${scenario_match_colour}}{$\text{yellow area} = \lambda m$}`} and the
${tex`\colorbox{${scenario_non_match_colour}}{$\text{blue area} = (1-\lambda) u$}`}.

So:

${tex`\text{match probability} = \frac{\colorbox{${scenario_match_colour}}{{$\lambda m$}}}{\colorbox{${scenario_match_colour}}{$\lambda m$} + \colorbox{${scenario_non_match_colour}}{$(1-\lambda)u$} } `}

Which is our original formula.`
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
scenario_match_colour = d3.color("rgb(255, 255, 34)").hex()
Insert cell
scenario_non_match_colour = "#35cbff"
Insert cell

One platform to build and deploy the best data apps

Experiment and prototype by building visualizations in live JavaScript notebooks. Collaborate with your team and decide which concepts to build out.
Use Observable Framework to build data apps locally. Use data loaders to build in any language or library, including Python, SQL, and R.
Seamlessly deploy to Observable. Test before you ship, use automatic deploy-on-commit, and ensure your projects are always up-to-date.
Learn more