Published
Edited
Jan 4, 2021
Importers
Insert cell
md`# Correlated Metalog Using Copulas`
Insert cell
Insert cell
Insert cell
md`## Generate Two Distribution
Metalogs are generated with quantiles from observed data.
### Insert your quantiles and metalog will fit a continous distribution to it.`
Insert cell
metaLogParams = getQuantiles([1, 50, 100], 0.1, "b") // looks kinda uniform - try
// The array should be historical observations or expert judgement. Once the history is used to generated the quantiles/metaLogParams the history is no longer needed.
Insert cell
metaLogParams2 = getQuantiles(
[0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100],
0.1,
"b"
) //or replace w bimodal eg [1, 2, 3, 50, 98, 99, 100]
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
multiplyDists = jStat([metalogDistVector1, metalogDistVector2]).product()
Insert cell
addedDists = jStat([metalogDistVector1, metalogDistVector2]).sum()
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
Insert cell
metalogDistVector1 = createMetalogDist(correlUnis[0], metaLogParams)
Insert cell
metalogDistVector2 = createMetalogDist(correlUnis[1], metaLogParams2)
Insert cell
Insert cell
Insert cell
md`### Code for HDR `
Insert cell
Insert cell
Insert cell
md`### Code for charts and sliders`
Insert cell
Insert cell
Insert cell
Insert cell
import { histogram } from '@jonhelfman/histogram'
Insert cell
import { slider } from '@jashkenas/inputs'
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