Skip to content

Instantly share code, notes, and snippets.

@cmelchior
Created August 21, 2025 14:35
Show Gist options
  • Save cmelchior/9d02b2d63d8ab4bb311ea08356e372e9 to your computer and use it in GitHub Desktop.
Save cmelchior/9d02b2d63d8ab4bb311ea08356e372e9 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells" : [ {
"metadata" : { },
"cell_type" : "markdown",
"source" : [ "# Luck-Meter Exploration\n", "\n", "This notebook is an attempt to explore different ways of representing “luck” in Blood Bowl. \"Luck\" is not well-defined, and will likely mean different things dependig on the context, so the goal of this notebook is to examine several possible approaches and compare them against each other. Ideally finding a way to represent this in the Jervis FFB Client.\n", "\n", "Most statistical analysis requires that we can assign probabilities to rolls. For some rolls, like Dodges or Rushes, this is trivial. For others, like block dice, it gets harder as it is unclear how to treat pushes, e.g., during one-turn-attempts they are probably \"success\" while during normal play, they are at best \"neutral\" (with exceptions). And finally, we have rolls like bounces that are close to impossible to assign success probabilities to.\n", "\n", "For now, we just examine the simple case of rolling single D6 with clear failure/success probabilities.\n", "\n", "**Caveat:** I am not a trained statistician, so it is very likely I am using some terms in this notebook imprecise or wrong. A lot of the implementations and wordings in this notebook came from either Wikipedia or ChatGPT." ],
"id" : "59a96b414314441c"
}, {
"metadata" : { },
"cell_type" : "markdown",
"source" : [ "### How to look at dice rolls?\n", "\n", "When rolling dice in Blood Bowl, we are looking at two properties:\n", "1) We want them to be fair, i.e., each value needs to roll each value roughly the same number of times (16.67%).\n", "2) We want to roll the target number (e.g. 4+) every time. If we do, we say we are \"lucky\".\n", "\n", "Some observations:\n", "- These two properties are not connected, but generally it will not be possible to be maximally lucky using fair dice.\n", "- The same set of rolls can result in very different \"luck\" values. E.g. if you use all you 6's on 2+ dodges vs. using them rolling for armor.\n", "\n", "\n", "### Statistical analysis of dice rolls\n", "\n", "If we are rolling _n_ D6, each with their own probability of success. The following properties are true:\n", "\n", "* The total number of successes X is the sum of n independent but non-identical Bernoulli random variables.\n", "* That distribution of this is the Poisson Binomial Distribution.\n", "* For the amount of dice rolls in Blood Bowl, we expect 100-200 rolls and their probability of success is between\n", " 0.83 and 0.16. In this case the Normal Distribution can be used as an approximation.\n" ],
"id" : "e624aa99c2987b1c"
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-08-21T14:34:02.662018Z",
"start_time" : "2025-08-21T14:33:59.284222Z"
}
},
"cell_type" : "code",
"source" : "%use dataframe, kandy",
"id" : "4120b9c33fe16d2d",
"outputs" : [ ],
"execution_count" : 1
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-08-21T14:34:03.379499Z",
"start_time" : "2025-08-21T14:34:02.668800Z"
}
},
"cell_type" : "code",
"source" : [ "import kotlin.random.Random\n", "\n", "// First we setup some helpers and create the distributions we want\n", "// to investigate. For now, we only look at single D6's\n", "\n", "// Set to hard-coded value to reproduce results\n", "val seed = 8033212925733483815 // Random.nextLong()\n", "val random = Random(seed)\n", "\n", "/**\n", " * Die that can be configured to unfair.\n", " *\n", " * [bias] determines the percentage a given range is selected\n", " * [towardsLow] determines if [bias] is applied to 1-3 (on D6) or 4-6 (on D6)\n", " */\n", "fun skewedDie(\n", " sides: Int = 6,\n", " bias: Double = 0.5,\n", " towardsLow: Boolean = true\n", "): Int {\n", " require(sides >= 2) { \"Die must have at least 2 sides\" }\n", " require(bias in 0.0..1.0) { \"Bias must be between 0.0 and 1.0\" }\n", "\n", " val half = sides / 2\n", " val lowCount = half + if (sides % 2 != 0) 1 else 0\n", " val highCount = sides - lowCount\n", "\n", " val (favoredCount, unfavoredCount) =\n", " if (towardsLow) lowCount to highCount else highCount to lowCount\n", "\n", " val pFav = bias / favoredCount\n", " val pUnfav = (1 - bias) / unfavoredCount\n", "\n", " val r = random.nextDouble()\n", " var acc = 0.0\n", "\n", " if (towardsLow) {\n", " for (i in 1..lowCount) {\n", " acc += pFav\n", " if (r < acc) return i\n", " }\n", " for (i in (lowCount + 1)..sides) {\n", " acc += pUnfav\n", " if (r < acc) return i\n", " }\n", " } else {\n", " for (i in 1..lowCount) {\n", " acc += pUnfav\n", " if (r < acc) return i\n", " }\n", " for (i in (lowCount + 1)..sides) {\n", " acc += pFav\n", " if (r < acc) return i\n", " }\n", " }\n", " return sides // fallback due to rounding\n", "}\n", "\n", "@DataSchema\n", "data class DiceRoll(val roll: Int, val target: Int, val sides: Int) {\n", " fun successPropability(): Double {\n", " return (sides - (target - 1)) / sides.toDouble()\n", " }\n", " fun failurePropability(): Double {\n", " if (target > sides) return 1.0\n", " return (target - 1) / sides.toDouble()\n", " }\n", " fun neturalPropability() = 0.0\n", " fun isSuccess() = roll >= target\n", " fun isFailure() = roll < target\n", "}" ],
"id" : "fe97ccc62aa12d7c",
"outputs" : [ ],
"execution_count" : 2
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-08-21T14:34:03.749613Z",
"start_time" : "2025-08-21T14:34:03.404506Z"
}
},
"cell_type" : "code",
"source" : [ "// Create the distributions we want to test.\n", "// Make sure the amount of rolls are divisible by 6, as it makes it easier\n", "// to compare results later.\n", "val rolls: Int = 20 * 6\n", "val d6BucketSize: Int = rolls / 6\n", "\n", "// All dice roll the same value\n", "val allOnes = (1..rolls).map {\n", " DiceRoll(1, random.nextInt(2, 7), 6)\n", "}\n", "val allSixes = (1..rolls).map {\n", " DiceRoll(6, random.nextInt(2, 7), 6)\n", "}\n", "\n", "// Even buckets, all fail\n", "val fairDiceAllFail = (1..rolls).map { n ->\n", " val roll = ((n - 1) / d6BucketSize) + 1 // Set dice value based on \"bucket\n", " DiceRoll(roll, 7, 6)\n", "}\n", "val fairDiceAllSucceed = (1..rolls).map { n ->\n", " val roll = ((n - 1) / d6BucketSize) + 1 // Set dice value based on \"bucket\n", " DiceRoll(roll, 1, 6)\n", "}\n", "\n", "// Even distribution of dice. Target roll of 4 (=50% success)\n", "val fairDiceHalfSucceed = (1..rolls).map { n ->\n", " val roll = ((n - 1) / d6BucketSize) + 1 // Set dice value based on \"bucket\n", " DiceRoll(roll, 4, 6)\n", "}\n", "\n", "// Distribution skewed with 75% towards the bottom\n", "val skewedTowardsBottomHalf = (1..rolls).map { n ->\n", " val roll = skewedDie(sides = 6, bias = 0.75, towardsLow = true)\n", " val target = random.nextInt(2, 7)\n", " DiceRoll(roll, target, 6)\n", "}\n", "\n", "// Distribution skewed with 75% towards the top\n", "val skewedTowardsTopHalf = (1..rolls).map { n ->\n", " val roll = skewedDie(sides = 6, bias = 0.75, towardsLow = false)\n", " val target = random.nextInt(2, 7)\n", " DiceRoll(roll, target, 6)\n", "}\n", "\n", "// Random roll and target between 2-6\n", "val random1 = (1..rolls).map { n ->\n", " val roll = random.nextInt(1, 7)\n", " val target = random.nextInt(2, 7)\n", " DiceRoll(roll, target, 6)\n", "}\n", "\n", "// Random roll and target between 2-6\n", "val random2 = (1..rolls).map { n ->\n", " val roll = random.nextInt(1, 7)\n", " val target = random.nextInt(2, 7)\n", " DiceRoll(roll, target, 6)\n", "}\n", "\n", "// Random roll and target between 2-6\n", "val random3 = (1..rolls).map { n ->\n", " val roll = random.nextInt(1, 7)\n", " val target = random.nextInt(2, 7)\n", " DiceRoll(roll, target, 6)\n", "}\n", "\n", "// Random roll with target 4+\n", "val randomDiceWith4Target = (1..rolls).map {\n", " val roll = random.nextInt(1, 7)\n", " DiceRoll(roll, 4, 6)\n", "}\n", "\n", "val distributions = listOf(\n", " \"All 1's\" to allOnes,\n", " \"All 6's\" to allSixes,\n", " \"Even buckets - All fail\" to fairDiceAllFail,\n", " \"Even buckets - All succed\" to fairDiceAllSucceed,\n", " \"Even buckets - Half succeed\" to fairDiceHalfSucceed,\n", " \"Scewed towards bottom\" to skewedTowardsBottomHalf,\n", " \"Scewed towards top\" to skewedTowardsTopHalf,\n", " \"Random (4+)\" to randomDiceWith4Target,\n", " \"Random 1\" to random1,\n", " \"Random 2\" to random2,\n", " \"Random 3\" to random3\n", ")" ],
"id" : "b9560acdf7223042",
"outputs" : [ ],
"execution_count" : 3
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-08-21T14:34:04.755117Z",
"start_time" : "2025-08-21T14:34:03.801985Z"
}
},
"cell_type" : "code",
"source" : [ "// Bucket rolls (how many of each dice was rolled).\n", "// For fair dice we expect 20 in each bucket.\n", "val rollDistributions = distributions.map {\n", " val title = it.first\n", " val df = it.second.toDataFrame()\n", " title to df.groupBy { roll }.count()\n", "}.let { dfs ->\n", " // ensure full dice set {1..6}, fill missing with 0\n", " dfs.map { (name, df) ->\n", " (1..6).toDataFrame(\"roll\")\n", " .leftJoin(df) { \"roll\" match \"roll\" }\n", " .fillNA(\"count\").withZero()\n", " .rename(\"count\").into(name)\n", " }.reduce { acc, df ->\n", " acc.join(df) { \"roll\" match \"roll\" }\n", " }\n", "}.gather { allExcept(\"roll\") }\n", " .into(\"distribution\", \"value\")\n", " .groupBy(\"distribution\")\n", " .pivot(\"roll\")\n", " .aggregate { first().get(\"value\") }\n", " .flatten()\n", "rollDistributions" ],
"id" : "67f398fa5ea2e16b",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe onload=\"o_resize_iframe_out_1()\" style=\"width:100%;\" class=\"result_container\" id=\"iframe_out_1\" frameBorder=\"0\" srcdoc=\" &lt;html theme='dark'&gt;\n", " &lt;head&gt;\n", " &lt;style type=&quot;text&sol;css&quot;&gt;\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover &gt; td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "&sol;* formatting *&sol;\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", ":root {\n", " --scroll-bg: #f5f5f5;\n", " --scroll-fg: #b3b3b3;\n", "}\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;]{\n", " --scroll-bg: #3c3c3c;\n", " --scroll-fg: #97e1fb;\n", "}\n", "body {\n", " scrollbar-color: var(--scroll-fg) var(--scroll-bg);\n", "}\n", "body::-webkit-scrollbar {\n", " width: 10px; &sol;* Mostly for vertical scrollbars *&sol;\n", " height: 10px; &sol;* Mostly for horizontal scrollbars *&sol;\n", "}\n", "body::-webkit-scrollbar-thumb {\n", " background-color: var(--scroll-fg);\n", "}\n", "body::-webkit-scrollbar-track {\n", " background-color: var(--scroll-bg);\n", "}\n", " &lt;&sol;style&gt;\n", " &lt;&sol;head&gt;\n", " &lt;body&gt;\n", " &lt;table class=&quot;dataframe&quot; id=&quot;df_-1157627904&quot;&gt;&lt;&sol;table&gt;\n", "\n", "&lt;p class=&quot;dataframe_description&quot;&gt;DataFrame: rowsCount = 11, columnsCount = 7&lt;&sol;p&gt;\n", "\n", " &lt;&sol;body&gt;\n", " &lt;script&gt;\n", " (function () {\n", " window.DataFrame = window.DataFrame || new (function () {\n", " this.addTable = function (df) {\n", " let cols = df.cols;\n", " for (let i = 0; i &lt; cols.length; i++) {\n", " for (let c of cols[i].children) {\n", " cols[c].parent = i;\n", " }\n", " }\n", " df.nrow = 0\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " if (df.cols[i].values.length &gt; df.nrow) df.nrow = df.cols[i].values.length\n", " }\n", " if (df.id === df.rootId) {\n", " df.expandedFrames = new Set()\n", " df.childFrames = {}\n", " const table = this.getTableElement(df.id)\n", " table.df = df\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " let col = df.cols[i]\n", " if (col.parent === undefined &amp;&amp; col.children.length &gt; 0) col.expanded = true\n", " }\n", " } else {\n", " const rootDf = this.getTableData(df.rootId)\n", " rootDf.childFrames[df.id] = df\n", " }\n", " }\n", "\n", " this.computeRenderData = function (df) {\n", " let result = []\n", " let pos = 0\n", " for (let col = 0; col &lt; df.cols.length; col++) {\n", " if (df.cols[col].parent === undefined)\n", " pos += this.computeRenderDataRec(df.cols, col, pos, 0, result, false, false)\n", " }\n", " for (let i = 0; i &lt; result.length; i++) {\n", " let row = result[i]\n", " for (let j = 0; j &lt; row.length; j++) {\n", " let cell = row[j]\n", " if (j === 0)\n", " cell.leftBd = false\n", " if (j &lt; row.length - 1) {\n", " let nextData = row[j + 1]\n", " if (nextData.leftBd) cell.rightBd = true\n", " else if (cell.rightBd) nextData.leftBd = true\n", " } else cell.rightBd = false\n", " }\n", " }\n", " return result\n", " }\n", "\n", " this.computeRenderDataRec = function (cols, colId, pos, depth, result, leftBorder, rightBorder) {\n", " if (result.length === depth) {\n", " const array = [];\n", " if (pos &gt; 0) {\n", " let j = 0\n", " for (let i = 0; j &lt; pos; i++) {\n", " let c = result[depth - 1][i]\n", " j += c.span\n", " let copy = Object.assign({empty: true}, c)\n", " array.push(copy)\n", " }\n", " }\n", " result.push(array)\n", " }\n", " const col = cols[colId];\n", " let size = 0;\n", " if (col.expanded) {\n", " let childPos = pos\n", " for (let i = 0; i &lt; col.children.length; i++) {\n", " let child = col.children[i]\n", " let childLeft = i === 0 &amp;&amp; (col.children.length &gt; 1 || leftBorder)\n", " let childRight = i === col.children.length - 1 &amp;&amp; (col.children.length &gt; 1 || rightBorder)\n", " let childSize = this.computeRenderDataRec(cols, child, childPos, depth + 1, result, childLeft, childRight)\n", " childPos += childSize\n", " size += childSize\n", " }\n", " } else {\n", " for (let i = depth + 1; i &lt; result.length; i++)\n", " result[i].push({id: colId, span: 1, leftBd: leftBorder, rightBd: rightBorder, empty: true})\n", " size = 1\n", " }\n", " let left = leftBorder\n", " let right = rightBorder\n", " if (size &gt; 1) {\n", " left = true\n", " right = true\n", " }\n", " result[depth].push({id: colId, span: size, leftBd: left, rightBd: right})\n", " return size\n", " }\n", "\n", " this.getTableElement = function (id) {\n", " return document.getElementById(&quot;df_&quot; + id)\n", " }\n", "\n", " this.getTableData = function (id) {\n", " return this.getTableElement(id).df\n", " }\n", "\n", " this.createExpander = function (isExpanded) {\n", " const svgNs = &quot;http:&sol;&sol;www.w3.org&sol;2000&sol;svg&quot;\n", " let svg = document.createElementNS(svgNs, &quot;svg&quot;)\n", " svg.classList.add(&quot;expanderSvg&quot;)\n", " let path = document.createElementNS(svgNs, &quot;path&quot;)\n", " if (isExpanded) {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;0 -2 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 4 4 4 -4 -1 -1 -3 3Z&quot;)\n", " } else {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;-2 0 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 3 3 -3 3 1 1 4 -4Z&quot;)\n", " }\n", " path.setAttribute(&quot;fill&quot;, &quot;currentColor&quot;)\n", " svg.appendChild(path)\n", " return svg\n", " }\n", "\n", " this.renderTable = function (id) {\n", "\n", " let table = this.getTableElement(id)\n", "\n", " if (table === null) return\n", "\n", " table.innerHTML = &quot;&quot;\n", "\n", " let df = table.df\n", " let rootDf = df.rootId === df.id ? df : this.getTableData(df.rootId)\n", "\n", " &sol;&sol; header\n", " let header = document.createElement(&quot;thead&quot;)\n", " table.appendChild(header)\n", "\n", " let renderData = this.computeRenderData(df)\n", " for (let j = 0; j &lt; renderData.length; j++) {\n", " let rowData = renderData[j]\n", " let tr = document.createElement(&quot;tr&quot;);\n", " let isLastRow = j === renderData.length - 1\n", " header.appendChild(tr);\n", " for (let i = 0; i &lt; rowData.length; i++) {\n", " let cell = rowData[i]\n", " let th = document.createElement(&quot;th&quot;);\n", " th.setAttribute(&quot;colspan&quot;, cell.span)\n", " let colId = cell.id\n", " let col = df.cols[colId];\n", " if (!cell.empty) {\n", " if (col.children.length === 0) {\n", " th.innerHTML = col.name\n", " } else {\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " col.expanded = !col.expanded\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(col.expanded))\n", " link.innerHTML += col.name\n", " th.appendChild(link)\n", " }\n", " }\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (isLastRow)\n", " classes += &quot; bottomBorder&quot;\n", " if (classes.length &gt; 0)\n", " th.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(th)\n", " }\n", " }\n", "\n", " &sol;&sol; body\n", " let body = document.createElement(&quot;tbody&quot;)\n", " table.appendChild(body)\n", "\n", " let columns = renderData.pop()\n", " for (let row = 0; row &lt; df.nrow; row++) {\n", " let tr = document.createElement(&quot;tr&quot;);\n", " body.appendChild(tr)\n", " for (let i = 0; i &lt; columns.length; i++) {\n", " let cell = columns[i]\n", " let td = document.createElement(&quot;td&quot;);\n", " let colId = cell.id\n", " let col = df.cols[colId]\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (classes.length &gt; 0)\n", " td.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(td)\n", " let value = col.values[row]\n", " if (value.frameId !== undefined) {\n", " let frameId = value.frameId\n", " let expanded = rootDf.expandedFrames.has(frameId)\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " if (rootDf.expandedFrames.has(frameId))\n", " rootDf.expandedFrames.delete(frameId)\n", " else rootDf.expandedFrames.add(frameId)\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(expanded))\n", " link.innerHTML += value.value\n", " if (expanded) {\n", " td.appendChild(link)\n", " td.appendChild(document.createElement(&quot;p&quot;))\n", " const childTable = document.createElement(&quot;table&quot;)\n", " childTable.className = &quot;dataframe&quot;\n", " childTable.id = &quot;df_&quot; + frameId\n", " let childDf = rootDf.childFrames[frameId]\n", " childTable.df = childDf\n", " td.appendChild(childTable)\n", " this.renderTable(frameId)\n", " if (childDf.nrow !== childDf.totalRows) {\n", " const footer = document.createElement(&quot;p&quot;)\n", " footer.innerText = `... showing only top ${childDf.nrow} of ${childDf.totalRows} rows`\n", " td.appendChild(footer)\n", " }\n", " } else {\n", " td.appendChild(link)\n", " }\n", " } else if (value.style !== undefined) {\n", " td.innerHTML = value.value\n", " td.setAttribute(&quot;style&quot;, value.style)\n", " } else td.innerHTML = value\n", " this.nodeScriptReplace(td)\n", " }\n", " }\n", " }\n", "\n", " this.nodeScriptReplace = function (node) {\n", " if (this.nodeScriptIs(node) === true) {\n", " node.parentNode.replaceChild(this.nodeScriptClone(node), node);\n", " } else {\n", " let i = -1, children = node.childNodes;\n", " while (++i &lt; children.length) {\n", " this.nodeScriptReplace(children[i]);\n", " }\n", " }\n", "\n", " return node;\n", " }\n", "\n", " this.nodeScriptClone = function (node) {\n", " let script = document.createElement(&quot;script&quot;);\n", " script.text = node.innerHTML;\n", "\n", " let i = -1, attrs = node.attributes, attr;\n", " while (++i &lt; attrs.length) {\n", " script.setAttribute((attr = attrs[i]).name, attr.value);\n", " }\n", " return script;\n", " }\n", "\n", " this.nodeScriptIs = function (node) {\n", " return node.tagName === 'SCRIPT';\n", " }\n", " })()\n", "\n", " window.call_DataFrame = function (f) {\n", " return f();\n", " };\n", "\n", " let funQueue = window[&quot;kotlinQueues&quot;] &amp;&amp; window[&quot;kotlinQueues&quot;][&quot;DataFrame&quot;];\n", " if (funQueue) {\n", " funQueue.forEach(function (f) {\n", " f();\n", " });\n", " funQueue = [];\n", " }\n", "})()\n", "\n", "&sol;*&lt;!--*&sol;\n", "call_DataFrame(function() { DataFrame.addTable({ cols: [{ name: &quot;&lt;span title=&bsol;&quot;distribution: String&bsol;&quot;&gt;distribution&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;All 1&amp;#39;s&quot;,&quot;All 6&amp;#39;s&quot;,&quot;Even buckets - All fail&quot;,&quot;Even buckets - All succed&quot;,&quot;Even buckets - Half succeed&quot;,&quot;Scewed towards bottom&quot;,&quot;Scewed towards top&quot;,&quot;Random (4+)&quot;,&quot;Random 1&quot;,&quot;Random 2&quot;,&quot;Random 3&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;1: Int&bsol;&quot;&gt;1&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;28&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;9&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;22&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;27&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;19&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;2: Int&bsol;&quot;&gt;2&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;37&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;10&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;16&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;16&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;15&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;16&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;3: Int&bsol;&quot;&gt;3&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;26&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;10&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;23&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;22&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;19&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;18&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;4: Int&bsol;&quot;&gt;4&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;9&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;22&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;21&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;15&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;24&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;26&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;5: Int&bsol;&quot;&gt;5&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;10&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;41&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;19&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;23&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;18&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;6: Int&bsol;&quot;&gt;6&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;10&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;28&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;19&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;20&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;19&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;23&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "], id: -1157627904, rootId: -1157627904, totalRows: 11 } ) });\n", "&sol;*--&gt;*&sol;\n", "\n", "call_DataFrame(function() { DataFrame.renderTable(-1157627904) });\n", "\n", "\n", " &lt;&sol;script&gt;\n", " &lt;&sol;html&gt;\"></iframe>\n", " <script>\n", " function o_resize_iframe_out_1() {\n", " let elem = document.getElementById(\"iframe_out_1\");\n", " resize_iframe_out_1(elem);\n", " setInterval(resize_iframe_out_1, 5000, elem);\n", " }\n", " function resize_iframe_out_1(el) {\n", " let h = el.contentWindow.document.body.scrollHeight;\n", " el.height = h === 0 ? 0 : h + 41;\n", " }\n", " </script> <html theme='dark'>\n", " <head>\n", " <style type=\"text/css\">\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody > tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover > td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "/* formatting */\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", " </style>\n", " </head>\n", " <body>\n", " <table class=\"dataframe\" id=\"static_df_-1157627903\"><thead><tr><th class=\"bottomBorder\" style=\"text-align:left\">distribution</th><th class=\"bottomBorder\" style=\"text-align:left\">1</th><th class=\"bottomBorder\" style=\"text-align:left\">2</th><th class=\"bottomBorder\" style=\"text-align:left\">3</th><th class=\"bottomBorder\" style=\"text-align:left\">4</th><th class=\"bottomBorder\" style=\"text-align:left\">5</th><th class=\"bottomBorder\" style=\"text-align:left\">6</th></tr></thead><tbody><tr><td style=\"vertical-align:top\">All 1&#39;s</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">0</td><td style=\"vertical-align:top\">0</td><td style=\"vertical-align:top\">0</td><td style=\"vertical-align:top\">0</td><td style=\"vertical-align:top\">0</td></tr><tr><td style=\"vertical-align:top\">All 6&#39;s</td><td style=\"vertical-align:top\">0</td><td style=\"vertical-align:top\">0</td><td style=\"vertical-align:top\">0</td><td style=\"vertical-align:top\">0</td><td style=\"vertical-align:top\">0</td><td style=\"vertical-align:top\">120</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All fail</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All succed</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td></tr><tr><td style=\"vertical-align:top\">Even buckets - Half succeed</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td></tr><tr><td style=\"vertical-align:top\">Scewed towards bottom</td><td style=\"vertical-align:top\">28</td><td style=\"vertical-align:top\">37</td><td style=\"vertical-align:top\">26</td><td style=\"vertical-align:top\">9</td><td style=\"vertical-align:top\">10</td><td style=\"vertical-align:top\">10</td></tr><tr><td style=\"vertical-align:top\">Scewed towards top</td><td style=\"vertical-align:top\">9</td><td style=\"vertical-align:top\">10</td><td style=\"vertical-align:top\">10</td><td style=\"vertical-align:top\">22</td><td style=\"vertical-align:top\">41</td><td style=\"vertical-align:top\">28</td></tr><tr><td style=\"vertical-align:top\">Random (4+)</td><td style=\"vertical-align:top\">22</td><td style=\"vertical-align:top\">16</td><td style=\"vertical-align:top\">23</td><td style=\"vertical-align:top\">21</td><td style=\"vertical-align:top\">19</td><td style=\"vertical-align:top\">19</td></tr><tr><td style=\"vertical-align:top\">Random 1</td><td style=\"vertical-align:top\">27</td><td style=\"vertical-align:top\">16</td><td style=\"vertical-align:top\">22</td><td style=\"vertical-align:top\">15</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">20</td></tr><tr><td style=\"vertical-align:top\">Random 2</td><td style=\"vertical-align:top\">20</td><td style=\"vertical-align:top\">15</td><td style=\"vertical-align:top\">19</td><td style=\"vertical-align:top\">24</td><td style=\"vertical-align:top\">23</td><td style=\"vertical-align:top\">19</td></tr><tr><td style=\"vertical-align:top\">Random 3</td><td style=\"vertical-align:top\">19</td><td style=\"vertical-align:top\">16</td><td style=\"vertical-align:top\">18</td><td style=\"vertical-align:top\">26</td><td style=\"vertical-align:top\">18</td><td style=\"vertical-align:top\">23</td></tr></tbody></table>\n", " </body>\n", " <script>\n", " document.getElementById(\"static_df_-1157627903\").style.display = \"none\";\n", " </script>\n", " </html>" ],
"application/kotlindataframe+json" : "{\"$version\":\"2.1.1\",\"metadata\":{\"columns\":[\"distribution\",\"1\",\"2\",\"3\",\"4\",\"5\",\"6\"],\"types\":[{\"kind\":\"ValueColumn\",\"type\":\"kotlin.String\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"}],\"nrow\":11,\"ncol\":7},\"kotlin_dataframe\":[{\"distribution\":\"All 1's\",\"1\":120,\"2\":0,\"3\":0,\"4\":0,\"5\":0,\"6\":0},{\"distribution\":\"All 6's\",\"1\":0,\"2\":0,\"3\":0,\"4\":0,\"5\":0,\"6\":120},{\"distribution\":\"Even buckets - All fail\",\"1\":20,\"2\":20,\"3\":20,\"4\":20,\"5\":20,\"6\":20},{\"distribution\":\"Even buckets - All succed\",\"1\":20,\"2\":20,\"3\":20,\"4\":20,\"5\":20,\"6\":20},{\"distribution\":\"Even buckets - Half succeed\",\"1\":20,\"2\":20,\"3\":20,\"4\":20,\"5\":20,\"6\":20},{\"distribution\":\"Scewed towards bottom\",\"1\":28,\"2\":37,\"3\":26,\"4\":9,\"5\":10,\"6\":10},{\"distribution\":\"Scewed towards top\",\"1\":9,\"2\":10,\"3\":10,\"4\":22,\"5\":41,\"6\":28},{\"distribution\":\"Random (4+)\",\"1\":22,\"2\":16,\"3\":23,\"4\":21,\"5\":19,\"6\":19},{\"distribution\":\"Random 1\",\"1\":27,\"2\":16,\"3\":22,\"4\":15,\"5\":20,\"6\":20},{\"distribution\":\"Random 2\",\"1\":20,\"2\":15,\"3\":19,\"4\":24,\"5\":23,\"6\":19},{\"distribution\":\"Random 3\",\"1\":19,\"2\":16,\"3\":18,\"4\":26,\"5\":18,\"6\":23}]}"
},
"execution_count" : 4,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 4
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-08-21T14:34:05.499386Z",
"start_time" : "2025-08-21T14:34:04.781308Z"
}
},
"cell_type" : "code",
"source" : [ "// Plot roll distribution.\n", "// Ignore distibutions that are either all 1's or all 6's as it skew the result too much.\n", "val bucketData = rollDistributions\n", " .getRows(2..rollDistributions.rowsCount() - 1)\n", " .gather { colsOf<Int>() }\n", " .into(\"roll\", \"count\")\n", "\n", "// Plot how many of each roll to get a sense of how fair they roll\n", "plot(bucketData) {\n", " bars {\n", " x(\"roll\")\n", " y(\"count\")\n", " fillColor(\"distribution\")\n", " position = Position.dodge()\n", " }\n", " hLine {\n", " yIntercept.constant(20)\n", " color = Color.WHITE\n", " width = 1.0\n", " alpha = 0.8\n", " type = LineType.DASHED\n", " }\n", "\n", " x.axis.name = \"Roll\"\n", " y.axis.name = \"Count\"\n", "}" ],
"id" : "dc14e45747b1b762",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe src='about:blank' style='border:none !important;' width='600' height='400' srcdoc=\"&lt;html lang=&quot;en&quot;>\n", " &lt;head>\n", " &lt;meta charset=&quot;UTF-8&quot;>\n", " &lt;style> html, body { margin: 0; overflow: hidden; } &lt;/style>\n", " &lt;script type=&quot;text/javascript&quot; data-lets-plot-script=&quot;library&quot; src=&quot;https://cdn.jsdelivr.net/gh/JetBrains/[email protected]/js-package/distr/lets-plot.min.js&quot;>&lt;/script>\n", " &lt;/head>\n", " &lt;body>\n", " &lt;div id=&quot;iuJLvj&quot;>&lt;/div>\n", " &lt;script type=&quot;text/javascript&quot; data-lets-plot-script=&quot;plot&quot;>\n", " \n", " (function() {\n", " // ----------\n", " \n", " var plotSpec={\n", "&quot;mapping&quot;:{\n", "},\n", "&quot;data&quot;:{\n", "&quot;roll&quot;:[&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;,&quot;1&quot;,&quot;2&quot;,&quot;3&quot;,&quot;4&quot;,&quot;5&quot;,&quot;6&quot;],\n", "&quot;count&quot;:[20.0,20.0,20.0,20.0,20.0,20.0,20.0,20.0,20.0,20.0,20.0,20.0,20.0,20.0,20.0,20.0,20.0,20.0,28.0,37.0,26.0,9.0,10.0,10.0,9.0,10.0,10.0,22.0,41.0,28.0,22.0,16.0,23.0,21.0,19.0,19.0,27.0,16.0,22.0,15.0,20.0,20.0,20.0,15.0,19.0,24.0,23.0,19.0,19.0,16.0,18.0,26.0,18.0,23.0],\n", "&quot;distribution&quot;:[&quot;Even buckets - All fail&quot;,&quot;Even buckets - All fail&quot;,&quot;Even buckets - All fail&quot;,&quot;Even buckets - All fail&quot;,&quot;Even buckets - All fail&quot;,&quot;Even buckets - All fail&quot;,&quot;Even buckets - All succed&quot;,&quot;Even buckets - All succed&quot;,&quot;Even buckets - All succed&quot;,&quot;Even buckets - All succed&quot;,&quot;Even buckets - All succed&quot;,&quot;Even buckets - All succed&quot;,&quot;Even buckets - Half succeed&quot;,&quot;Even buckets - Half succeed&quot;,&quot;Even buckets - Half succeed&quot;,&quot;Even buckets - Half succeed&quot;,&quot;Even buckets - Half succeed&quot;,&quot;Even buckets - Half succeed&quot;,&quot;Scewed towards bottom&quot;,&quot;Scewed towards bottom&quot;,&quot;Scewed towards bottom&quot;,&quot;Scewed towards bottom&quot;,&quot;Scewed towards bottom&quot;,&quot;Scewed towards bottom&quot;,&quot;Scewed towards top&quot;,&quot;Scewed towards top&quot;,&quot;Scewed towards top&quot;,&quot;Scewed towards top&quot;,&quot;Scewed towards top&quot;,&quot;Scewed towards top&quot;,&quot;Random (4+)&quot;,&quot;Random (4+)&quot;,&quot;Random (4+)&quot;,&quot;Random (4+)&quot;,&quot;Random (4+)&quot;,&quot;Random (4+)&quot;,&quot;Random 1&quot;,&quot;Random 1&quot;,&quot;Random 1&quot;,&quot;Random 1&quot;,&quot;Random 1&quot;,&quot;Random 1&quot;,&quot;Random 2&quot;,&quot;Random 2&quot;,&quot;Random 2&quot;,&quot;Random 2&quot;,&quot;Random 2&quot;,&quot;Random 2&quot;,&quot;Random 3&quot;,&quot;Random 3&quot;,&quot;Random 3&quot;,&quot;Random 3&quot;,&quot;Random 3&quot;,&quot;Random 3&quot;]\n", "},\n", "&quot;kind&quot;:&quot;plot&quot;,\n", "&quot;scales&quot;:[{\n", "&quot;aesthetic&quot;:&quot;x&quot;,\n", "&quot;discrete&quot;:true\n", "},{\n", "&quot;aesthetic&quot;:&quot;y&quot;,\n", "&quot;limits&quot;:[null,null]\n", "},{\n", "&quot;aesthetic&quot;:&quot;fill&quot;,\n", "&quot;discrete&quot;:true\n", "},{\n", "&quot;aesthetic&quot;:&quot;x&quot;,\n", "&quot;name&quot;:&quot;Roll&quot;,\n", "&quot;limits&quot;:[null,null]\n", "},{\n", "&quot;aesthetic&quot;:&quot;y&quot;,\n", "&quot;name&quot;:&quot;Count&quot;,\n", "&quot;limits&quot;:[null,null]\n", "}],\n", "&quot;layers&quot;:[{\n", "&quot;mapping&quot;:{\n", "&quot;x&quot;:&quot;roll&quot;,\n", "&quot;y&quot;:&quot;count&quot;,\n", "&quot;fill&quot;:&quot;distribution&quot;\n", "},\n", "&quot;stat&quot;:&quot;identity&quot;,\n", "&quot;sampling&quot;:&quot;none&quot;,\n", "&quot;inherit_aes&quot;:false,\n", "&quot;position&quot;:&quot;dodge&quot;,\n", "&quot;geom&quot;:&quot;bar&quot;,\n", "&quot;data&quot;:{\n", "}\n", "},{\n", "&quot;mapping&quot;:{\n", "},\n", "&quot;stat&quot;:&quot;identity&quot;,\n", "&quot;yintercept&quot;:20.0,\n", "&quot;color&quot;:&quot;#ffffff&quot;,\n", "&quot;size&quot;:1.0,\n", "&quot;linetype&quot;:&quot;dashed&quot;,\n", "&quot;sampling&quot;:&quot;none&quot;,\n", "&quot;alpha&quot;:0.8,\n", "&quot;inherit_aes&quot;:false,\n", "&quot;position&quot;:&quot;identity&quot;,\n", "&quot;geom&quot;:&quot;hline&quot;,\n", "&quot;data&quot;:{\n", "}\n", "}],\n", "&quot;data_meta&quot;:{\n", "&quot;series_annotations&quot;:[{\n", "&quot;type&quot;:&quot;str&quot;,\n", "&quot;column&quot;:&quot;roll&quot;\n", "},{\n", "&quot;type&quot;:&quot;int&quot;,\n", "&quot;column&quot;:&quot;count&quot;\n", "},{\n", "&quot;type&quot;:&quot;str&quot;,\n", "&quot;column&quot;:&quot;distribution&quot;\n", "}]\n", "},\n", "&quot;spec_id&quot;:&quot;2&quot;\n", "};\n", " var containerDiv = document.getElementById(&quot;iuJLvj&quot;);\n", " \n", " var toolbar = null;\n", " var plotContainer = containerDiv; \n", " \n", " var options = {\n", " sizing: {\n", " width_mode: &quot;fixed&quot;,\n", " height_mode: &quot;fixed&quot;,\n", " width: 600.0,\n", " height: 400.0\n", " }\n", " };\n", " var fig = LetsPlot.buildPlotFromProcessedSpecs(plotSpec, -1, -1, plotContainer, options);\n", " if (toolbar) {\n", " toolbar.bind(fig);\n", " }\n", " \n", " // ----------\n", " })();\n", " \n", " &lt;/script>\n", " &lt;/body>\n", "&lt;/html>\"></iframe> <svg xmlns=\"http://www.w3.org/2000/svg\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" display=\"block\" class=\"plt-container\" id=39b94022-1c44-43ca-94aa-f08f1725d212 width=\"100%\" height=\"100%\" style=\"max-width: 600.0px; max-height: 400.0px;\" viewBox=\"0 0 600.0 400.0\" preserveAspectRatio=\"xMinYMin meet\">\n", " <style type=\"text/css\">\n", " .plt-container {\n", " font-family: Lucida Grande, sans-serif;\n", " user-select: none;\n", " -webkit-user-select: none;\n", " -moz-user-select: none;\n", " -ms-user-select: none;\n", "}\n", "text {\n", " text-rendering: optimizeLegibility;\n", "}\n", "#pMzJzCr .plot-title {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 16.0px;\n", "\n", "}\n", "#pMzJzCr .plot-subtitle {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pMzJzCr .plot-caption {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pMzJzCr .hyperlink-element {\n", "fill: #118ed8;\n", "font-weight: normal;\n", " font-style: normal;\n", "}\n", "#pMzJzCr .legend-title {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pMzJzCr .legend-item {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pMzJzCr .axis-title-x {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pMzJzCr .axis-text-x {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dx0Uuu4 .axis-tooltip-text-x {\n", "fill: #ffffff;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pMzJzCr .axis-title-y {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 15.0px;\n", "\n", "}\n", "#pMzJzCr .axis-text-y {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dx0Uuu4 .axis-tooltip-text-y {\n", "fill: #ffffff;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pMzJzCr .facet-strip-text-x {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#pMzJzCr .facet-strip-text-y {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dx0Uuu4 .tooltip-text {\n", "fill: #474747;\n", "font-weight: normal;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dx0Uuu4 .tooltip-title {\n", "fill: #474747;\n", "font-weight: bold;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "#dx0Uuu4 .tooltip-label {\n", "fill: #474747;\n", "font-weight: bold;\n", " font-style: normal;font-family: Lucida Grande, sans-serif;\n", "font-size: 13.0px;\n", "\n", "}\n", "\n", " </style>\n", " <g id=\"pMzJzCr\">\n", " <path fill-rule=\"evenodd\" fill=\"rgb(255,255,255)\" fill-opacity=\"1.0\" d=\"M0.0 0.0 L0.0 400.0 L600.0 400.0 L600.0 0.0 Z\">\n", " </path>\n", " <g transform=\"translate(29.5 6.5 ) \">\n", " <g>\n", " <g transform=\"translate(21.961210910936405 0.0 ) \">\n", " <g>\n", " <line x1=\"30.25155991370841\" y1=\"0.0\" x2=\"30.25155991370841\" y2=\"341.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"76.79242131941365\" y1=\"0.0\" x2=\"76.79242131941365\" y2=\"341.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"123.33328272511889\" y1=\"0.0\" x2=\"123.33328272511889\" y2=\"341.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"169.87414413082413\" y1=\"0.0\" x2=\"169.87414413082413\" y2=\"341.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"216.41500553652938\" y1=\"0.0\" x2=\"216.41500553652938\" y2=\"341.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"262.95586694223465\" y1=\"0.0\" x2=\"262.95586694223465\" y2=\"341.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " </g>\n", " </g>\n", " <g transform=\"translate(21.961210910936405 0.0 ) \">\n", " <g>\n", " <line x1=\"0.0\" y1=\"341.0\" x2=\"293.2074268559431\" y2=\"341.0\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"301.3948896631823\" x2=\"293.2074268559431\" y2=\"301.3948896631823\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"261.7897793263647\" x2=\"293.2074268559431\" y2=\"261.7897793263647\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"222.18466898954705\" x2=\"293.2074268559431\" y2=\"222.18466898954705\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"182.57955865272936\" x2=\"293.2074268559431\" y2=\"182.57955865272936\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"142.9744483159117\" x2=\"293.2074268559431\" y2=\"142.9744483159117\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"103.36933797909407\" x2=\"293.2074268559431\" y2=\"103.36933797909407\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"63.76422764227641\" x2=\"293.2074268559431\" y2=\"63.76422764227641\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " <line x1=\"0.0\" y1=\"24.15911730545872\" x2=\"293.2074268559431\" y2=\"24.15911730545872\" stroke=\"rgb(233,233,233)\" stroke-opacity=\"1.0\" stroke-width=\"1.0\" fill=\"none\">\n", " </line>\n", " </g>\n", " </g>\n", " </g>\n", " <g clip-path=\"url(#cf9sp2a)\" clip-bounds-jfx=\"[rect (21.961210910936405, 0.0), (293.2074268559431, 341.0)]\">\n", " <g transform=\"translate(21.961210910936405 0.0 ) \">\n", " <g>\n", " <g>\n", " <rect x=\"279.24516843423146\" y=\"158.81649245063878\" height=\"182.18350754936122\" width=\"4.654086140570541\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(153,153,153)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"232.7043070285262\" y=\"198.42160278745644\" height=\"142.57839721254356\" width=\"4.65408614057057\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(153,153,153)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"186.16344562282097\" y=\"135.0534262485482\" height=\"205.9465737514518\" width=\"4.654086140570541\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(153,153,153)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"139.62258421711573\" y=\"198.42160278745644\" height=\"142.57839721254356\" width=\"4.654086140570541\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(153,153,153)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"93.08172281141049\" y=\"214.2636469221835\" height=\"126.73635307781649\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(153,153,153)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"46.54086140570524\" y=\"190.5005807200929\" height=\"150.4994192799071\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(153,153,153)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"274.591082293661\" y=\"190.5005807200929\" height=\"150.4994192799071\" width=\"4.6540861405704845\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(247,129,191)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"228.0502208879557\" y=\"158.81649245063878\" height=\"182.18350754936122\" width=\"4.6540861405704845\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(247,129,191)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"181.50935948225046\" y=\"150.89547038327524\" height=\"190.10452961672476\" width=\"4.654086140570513\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(247,129,191)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"134.96849807654522\" y=\"190.5005807200929\" height=\"150.4994192799071\" width=\"4.654086140570513\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(247,129,191)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"88.42763667083996\" y=\"222.18466898954705\" height=\"118.81533101045295\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(247,129,191)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"41.886775265134716\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(247,129,191)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"269.93699615309043\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570541\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(166,86,40)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"223.3961347473852\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570513\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(166,86,40)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"176.85527334167992\" y=\"222.18466898954705\" height=\"118.81533101045295\" width=\"4.654086140570541\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(166,86,40)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"130.31441193597468\" y=\"166.7375145180023\" height=\"174.2624854819977\" width=\"4.654086140570541\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(166,86,40)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"83.77355053026943\" y=\"214.2636469221835\" height=\"126.73635307781649\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(166,86,40)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"37.232689124564196\" y=\"127.13240418118465\" height=\"213.86759581881535\" width=\"4.65408614057052\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(166,86,40)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"265.2829100125199\" y=\"190.5005807200929\" height=\"150.4994192799071\" width=\"4.654086140570541\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,255,51)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"218.74204860681462\" y=\"190.5005807200929\" height=\"150.4994192799071\" width=\"4.65408614057057\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,255,51)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"172.20118720110938\" y=\"174.65853658536585\" height=\"166.34146341463415\" width=\"4.654086140570541\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,255,51)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"125.66032579540415\" y=\"158.81649245063878\" height=\"182.18350754936122\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,255,51)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"79.11946438969892\" y=\"214.2636469221835\" height=\"126.73635307781649\" width=\"4.654086140570513\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,255,51)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"32.57860298399367\" y=\"166.7375145180023\" height=\"174.2624854819977\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,255,51)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"260.6288238719494\" y=\"119.21138211382112\" height=\"221.78861788617888\" width=\"4.6540861405704845\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,127,0)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"214.08796246624414\" y=\"16.238095238095184\" height=\"324.7619047619048\" width=\"4.6540861405704845\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,127,0)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"167.5471010605389\" y=\"166.7375145180023\" height=\"174.2624854819977\" width=\"4.6540861405704845\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,127,0)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"121.00623965483362\" y=\"261.7897793263647\" height=\"79.21022067363532\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,127,0)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"74.46537824912839\" y=\"261.7897793263647\" height=\"79.21022067363532\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,127,0)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"27.92451684342315\" y=\"269.7108013937282\" height=\"71.28919860627178\" width=\"4.65408614057052\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,127,0)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"255.9747377313788\" y=\"261.7897793263647\" height=\"79.21022067363532\" width=\"4.654086140570598\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(152,78,163)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"209.4338763256736\" y=\"261.7897793263647\" height=\"79.21022067363532\" width=\"4.654086140570541\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(152,78,163)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"162.89301491996835\" y=\"269.7108013937282\" height=\"71.28919860627178\" width=\"4.654086140570541\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(152,78,163)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"116.35215351426311\" y=\"135.0534262485482\" height=\"205.9465737514518\" width=\"4.654086140570513\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(152,78,163)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"69.81129210855786\" y=\"47.922183507549335\" height=\"293.07781649245067\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(152,78,163)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"23.27043070285262\" y=\"119.21138211382112\" height=\"221.78861788617888\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(152,78,163)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"251.3206515908083\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570513\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(77,175,74)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"204.77979018510305\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570541\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(77,175,74)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"158.23892877939784\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570513\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(77,175,74)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"111.69806737369258\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(77,175,74)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"65.15720596798734\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(77,175,74)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"18.616344562282098\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570524\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(77,175,74)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"246.6665654502378\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.6540861405704845\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(55,126,184)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"200.12570404453254\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570513\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(55,126,184)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"153.5848426388273\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570541\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(55,126,184)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"107.04398123312205\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(55,126,184)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"60.50311982741681\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(55,126,184)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"13.96225842171157\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570527\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(55,126,184)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"242.01247930966724\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.65408614057057\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(228,26,28)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"195.471617903962\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570541\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(228,26,28)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"148.93075649825678\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570513\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(228,26,28)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"102.38989509255154\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570513\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(228,26,28)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"55.8490336868463\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.65408614057052\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(228,26,28)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " <rect x=\"9.30817228114105\" y=\"182.57955865272936\" height=\"158.42044134727064\" width=\"4.654086140570524\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(228,26,28)\" fill-opacity=\"1.0\" stroke-width=\"1.6500000000000001\">\n", " </rect>\n", " </g>\n", " <g>\n", " <line x1=\"0.0\" y1=\"182.57955865272936\" x2=\"293.2074268559431\" y2=\"182.57955865272936\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"0.8\" fill=\"none\" stroke-width=\"2.2\" stroke-dasharray=\"8.8,8.8\" stroke-dashoffset=\"0.0\">\n", " </line>\n", " </g>\n", " </g>\n", " </g>\n", " <defs>\n", " <clipPath id=\"coR9Qtz\">\n", " <rect x=\"21.961210910936405\" y=\"0.0\" width=\"293.2074268559431\" height=\"341.0\">\n", " </rect>\n", " </clipPath>\n", " </defs>\n", " <defs>\n", " <clipPath id=\"cf9sp2a\">\n", " <rect x=\"21.961210910936405\" y=\"0.0\" width=\"293.2074268559431\" height=\"341.0\">\n", " </rect>\n", " </clipPath>\n", " </defs>\n", " </g>\n", " <g>\n", " <g transform=\"translate(21.961210910936405 341.0 ) \">\n", " <g transform=\"translate(30.25155991370841 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 7.0 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>1</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(76.79242131941365 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 7.0 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>2</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(123.33328272511889 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 7.0 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>3</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(169.87414413082413 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 7.0 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>4</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(216.41500553652938 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 7.0 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>5</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(262.95586694223465 0.0 ) \">\n", " <line stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" x2=\"0.0\" y2=\"4.0\">\n", " </line>\n", " <g transform=\"translate(0.0 7.0 ) \">\n", " <text class=\"axis-text-x\" text-anchor=\"middle\" dy=\"0.7em\">\n", " <tspan>6</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <line x1=\"0.0\" y1=\"0.0\" x2=\"293.2074268559431\" y2=\"0.0\" stroke-width=\"1.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\">\n", " </line>\n", " </g>\n", " <g transform=\"translate(21.961210910936405 0.0 ) \">\n", " <g transform=\"translate(0.0 341.0 ) \">\n", " <g transform=\"translate(-3.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>0</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 301.3948896631823 ) \">\n", " <g transform=\"translate(-3.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>5</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 261.7897793263647 ) \">\n", " <g transform=\"translate(-3.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>10</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 222.18466898954705 ) \">\n", " <g transform=\"translate(-3.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>15</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 182.57955865272936 ) \">\n", " <g transform=\"translate(-3.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>20</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 142.9744483159117 ) \">\n", " <g transform=\"translate(-3.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>25</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 103.36933797909407 ) \">\n", " <g transform=\"translate(-3.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>30</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 63.76422764227641 ) \">\n", " <g transform=\"translate(-3.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>35</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 24.15911730545872 ) \">\n", " <g transform=\"translate(-3.0 0.0 ) \">\n", " <text class=\"axis-text-y\" text-anchor=\"end\" dy=\"0.35em\">\n", " <tspan>40</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(16.0 177.0 ) rotate(-90.0 ) \">\n", " <text class=\"axis-title-y\" y=\"0.0\" text-anchor=\"middle\">\n", " <tspan>Count</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(198.06492433890793 393.0 ) \">\n", " <text class=\"axis-title-x\" y=\"0.0\" text-anchor=\"middle\">\n", " <tspan>Roll</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(356.1686377668795 57.25 ) \">\n", " <rect x=\"0.0\" y=\"0.0\" height=\"239.5\" width=\"243.8313622331205\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" stroke-width=\"0.0\" fill=\"rgb(255,255,255)\" fill-opacity=\"1.0\">\n", " </rect>\n", " <g transform=\"translate(5.0 5.0 ) \">\n", " <g transform=\"translate(0.0 12.0 ) \">\n", " <text class=\"legend-title\" y=\"0.0\">\n", " <tspan>distribution</tspan>\n", " </text>\n", " </g>\n", " <g transform=\"translate(0.0 22.5 ) \">\n", " <g transform=\"\">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <rect x=\"0.0\" y=\"0.0\" height=\"21.0\" width=\"21.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(228,26,28)\" fill-opacity=\"1.0\" stroke-width=\"1.5\">\n", " </rect>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(26.9903027277341 16.05 ) \">\n", " <text class=\"legend-item\" y=\"0.0\">\n", " <tspan>Even buckets - All fail</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 23.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <rect x=\"0.0\" y=\"0.0\" height=\"21.0\" width=\"21.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(55,126,184)\" fill-opacity=\"1.0\" stroke-width=\"1.5\">\n", " </rect>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(26.9903027277341 16.05 ) \">\n", " <text class=\"legend-item\" y=\"0.0\">\n", " <tspan>Even buckets - All succed</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 46.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <rect x=\"0.0\" y=\"0.0\" height=\"21.0\" width=\"21.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(77,175,74)\" fill-opacity=\"1.0\" stroke-width=\"1.5\">\n", " </rect>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(26.9903027277341 16.05 ) \">\n", " <text class=\"legend-item\" y=\"0.0\">\n", " <tspan>Even buckets - Half succeed</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 69.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <rect x=\"0.0\" y=\"0.0\" height=\"21.0\" width=\"21.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(152,78,163)\" fill-opacity=\"1.0\" stroke-width=\"1.5\">\n", " </rect>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(26.9903027277341 16.05 ) \">\n", " <text class=\"legend-item\" y=\"0.0\">\n", " <tspan>Scewed towards bottom</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 92.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <rect x=\"0.0\" y=\"0.0\" height=\"21.0\" width=\"21.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,127,0)\" fill-opacity=\"1.0\" stroke-width=\"1.5\">\n", " </rect>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(26.9903027277341 16.05 ) \">\n", " <text class=\"legend-item\" y=\"0.0\">\n", " <tspan>Scewed towards top</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 115.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <rect x=\"0.0\" y=\"0.0\" height=\"21.0\" width=\"21.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(255,255,51)\" fill-opacity=\"1.0\" stroke-width=\"1.5\">\n", " </rect>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(26.9903027277341 16.05 ) \">\n", " <text class=\"legend-item\" y=\"0.0\">\n", " <tspan>Random (4+)</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 138.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <rect x=\"0.0\" y=\"0.0\" height=\"21.0\" width=\"21.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(166,86,40)\" fill-opacity=\"1.0\" stroke-width=\"1.5\">\n", " </rect>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(26.9903027277341 16.05 ) \">\n", " <text class=\"legend-item\" y=\"0.0\">\n", " <tspan>Random 1</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 161.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <rect x=\"0.0\" y=\"0.0\" height=\"21.0\" width=\"21.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(247,129,191)\" fill-opacity=\"1.0\" stroke-width=\"1.5\">\n", " </rect>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(26.9903027277341 16.05 ) \">\n", " <text class=\"legend-item\" y=\"0.0\">\n", " <tspan>Random 2</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " <g transform=\"translate(0.0 184.0 ) \">\n", " <g>\n", " <g transform=\"translate(1.0 1.0 ) \">\n", " <g>\n", " <rect x=\"0.0\" y=\"0.0\" height=\"21.0\" width=\"21.0\" stroke=\"rgb(255,255,255)\" stroke-opacity=\"1.0\" fill=\"rgb(153,153,153)\" fill-opacity=\"1.0\" stroke-width=\"1.5\">\n", " </rect>\n", " </g>\n", " </g>\n", " </g>\n", " <g transform=\"translate(26.9903027277341 16.05 ) \">\n", " <text class=\"legend-item\" y=\"0.0\">\n", " <tspan>Random 3</tspan>\n", " </text>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " </g>\n", " <path fill=\"rgb(0,0,0)\" fill-opacity=\"0.0\" stroke=\"rgb(71,71,71)\" stroke-opacity=\"1.0\" stroke-width=\"0.0\" d=\"M0.0 0.0 L0.0 400.0 L600.0 400.0 L600.0 0.0 Z\" pointer-events=\"none\">\n", " </path>\n", " </g>\n", " <g id=\"dx0Uuu4\">\n", " </g>\n", "</svg>\n", " <script>document.getElementById(\"39b94022-1c44-43ca-94aa-f08f1725d212\").style.display = \"none\";</script>" ],
"application/plot+json" : {
"output_type" : "lets_plot_spec",
"output" : {
"mapping" : { },
"data" : {
"roll" : [ "1", "2", "3", "4", "5", "6", "1", "2", "3", "4", "5", "6", "1", "2", "3", "4", "5", "6", "1", "2", "3", "4", "5", "6", "1", "2", "3", "4", "5", "6", "1", "2", "3", "4", "5", "6", "1", "2", "3", "4", "5", "6", "1", "2", "3", "4", "5", "6", "1", "2", "3", "4", "5", "6" ],
"count" : [ 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 20.0, 28.0, 37.0, 26.0, 9.0, 10.0, 10.0, 9.0, 10.0, 10.0, 22.0, 41.0, 28.0, 22.0, 16.0, 23.0, 21.0, 19.0, 19.0, 27.0, 16.0, 22.0, 15.0, 20.0, 20.0, 20.0, 15.0, 19.0, 24.0, 23.0, 19.0, 19.0, 16.0, 18.0, 26.0, 18.0, 23.0 ],
"distribution" : [ "Even buckets - All fail", "Even buckets - All fail", "Even buckets - All fail", "Even buckets - All fail", "Even buckets - All fail", "Even buckets - All fail", "Even buckets - All succed", "Even buckets - All succed", "Even buckets - All succed", "Even buckets - All succed", "Even buckets - All succed", "Even buckets - All succed", "Even buckets - Half succeed", "Even buckets - Half succeed", "Even buckets - Half succeed", "Even buckets - Half succeed", "Even buckets - Half succeed", "Even buckets - Half succeed", "Scewed towards bottom", "Scewed towards bottom", "Scewed towards bottom", "Scewed towards bottom", "Scewed towards bottom", "Scewed towards bottom", "Scewed towards top", "Scewed towards top", "Scewed towards top", "Scewed towards top", "Scewed towards top", "Scewed towards top", "Random (4+)", "Random (4+)", "Random (4+)", "Random (4+)", "Random (4+)", "Random (4+)", "Random 1", "Random 1", "Random 1", "Random 1", "Random 1", "Random 1", "Random 2", "Random 2", "Random 2", "Random 2", "Random 2", "Random 2", "Random 3", "Random 3", "Random 3", "Random 3", "Random 3", "Random 3" ]
},
"kind" : "plot",
"scales" : [ {
"aesthetic" : "x",
"discrete" : true
}, {
"aesthetic" : "y",
"limits" : [ null, null ]
}, {
"aesthetic" : "fill",
"discrete" : true
}, {
"aesthetic" : "x",
"name" : "Roll",
"limits" : [ null, null ]
}, {
"aesthetic" : "y",
"name" : "Count",
"limits" : [ null, null ]
} ],
"layers" : [ {
"mapping" : {
"x" : "roll",
"y" : "count",
"fill" : "distribution"
},
"stat" : "identity",
"sampling" : "none",
"inherit_aes" : false,
"position" : "dodge",
"geom" : "bar"
}, {
"mapping" : { },
"stat" : "identity",
"yintercept" : 20.0,
"color" : "#ffffff",
"size" : 1.0,
"linetype" : "dashed",
"sampling" : "none",
"alpha" : 0.8,
"inherit_aes" : false,
"position" : "identity",
"geom" : "hline"
} ],
"data_meta" : {
"series_annotations" : [ {
"type" : "str",
"column" : "roll"
}, {
"type" : "int",
"column" : "count"
}, {
"type" : "str",
"column" : "distribution"
} ]
}
},
"apply_color_scheme" : true,
"swing_enabled" : true
}
},
"execution_count" : 5,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 5
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-08-21T14:34:06.038633Z",
"start_time" : "2025-08-21T14:34:05.596246Z"
}
},
"cell_type" : "code",
"source" : [ "/**\n", " * Jensen–Shannon divergence (JSD)\n", " * Informally, this is the \"distance\" [0-1] away from the expected distribution.\n", " *\n", " * Critic:\n", " * - While the JSD value tells you something about how \"fair\" a die is, it doesn't\n", " * say anything about \"luck\",.e.g., rolling all 1's and rolling all 6's will\n", " * result in the same JSD value.\n", " * - It turns out the maximum value is ~0.65486. Apparently because bigger values\n", " * can only happen when the distributions have disjoint support. I didn't totally\n", " * understand ChatGPTs answer here with regard to dice rolls, but I guess we can\n", " * scale the values so they fit in the [0-1] range if needed.\n", " * - JSD doesn't scale linearly, so exposing it as 0-100% is wrong. If exposed it\n", " * should be a \"fairness index\" instead.\n", " *\n", " * See https://en.wikipedia.org/wiki/Jensen%E2%80%93Shannon_divergence\n", " */\n", "\n", "/**\n", " * Calculate the Jensen-Shanon Divergence value.\n", " *\n", " * @param rollProbabilities The result of all dice rolls with each index + 1\n", " * being a side on the die and the probability for rolling that die in the trial.\n", " */\n", "fun jensenShannonBits(rollProbabilities: List<Double>): Double {\n", " val sides = rollProbabilities.size\n", " val u = 1 / sides.toDouble() // Uniform distribution\n", " var jsd = 0.0\n", " for (i in 1..sides) {\n", " val p = rollProbabilities[i - 1]\n", " val m = 0.5 * (p + u)\n", " if (p > 0.0) {\n", " jsd += 0.5 * p * (ln(p / m) / ln(2.0))\n", " }\n", " jsd += 0.5 * u * (ln(u / m) / ln(2.0))\n", " }\n", " return jsd // ∈ [0, 1] (bounded by 1 bit)\n", "}\n", "\n", "val jsdMaxForD6 = 0.6548575458\n", "val jsdScale = 1.0 / jsdMaxForD6\n", "val jsdValues = rollDistributions\n", " // Informally try to use the numeric \"distance\" from the expected value as a heuristic.\n", " // Since this will require another value to also shift, we just count values above the expected,\n", " // so we do not \"double-count\".\n", " .add(\"distance\") { row ->\n", " row.valuesOf<Int>().fold(0) { acc, v ->\n", " if (v > d6BucketSize) {\n", " acc + (v - d6BucketSize)\n", " } else {\n", " acc\n", " }\n", " }\n", " }\n", " .convert { allExcept(\"distribution\", \"distance\") }.toDouble()\n", " .update { colsOf<Double>() }.with { it / rolls }\n", " .groupBy(\"distribution\")\n", " .aggregate {\n", " val rollProps = it.values { colsOf<Double>() }.toList()\n", " val jsd = jensenShannonBits(rollProps)\n", " // Convert into a [0-1] range with 1.0 meaning uniform distribution\n", " jsd into \"jsd\"\n", " abs(jsdMaxForD6 - jsd)*jsdScale into \"adjustedJSD\"\n", " it.values().last() into \"distance\"\n", " }\n", "jsdValues" ],
"id" : "230c79eb87fad39b",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe onload=\"o_resize_iframe_out_3()\" style=\"width:100%;\" class=\"result_container\" id=\"iframe_out_3\" frameBorder=\"0\" srcdoc=\" &lt;html theme='dark'&gt;\n", " &lt;head&gt;\n", " &lt;style type=&quot;text&sol;css&quot;&gt;\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover &gt; td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "&sol;* formatting *&sol;\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", ":root {\n", " --scroll-bg: #f5f5f5;\n", " --scroll-fg: #b3b3b3;\n", "}\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;]{\n", " --scroll-bg: #3c3c3c;\n", " --scroll-fg: #97e1fb;\n", "}\n", "body {\n", " scrollbar-color: var(--scroll-fg) var(--scroll-bg);\n", "}\n", "body::-webkit-scrollbar {\n", " width: 10px; &sol;* Mostly for vertical scrollbars *&sol;\n", " height: 10px; &sol;* Mostly for horizontal scrollbars *&sol;\n", "}\n", "body::-webkit-scrollbar-thumb {\n", " background-color: var(--scroll-fg);\n", "}\n", "body::-webkit-scrollbar-track {\n", " background-color: var(--scroll-bg);\n", "}\n", " &lt;&sol;style&gt;\n", " &lt;&sol;head&gt;\n", " &lt;body&gt;\n", " &lt;table class=&quot;dataframe&quot; id=&quot;df_-1157627900&quot;&gt;&lt;&sol;table&gt;\n", "\n", "&lt;p class=&quot;dataframe_description&quot;&gt;DataFrame: rowsCount = 11, columnsCount = 4&lt;&sol;p&gt;\n", "\n", " &lt;&sol;body&gt;\n", " &lt;script&gt;\n", " (function () {\n", " window.DataFrame = window.DataFrame || new (function () {\n", " this.addTable = function (df) {\n", " let cols = df.cols;\n", " for (let i = 0; i &lt; cols.length; i++) {\n", " for (let c of cols[i].children) {\n", " cols[c].parent = i;\n", " }\n", " }\n", " df.nrow = 0\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " if (df.cols[i].values.length &gt; df.nrow) df.nrow = df.cols[i].values.length\n", " }\n", " if (df.id === df.rootId) {\n", " df.expandedFrames = new Set()\n", " df.childFrames = {}\n", " const table = this.getTableElement(df.id)\n", " table.df = df\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " let col = df.cols[i]\n", " if (col.parent === undefined &amp;&amp; col.children.length &gt; 0) col.expanded = true\n", " }\n", " } else {\n", " const rootDf = this.getTableData(df.rootId)\n", " rootDf.childFrames[df.id] = df\n", " }\n", " }\n", "\n", " this.computeRenderData = function (df) {\n", " let result = []\n", " let pos = 0\n", " for (let col = 0; col &lt; df.cols.length; col++) {\n", " if (df.cols[col].parent === undefined)\n", " pos += this.computeRenderDataRec(df.cols, col, pos, 0, result, false, false)\n", " }\n", " for (let i = 0; i &lt; result.length; i++) {\n", " let row = result[i]\n", " for (let j = 0; j &lt; row.length; j++) {\n", " let cell = row[j]\n", " if (j === 0)\n", " cell.leftBd = false\n", " if (j &lt; row.length - 1) {\n", " let nextData = row[j + 1]\n", " if (nextData.leftBd) cell.rightBd = true\n", " else if (cell.rightBd) nextData.leftBd = true\n", " } else cell.rightBd = false\n", " }\n", " }\n", " return result\n", " }\n", "\n", " this.computeRenderDataRec = function (cols, colId, pos, depth, result, leftBorder, rightBorder) {\n", " if (result.length === depth) {\n", " const array = [];\n", " if (pos &gt; 0) {\n", " let j = 0\n", " for (let i = 0; j &lt; pos; i++) {\n", " let c = result[depth - 1][i]\n", " j += c.span\n", " let copy = Object.assign({empty: true}, c)\n", " array.push(copy)\n", " }\n", " }\n", " result.push(array)\n", " }\n", " const col = cols[colId];\n", " let size = 0;\n", " if (col.expanded) {\n", " let childPos = pos\n", " for (let i = 0; i &lt; col.children.length; i++) {\n", " let child = col.children[i]\n", " let childLeft = i === 0 &amp;&amp; (col.children.length &gt; 1 || leftBorder)\n", " let childRight = i === col.children.length - 1 &amp;&amp; (col.children.length &gt; 1 || rightBorder)\n", " let childSize = this.computeRenderDataRec(cols, child, childPos, depth + 1, result, childLeft, childRight)\n", " childPos += childSize\n", " size += childSize\n", " }\n", " } else {\n", " for (let i = depth + 1; i &lt; result.length; i++)\n", " result[i].push({id: colId, span: 1, leftBd: leftBorder, rightBd: rightBorder, empty: true})\n", " size = 1\n", " }\n", " let left = leftBorder\n", " let right = rightBorder\n", " if (size &gt; 1) {\n", " left = true\n", " right = true\n", " }\n", " result[depth].push({id: colId, span: size, leftBd: left, rightBd: right})\n", " return size\n", " }\n", "\n", " this.getTableElement = function (id) {\n", " return document.getElementById(&quot;df_&quot; + id)\n", " }\n", "\n", " this.getTableData = function (id) {\n", " return this.getTableElement(id).df\n", " }\n", "\n", " this.createExpander = function (isExpanded) {\n", " const svgNs = &quot;http:&sol;&sol;www.w3.org&sol;2000&sol;svg&quot;\n", " let svg = document.createElementNS(svgNs, &quot;svg&quot;)\n", " svg.classList.add(&quot;expanderSvg&quot;)\n", " let path = document.createElementNS(svgNs, &quot;path&quot;)\n", " if (isExpanded) {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;0 -2 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 4 4 4 -4 -1 -1 -3 3Z&quot;)\n", " } else {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;-2 0 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 3 3 -3 3 1 1 4 -4Z&quot;)\n", " }\n", " path.setAttribute(&quot;fill&quot;, &quot;currentColor&quot;)\n", " svg.appendChild(path)\n", " return svg\n", " }\n", "\n", " this.renderTable = function (id) {\n", "\n", " let table = this.getTableElement(id)\n", "\n", " if (table === null) return\n", "\n", " table.innerHTML = &quot;&quot;\n", "\n", " let df = table.df\n", " let rootDf = df.rootId === df.id ? df : this.getTableData(df.rootId)\n", "\n", " &sol;&sol; header\n", " let header = document.createElement(&quot;thead&quot;)\n", " table.appendChild(header)\n", "\n", " let renderData = this.computeRenderData(df)\n", " for (let j = 0; j &lt; renderData.length; j++) {\n", " let rowData = renderData[j]\n", " let tr = document.createElement(&quot;tr&quot;);\n", " let isLastRow = j === renderData.length - 1\n", " header.appendChild(tr);\n", " for (let i = 0; i &lt; rowData.length; i++) {\n", " let cell = rowData[i]\n", " let th = document.createElement(&quot;th&quot;);\n", " th.setAttribute(&quot;colspan&quot;, cell.span)\n", " let colId = cell.id\n", " let col = df.cols[colId];\n", " if (!cell.empty) {\n", " if (col.children.length === 0) {\n", " th.innerHTML = col.name\n", " } else {\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " col.expanded = !col.expanded\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(col.expanded))\n", " link.innerHTML += col.name\n", " th.appendChild(link)\n", " }\n", " }\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (isLastRow)\n", " classes += &quot; bottomBorder&quot;\n", " if (classes.length &gt; 0)\n", " th.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(th)\n", " }\n", " }\n", "\n", " &sol;&sol; body\n", " let body = document.createElement(&quot;tbody&quot;)\n", " table.appendChild(body)\n", "\n", " let columns = renderData.pop()\n", " for (let row = 0; row &lt; df.nrow; row++) {\n", " let tr = document.createElement(&quot;tr&quot;);\n", " body.appendChild(tr)\n", " for (let i = 0; i &lt; columns.length; i++) {\n", " let cell = columns[i]\n", " let td = document.createElement(&quot;td&quot;);\n", " let colId = cell.id\n", " let col = df.cols[colId]\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (classes.length &gt; 0)\n", " td.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(td)\n", " let value = col.values[row]\n", " if (value.frameId !== undefined) {\n", " let frameId = value.frameId\n", " let expanded = rootDf.expandedFrames.has(frameId)\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " if (rootDf.expandedFrames.has(frameId))\n", " rootDf.expandedFrames.delete(frameId)\n", " else rootDf.expandedFrames.add(frameId)\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(expanded))\n", " link.innerHTML += value.value\n", " if (expanded) {\n", " td.appendChild(link)\n", " td.appendChild(document.createElement(&quot;p&quot;))\n", " const childTable = document.createElement(&quot;table&quot;)\n", " childTable.className = &quot;dataframe&quot;\n", " childTable.id = &quot;df_&quot; + frameId\n", " let childDf = rootDf.childFrames[frameId]\n", " childTable.df = childDf\n", " td.appendChild(childTable)\n", " this.renderTable(frameId)\n", " if (childDf.nrow !== childDf.totalRows) {\n", " const footer = document.createElement(&quot;p&quot;)\n", " footer.innerText = `... showing only top ${childDf.nrow} of ${childDf.totalRows} rows`\n", " td.appendChild(footer)\n", " }\n", " } else {\n", " td.appendChild(link)\n", " }\n", " } else if (value.style !== undefined) {\n", " td.innerHTML = value.value\n", " td.setAttribute(&quot;style&quot;, value.style)\n", " } else td.innerHTML = value\n", " this.nodeScriptReplace(td)\n", " }\n", " }\n", " }\n", "\n", " this.nodeScriptReplace = function (node) {\n", " if (this.nodeScriptIs(node) === true) {\n", " node.parentNode.replaceChild(this.nodeScriptClone(node), node);\n", " } else {\n", " let i = -1, children = node.childNodes;\n", " while (++i &lt; children.length) {\n", " this.nodeScriptReplace(children[i]);\n", " }\n", " }\n", "\n", " return node;\n", " }\n", "\n", " this.nodeScriptClone = function (node) {\n", " let script = document.createElement(&quot;script&quot;);\n", " script.text = node.innerHTML;\n", "\n", " let i = -1, attrs = node.attributes, attr;\n", " while (++i &lt; attrs.length) {\n", " script.setAttribute((attr = attrs[i]).name, attr.value);\n", " }\n", " return script;\n", " }\n", "\n", " this.nodeScriptIs = function (node) {\n", " return node.tagName === 'SCRIPT';\n", " }\n", " })()\n", "\n", " window.call_DataFrame = function (f) {\n", " return f();\n", " };\n", "\n", " let funQueue = window[&quot;kotlinQueues&quot;] &amp;&amp; window[&quot;kotlinQueues&quot;][&quot;DataFrame&quot;];\n", " if (funQueue) {\n", " funQueue.forEach(function (f) {\n", " f();\n", " });\n", " funQueue = [];\n", " }\n", "})()\n", "\n", "&sol;*&lt;!--*&sol;\n", "call_DataFrame(function() { DataFrame.addTable({ cols: [{ name: &quot;&lt;span title=&bsol;&quot;distribution: String&bsol;&quot;&gt;distribution&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;All 1&amp;#39;s&quot;,&quot;All 6&amp;#39;s&quot;,&quot;Even buckets - All fail&quot;,&quot;Even buckets - All succed&quot;,&quot;Even buckets - Half succeed&quot;,&quot;Scewed towards bottom&quot;,&quot;Scewed towards top&quot;,&quot;Random (4+)&quot;,&quot;Random 1&quot;,&quot;Random 2&quot;,&quot;Random 3&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;jsd: Double&bsol;&quot;&gt;jsd&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.654858&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.654858&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.055145&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.059779&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.002482&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.006924&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.004032&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.005037&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;adjustedJSD: Double&bsol;&quot;&gt;adjustedJSD&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.915791&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.908715&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.996210&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.989426&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.993842&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.992308&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;distance: Any&bsol;&quot;&gt;distance&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;31&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;31&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;6&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;9&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;7&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;9&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "], id: -1157627900, rootId: -1157627900, totalRows: 11 } ) });\n", "&sol;*--&gt;*&sol;\n", "\n", "call_DataFrame(function() { DataFrame.renderTable(-1157627900) });\n", "\n", "\n", " &lt;&sol;script&gt;\n", " &lt;&sol;html&gt;\"></iframe>\n", " <script>\n", " function o_resize_iframe_out_3() {\n", " let elem = document.getElementById(\"iframe_out_3\");\n", " resize_iframe_out_3(elem);\n", " setInterval(resize_iframe_out_3, 5000, elem);\n", " }\n", " function resize_iframe_out_3(el) {\n", " let h = el.contentWindow.document.body.scrollHeight;\n", " el.height = h === 0 ? 0 : h + 41;\n", " }\n", " </script> <html theme='dark'>\n", " <head>\n", " <style type=\"text/css\">\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody > tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover > td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "/* formatting */\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", " </style>\n", " </head>\n", " <body>\n", " <table class=\"dataframe\" id=\"static_df_-1157627899\"><thead><tr><th class=\"bottomBorder\" style=\"text-align:left\">distribution</th><th class=\"bottomBorder\" style=\"text-align:left\">jsd</th><th class=\"bottomBorder\" style=\"text-align:left\">adjustedJSD</th><th class=\"bottomBorder\" style=\"text-align:left\">distance</th></tr></thead><tbody><tr><td style=\"vertical-align:top\">All 1&#39;s</td><td style=\"vertical-align:top\">0.654858</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">100</td></tr><tr><td style=\"vertical-align:top\">All 6&#39;s</td><td style=\"vertical-align:top\">0.654858</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">100</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All fail</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">1.000000</td><td style=\"vertical-align:top\">0</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All succed</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">1.000000</td><td style=\"vertical-align:top\">0</td></tr><tr><td style=\"vertical-align:top\">Even buckets - Half succeed</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">1.000000</td><td style=\"vertical-align:top\">0</td></tr><tr><td style=\"vertical-align:top\">Scewed towards bottom</td><td style=\"vertical-align:top\">0.055145</td><td style=\"vertical-align:top\">0.915791</td><td style=\"vertical-align:top\">31</td></tr><tr><td style=\"vertical-align:top\">Scewed towards top</td><td style=\"vertical-align:top\">0.059779</td><td style=\"vertical-align:top\">0.908715</td><td style=\"vertical-align:top\">31</td></tr><tr><td style=\"vertical-align:top\">Random (4+)</td><td style=\"vertical-align:top\">0.002482</td><td style=\"vertical-align:top\">0.996210</td><td style=\"vertical-align:top\">6</td></tr><tr><td style=\"vertical-align:top\">Random 1</td><td style=\"vertical-align:top\">0.006924</td><td style=\"vertical-align:top\">0.989426</td><td style=\"vertical-align:top\">9</td></tr><tr><td style=\"vertical-align:top\">Random 2</td><td style=\"vertical-align:top\">0.004032</td><td style=\"vertical-align:top\">0.993842</td><td style=\"vertical-align:top\">7</td></tr><tr><td style=\"vertical-align:top\">Random 3</td><td style=\"vertical-align:top\">0.005037</td><td style=\"vertical-align:top\">0.992308</td><td style=\"vertical-align:top\">9</td></tr></tbody></table>\n", " </body>\n", " <script>\n", " document.getElementById(\"static_df_-1157627899\").style.display = \"none\";\n", " </script>\n", " </html>" ],
"application/kotlindataframe+json" : "{\"$version\":\"2.1.1\",\"metadata\":{\"columns\":[\"distribution\",\"jsd\",\"adjustedJSD\",\"distance\"],\"types\":[{\"kind\":\"ValueColumn\",\"type\":\"kotlin.String\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Any\"}],\"nrow\":11,\"ncol\":4},\"kotlin_dataframe\":[{\"distribution\":\"All 1's\",\"jsd\":0.6548575458269756,\"adjustedJSD\":4.119314821038707E-11,\"distance\":\"100\"},{\"distribution\":\"All 6's\",\"jsd\":0.6548575458269756,\"adjustedJSD\":4.119314821038707E-11,\"distance\":\"100\"},{\"distribution\":\"Even buckets - All fail\",\"jsd\":0.0,\"adjustedJSD\":1.0,\"distance\":\"0\"},{\"distribution\":\"Even buckets - All succed\",\"jsd\":0.0,\"adjustedJSD\":1.0,\"distance\":\"0\"},{\"distribution\":\"Even buckets - Half succeed\",\"jsd\":0.0,\"adjustedJSD\":1.0,\"distance\":\"0\"},{\"distribution\":\"Scewed towards bottom\",\"jsd\":0.05514474124552049,\"adjustedJSD\":0.9157912410123433,\"distance\":\"31\"},{\"distribution\":\"Scewed towards top\",\"jsd\":0.05977887473465095,\"adjustedJSD\":0.9087146889914467,\"distance\":\"31\"},{\"distribution\":\"Random (4+)\",\"jsd\":0.0024820077233640193,\"adjustedJSD\":0.9962098509221087,\"distance\":\"6\"},{\"distribution\":\"Random 1\",\"jsd\":0.006924380262487557,\"adjustedJSD\":0.98942612739687,\"distance\":\"9\"},{\"distribution\":\"Random 2\",\"jsd\":0.004032435849078475,\"adjustedJSD\":0.9938422701625094,\"distance\":\"7\"},{\"distribution\":\"Random 3\",\"jsd\":0.005037249228076367,\"adjustedJSD\":0.9923078702224883,\"distance\":\"9\"}]}"
},
"execution_count" : 6,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 6
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-08-21T14:34:06.412725Z",
"start_time" : "2025-08-21T14:34:06.064069Z"
}
},
"cell_type" : "code",
"source" : [ "/**\n", " * Luck-meter, as described on FUMBBL: https://fumbbl.com/help:Luck\n", " * The luck value is a semi-statistical figure that represents the outcome of your rolls compared to the statistically expected average.\n", " *\n", " * It produces a value between [0 - 100], where 50% is \"expected luck\" and 0% is maximally unlucky and 100% is maximally lucky.\n", " *\n", " * Luck = Nominator / Denominator\n", " *\n", " * **Success**\n", " * - Nominator is increased by 1 / (pSuccess + pNeutral / 2)\n", " * - Denominator is increased by 1 / (pSuccess + pNeutral / 2)\n", " *\n", " * This will increase the luck value, but never take it above 1.0.\n", " *\n", " * **Failure**\n", " * - Nominator is unchanged.\n", " * - Denominator is increased by 1 / (pFailure + pNeutral / 2)\n", " *\n", " * This will decrease the luck value, but never take it below 0.\n", " *\n", " * **Neutral**\n", " * - Nominator is increased by 1 / (2 * pSuccess + pNeutral)\n", " * - Denominator is increased by 1 / (2 * pSuccess + pNeutral) + 1 / (2 * pFailure + pNeutral)\n", " *\n", " * Advantage:\n", " * - Tells you something about how lucky or unlucky you are.\n", " * - Easy to calculate.\n", " *\n", " * Critic:\n", " * - Number cannot be compared between games and players.\n", " */\n", "val names = mutableListOf<String>()\n", "val nominators = mutableListOf<Double>()\n", "val denominators = mutableListOf<Double>()\n", "val luckValues = mutableListOf<Double>()\n", "distributions.forEach { (name, rolls) ->\n", " var nominator = 0.0\n", " var denominator = 0.0\n", " rolls.forEach { roll ->\n", " when (roll.isSuccess()) {\n", " true -> {\n", " val change = (1.0 / ((roll.successPropability() + roll.neturalPropability()/2.0)) )\n", " nominator += change\n", " denominator += change\n", " }\n", " false -> {\n", " denominator += (1.0 / ((roll.failurePropability() + roll.neturalPropability()/2.0)) )\n", " }\n", " }\n", " }\n", " names.add(name)\n", " nominators.add(nominator)\n", " denominators.add(denominator)\n", " luckValues.add(if (denominator == 0.0) 1.0 else (nominator/denominator))\n", "}\n", "val fumbblLuckValue = dataFrameOf(\n", " \"distribution\" to names,\n", " \"nominator\" to nominators,\n", " \"denominator\" to denominators,\n", " \"luck\" to luckValues\n", ")\n", "fumbblLuckValue" ],
"id" : "92a73f2edcc5840",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe onload=\"o_resize_iframe_out_4()\" style=\"width:100%;\" class=\"result_container\" id=\"iframe_out_4\" frameBorder=\"0\" srcdoc=\" &lt;html theme='dark'&gt;\n", " &lt;head&gt;\n", " &lt;style type=&quot;text&sol;css&quot;&gt;\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover &gt; td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "&sol;* formatting *&sol;\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", ":root {\n", " --scroll-bg: #f5f5f5;\n", " --scroll-fg: #b3b3b3;\n", "}\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;]{\n", " --scroll-bg: #3c3c3c;\n", " --scroll-fg: #97e1fb;\n", "}\n", "body {\n", " scrollbar-color: var(--scroll-fg) var(--scroll-bg);\n", "}\n", "body::-webkit-scrollbar {\n", " width: 10px; &sol;* Mostly for vertical scrollbars *&sol;\n", " height: 10px; &sol;* Mostly for horizontal scrollbars *&sol;\n", "}\n", "body::-webkit-scrollbar-thumb {\n", " background-color: var(--scroll-fg);\n", "}\n", "body::-webkit-scrollbar-track {\n", " background-color: var(--scroll-bg);\n", "}\n", " &lt;&sol;style&gt;\n", " &lt;&sol;head&gt;\n", " &lt;body&gt;\n", " &lt;table class=&quot;dataframe&quot; id=&quot;df_-1157627898&quot;&gt;&lt;&sol;table&gt;\n", "\n", "&lt;p class=&quot;dataframe_description&quot;&gt;DataFrame: rowsCount = 11, columnsCount = 4&lt;&sol;p&gt;\n", "\n", " &lt;&sol;body&gt;\n", " &lt;script&gt;\n", " (function () {\n", " window.DataFrame = window.DataFrame || new (function () {\n", " this.addTable = function (df) {\n", " let cols = df.cols;\n", " for (let i = 0; i &lt; cols.length; i++) {\n", " for (let c of cols[i].children) {\n", " cols[c].parent = i;\n", " }\n", " }\n", " df.nrow = 0\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " if (df.cols[i].values.length &gt; df.nrow) df.nrow = df.cols[i].values.length\n", " }\n", " if (df.id === df.rootId) {\n", " df.expandedFrames = new Set()\n", " df.childFrames = {}\n", " const table = this.getTableElement(df.id)\n", " table.df = df\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " let col = df.cols[i]\n", " if (col.parent === undefined &amp;&amp; col.children.length &gt; 0) col.expanded = true\n", " }\n", " } else {\n", " const rootDf = this.getTableData(df.rootId)\n", " rootDf.childFrames[df.id] = df\n", " }\n", " }\n", "\n", " this.computeRenderData = function (df) {\n", " let result = []\n", " let pos = 0\n", " for (let col = 0; col &lt; df.cols.length; col++) {\n", " if (df.cols[col].parent === undefined)\n", " pos += this.computeRenderDataRec(df.cols, col, pos, 0, result, false, false)\n", " }\n", " for (let i = 0; i &lt; result.length; i++) {\n", " let row = result[i]\n", " for (let j = 0; j &lt; row.length; j++) {\n", " let cell = row[j]\n", " if (j === 0)\n", " cell.leftBd = false\n", " if (j &lt; row.length - 1) {\n", " let nextData = row[j + 1]\n", " if (nextData.leftBd) cell.rightBd = true\n", " else if (cell.rightBd) nextData.leftBd = true\n", " } else cell.rightBd = false\n", " }\n", " }\n", " return result\n", " }\n", "\n", " this.computeRenderDataRec = function (cols, colId, pos, depth, result, leftBorder, rightBorder) {\n", " if (result.length === depth) {\n", " const array = [];\n", " if (pos &gt; 0) {\n", " let j = 0\n", " for (let i = 0; j &lt; pos; i++) {\n", " let c = result[depth - 1][i]\n", " j += c.span\n", " let copy = Object.assign({empty: true}, c)\n", " array.push(copy)\n", " }\n", " }\n", " result.push(array)\n", " }\n", " const col = cols[colId];\n", " let size = 0;\n", " if (col.expanded) {\n", " let childPos = pos\n", " for (let i = 0; i &lt; col.children.length; i++) {\n", " let child = col.children[i]\n", " let childLeft = i === 0 &amp;&amp; (col.children.length &gt; 1 || leftBorder)\n", " let childRight = i === col.children.length - 1 &amp;&amp; (col.children.length &gt; 1 || rightBorder)\n", " let childSize = this.computeRenderDataRec(cols, child, childPos, depth + 1, result, childLeft, childRight)\n", " childPos += childSize\n", " size += childSize\n", " }\n", " } else {\n", " for (let i = depth + 1; i &lt; result.length; i++)\n", " result[i].push({id: colId, span: 1, leftBd: leftBorder, rightBd: rightBorder, empty: true})\n", " size = 1\n", " }\n", " let left = leftBorder\n", " let right = rightBorder\n", " if (size &gt; 1) {\n", " left = true\n", " right = true\n", " }\n", " result[depth].push({id: colId, span: size, leftBd: left, rightBd: right})\n", " return size\n", " }\n", "\n", " this.getTableElement = function (id) {\n", " return document.getElementById(&quot;df_&quot; + id)\n", " }\n", "\n", " this.getTableData = function (id) {\n", " return this.getTableElement(id).df\n", " }\n", "\n", " this.createExpander = function (isExpanded) {\n", " const svgNs = &quot;http:&sol;&sol;www.w3.org&sol;2000&sol;svg&quot;\n", " let svg = document.createElementNS(svgNs, &quot;svg&quot;)\n", " svg.classList.add(&quot;expanderSvg&quot;)\n", " let path = document.createElementNS(svgNs, &quot;path&quot;)\n", " if (isExpanded) {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;0 -2 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 4 4 4 -4 -1 -1 -3 3Z&quot;)\n", " } else {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;-2 0 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 3 3 -3 3 1 1 4 -4Z&quot;)\n", " }\n", " path.setAttribute(&quot;fill&quot;, &quot;currentColor&quot;)\n", " svg.appendChild(path)\n", " return svg\n", " }\n", "\n", " this.renderTable = function (id) {\n", "\n", " let table = this.getTableElement(id)\n", "\n", " if (table === null) return\n", "\n", " table.innerHTML = &quot;&quot;\n", "\n", " let df = table.df\n", " let rootDf = df.rootId === df.id ? df : this.getTableData(df.rootId)\n", "\n", " &sol;&sol; header\n", " let header = document.createElement(&quot;thead&quot;)\n", " table.appendChild(header)\n", "\n", " let renderData = this.computeRenderData(df)\n", " for (let j = 0; j &lt; renderData.length; j++) {\n", " let rowData = renderData[j]\n", " let tr = document.createElement(&quot;tr&quot;);\n", " let isLastRow = j === renderData.length - 1\n", " header.appendChild(tr);\n", " for (let i = 0; i &lt; rowData.length; i++) {\n", " let cell = rowData[i]\n", " let th = document.createElement(&quot;th&quot;);\n", " th.setAttribute(&quot;colspan&quot;, cell.span)\n", " let colId = cell.id\n", " let col = df.cols[colId];\n", " if (!cell.empty) {\n", " if (col.children.length === 0) {\n", " th.innerHTML = col.name\n", " } else {\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " col.expanded = !col.expanded\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(col.expanded))\n", " link.innerHTML += col.name\n", " th.appendChild(link)\n", " }\n", " }\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (isLastRow)\n", " classes += &quot; bottomBorder&quot;\n", " if (classes.length &gt; 0)\n", " th.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(th)\n", " }\n", " }\n", "\n", " &sol;&sol; body\n", " let body = document.createElement(&quot;tbody&quot;)\n", " table.appendChild(body)\n", "\n", " let columns = renderData.pop()\n", " for (let row = 0; row &lt; df.nrow; row++) {\n", " let tr = document.createElement(&quot;tr&quot;);\n", " body.appendChild(tr)\n", " for (let i = 0; i &lt; columns.length; i++) {\n", " let cell = columns[i]\n", " let td = document.createElement(&quot;td&quot;);\n", " let colId = cell.id\n", " let col = df.cols[colId]\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (classes.length &gt; 0)\n", " td.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(td)\n", " let value = col.values[row]\n", " if (value.frameId !== undefined) {\n", " let frameId = value.frameId\n", " let expanded = rootDf.expandedFrames.has(frameId)\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " if (rootDf.expandedFrames.has(frameId))\n", " rootDf.expandedFrames.delete(frameId)\n", " else rootDf.expandedFrames.add(frameId)\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(expanded))\n", " link.innerHTML += value.value\n", " if (expanded) {\n", " td.appendChild(link)\n", " td.appendChild(document.createElement(&quot;p&quot;))\n", " const childTable = document.createElement(&quot;table&quot;)\n", " childTable.className = &quot;dataframe&quot;\n", " childTable.id = &quot;df_&quot; + frameId\n", " let childDf = rootDf.childFrames[frameId]\n", " childTable.df = childDf\n", " td.appendChild(childTable)\n", " this.renderTable(frameId)\n", " if (childDf.nrow !== childDf.totalRows) {\n", " const footer = document.createElement(&quot;p&quot;)\n", " footer.innerText = `... showing only top ${childDf.nrow} of ${childDf.totalRows} rows`\n", " td.appendChild(footer)\n", " }\n", " } else {\n", " td.appendChild(link)\n", " }\n", " } else if (value.style !== undefined) {\n", " td.innerHTML = value.value\n", " td.setAttribute(&quot;style&quot;, value.style)\n", " } else td.innerHTML = value\n", " this.nodeScriptReplace(td)\n", " }\n", " }\n", " }\n", "\n", " this.nodeScriptReplace = function (node) {\n", " if (this.nodeScriptIs(node) === true) {\n", " node.parentNode.replaceChild(this.nodeScriptClone(node), node);\n", " } else {\n", " let i = -1, children = node.childNodes;\n", " while (++i &lt; children.length) {\n", " this.nodeScriptReplace(children[i]);\n", " }\n", " }\n", "\n", " return node;\n", " }\n", "\n", " this.nodeScriptClone = function (node) {\n", " let script = document.createElement(&quot;script&quot;);\n", " script.text = node.innerHTML;\n", "\n", " let i = -1, attrs = node.attributes, attr;\n", " while (++i &lt; attrs.length) {\n", " script.setAttribute((attr = attrs[i]).name, attr.value);\n", " }\n", " return script;\n", " }\n", "\n", " this.nodeScriptIs = function (node) {\n", " return node.tagName === 'SCRIPT';\n", " }\n", " })()\n", "\n", " window.call_DataFrame = function (f) {\n", " return f();\n", " };\n", "\n", " let funQueue = window[&quot;kotlinQueues&quot;] &amp;&amp; window[&quot;kotlinQueues&quot;][&quot;DataFrame&quot;];\n", " if (funQueue) {\n", " funQueue.forEach(function (f) {\n", " f();\n", " });\n", " funQueue = [];\n", " }\n", "})()\n", "\n", "&sol;*&lt;!--*&sol;\n", "call_DataFrame(function() { DataFrame.addTable({ cols: [{ name: &quot;&lt;span title=&bsol;&quot;distribution: String&bsol;&quot;&gt;distribution&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;All 1&amp;#39;s&quot;,&quot;All 6&amp;#39;s&quot;,&quot;Even buckets - All fail&quot;,&quot;Even buckets - All succed&quot;,&quot;Even buckets - Half succeed&quot;,&quot;Scewed towards bottom&quot;,&quot;Scewed towards top&quot;,&quot;Random (4+)&quot;,&quot;Random 1&quot;,&quot;Random 2&quot;,&quot;Random 3&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;nominator: Double&bsol;&quot;&gt;nominator&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;309.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;69.300000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;166.400000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;118.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;109.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;140.600000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;149.500000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;denominator: Double&bsol;&quot;&gt;denominator&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;312.200000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;309.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;240.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;243.600000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;240.600000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;240.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;256.700000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;274.100000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;250.600000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;luck: Double&bsol;&quot;&gt;luck&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.500000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.284483&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.691604&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.491667&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.424620&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.512951&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.596568&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "], id: -1157627898, rootId: -1157627898, totalRows: 11 } ) });\n", "&sol;*--&gt;*&sol;\n", "\n", "call_DataFrame(function() { DataFrame.renderTable(-1157627898) });\n", "\n", "\n", " &lt;&sol;script&gt;\n", " &lt;&sol;html&gt;\"></iframe>\n", " <script>\n", " function o_resize_iframe_out_4() {\n", " let elem = document.getElementById(\"iframe_out_4\");\n", " resize_iframe_out_4(elem);\n", " setInterval(resize_iframe_out_4, 5000, elem);\n", " }\n", " function resize_iframe_out_4(el) {\n", " let h = el.contentWindow.document.body.scrollHeight;\n", " el.height = h === 0 ? 0 : h + 41;\n", " }\n", " </script> <html theme='dark'>\n", " <head>\n", " <style type=\"text/css\">\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody > tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover > td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "/* formatting */\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", " </style>\n", " </head>\n", " <body>\n", " <table class=\"dataframe\" id=\"static_df_-1157627897\"><thead><tr><th class=\"bottomBorder\" style=\"text-align:left\">distribution</th><th class=\"bottomBorder\" style=\"text-align:left\">nominator</th><th class=\"bottomBorder\" style=\"text-align:left\">denominator</th><th class=\"bottomBorder\" style=\"text-align:left\">luck</th></tr></thead><tbody><tr><td style=\"vertical-align:top\">All 1&#39;s</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">312.200000</td><td style=\"vertical-align:top\">0.000000</td></tr><tr><td style=\"vertical-align:top\">All 6&#39;s</td><td style=\"vertical-align:top\">309.000000</td><td style=\"vertical-align:top\">309.000000</td><td style=\"vertical-align:top\">1.000000</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All fail</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">120.000000</td><td style=\"vertical-align:top\">0.000000</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All succed</td><td style=\"vertical-align:top\">120.000000</td><td style=\"vertical-align:top\">120.000000</td><td style=\"vertical-align:top\">1.000000</td></tr><tr><td style=\"vertical-align:top\">Even buckets - Half succeed</td><td style=\"vertical-align:top\">120.000000</td><td style=\"vertical-align:top\">240.000000</td><td style=\"vertical-align:top\">0.500000</td></tr><tr><td style=\"vertical-align:top\">Scewed towards bottom</td><td style=\"vertical-align:top\">69.300000</td><td style=\"vertical-align:top\">243.600000</td><td style=\"vertical-align:top\">0.284483</td></tr><tr><td style=\"vertical-align:top\">Scewed towards top</td><td style=\"vertical-align:top\">166.400000</td><td style=\"vertical-align:top\">240.600000</td><td style=\"vertical-align:top\">0.691604</td></tr><tr><td style=\"vertical-align:top\">Random (4+)</td><td style=\"vertical-align:top\">118.000000</td><td style=\"vertical-align:top\">240.000000</td><td style=\"vertical-align:top\">0.491667</td></tr><tr><td style=\"vertical-align:top\">Random 1</td><td style=\"vertical-align:top\">109.000000</td><td style=\"vertical-align:top\">256.700000</td><td style=\"vertical-align:top\">0.424620</td></tr><tr><td style=\"vertical-align:top\">Random 2</td><td style=\"vertical-align:top\">140.600000</td><td style=\"vertical-align:top\">274.100000</td><td style=\"vertical-align:top\">0.512951</td></tr><tr><td style=\"vertical-align:top\">Random 3</td><td style=\"vertical-align:top\">149.500000</td><td style=\"vertical-align:top\">250.600000</td><td style=\"vertical-align:top\">0.596568</td></tr></tbody></table>\n", " </body>\n", " <script>\n", " document.getElementById(\"static_df_-1157627897\").style.display = \"none\";\n", " </script>\n", " </html>" ],
"application/kotlindataframe+json" : "{\"$version\":\"2.1.1\",\"metadata\":{\"columns\":[\"distribution\",\"nominator\",\"denominator\",\"luck\"],\"types\":[{\"kind\":\"ValueColumn\",\"type\":\"kotlin.String\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"}],\"nrow\":11,\"ncol\":4},\"kotlin_dataframe\":[{\"distribution\":\"All 1's\",\"nominator\":0.0,\"denominator\":312.19999999999993,\"luck\":0.0},{\"distribution\":\"All 6's\",\"nominator\":308.9999999999999,\"denominator\":308.9999999999999,\"luck\":1.0},{\"distribution\":\"Even buckets - All fail\",\"nominator\":0.0,\"denominator\":120.0,\"luck\":0.0},{\"distribution\":\"Even buckets - All succed\",\"nominator\":120.0,\"denominator\":120.0,\"luck\":1.0},{\"distribution\":\"Even buckets - Half succeed\",\"nominator\":120.0,\"denominator\":240.0,\"luck\":0.5},{\"distribution\":\"Scewed towards bottom\",\"nominator\":69.30000000000003,\"denominator\":243.59999999999985,\"luck\":0.28448275862068995},{\"distribution\":\"Scewed towards top\",\"nominator\":166.40000000000003,\"denominator\":240.59999999999994,\"luck\":0.6916043225270161},{\"distribution\":\"Random (4+)\",\"nominator\":118.0,\"denominator\":240.0,\"luck\":0.49166666666666664},{\"distribution\":\"Random 1\",\"nominator\":109.00000000000004,\"denominator\":256.6999999999998,\"luck\":0.4246201791975073},{\"distribution\":\"Random 2\",\"nominator\":140.60000000000002,\"denominator\":274.0999999999998,\"luck\":0.5129514775629337},{\"distribution\":\"Random 3\",\"nominator\":149.50000000000006,\"denominator\":250.59999999999985,\"luck\":0.5965682362330412}]}"
},
"execution_count" : 7,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 7
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-08-21T14:34:07.291493Z",
"start_time" : "2025-08-21T14:34:06.545679Z"
}
},
"cell_type" : "code",
"source" : [ "import org.jetbrains.kotlinx.statistics.math3.special.Erf.erf\n", "\n", "/***\n", " * Use the Z-score as a measure of \"luck\", i.e. how far from the average did we roll. This takes into account the roll\n", " * and probability for each roll, e.g., it takes into account that rolling a 2+ is easer than a 6+.\n", " *\n", " * Definition: Z-score is the number (distance) of standard deviation away (above or below) the mean.\n", " * By definition the Z score of the mean is 0.\n", " *\n", " * This means that the Z-score can say something about how extreme an outcome is within its own distribution,\n", " * which can be compared to other games or players. The absolute number of dice rolled and success can be different\n", " * and still have the same Z-score. It just tells you something about how likely the outcome was given the amount of dice\n", " * rolled and their successes.\n", " *\n", " * Advantage:\n", " * - Standard way to look at probabilities\n", " * - Can be compared against other players and games\n", " *\n", " * Critic:\n", " * - Z-score is not a [0-1] range, making it harder to interpret.\n", " * - Z-score is not linear.\n", " * - If either all succeed or all fail the Z-score is `null`.\n", " *\n", " * See https://en.wikipedia.org/wiki/Standard_score\n", " * See https://en.wikipedia.org/wiki/Bernoulli_trial\n", " */\n", "\n", "/**\n", " * Wrap Roll results for Bernoulli trial calculations\n", " * @param p Probability [0-1] that the roll is a success\n", " * @param success the roll was an actual success\n", " */\n", "data class Roll(val p: Double, val success: Boolean)\n", "\n", "@DataSchema\n", "data class LuckSummary(\n", " val n: Int,\n", " val successes: Int,\n", " val expected: Double,\n", " val variance: Double,\n", " val centeredLuck: Double, // S - μ\n", " val zScore: Double?, // (S-μ)/σ, null if σ==0\n", " val tailP: Double, // P(X >= S)\n", " val surprisalLog10: Double, // -log10(tailP)\n", " val rarityPercentage: Double? // Two-sided rarity % (assuming normal distribution)\n", ")\n", "\n", "@DataSchema\n", "data class LuckRow(\n", " val distribution: String,\n", " val summary: LuckSummary\n", ")\n", "\n", "/** Exact Poisson–binomial tail P(X >= s) via O(n^2) DP. */\n", "fun tailProbAtLeast(ps: DoubleArray, s: Int): Double {\n", " val n = ps.size\n", " var dp = DoubleArray(n + 1) { 0.0 }\n", " dp[0] = 1.0\n", " for (p in ps) {\n", " val next = DoubleArray(n + 1)\n", " for (k in 0..n) {\n", " if (dp[k] == 0.0) continue\n", " next[k] += dp[k] * (1 - p) // failure\n", " if (k + 1 <= n) next[k + 1] += dp[k] * p // success\n", " }\n", " dp = next\n", " }\n", " var tail = 0.0\n", " for (k in s..n) tail += dp[k]\n", " return tail.coerceIn(0.0, 1.0)\n", "}\n", "\n", "/**\n", " * One-sided rarity % for a Z-score (negative is \"bad luck\", positive is \"good luck\").\n", " * Note, this assumes a normal distribution, which dice rolls only approximate.\n", " * It will especially be off at a low amount of rolls\n", " */\n", "fun rarityPercent(zScore: Double): Double {\n", " val oneSidedTail = 0.5 * (1 - erf(abs(zScore) / sqrt(2.0))) * 100.0\n", " return if (zScore >= 0) oneSidedTail else -oneSidedTail\n", "}\n", "\n", "fun summarizeLuck(rolls: List<Roll>): LuckSummary {\n", " val ps = rolls.map { it.p }.toDoubleArray()\n", " val s = rolls.count { it.success }\n", " val expected = ps.sum()\n", " val variance = ps.sumOf { it * (1 - it) }\n", " val sigma = kotlin.math.sqrt(variance)\n", " val centered = s - expected\n", " val z = if (sigma > 0) centered / sigma else null\n", " val tailP = tailProbAtLeast(ps, s)\n", " val surprisal = if (tailP > 0) -kotlin.math.log10(tailP) else Double.POSITIVE_INFINITY\n", " return LuckSummary(\n", " n = rolls.size,\n", " successes = s,\n", " expected = expected,\n", " variance = variance,\n", " centeredLuck = centered,\n", " zScore = z,\n", " tailP = tailP,\n", " surprisalLog10 = surprisal,\n", " rarityPercentage = if (z != null) rarityPercent(z) else null\n", " )\n", "}\n", "\n", "val zScoreLuckSummary = distributions.map { (name, rolls) ->\n", " val rollsWithProbabilities = rolls.map {\n", " Roll(it.successPropability(), it.isSuccess())\n", " }\n", " LuckRow(name, summarizeLuck(rollsWithProbabilities))\n", "}.toDataFrame().flatten()\n", "zScoreLuckSummary" ],
"id" : "e473c59b8da9bbc6",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe onload=\"o_resize_iframe_out_7()\" style=\"width:100%;\" class=\"result_container\" id=\"iframe_out_7\" frameBorder=\"0\" srcdoc=\" &lt;html theme='dark'&gt;\n", " &lt;head&gt;\n", " &lt;style type=&quot;text&sol;css&quot;&gt;\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover &gt; td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "&sol;* formatting *&sol;\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", ":root {\n", " --scroll-bg: #f5f5f5;\n", " --scroll-fg: #b3b3b3;\n", "}\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;]{\n", " --scroll-bg: #3c3c3c;\n", " --scroll-fg: #97e1fb;\n", "}\n", "body {\n", " scrollbar-color: var(--scroll-fg) var(--scroll-bg);\n", "}\n", "body::-webkit-scrollbar {\n", " width: 10px; &sol;* Mostly for vertical scrollbars *&sol;\n", " height: 10px; &sol;* Mostly for horizontal scrollbars *&sol;\n", "}\n", "body::-webkit-scrollbar-thumb {\n", " background-color: var(--scroll-fg);\n", "}\n", "body::-webkit-scrollbar-track {\n", " background-color: var(--scroll-bg);\n", "}\n", " &lt;&sol;style&gt;\n", " &lt;&sol;head&gt;\n", " &lt;body&gt;\n", " &lt;table class=&quot;dataframe&quot; id=&quot;df_-1157627892&quot;&gt;&lt;&sol;table&gt;\n", "\n", "&lt;p class=&quot;dataframe_description&quot;&gt;DataFrame: rowsCount = 11, columnsCount = 10&lt;&sol;p&gt;\n", "\n", " &lt;&sol;body&gt;\n", " &lt;script&gt;\n", " (function () {\n", " window.DataFrame = window.DataFrame || new (function () {\n", " this.addTable = function (df) {\n", " let cols = df.cols;\n", " for (let i = 0; i &lt; cols.length; i++) {\n", " for (let c of cols[i].children) {\n", " cols[c].parent = i;\n", " }\n", " }\n", " df.nrow = 0\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " if (df.cols[i].values.length &gt; df.nrow) df.nrow = df.cols[i].values.length\n", " }\n", " if (df.id === df.rootId) {\n", " df.expandedFrames = new Set()\n", " df.childFrames = {}\n", " const table = this.getTableElement(df.id)\n", " table.df = df\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " let col = df.cols[i]\n", " if (col.parent === undefined &amp;&amp; col.children.length &gt; 0) col.expanded = true\n", " }\n", " } else {\n", " const rootDf = this.getTableData(df.rootId)\n", " rootDf.childFrames[df.id] = df\n", " }\n", " }\n", "\n", " this.computeRenderData = function (df) {\n", " let result = []\n", " let pos = 0\n", " for (let col = 0; col &lt; df.cols.length; col++) {\n", " if (df.cols[col].parent === undefined)\n", " pos += this.computeRenderDataRec(df.cols, col, pos, 0, result, false, false)\n", " }\n", " for (let i = 0; i &lt; result.length; i++) {\n", " let row = result[i]\n", " for (let j = 0; j &lt; row.length; j++) {\n", " let cell = row[j]\n", " if (j === 0)\n", " cell.leftBd = false\n", " if (j &lt; row.length - 1) {\n", " let nextData = row[j + 1]\n", " if (nextData.leftBd) cell.rightBd = true\n", " else if (cell.rightBd) nextData.leftBd = true\n", " } else cell.rightBd = false\n", " }\n", " }\n", " return result\n", " }\n", "\n", " this.computeRenderDataRec = function (cols, colId, pos, depth, result, leftBorder, rightBorder) {\n", " if (result.length === depth) {\n", " const array = [];\n", " if (pos &gt; 0) {\n", " let j = 0\n", " for (let i = 0; j &lt; pos; i++) {\n", " let c = result[depth - 1][i]\n", " j += c.span\n", " let copy = Object.assign({empty: true}, c)\n", " array.push(copy)\n", " }\n", " }\n", " result.push(array)\n", " }\n", " const col = cols[colId];\n", " let size = 0;\n", " if (col.expanded) {\n", " let childPos = pos\n", " for (let i = 0; i &lt; col.children.length; i++) {\n", " let child = col.children[i]\n", " let childLeft = i === 0 &amp;&amp; (col.children.length &gt; 1 || leftBorder)\n", " let childRight = i === col.children.length - 1 &amp;&amp; (col.children.length &gt; 1 || rightBorder)\n", " let childSize = this.computeRenderDataRec(cols, child, childPos, depth + 1, result, childLeft, childRight)\n", " childPos += childSize\n", " size += childSize\n", " }\n", " } else {\n", " for (let i = depth + 1; i &lt; result.length; i++)\n", " result[i].push({id: colId, span: 1, leftBd: leftBorder, rightBd: rightBorder, empty: true})\n", " size = 1\n", " }\n", " let left = leftBorder\n", " let right = rightBorder\n", " if (size &gt; 1) {\n", " left = true\n", " right = true\n", " }\n", " result[depth].push({id: colId, span: size, leftBd: left, rightBd: right})\n", " return size\n", " }\n", "\n", " this.getTableElement = function (id) {\n", " return document.getElementById(&quot;df_&quot; + id)\n", " }\n", "\n", " this.getTableData = function (id) {\n", " return this.getTableElement(id).df\n", " }\n", "\n", " this.createExpander = function (isExpanded) {\n", " const svgNs = &quot;http:&sol;&sol;www.w3.org&sol;2000&sol;svg&quot;\n", " let svg = document.createElementNS(svgNs, &quot;svg&quot;)\n", " svg.classList.add(&quot;expanderSvg&quot;)\n", " let path = document.createElementNS(svgNs, &quot;path&quot;)\n", " if (isExpanded) {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;0 -2 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 4 4 4 -4 -1 -1 -3 3Z&quot;)\n", " } else {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;-2 0 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 3 3 -3 3 1 1 4 -4Z&quot;)\n", " }\n", " path.setAttribute(&quot;fill&quot;, &quot;currentColor&quot;)\n", " svg.appendChild(path)\n", " return svg\n", " }\n", "\n", " this.renderTable = function (id) {\n", "\n", " let table = this.getTableElement(id)\n", "\n", " if (table === null) return\n", "\n", " table.innerHTML = &quot;&quot;\n", "\n", " let df = table.df\n", " let rootDf = df.rootId === df.id ? df : this.getTableData(df.rootId)\n", "\n", " &sol;&sol; header\n", " let header = document.createElement(&quot;thead&quot;)\n", " table.appendChild(header)\n", "\n", " let renderData = this.computeRenderData(df)\n", " for (let j = 0; j &lt; renderData.length; j++) {\n", " let rowData = renderData[j]\n", " let tr = document.createElement(&quot;tr&quot;);\n", " let isLastRow = j === renderData.length - 1\n", " header.appendChild(tr);\n", " for (let i = 0; i &lt; rowData.length; i++) {\n", " let cell = rowData[i]\n", " let th = document.createElement(&quot;th&quot;);\n", " th.setAttribute(&quot;colspan&quot;, cell.span)\n", " let colId = cell.id\n", " let col = df.cols[colId];\n", " if (!cell.empty) {\n", " if (col.children.length === 0) {\n", " th.innerHTML = col.name\n", " } else {\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " col.expanded = !col.expanded\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(col.expanded))\n", " link.innerHTML += col.name\n", " th.appendChild(link)\n", " }\n", " }\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (isLastRow)\n", " classes += &quot; bottomBorder&quot;\n", " if (classes.length &gt; 0)\n", " th.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(th)\n", " }\n", " }\n", "\n", " &sol;&sol; body\n", " let body = document.createElement(&quot;tbody&quot;)\n", " table.appendChild(body)\n", "\n", " let columns = renderData.pop()\n", " for (let row = 0; row &lt; df.nrow; row++) {\n", " let tr = document.createElement(&quot;tr&quot;);\n", " body.appendChild(tr)\n", " for (let i = 0; i &lt; columns.length; i++) {\n", " let cell = columns[i]\n", " let td = document.createElement(&quot;td&quot;);\n", " let colId = cell.id\n", " let col = df.cols[colId]\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (classes.length &gt; 0)\n", " td.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(td)\n", " let value = col.values[row]\n", " if (value.frameId !== undefined) {\n", " let frameId = value.frameId\n", " let expanded = rootDf.expandedFrames.has(frameId)\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " if (rootDf.expandedFrames.has(frameId))\n", " rootDf.expandedFrames.delete(frameId)\n", " else rootDf.expandedFrames.add(frameId)\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(expanded))\n", " link.innerHTML += value.value\n", " if (expanded) {\n", " td.appendChild(link)\n", " td.appendChild(document.createElement(&quot;p&quot;))\n", " const childTable = document.createElement(&quot;table&quot;)\n", " childTable.className = &quot;dataframe&quot;\n", " childTable.id = &quot;df_&quot; + frameId\n", " let childDf = rootDf.childFrames[frameId]\n", " childTable.df = childDf\n", " td.appendChild(childTable)\n", " this.renderTable(frameId)\n", " if (childDf.nrow !== childDf.totalRows) {\n", " const footer = document.createElement(&quot;p&quot;)\n", " footer.innerText = `... showing only top ${childDf.nrow} of ${childDf.totalRows} rows`\n", " td.appendChild(footer)\n", " }\n", " } else {\n", " td.appendChild(link)\n", " }\n", " } else if (value.style !== undefined) {\n", " td.innerHTML = value.value\n", " td.setAttribute(&quot;style&quot;, value.style)\n", " } else td.innerHTML = value\n", " this.nodeScriptReplace(td)\n", " }\n", " }\n", " }\n", "\n", " this.nodeScriptReplace = function (node) {\n", " if (this.nodeScriptIs(node) === true) {\n", " node.parentNode.replaceChild(this.nodeScriptClone(node), node);\n", " } else {\n", " let i = -1, children = node.childNodes;\n", " while (++i &lt; children.length) {\n", " this.nodeScriptReplace(children[i]);\n", " }\n", " }\n", "\n", " return node;\n", " }\n", "\n", " this.nodeScriptClone = function (node) {\n", " let script = document.createElement(&quot;script&quot;);\n", " script.text = node.innerHTML;\n", "\n", " let i = -1, attrs = node.attributes, attr;\n", " while (++i &lt; attrs.length) {\n", " script.setAttribute((attr = attrs[i]).name, attr.value);\n", " }\n", " return script;\n", " }\n", "\n", " this.nodeScriptIs = function (node) {\n", " return node.tagName === 'SCRIPT';\n", " }\n", " })()\n", "\n", " window.call_DataFrame = function (f) {\n", " return f();\n", " };\n", "\n", " let funQueue = window[&quot;kotlinQueues&quot;] &amp;&amp; window[&quot;kotlinQueues&quot;][&quot;DataFrame&quot;];\n", " if (funQueue) {\n", " funQueue.forEach(function (f) {\n", " f();\n", " });\n", " funQueue = [];\n", " }\n", "})()\n", "\n", "&sol;*&lt;!--*&sol;\n", "call_DataFrame(function() { DataFrame.addTable({ cols: [{ name: &quot;&lt;span title=&bsol;&quot;distribution: String&bsol;&quot;&gt;distribution&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;All 1&amp;#39;s&quot;,&quot;All 6&amp;#39;s&quot;,&quot;Even buckets - All fail&quot;,&quot;Even buckets - All succed&quot;,&quot;Even buckets - Half succeed&quot;,&quot;Scewed towards bottom&quot;,&quot;Scewed towards top&quot;,&quot;Random (4+)&quot;,&quot;Random 1&quot;,&quot;Random 2&quot;,&quot;Random 3&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;n: Int&bsol;&quot;&gt;n&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;successes: Int&bsol;&quot;&gt;successes&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;60&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;39&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;80&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;59&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;53&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;62&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;66&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;expected: Double&bsol;&quot;&gt;expected&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;58.333333&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;62.166667&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;120.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;60.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;60.166667&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;60.500000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;60.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;62.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;60.500000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;58.500000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;variance: Double&bsol;&quot;&gt;variance&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;23.777778&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;23.750000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;30.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;24.083333&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;23.250000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;30.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;23.444444&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;23.194444&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;22.638889&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;centeredLuck: Double&bsol;&quot;&gt;centeredLuck&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-58.333333&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;57.833333&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-21.166667&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;19.500000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-9.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.500000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;7.500000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;zScore: Double?&bsol;&quot;&gt;zScore&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-11.962754&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;11.867150&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;null&bsol;&quot;&gt;null&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;null&bsol;&quot;&gt;null&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-4.313146&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;4.044112&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-0.182574&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-1.858757&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.311458&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.576281&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;tailP: Double&bsol;&quot;&gt;tailP&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.536342&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.999996&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000035&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.607836&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.975214&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.417738&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.070507&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;surprisalLog10: Double&bsol;&quot;&gt;surprisalLog10&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;40.819193&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.270558&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000002&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;4.456033&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.216214&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.010900&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.379096&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.151769&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;rarityPercentage: Double?&bsol;&quot;&gt;rarityPercentage&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;null&bsol;&quot;&gt;null&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;null&bsol;&quot;&gt;null&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;50.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-0.000805&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.002626&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-42.756607&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-3.153082&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;37.772629&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;5.748050&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "], id: -1157627892, rootId: -1157627892, totalRows: 11 } ) });\n", "&sol;*--&gt;*&sol;\n", "\n", "call_DataFrame(function() { DataFrame.renderTable(-1157627892) });\n", "\n", "\n", " &lt;&sol;script&gt;\n", " &lt;&sol;html&gt;\"></iframe>\n", " <script>\n", " function o_resize_iframe_out_7() {\n", " let elem = document.getElementById(\"iframe_out_7\");\n", " resize_iframe_out_7(elem);\n", " setInterval(resize_iframe_out_7, 5000, elem);\n", " }\n", " function resize_iframe_out_7(el) {\n", " let h = el.contentWindow.document.body.scrollHeight;\n", " el.height = h === 0 ? 0 : h + 41;\n", " }\n", " </script> <html theme='dark'>\n", " <head>\n", " <style type=\"text/css\">\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody > tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover > td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "/* formatting */\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", " </style>\n", " </head>\n", " <body>\n", " <table class=\"dataframe\" id=\"static_df_-1157627891\"><thead><tr><th class=\"bottomBorder\" style=\"text-align:left\">distribution</th><th class=\"bottomBorder\" style=\"text-align:left\">n</th><th class=\"bottomBorder\" style=\"text-align:left\">successes</th><th class=\"bottomBorder\" style=\"text-align:left\">expected</th><th class=\"bottomBorder\" style=\"text-align:left\">variance</th><th class=\"bottomBorder\" style=\"text-align:left\">centeredLuck</th><th class=\"bottomBorder\" style=\"text-align:left\">zScore</th><th class=\"bottomBorder\" style=\"text-align:left\">tailP</th><th class=\"bottomBorder\" style=\"text-align:left\">surprisalLog10</th><th class=\"bottomBorder\" style=\"text-align:left\">rarityPercentage</th></tr></thead><tbody><tr><td style=\"vertical-align:top\">All 1&#39;s</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">0</td><td style=\"vertical-align:top\">58.333333</td><td style=\"vertical-align:top\">23.777778</td><td style=\"vertical-align:top\">-58.333333</td><td style=\"vertical-align:top\">-11.962754</td><td style=\"vertical-align:top\">1.000000</td><td style=\"vertical-align:top\">-0.000000</td><td style=\"vertical-align:top\">-0.000000</td></tr><tr><td style=\"vertical-align:top\">All 6&#39;s</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">62.166667</td><td style=\"vertical-align:top\">23.750000</td><td style=\"vertical-align:top\">57.833333</td><td style=\"vertical-align:top\">11.867150</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">40.819193</td><td style=\"vertical-align:top\">0.000000</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All fail</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">0</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">null</td><td style=\"vertical-align:top\">1.000000</td><td style=\"vertical-align:top\">-0.000000</td><td style=\"vertical-align:top\">null</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All succed</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">120.000000</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">null</td><td style=\"vertical-align:top\">1.000000</td><td style=\"vertical-align:top\">-0.000000</td><td style=\"vertical-align:top\">null</td></tr><tr><td style=\"vertical-align:top\">Even buckets - Half succeed</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">60</td><td style=\"vertical-align:top\">60.000000</td><td style=\"vertical-align:top\">30.000000</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">0.536342</td><td style=\"vertical-align:top\">0.270558</td><td style=\"vertical-align:top\">50.000000</td></tr><tr><td style=\"vertical-align:top\">Scewed towards bottom</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">39</td><td style=\"vertical-align:top\">60.166667</td><td style=\"vertical-align:top\">24.083333</td><td style=\"vertical-align:top\">-21.166667</td><td style=\"vertical-align:top\">-4.313146</td><td style=\"vertical-align:top\">0.999996</td><td style=\"vertical-align:top\">0.000002</td><td style=\"vertical-align:top\">-0.000805</td></tr><tr><td style=\"vertical-align:top\">Scewed towards top</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">80</td><td style=\"vertical-align:top\">60.500000</td><td style=\"vertical-align:top\">23.250000</td><td style=\"vertical-align:top\">19.500000</td><td style=\"vertical-align:top\">4.044112</td><td style=\"vertical-align:top\">0.000035</td><td style=\"vertical-align:top\">4.456033</td><td style=\"vertical-align:top\">0.002626</td></tr><tr><td style=\"vertical-align:top\">Random (4+)</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">59</td><td style=\"vertical-align:top\">60.000000</td><td style=\"vertical-align:top\">30.000000</td><td style=\"vertical-align:top\">-1.000000</td><td style=\"vertical-align:top\">-0.182574</td><td style=\"vertical-align:top\">0.607836</td><td style=\"vertical-align:top\">0.216214</td><td style=\"vertical-align:top\">-42.756607</td></tr><tr><td style=\"vertical-align:top\">Random 1</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">53</td><td style=\"vertical-align:top\">62.000000</td><td style=\"vertical-align:top\">23.444444</td><td style=\"vertical-align:top\">-9.000000</td><td style=\"vertical-align:top\">-1.858757</td><td style=\"vertical-align:top\">0.975214</td><td style=\"vertical-align:top\">0.010900</td><td style=\"vertical-align:top\">-3.153082</td></tr><tr><td style=\"vertical-align:top\">Random 2</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">62</td><td style=\"vertical-align:top\">60.500000</td><td style=\"vertical-align:top\">23.194444</td><td style=\"vertical-align:top\">1.500000</td><td style=\"vertical-align:top\">0.311458</td><td style=\"vertical-align:top\">0.417738</td><td style=\"vertical-align:top\">0.379096</td><td style=\"vertical-align:top\">37.772629</td></tr><tr><td style=\"vertical-align:top\">Random 3</td><td style=\"vertical-align:top\">120</td><td style=\"vertical-align:top\">66</td><td style=\"vertical-align:top\">58.500000</td><td style=\"vertical-align:top\">22.638889</td><td style=\"vertical-align:top\">7.500000</td><td style=\"vertical-align:top\">1.576281</td><td style=\"vertical-align:top\">0.070507</td><td style=\"vertical-align:top\">1.151769</td><td style=\"vertical-align:top\">5.748050</td></tr></tbody></table>\n", " </body>\n", " <script>\n", " document.getElementById(\"static_df_-1157627891\").style.display = \"none\";\n", " </script>\n", " </html>" ],
"application/kotlindataframe+json" : "{\"$version\":\"2.1.1\",\"metadata\":{\"columns\":[\"distribution\",\"n\",\"successes\",\"expected\",\"variance\",\"centeredLuck\",\"zScore\",\"tailP\",\"surprisalLog10\",\"rarityPercentage\"],\"types\":[{\"kind\":\"ValueColumn\",\"type\":\"kotlin.String\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Int\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double?\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double?\"}],\"nrow\":11,\"ncol\":10},\"kotlin_dataframe\":[{\"distribution\":\"All 1's\",\"n\":120,\"successes\":0,\"expected\":58.33333333333334,\"variance\":23.77777777777776,\"centeredLuck\":-58.33333333333334,\"zScore\":-11.962753722931613,\"tailP\":1.0,\"surprisalLog10\":-0.0,\"rarityPercentage\":-0.0},{\"distribution\":\"All 6's\",\"n\":120,\"successes\":120,\"expected\":62.16666666666669,\"variance\":23.749999999999986,\"centeredLuck\":57.83333333333331,\"zScore\":11.867149605784947,\"tailP\":1.5163777549713305E-41,\"surprisalLog10\":40.81919259523219,\"rarityPercentage\":0.0},{\"distribution\":\"Even buckets - All fail\",\"n\":120,\"successes\":0,\"expected\":0.0,\"variance\":0.0,\"centeredLuck\":0.0,\"zScore\":null,\"tailP\":1.0,\"surprisalLog10\":-0.0,\"rarityPercentage\":null},{\"distribution\":\"Even buckets - All succed\",\"n\":120,\"successes\":120,\"expected\":120.0,\"variance\":0.0,\"centeredLuck\":0.0,\"zScore\":null,\"tailP\":1.0,\"surprisalLog10\":-0.0,\"rarityPercentage\":null},{\"distribution\":\"Even buckets - Half succeed\",\"n\":120,\"successes\":60,\"expected\":60.0,\"variance\":30.0,\"centeredLuck\":0.0,\"zScore\":0.0,\"tailP\":0.5363424894550584,\"surprisalLog10\":0.2705577965388452,\"rarityPercentage\":50.0},{\"distribution\":\"Scewed towards bottom\",\"n\":120,\"successes\":39,\"expected\":60.16666666666667,\"variance\":24.083333333333318,\"centeredLuck\":-21.16666666666667,\"zScore\":-4.313146128651913,\"tailP\":0.9999958229067214,\"surprisalLog10\":1.8140923501107664E-6,\"rarityPercentage\":-8.047383087683713E-4},{\"distribution\":\"Scewed towards top\",\"n\":120,\"successes\":80,\"expected\":60.5,\"variance\":23.249999999999996,\"centeredLuck\":19.5,\"zScore\":4.044111609448659,\"tailP\":3.4991842627240265E-5,\"surprisalLog10\":4.456033187503593,\"rarityPercentage\":0.0026260948221668023},{\"distribution\":\"Random (4+)\",\"n\":120,\"successes\":59,\"expected\":60.0,\"variance\":30.0,\"centeredLuck\":-1.0,\"zScore\":-0.18257418583505536,\"tailP\":0.6078359113338617,\"surprisalLog10\":0.2162136451027175,\"rarityPercentage\":-42.7566070292353},{\"distribution\":\"Random 1\",\"n\":120,\"successes\":53,\"expected\":62.000000000000014,\"variance\":23.444444444444436,\"centeredLuck\":-9.000000000000014,\"zScore\":-1.8587566552180916,\"tailP\":0.9752140209765248,\"surprisalLog10\":0.010900063348491217,\"rarityPercentage\":-3.153081943852709},{\"distribution\":\"Random 2\",\"n\":120,\"successes\":62,\"expected\":60.50000000000002,\"variance\":23.19444444444444,\"centeredLuck\":1.4999999999999787,\"zScore\":0.31145784309268787,\"tailP\":0.41773762641060946,\"surprisalLog10\":0.3790964052554684,\"rarityPercentage\":37.772629324558004},{\"distribution\":\"Random 3\",\"n\":120,\"successes\":66,\"expected\":58.50000000000001,\"variance\":22.63888888888888,\"centeredLuck\":7.499999999999993,\"zScore\":1.5762812492341312,\"tailP\":0.07050673954225631,\"surprisalLog10\":1.151769368028194,\"rarityPercentage\":5.7480500483650605}]}"
},
"execution_count" : 8,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 8
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-08-21T14:34:07.549376Z",
"start_time" : "2025-08-21T14:34:07.316759Z"
}
},
"cell_type" : "code",
"source" : [ "/**\n", " * Instead of using the Z-Score, we instead describe the \"likely outcome\" in the given distribution, mapped\n", " * to [-100 - 100] range.\n", " *\n", " * Formally:\n", " * LuckSym is a linear rescale of the mid-rank CDF of the Poisson–binomial distribution of successes.\n", " * With -100 being maximally unlucky, 0 being average and +100 being maximally lucky.\n", " *\n", " * The interpretation is:\n", " * - 0: The average outcome\n", " * - +100: All rolls succeed\n", " * - -100: All rolls fail\n", " * - +20:\n", " * - 60% of games are ≤ this lucky (so unluckier or equal).\n", " * - 40% of games are luckier.\n", " * - -60:\n", " * - 20% of games are ≤ this lucky (so unluckier or equal).\n", " * - 80% of games are luckier.\n", " */\n", "\n", "// -------- Exact LuckSym from per-roll p_i and observed successes S --------\n", "fun pbPmf(ps: List<Double>): DoubleArray {\n", " val n = ps.size\n", " var dp = DoubleArray(n + 1) { 0.0 }\n", " dp[0] = 1.0\n", " for (p in ps) {\n", " val next = DoubleArray(n + 1)\n", " for (k in 0..n) {\n", " val v = dp[k]; if (v == 0.0) continue\n", " next[k] += v * (1 - p)\n", " if (k + 1 <= n) next[k + 1] += v * p\n", " }\n", " dp = next\n", " }\n", " return dp\n", "}\n", "\n", "fun midCdf(pmf: DoubleArray, s: Int): Double {\n", " val ss = s.coerceIn(0, pmf.lastIndex)\n", " var lt = 0.0\n", " for (k in 0 until ss) lt += pmf[k]\n", " return lt + 0.5 * pmf[ss]\n", "}\n", "\n", "// ps: Probability array of \"success\" for each roll\n", "fun luckSymExact(ps: List<Double>, successes: Int): Double {\n", " // Check for all fail/succeed case, since this will reported wrong otherwise\n", " val variance = ps.sumOf { it * (1 - it) }\n", " if (variance == 0.0) {\n", " return when (successes > 0) {\n", " true -> 100.0\n", " false -> -100.0\n", " }\n", " }\n", " val pmf = pbPmf(ps)\n", " val mid = midCdf(pmf, successes) // in [0,1]\n", " return (2.0 * mid - 1.0) * 100.0 // in [-100,+100]\n", "}\n", "\n", "val luckSym = distributions.map {\n", " val title = it.first\n", " val rolls = it.second\n", " val ps = rolls.map { it.successPropability() }\n", " val successes = rolls.count { it.isSuccess() }\n", " val luckSym = luckSymExact(ps, successes)\n", " title to luckSym\n", "}.toDataFrame().rename(\"first\" to \"distribution\", \"second\" to \"luckSym\")\n", "luckSym" ],
"id" : "f872d2e60efaa2fd",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe onload=\"o_resize_iframe_out_8()\" style=\"width:100%;\" class=\"result_container\" id=\"iframe_out_8\" frameBorder=\"0\" srcdoc=\" &lt;html theme='dark'&gt;\n", " &lt;head&gt;\n", " &lt;style type=&quot;text&sol;css&quot;&gt;\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover &gt; td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "&sol;* formatting *&sol;\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", ":root {\n", " --scroll-bg: #f5f5f5;\n", " --scroll-fg: #b3b3b3;\n", "}\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;]{\n", " --scroll-bg: #3c3c3c;\n", " --scroll-fg: #97e1fb;\n", "}\n", "body {\n", " scrollbar-color: var(--scroll-fg) var(--scroll-bg);\n", "}\n", "body::-webkit-scrollbar {\n", " width: 10px; &sol;* Mostly for vertical scrollbars *&sol;\n", " height: 10px; &sol;* Mostly for horizontal scrollbars *&sol;\n", "}\n", "body::-webkit-scrollbar-thumb {\n", " background-color: var(--scroll-fg);\n", "}\n", "body::-webkit-scrollbar-track {\n", " background-color: var(--scroll-bg);\n", "}\n", " &lt;&sol;style&gt;\n", " &lt;&sol;head&gt;\n", " &lt;body&gt;\n", " &lt;table class=&quot;dataframe&quot; id=&quot;df_-1157627890&quot;&gt;&lt;&sol;table&gt;\n", "\n", "&lt;p class=&quot;dataframe_description&quot;&gt;DataFrame: rowsCount = 11, columnsCount = 2&lt;&sol;p&gt;\n", "\n", " &lt;&sol;body&gt;\n", " &lt;script&gt;\n", " (function () {\n", " window.DataFrame = window.DataFrame || new (function () {\n", " this.addTable = function (df) {\n", " let cols = df.cols;\n", " for (let i = 0; i &lt; cols.length; i++) {\n", " for (let c of cols[i].children) {\n", " cols[c].parent = i;\n", " }\n", " }\n", " df.nrow = 0\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " if (df.cols[i].values.length &gt; df.nrow) df.nrow = df.cols[i].values.length\n", " }\n", " if (df.id === df.rootId) {\n", " df.expandedFrames = new Set()\n", " df.childFrames = {}\n", " const table = this.getTableElement(df.id)\n", " table.df = df\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " let col = df.cols[i]\n", " if (col.parent === undefined &amp;&amp; col.children.length &gt; 0) col.expanded = true\n", " }\n", " } else {\n", " const rootDf = this.getTableData(df.rootId)\n", " rootDf.childFrames[df.id] = df\n", " }\n", " }\n", "\n", " this.computeRenderData = function (df) {\n", " let result = []\n", " let pos = 0\n", " for (let col = 0; col &lt; df.cols.length; col++) {\n", " if (df.cols[col].parent === undefined)\n", " pos += this.computeRenderDataRec(df.cols, col, pos, 0, result, false, false)\n", " }\n", " for (let i = 0; i &lt; result.length; i++) {\n", " let row = result[i]\n", " for (let j = 0; j &lt; row.length; j++) {\n", " let cell = row[j]\n", " if (j === 0)\n", " cell.leftBd = false\n", " if (j &lt; row.length - 1) {\n", " let nextData = row[j + 1]\n", " if (nextData.leftBd) cell.rightBd = true\n", " else if (cell.rightBd) nextData.leftBd = true\n", " } else cell.rightBd = false\n", " }\n", " }\n", " return result\n", " }\n", "\n", " this.computeRenderDataRec = function (cols, colId, pos, depth, result, leftBorder, rightBorder) {\n", " if (result.length === depth) {\n", " const array = [];\n", " if (pos &gt; 0) {\n", " let j = 0\n", " for (let i = 0; j &lt; pos; i++) {\n", " let c = result[depth - 1][i]\n", " j += c.span\n", " let copy = Object.assign({empty: true}, c)\n", " array.push(copy)\n", " }\n", " }\n", " result.push(array)\n", " }\n", " const col = cols[colId];\n", " let size = 0;\n", " if (col.expanded) {\n", " let childPos = pos\n", " for (let i = 0; i &lt; col.children.length; i++) {\n", " let child = col.children[i]\n", " let childLeft = i === 0 &amp;&amp; (col.children.length &gt; 1 || leftBorder)\n", " let childRight = i === col.children.length - 1 &amp;&amp; (col.children.length &gt; 1 || rightBorder)\n", " let childSize = this.computeRenderDataRec(cols, child, childPos, depth + 1, result, childLeft, childRight)\n", " childPos += childSize\n", " size += childSize\n", " }\n", " } else {\n", " for (let i = depth + 1; i &lt; result.length; i++)\n", " result[i].push({id: colId, span: 1, leftBd: leftBorder, rightBd: rightBorder, empty: true})\n", " size = 1\n", " }\n", " let left = leftBorder\n", " let right = rightBorder\n", " if (size &gt; 1) {\n", " left = true\n", " right = true\n", " }\n", " result[depth].push({id: colId, span: size, leftBd: left, rightBd: right})\n", " return size\n", " }\n", "\n", " this.getTableElement = function (id) {\n", " return document.getElementById(&quot;df_&quot; + id)\n", " }\n", "\n", " this.getTableData = function (id) {\n", " return this.getTableElement(id).df\n", " }\n", "\n", " this.createExpander = function (isExpanded) {\n", " const svgNs = &quot;http:&sol;&sol;www.w3.org&sol;2000&sol;svg&quot;\n", " let svg = document.createElementNS(svgNs, &quot;svg&quot;)\n", " svg.classList.add(&quot;expanderSvg&quot;)\n", " let path = document.createElementNS(svgNs, &quot;path&quot;)\n", " if (isExpanded) {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;0 -2 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 4 4 4 -4 -1 -1 -3 3Z&quot;)\n", " } else {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;-2 0 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 3 3 -3 3 1 1 4 -4Z&quot;)\n", " }\n", " path.setAttribute(&quot;fill&quot;, &quot;currentColor&quot;)\n", " svg.appendChild(path)\n", " return svg\n", " }\n", "\n", " this.renderTable = function (id) {\n", "\n", " let table = this.getTableElement(id)\n", "\n", " if (table === null) return\n", "\n", " table.innerHTML = &quot;&quot;\n", "\n", " let df = table.df\n", " let rootDf = df.rootId === df.id ? df : this.getTableData(df.rootId)\n", "\n", " &sol;&sol; header\n", " let header = document.createElement(&quot;thead&quot;)\n", " table.appendChild(header)\n", "\n", " let renderData = this.computeRenderData(df)\n", " for (let j = 0; j &lt; renderData.length; j++) {\n", " let rowData = renderData[j]\n", " let tr = document.createElement(&quot;tr&quot;);\n", " let isLastRow = j === renderData.length - 1\n", " header.appendChild(tr);\n", " for (let i = 0; i &lt; rowData.length; i++) {\n", " let cell = rowData[i]\n", " let th = document.createElement(&quot;th&quot;);\n", " th.setAttribute(&quot;colspan&quot;, cell.span)\n", " let colId = cell.id\n", " let col = df.cols[colId];\n", " if (!cell.empty) {\n", " if (col.children.length === 0) {\n", " th.innerHTML = col.name\n", " } else {\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " col.expanded = !col.expanded\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(col.expanded))\n", " link.innerHTML += col.name\n", " th.appendChild(link)\n", " }\n", " }\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (isLastRow)\n", " classes += &quot; bottomBorder&quot;\n", " if (classes.length &gt; 0)\n", " th.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(th)\n", " }\n", " }\n", "\n", " &sol;&sol; body\n", " let body = document.createElement(&quot;tbody&quot;)\n", " table.appendChild(body)\n", "\n", " let columns = renderData.pop()\n", " for (let row = 0; row &lt; df.nrow; row++) {\n", " let tr = document.createElement(&quot;tr&quot;);\n", " body.appendChild(tr)\n", " for (let i = 0; i &lt; columns.length; i++) {\n", " let cell = columns[i]\n", " let td = document.createElement(&quot;td&quot;);\n", " let colId = cell.id\n", " let col = df.cols[colId]\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (classes.length &gt; 0)\n", " td.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(td)\n", " let value = col.values[row]\n", " if (value.frameId !== undefined) {\n", " let frameId = value.frameId\n", " let expanded = rootDf.expandedFrames.has(frameId)\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " if (rootDf.expandedFrames.has(frameId))\n", " rootDf.expandedFrames.delete(frameId)\n", " else rootDf.expandedFrames.add(frameId)\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(expanded))\n", " link.innerHTML += value.value\n", " if (expanded) {\n", " td.appendChild(link)\n", " td.appendChild(document.createElement(&quot;p&quot;))\n", " const childTable = document.createElement(&quot;table&quot;)\n", " childTable.className = &quot;dataframe&quot;\n", " childTable.id = &quot;df_&quot; + frameId\n", " let childDf = rootDf.childFrames[frameId]\n", " childTable.df = childDf\n", " td.appendChild(childTable)\n", " this.renderTable(frameId)\n", " if (childDf.nrow !== childDf.totalRows) {\n", " const footer = document.createElement(&quot;p&quot;)\n", " footer.innerText = `... showing only top ${childDf.nrow} of ${childDf.totalRows} rows`\n", " td.appendChild(footer)\n", " }\n", " } else {\n", " td.appendChild(link)\n", " }\n", " } else if (value.style !== undefined) {\n", " td.innerHTML = value.value\n", " td.setAttribute(&quot;style&quot;, value.style)\n", " } else td.innerHTML = value\n", " this.nodeScriptReplace(td)\n", " }\n", " }\n", " }\n", "\n", " this.nodeScriptReplace = function (node) {\n", " if (this.nodeScriptIs(node) === true) {\n", " node.parentNode.replaceChild(this.nodeScriptClone(node), node);\n", " } else {\n", " let i = -1, children = node.childNodes;\n", " while (++i &lt; children.length) {\n", " this.nodeScriptReplace(children[i]);\n", " }\n", " }\n", "\n", " return node;\n", " }\n", "\n", " this.nodeScriptClone = function (node) {\n", " let script = document.createElement(&quot;script&quot;);\n", " script.text = node.innerHTML;\n", "\n", " let i = -1, attrs = node.attributes, attr;\n", " while (++i &lt; attrs.length) {\n", " script.setAttribute((attr = attrs[i]).name, attr.value);\n", " }\n", " return script;\n", " }\n", "\n", " this.nodeScriptIs = function (node) {\n", " return node.tagName === 'SCRIPT';\n", " }\n", " })()\n", "\n", " window.call_DataFrame = function (f) {\n", " return f();\n", " };\n", "\n", " let funQueue = window[&quot;kotlinQueues&quot;] &amp;&amp; window[&quot;kotlinQueues&quot;][&quot;DataFrame&quot;];\n", " if (funQueue) {\n", " funQueue.forEach(function (f) {\n", " f();\n", " });\n", " funQueue = [];\n", " }\n", "})()\n", "\n", "&sol;*&lt;!--*&sol;\n", "call_DataFrame(function() { DataFrame.addTable({ cols: [{ name: &quot;&lt;span title=&bsol;&quot;distribution: Any&bsol;&quot;&gt;distribution&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;All 1&amp;#39;s&quot;,&quot;All 6&amp;#39;s&quot;,&quot;Even buckets - All fail&quot;,&quot;Even buckets - All succed&quot;,&quot;Even buckets - Half succeed&quot;,&quot;Scewed towards bottom&quot;,&quot;Scewed towards top&quot;,&quot;Random (4+)&quot;,&quot;Random 1&quot;,&quot;Random 2&quot;,&quot;Random 3&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;luckSym: Any&bsol;&quot;&gt;luckSym&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-14.4&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-93.6&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;24.3&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;88.3&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "], id: -1157627890, rootId: -1157627890, totalRows: 11 } ) });\n", "&sol;*--&gt;*&sol;\n", "\n", "call_DataFrame(function() { DataFrame.renderTable(-1157627890) });\n", "\n", "\n", " &lt;&sol;script&gt;\n", " &lt;&sol;html&gt;\"></iframe>\n", " <script>\n", " function o_resize_iframe_out_8() {\n", " let elem = document.getElementById(\"iframe_out_8\");\n", " resize_iframe_out_8(elem);\n", " setInterval(resize_iframe_out_8, 5000, elem);\n", " }\n", " function resize_iframe_out_8(el) {\n", " let h = el.contentWindow.document.body.scrollHeight;\n", " el.height = h === 0 ? 0 : h + 41;\n", " }\n", " </script> <html theme='dark'>\n", " <head>\n", " <style type=\"text/css\">\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody > tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover > td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "/* formatting */\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", " </style>\n", " </head>\n", " <body>\n", " <table class=\"dataframe\" id=\"static_df_-1157627889\"><thead><tr><th class=\"bottomBorder\" style=\"text-align:left\">distribution</th><th class=\"bottomBorder\" style=\"text-align:left\">luckSym</th></tr></thead><tbody><tr><td style=\"vertical-align:top\">All 1&#39;s</td><td style=\"vertical-align:top\">-100.000000</td></tr><tr><td style=\"vertical-align:top\">All 6&#39;s</td><td style=\"vertical-align:top\">100.000000</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All fail</td><td style=\"vertical-align:top\">-100.000000</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All succed</td><td style=\"vertical-align:top\">100.000000</td></tr><tr><td style=\"vertical-align:top\">Even buckets - Half succeed</td><td style=\"vertical-align:top\">0.000000</td></tr><tr><td style=\"vertical-align:top\">Scewed towards bottom</td><td style=\"vertical-align:top\">-99.998497</td></tr><tr><td style=\"vertical-align:top\">Scewed towards top</td><td style=\"vertical-align:top\">99.995101</td></tr><tr><td style=\"vertical-align:top\">Random (4+)</td><td style=\"vertical-align:top\">-14.417840</td></tr><tr><td style=\"vertical-align:top\">Random 1</td><td style=\"vertical-align:top\">-93.573787</td></tr><tr><td style=\"vertical-align:top\">Random 2</td><td style=\"vertical-align:top\">24.336664</td></tr><tr><td style=\"vertical-align:top\">Random 3</td><td style=\"vertical-align:top\">88.322126</td></tr></tbody></table>\n", " </body>\n", " <script>\n", " document.getElementById(\"static_df_-1157627889\").style.display = \"none\";\n", " </script>\n", " </html>" ],
"application/kotlindataframe+json" : "{\"$version\":\"2.1.1\",\"metadata\":{\"columns\":[\"distribution\",\"luckSym\"],\"types\":[{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Any\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Any\"}],\"nrow\":11,\"ncol\":2},\"kotlin_dataframe\":[{\"distribution\":\"All 1's\",\"luckSym\":\"-100.0\"},{\"distribution\":\"All 6's\",\"luckSym\":\"100.0000000000004\"},{\"distribution\":\"Even buckets - All fail\",\"luckSym\":\"-100.0\"},{\"distribution\":\"Even buckets - All succed\",\"luckSym\":\"100.0\"},{\"distribution\":\"Even buckets - Half succeed\",\"luckSym\":\"2.220446049250313E-14\"},{\"distribution\":\"Scewed towards bottom\",\"luckSym\":\"-99.99849725580138\"},{\"distribution\":\"Scewed towards top\",\"luckSym\":\"99.99510121798447\"},{\"distribution\":\"Random (4+)\",\"luckSym\":\"-14.417840078891997\"},{\"distribution\":\"Random 1\",\"luckSym\":\"-93.5737874558042\"},{\"distribution\":\"Random 2\",\"luckSym\":\"24.336664151898812\"},{\"distribution\":\"Random 3\",\"luckSym\":\"88.32212628082203\"}]}"
},
"execution_count" : 9,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 9
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-08-21T14:34:07.778964Z",
"start_time" : "2025-08-21T14:34:07.652058Z"
}
},
"cell_type" : "code",
"source" : [ "/**\n", " * Map luckSym into percentiles [0-100]. This gives the following interpretation:\n", " *\n", " * - 50 : Average outcome\n", " * - 0 : All fails\n", " * - 100 : All successes\n", " * - 20 : 80% of outcomes are more lucky than this\n", " * - 60 : 40% of outcomes are more lucky than this\n", " */\n", "fun luckSymToPercentile(luckSym: Double): Double =\n", " ((luckSym + 100.0) / 200.0) * 100.0 // returns 0..100\n", "\n", "val luckSymPercentiles = luckSym\n", " .update(\"luckSym\") { luckSymToPercentile(it as Double) }\n", " .rename(\"luckSym\").into(\"luckSymPercentile\")\n", "luckSymPercentiles" ],
"id" : "c02f587799d6f67f",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe onload=\"o_resize_iframe_out_11()\" style=\"width:100%;\" class=\"result_container\" id=\"iframe_out_11\" frameBorder=\"0\" srcdoc=\" &lt;html theme='dark'&gt;\n", " &lt;head&gt;\n", " &lt;style type=&quot;text&sol;css&quot;&gt;\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover &gt; td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "&sol;* formatting *&sol;\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", ":root {\n", " --scroll-bg: #f5f5f5;\n", " --scroll-fg: #b3b3b3;\n", "}\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;]{\n", " --scroll-bg: #3c3c3c;\n", " --scroll-fg: #97e1fb;\n", "}\n", "body {\n", " scrollbar-color: var(--scroll-fg) var(--scroll-bg);\n", "}\n", "body::-webkit-scrollbar {\n", " width: 10px; &sol;* Mostly for vertical scrollbars *&sol;\n", " height: 10px; &sol;* Mostly for horizontal scrollbars *&sol;\n", "}\n", "body::-webkit-scrollbar-thumb {\n", " background-color: var(--scroll-fg);\n", "}\n", "body::-webkit-scrollbar-track {\n", " background-color: var(--scroll-bg);\n", "}\n", " &lt;&sol;style&gt;\n", " &lt;&sol;head&gt;\n", " &lt;body&gt;\n", " &lt;table class=&quot;dataframe&quot; id=&quot;df_-1157627884&quot;&gt;&lt;&sol;table&gt;\n", "\n", "&lt;p class=&quot;dataframe_description&quot;&gt;DataFrame: rowsCount = 11, columnsCount = 2&lt;&sol;p&gt;\n", "\n", " &lt;&sol;body&gt;\n", " &lt;script&gt;\n", " (function () {\n", " window.DataFrame = window.DataFrame || new (function () {\n", " this.addTable = function (df) {\n", " let cols = df.cols;\n", " for (let i = 0; i &lt; cols.length; i++) {\n", " for (let c of cols[i].children) {\n", " cols[c].parent = i;\n", " }\n", " }\n", " df.nrow = 0\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " if (df.cols[i].values.length &gt; df.nrow) df.nrow = df.cols[i].values.length\n", " }\n", " if (df.id === df.rootId) {\n", " df.expandedFrames = new Set()\n", " df.childFrames = {}\n", " const table = this.getTableElement(df.id)\n", " table.df = df\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " let col = df.cols[i]\n", " if (col.parent === undefined &amp;&amp; col.children.length &gt; 0) col.expanded = true\n", " }\n", " } else {\n", " const rootDf = this.getTableData(df.rootId)\n", " rootDf.childFrames[df.id] = df\n", " }\n", " }\n", "\n", " this.computeRenderData = function (df) {\n", " let result = []\n", " let pos = 0\n", " for (let col = 0; col &lt; df.cols.length; col++) {\n", " if (df.cols[col].parent === undefined)\n", " pos += this.computeRenderDataRec(df.cols, col, pos, 0, result, false, false)\n", " }\n", " for (let i = 0; i &lt; result.length; i++) {\n", " let row = result[i]\n", " for (let j = 0; j &lt; row.length; j++) {\n", " let cell = row[j]\n", " if (j === 0)\n", " cell.leftBd = false\n", " if (j &lt; row.length - 1) {\n", " let nextData = row[j + 1]\n", " if (nextData.leftBd) cell.rightBd = true\n", " else if (cell.rightBd) nextData.leftBd = true\n", " } else cell.rightBd = false\n", " }\n", " }\n", " return result\n", " }\n", "\n", " this.computeRenderDataRec = function (cols, colId, pos, depth, result, leftBorder, rightBorder) {\n", " if (result.length === depth) {\n", " const array = [];\n", " if (pos &gt; 0) {\n", " let j = 0\n", " for (let i = 0; j &lt; pos; i++) {\n", " let c = result[depth - 1][i]\n", " j += c.span\n", " let copy = Object.assign({empty: true}, c)\n", " array.push(copy)\n", " }\n", " }\n", " result.push(array)\n", " }\n", " const col = cols[colId];\n", " let size = 0;\n", " if (col.expanded) {\n", " let childPos = pos\n", " for (let i = 0; i &lt; col.children.length; i++) {\n", " let child = col.children[i]\n", " let childLeft = i === 0 &amp;&amp; (col.children.length &gt; 1 || leftBorder)\n", " let childRight = i === col.children.length - 1 &amp;&amp; (col.children.length &gt; 1 || rightBorder)\n", " let childSize = this.computeRenderDataRec(cols, child, childPos, depth + 1, result, childLeft, childRight)\n", " childPos += childSize\n", " size += childSize\n", " }\n", " } else {\n", " for (let i = depth + 1; i &lt; result.length; i++)\n", " result[i].push({id: colId, span: 1, leftBd: leftBorder, rightBd: rightBorder, empty: true})\n", " size = 1\n", " }\n", " let left = leftBorder\n", " let right = rightBorder\n", " if (size &gt; 1) {\n", " left = true\n", " right = true\n", " }\n", " result[depth].push({id: colId, span: size, leftBd: left, rightBd: right})\n", " return size\n", " }\n", "\n", " this.getTableElement = function (id) {\n", " return document.getElementById(&quot;df_&quot; + id)\n", " }\n", "\n", " this.getTableData = function (id) {\n", " return this.getTableElement(id).df\n", " }\n", "\n", " this.createExpander = function (isExpanded) {\n", " const svgNs = &quot;http:&sol;&sol;www.w3.org&sol;2000&sol;svg&quot;\n", " let svg = document.createElementNS(svgNs, &quot;svg&quot;)\n", " svg.classList.add(&quot;expanderSvg&quot;)\n", " let path = document.createElementNS(svgNs, &quot;path&quot;)\n", " if (isExpanded) {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;0 -2 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 4 4 4 -4 -1 -1 -3 3Z&quot;)\n", " } else {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;-2 0 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 3 3 -3 3 1 1 4 -4Z&quot;)\n", " }\n", " path.setAttribute(&quot;fill&quot;, &quot;currentColor&quot;)\n", " svg.appendChild(path)\n", " return svg\n", " }\n", "\n", " this.renderTable = function (id) {\n", "\n", " let table = this.getTableElement(id)\n", "\n", " if (table === null) return\n", "\n", " table.innerHTML = &quot;&quot;\n", "\n", " let df = table.df\n", " let rootDf = df.rootId === df.id ? df : this.getTableData(df.rootId)\n", "\n", " &sol;&sol; header\n", " let header = document.createElement(&quot;thead&quot;)\n", " table.appendChild(header)\n", "\n", " let renderData = this.computeRenderData(df)\n", " for (let j = 0; j &lt; renderData.length; j++) {\n", " let rowData = renderData[j]\n", " let tr = document.createElement(&quot;tr&quot;);\n", " let isLastRow = j === renderData.length - 1\n", " header.appendChild(tr);\n", " for (let i = 0; i &lt; rowData.length; i++) {\n", " let cell = rowData[i]\n", " let th = document.createElement(&quot;th&quot;);\n", " th.setAttribute(&quot;colspan&quot;, cell.span)\n", " let colId = cell.id\n", " let col = df.cols[colId];\n", " if (!cell.empty) {\n", " if (col.children.length === 0) {\n", " th.innerHTML = col.name\n", " } else {\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " col.expanded = !col.expanded\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(col.expanded))\n", " link.innerHTML += col.name\n", " th.appendChild(link)\n", " }\n", " }\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (isLastRow)\n", " classes += &quot; bottomBorder&quot;\n", " if (classes.length &gt; 0)\n", " th.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(th)\n", " }\n", " }\n", "\n", " &sol;&sol; body\n", " let body = document.createElement(&quot;tbody&quot;)\n", " table.appendChild(body)\n", "\n", " let columns = renderData.pop()\n", " for (let row = 0; row &lt; df.nrow; row++) {\n", " let tr = document.createElement(&quot;tr&quot;);\n", " body.appendChild(tr)\n", " for (let i = 0; i &lt; columns.length; i++) {\n", " let cell = columns[i]\n", " let td = document.createElement(&quot;td&quot;);\n", " let colId = cell.id\n", " let col = df.cols[colId]\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (classes.length &gt; 0)\n", " td.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(td)\n", " let value = col.values[row]\n", " if (value.frameId !== undefined) {\n", " let frameId = value.frameId\n", " let expanded = rootDf.expandedFrames.has(frameId)\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " if (rootDf.expandedFrames.has(frameId))\n", " rootDf.expandedFrames.delete(frameId)\n", " else rootDf.expandedFrames.add(frameId)\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(expanded))\n", " link.innerHTML += value.value\n", " if (expanded) {\n", " td.appendChild(link)\n", " td.appendChild(document.createElement(&quot;p&quot;))\n", " const childTable = document.createElement(&quot;table&quot;)\n", " childTable.className = &quot;dataframe&quot;\n", " childTable.id = &quot;df_&quot; + frameId\n", " let childDf = rootDf.childFrames[frameId]\n", " childTable.df = childDf\n", " td.appendChild(childTable)\n", " this.renderTable(frameId)\n", " if (childDf.nrow !== childDf.totalRows) {\n", " const footer = document.createElement(&quot;p&quot;)\n", " footer.innerText = `... showing only top ${childDf.nrow} of ${childDf.totalRows} rows`\n", " td.appendChild(footer)\n", " }\n", " } else {\n", " td.appendChild(link)\n", " }\n", " } else if (value.style !== undefined) {\n", " td.innerHTML = value.value\n", " td.setAttribute(&quot;style&quot;, value.style)\n", " } else td.innerHTML = value\n", " this.nodeScriptReplace(td)\n", " }\n", " }\n", " }\n", "\n", " this.nodeScriptReplace = function (node) {\n", " if (this.nodeScriptIs(node) === true) {\n", " node.parentNode.replaceChild(this.nodeScriptClone(node), node);\n", " } else {\n", " let i = -1, children = node.childNodes;\n", " while (++i &lt; children.length) {\n", " this.nodeScriptReplace(children[i]);\n", " }\n", " }\n", "\n", " return node;\n", " }\n", "\n", " this.nodeScriptClone = function (node) {\n", " let script = document.createElement(&quot;script&quot;);\n", " script.text = node.innerHTML;\n", "\n", " let i = -1, attrs = node.attributes, attr;\n", " while (++i &lt; attrs.length) {\n", " script.setAttribute((attr = attrs[i]).name, attr.value);\n", " }\n", " return script;\n", " }\n", "\n", " this.nodeScriptIs = function (node) {\n", " return node.tagName === 'SCRIPT';\n", " }\n", " })()\n", "\n", " window.call_DataFrame = function (f) {\n", " return f();\n", " };\n", "\n", " let funQueue = window[&quot;kotlinQueues&quot;] &amp;&amp; window[&quot;kotlinQueues&quot;][&quot;DataFrame&quot;];\n", " if (funQueue) {\n", " funQueue.forEach(function (f) {\n", " f();\n", " });\n", " funQueue = [];\n", " }\n", "})()\n", "\n", "&sol;*&lt;!--*&sol;\n", "call_DataFrame(function() { DataFrame.addTable({ cols: [{ name: &quot;&lt;span title=&bsol;&quot;distribution: Any&bsol;&quot;&gt;distribution&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;All 1&amp;#39;s&quot;,&quot;All 6&amp;#39;s&quot;,&quot;Even buckets - All fail&quot;,&quot;Even buckets - All succed&quot;,&quot;Even buckets - Half succeed&quot;,&quot;Scewed towards bottom&quot;,&quot;Scewed towards top&quot;,&quot;Random (4+)&quot;,&quot;Random 1&quot;,&quot;Random 2&quot;,&quot;Random 3&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;luckSymPercentile: Any&bsol;&quot;&gt;luckSymPercentile&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;50.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;42.8&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;3.2&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;62.2&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;94.2&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "], id: -1157627884, rootId: -1157627884, totalRows: 11 } ) });\n", "&sol;*--&gt;*&sol;\n", "\n", "call_DataFrame(function() { DataFrame.renderTable(-1157627884) });\n", "\n", "\n", " &lt;&sol;script&gt;\n", " &lt;&sol;html&gt;\"></iframe>\n", " <script>\n", " function o_resize_iframe_out_11() {\n", " let elem = document.getElementById(\"iframe_out_11\");\n", " resize_iframe_out_11(elem);\n", " setInterval(resize_iframe_out_11, 5000, elem);\n", " }\n", " function resize_iframe_out_11(el) {\n", " let h = el.contentWindow.document.body.scrollHeight;\n", " el.height = h === 0 ? 0 : h + 41;\n", " }\n", " </script> <html theme='dark'>\n", " <head>\n", " <style type=\"text/css\">\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody > tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover > td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "/* formatting */\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", " </style>\n", " </head>\n", " <body>\n", " <table class=\"dataframe\" id=\"static_df_-1157627883\"><thead><tr><th class=\"bottomBorder\" style=\"text-align:left\">distribution</th><th class=\"bottomBorder\" style=\"text-align:left\">luckSymPercentile</th></tr></thead><tbody><tr><td style=\"vertical-align:top\">All 1&#39;s</td><td style=\"vertical-align:top\">0.000000</td></tr><tr><td style=\"vertical-align:top\">All 6&#39;s</td><td style=\"vertical-align:top\">100.000000</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All fail</td><td style=\"vertical-align:top\">0.000000</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All succed</td><td style=\"vertical-align:top\">100.000000</td></tr><tr><td style=\"vertical-align:top\">Even buckets - Half succeed</td><td style=\"vertical-align:top\">50.000000</td></tr><tr><td style=\"vertical-align:top\">Scewed towards bottom</td><td style=\"vertical-align:top\">0.000751</td></tr><tr><td style=\"vertical-align:top\">Scewed towards top</td><td style=\"vertical-align:top\">99.997551</td></tr><tr><td style=\"vertical-align:top\">Random (4+)</td><td style=\"vertical-align:top\">42.791080</td></tr><tr><td style=\"vertical-align:top\">Random 1</td><td style=\"vertical-align:top\">3.213106</td></tr><tr><td style=\"vertical-align:top\">Random 2</td><td style=\"vertical-align:top\">62.168332</td></tr><tr><td style=\"vertical-align:top\">Random 3</td><td style=\"vertical-align:top\">94.161063</td></tr></tbody></table>\n", " </body>\n", " <script>\n", " document.getElementById(\"static_df_-1157627883\").style.display = \"none\";\n", " </script>\n", " </html>" ],
"application/kotlindataframe+json" : "{\"$version\":\"2.1.1\",\"metadata\":{\"columns\":[\"distribution\",\"luckSymPercentile\"],\"types\":[{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Any\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Any\"}],\"nrow\":11,\"ncol\":2},\"kotlin_dataframe\":[{\"distribution\":\"All 1's\",\"luckSymPercentile\":\"0.0\"},{\"distribution\":\"All 6's\",\"luckSymPercentile\":\"100.0000000000002\"},{\"distribution\":\"Even buckets - All fail\",\"luckSymPercentile\":\"0.0\"},{\"distribution\":\"Even buckets - All succed\",\"luckSymPercentile\":\"100.0\"},{\"distribution\":\"Even buckets - Half succeed\",\"luckSymPercentile\":\"50.000000000000014\"},{\"distribution\":\"Scewed towards bottom\",\"luckSymPercentile\":\"7.513720993088668E-4\"},{\"distribution\":\"Scewed towards top\",\"luckSymPercentile\":\"99.99755060899224\"},{\"distribution\":\"Random (4+)\",\"luckSymPercentile\":\"42.791079960554\"},{\"distribution\":\"Random 1\",\"luckSymPercentile\":\"3.2131062720979027\"},{\"distribution\":\"Random 2\",\"luckSymPercentile\":\"62.16833207594941\"},{\"distribution\":\"Random 3\",\"luckSymPercentile\":\"94.16106314041102\"}]}"
},
"execution_count" : 10,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 10
}, {
"metadata" : {
"ExecuteTime" : {
"end_time" : "2025-08-21T14:34:08.004933Z",
"start_time" : "2025-08-21T14:34:07.898591Z"
}
},
"cell_type" : "code",
"source" : [ "/**\n", " * Compare the relevant results from all the experiments.\n", " */\n", "listOf(\n", " jsdValues.select { \"distribution\" and \"jsd\"},\n", " jsdValues.select { \"distribution\" and \"adjustedJSD\"},\n", " fumbblLuckValue.select { \"distribution\" and \"luck\" }.rename(\"luck\").into(\"FFB Luck\"),\n", " zScoreLuckSummary.select { \"distribution\" and \"zScore\" },\n", " zScoreLuckSummary.select { \"distribution\" and \"rarityPercentage\" }.rename(\"rarityPercentage\").into(\"normalDist%\"),\n", " luckSym.select { \"distribution\" and \"luckSym\"},\n", " luckSymPercentiles.select { \"distribution\" and \"luckSymPercentile\"}\n", ").reduce { acc, df ->\n", " acc.join(df) { \"distribution\" match \"distribution\" }\n", "}" ],
"id" : "67022d515da32310",
"outputs" : [ {
"data" : {
"text/html" : [ " <iframe onload=\"o_resize_iframe_out_12()\" style=\"width:100%;\" class=\"result_container\" id=\"iframe_out_12\" frameBorder=\"0\" srcdoc=\" &lt;html theme='dark'&gt;\n", " &lt;head&gt;\n", " &lt;style type=&quot;text&sol;css&quot;&gt;\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: &quot;Helvetica Neue&quot;, Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody &gt; tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover &gt; td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "&sol;* formatting *&sol;\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", ":root {\n", " --scroll-bg: #f5f5f5;\n", " --scroll-fg: #b3b3b3;\n", "}\n", ":root[theme=&quot;dark&quot;], :root [data-jp-theme-light=&quot;false&quot;]{\n", " --scroll-bg: #3c3c3c;\n", " --scroll-fg: #97e1fb;\n", "}\n", "body {\n", " scrollbar-color: var(--scroll-fg) var(--scroll-bg);\n", "}\n", "body::-webkit-scrollbar {\n", " width: 10px; &sol;* Mostly for vertical scrollbars *&sol;\n", " height: 10px; &sol;* Mostly for horizontal scrollbars *&sol;\n", "}\n", "body::-webkit-scrollbar-thumb {\n", " background-color: var(--scroll-fg);\n", "}\n", "body::-webkit-scrollbar-track {\n", " background-color: var(--scroll-bg);\n", "}\n", " &lt;&sol;style&gt;\n", " &lt;&sol;head&gt;\n", " &lt;body&gt;\n", " &lt;table class=&quot;dataframe&quot; id=&quot;df_-1157627882&quot;&gt;&lt;&sol;table&gt;\n", "\n", "&lt;p class=&quot;dataframe_description&quot;&gt;DataFrame: rowsCount = 11, columnsCount = 8&lt;&sol;p&gt;\n", "\n", " &lt;&sol;body&gt;\n", " &lt;script&gt;\n", " (function () {\n", " window.DataFrame = window.DataFrame || new (function () {\n", " this.addTable = function (df) {\n", " let cols = df.cols;\n", " for (let i = 0; i &lt; cols.length; i++) {\n", " for (let c of cols[i].children) {\n", " cols[c].parent = i;\n", " }\n", " }\n", " df.nrow = 0\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " if (df.cols[i].values.length &gt; df.nrow) df.nrow = df.cols[i].values.length\n", " }\n", " if (df.id === df.rootId) {\n", " df.expandedFrames = new Set()\n", " df.childFrames = {}\n", " const table = this.getTableElement(df.id)\n", " table.df = df\n", " for (let i = 0; i &lt; df.cols.length; i++) {\n", " let col = df.cols[i]\n", " if (col.parent === undefined &amp;&amp; col.children.length &gt; 0) col.expanded = true\n", " }\n", " } else {\n", " const rootDf = this.getTableData(df.rootId)\n", " rootDf.childFrames[df.id] = df\n", " }\n", " }\n", "\n", " this.computeRenderData = function (df) {\n", " let result = []\n", " let pos = 0\n", " for (let col = 0; col &lt; df.cols.length; col++) {\n", " if (df.cols[col].parent === undefined)\n", " pos += this.computeRenderDataRec(df.cols, col, pos, 0, result, false, false)\n", " }\n", " for (let i = 0; i &lt; result.length; i++) {\n", " let row = result[i]\n", " for (let j = 0; j &lt; row.length; j++) {\n", " let cell = row[j]\n", " if (j === 0)\n", " cell.leftBd = false\n", " if (j &lt; row.length - 1) {\n", " let nextData = row[j + 1]\n", " if (nextData.leftBd) cell.rightBd = true\n", " else if (cell.rightBd) nextData.leftBd = true\n", " } else cell.rightBd = false\n", " }\n", " }\n", " return result\n", " }\n", "\n", " this.computeRenderDataRec = function (cols, colId, pos, depth, result, leftBorder, rightBorder) {\n", " if (result.length === depth) {\n", " const array = [];\n", " if (pos &gt; 0) {\n", " let j = 0\n", " for (let i = 0; j &lt; pos; i++) {\n", " let c = result[depth - 1][i]\n", " j += c.span\n", " let copy = Object.assign({empty: true}, c)\n", " array.push(copy)\n", " }\n", " }\n", " result.push(array)\n", " }\n", " const col = cols[colId];\n", " let size = 0;\n", " if (col.expanded) {\n", " let childPos = pos\n", " for (let i = 0; i &lt; col.children.length; i++) {\n", " let child = col.children[i]\n", " let childLeft = i === 0 &amp;&amp; (col.children.length &gt; 1 || leftBorder)\n", " let childRight = i === col.children.length - 1 &amp;&amp; (col.children.length &gt; 1 || rightBorder)\n", " let childSize = this.computeRenderDataRec(cols, child, childPos, depth + 1, result, childLeft, childRight)\n", " childPos += childSize\n", " size += childSize\n", " }\n", " } else {\n", " for (let i = depth + 1; i &lt; result.length; i++)\n", " result[i].push({id: colId, span: 1, leftBd: leftBorder, rightBd: rightBorder, empty: true})\n", " size = 1\n", " }\n", " let left = leftBorder\n", " let right = rightBorder\n", " if (size &gt; 1) {\n", " left = true\n", " right = true\n", " }\n", " result[depth].push({id: colId, span: size, leftBd: left, rightBd: right})\n", " return size\n", " }\n", "\n", " this.getTableElement = function (id) {\n", " return document.getElementById(&quot;df_&quot; + id)\n", " }\n", "\n", " this.getTableData = function (id) {\n", " return this.getTableElement(id).df\n", " }\n", "\n", " this.createExpander = function (isExpanded) {\n", " const svgNs = &quot;http:&sol;&sol;www.w3.org&sol;2000&sol;svg&quot;\n", " let svg = document.createElementNS(svgNs, &quot;svg&quot;)\n", " svg.classList.add(&quot;expanderSvg&quot;)\n", " let path = document.createElementNS(svgNs, &quot;path&quot;)\n", " if (isExpanded) {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;0 -2 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 4 4 4 -4 -1 -1 -3 3Z&quot;)\n", " } else {\n", " svg.setAttribute(&quot;viewBox&quot;, &quot;-2 0 8 8&quot;)\n", " path.setAttribute(&quot;d&quot;, &quot;M1 0 l-1 1 3 3 -3 3 1 1 4 -4Z&quot;)\n", " }\n", " path.setAttribute(&quot;fill&quot;, &quot;currentColor&quot;)\n", " svg.appendChild(path)\n", " return svg\n", " }\n", "\n", " this.renderTable = function (id) {\n", "\n", " let table = this.getTableElement(id)\n", "\n", " if (table === null) return\n", "\n", " table.innerHTML = &quot;&quot;\n", "\n", " let df = table.df\n", " let rootDf = df.rootId === df.id ? df : this.getTableData(df.rootId)\n", "\n", " &sol;&sol; header\n", " let header = document.createElement(&quot;thead&quot;)\n", " table.appendChild(header)\n", "\n", " let renderData = this.computeRenderData(df)\n", " for (let j = 0; j &lt; renderData.length; j++) {\n", " let rowData = renderData[j]\n", " let tr = document.createElement(&quot;tr&quot;);\n", " let isLastRow = j === renderData.length - 1\n", " header.appendChild(tr);\n", " for (let i = 0; i &lt; rowData.length; i++) {\n", " let cell = rowData[i]\n", " let th = document.createElement(&quot;th&quot;);\n", " th.setAttribute(&quot;colspan&quot;, cell.span)\n", " let colId = cell.id\n", " let col = df.cols[colId];\n", " if (!cell.empty) {\n", " if (col.children.length === 0) {\n", " th.innerHTML = col.name\n", " } else {\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " col.expanded = !col.expanded\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(col.expanded))\n", " link.innerHTML += col.name\n", " th.appendChild(link)\n", " }\n", " }\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (isLastRow)\n", " classes += &quot; bottomBorder&quot;\n", " if (classes.length &gt; 0)\n", " th.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(th)\n", " }\n", " }\n", "\n", " &sol;&sol; body\n", " let body = document.createElement(&quot;tbody&quot;)\n", " table.appendChild(body)\n", "\n", " let columns = renderData.pop()\n", " for (let row = 0; row &lt; df.nrow; row++) {\n", " let tr = document.createElement(&quot;tr&quot;);\n", " body.appendChild(tr)\n", " for (let i = 0; i &lt; columns.length; i++) {\n", " let cell = columns[i]\n", " let td = document.createElement(&quot;td&quot;);\n", " let colId = cell.id\n", " let col = df.cols[colId]\n", " let classes = (cell.leftBd ? &quot; leftBorder&quot; : &quot;&quot;) + (cell.rightBd ? &quot; rightBorder&quot; : &quot;&quot;)\n", " if (col.rightAlign)\n", " classes += &quot; rightAlign&quot;\n", " if (classes.length &gt; 0)\n", " td.setAttribute(&quot;class&quot;, classes)\n", " tr.appendChild(td)\n", " let value = col.values[row]\n", " if (value.frameId !== undefined) {\n", " let frameId = value.frameId\n", " let expanded = rootDf.expandedFrames.has(frameId)\n", " let link = document.createElement(&quot;a&quot;)\n", " link.className = &quot;expander&quot;\n", " let that = this\n", " link.onclick = function () {\n", " if (rootDf.expandedFrames.has(frameId))\n", " rootDf.expandedFrames.delete(frameId)\n", " else rootDf.expandedFrames.add(frameId)\n", " that.renderTable(id)\n", " }\n", " link.appendChild(this.createExpander(expanded))\n", " link.innerHTML += value.value\n", " if (expanded) {\n", " td.appendChild(link)\n", " td.appendChild(document.createElement(&quot;p&quot;))\n", " const childTable = document.createElement(&quot;table&quot;)\n", " childTable.className = &quot;dataframe&quot;\n", " childTable.id = &quot;df_&quot; + frameId\n", " let childDf = rootDf.childFrames[frameId]\n", " childTable.df = childDf\n", " td.appendChild(childTable)\n", " this.renderTable(frameId)\n", " if (childDf.nrow !== childDf.totalRows) {\n", " const footer = document.createElement(&quot;p&quot;)\n", " footer.innerText = `... showing only top ${childDf.nrow} of ${childDf.totalRows} rows`\n", " td.appendChild(footer)\n", " }\n", " } else {\n", " td.appendChild(link)\n", " }\n", " } else if (value.style !== undefined) {\n", " td.innerHTML = value.value\n", " td.setAttribute(&quot;style&quot;, value.style)\n", " } else td.innerHTML = value\n", " this.nodeScriptReplace(td)\n", " }\n", " }\n", " }\n", "\n", " this.nodeScriptReplace = function (node) {\n", " if (this.nodeScriptIs(node) === true) {\n", " node.parentNode.replaceChild(this.nodeScriptClone(node), node);\n", " } else {\n", " let i = -1, children = node.childNodes;\n", " while (++i &lt; children.length) {\n", " this.nodeScriptReplace(children[i]);\n", " }\n", " }\n", "\n", " return node;\n", " }\n", "\n", " this.nodeScriptClone = function (node) {\n", " let script = document.createElement(&quot;script&quot;);\n", " script.text = node.innerHTML;\n", "\n", " let i = -1, attrs = node.attributes, attr;\n", " while (++i &lt; attrs.length) {\n", " script.setAttribute((attr = attrs[i]).name, attr.value);\n", " }\n", " return script;\n", " }\n", "\n", " this.nodeScriptIs = function (node) {\n", " return node.tagName === 'SCRIPT';\n", " }\n", " })()\n", "\n", " window.call_DataFrame = function (f) {\n", " return f();\n", " };\n", "\n", " let funQueue = window[&quot;kotlinQueues&quot;] &amp;&amp; window[&quot;kotlinQueues&quot;][&quot;DataFrame&quot;];\n", " if (funQueue) {\n", " funQueue.forEach(function (f) {\n", " f();\n", " });\n", " funQueue = [];\n", " }\n", "})()\n", "\n", "&sol;*&lt;!--*&sol;\n", "call_DataFrame(function() { DataFrame.addTable({ cols: [{ name: &quot;&lt;span title=&bsol;&quot;distribution: String&bsol;&quot;&gt;distribution&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;All 1&amp;#39;s&quot;,&quot;All 6&amp;#39;s&quot;,&quot;Even buckets - All fail&quot;,&quot;Even buckets - All succed&quot;,&quot;Even buckets - Half succeed&quot;,&quot;Scewed towards bottom&quot;,&quot;Scewed towards top&quot;,&quot;Random (4+)&quot;,&quot;Random 1&quot;,&quot;Random 2&quot;,&quot;Random 3&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;jsd: Double&bsol;&quot;&gt;jsd&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.654858&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.654858&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.055145&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.059779&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.002482&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.006924&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.004032&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.005037&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;adjustedJSD: Double&bsol;&quot;&gt;adjustedJSD&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.915791&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.908715&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.996210&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.989426&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.993842&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.992308&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;FFB Luck: Double&bsol;&quot;&gt;FFB Luck&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.500000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.284483&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.691604&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.491667&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.424620&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.512951&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.596568&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;zScore: Double?&bsol;&quot;&gt;zScore&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-11.962754&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;11.867150&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;null&bsol;&quot;&gt;null&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;null&bsol;&quot;&gt;null&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-4.313146&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;4.044112&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-0.182574&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-1.858757&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.311458&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;1.576281&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;normalDist%: Double?&bsol;&quot;&gt;normalDist%&lt;&sol;span&gt;&quot;, children: [], rightAlign: true, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;null&bsol;&quot;&gt;null&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;null&bsol;&quot;&gt;null&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;50.000000&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-0.000805&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.002626&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-42.756607&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-3.153082&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;37.772629&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;5.748050&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;luckSym: Any&bsol;&quot;&gt;luckSym&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-14.4&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;-93.6&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;24.3&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;88.3&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "{ name: &quot;&lt;span title=&bsol;&quot;luckSymPercentile: Any&bsol;&quot;&gt;luckSymPercentile&lt;&sol;span&gt;&quot;, children: [], rightAlign: false, values: [&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;50.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;0.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;100.0&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;42.8&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;3.2&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;62.2&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;,&quot;&lt;span class=&bsol;&quot;formatted&bsol;&quot; title=&bsol;&quot;&bsol;&quot;&gt;&lt;span class=&bsol;&quot;numbers&bsol;&quot;&gt;94.2&lt;&sol;span&gt;&lt;&sol;span&gt;&quot;] }, \n", "], id: -1157627882, rootId: -1157627882, totalRows: 11 } ) });\n", "&sol;*--&gt;*&sol;\n", "\n", "call_DataFrame(function() { DataFrame.renderTable(-1157627882) });\n", "\n", "\n", " &lt;&sol;script&gt;\n", " &lt;&sol;html&gt;\"></iframe>\n", " <script>\n", " function o_resize_iframe_out_12() {\n", " let elem = document.getElementById(\"iframe_out_12\");\n", " resize_iframe_out_12(elem);\n", " setInterval(resize_iframe_out_12, 5000, elem);\n", " }\n", " function resize_iframe_out_12(el) {\n", " let h = el.contentWindow.document.body.scrollHeight;\n", " el.height = h === 0 ? 0 : h + 41;\n", " }\n", " </script> <html theme='dark'>\n", " <head>\n", " <style type=\"text/css\">\n", " :root {\n", " --background: #fff;\n", " --background-odd: #f5f5f5;\n", " --background-hover: #d9edfd;\n", " --header-text-color: #474747;\n", " --text-color: #848484;\n", " --text-color-dark: #000;\n", " --text-color-medium: #737373;\n", " --text-color-pale: #b3b3b3;\n", " --inner-border-color: #aaa;\n", " --bold-border-color: #000;\n", " --link-color: #296eaa;\n", " --link-color-pale: #296eaa;\n", " --link-hover: #1a466c;\n", "}\n", "\n", ":root[theme=\"dark\"], :root [data-jp-theme-light=\"false\"], .dataframe_dark{\n", " --background: #303030;\n", " --background-odd: #3c3c3c;\n", " --background-hover: #464646;\n", " --header-text-color: #dddddd;\n", " --text-color: #b3b3b3;\n", " --text-color-dark: #dddddd;\n", " --text-color-medium: #b2b2b2;\n", " --text-color-pale: #737373;\n", " --inner-border-color: #707070;\n", " --bold-border-color: #777777;\n", " --link-color: #008dc0;\n", " --link-color-pale: #97e1fb;\n", " --link-hover: #00688e;\n", "}\n", "\n", "p.dataframe_description {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe {\n", " font-family: \"Helvetica Neue\", Helvetica, Arial, sans-serif;\n", " font-size: 12px;\n", " background-color: var(--background);\n", " color: var(--text-color-dark);\n", " border: none;\n", " border-collapse: collapse;\n", "}\n", "\n", "table.dataframe th, td {\n", " padding: 6px;\n", " border: 1px solid transparent;\n", " text-align: left;\n", "}\n", "\n", "table.dataframe th {\n", " background-color: var(--background);\n", " color: var(--header-text-color);\n", "}\n", "\n", "table.dataframe td {\n", " vertical-align: top;\n", " white-space: nowrap;\n", "}\n", "\n", "table.dataframe th.bottomBorder {\n", " border-bottom-color: var(--bold-border-color);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(odd) {\n", " background: var(--background-odd);\n", "}\n", "\n", "table.dataframe tbody > tr:nth-child(even) {\n", " background: var(--background);\n", "}\n", "\n", "table.dataframe tbody > tr:hover {\n", " background: var(--background-hover);\n", "}\n", "\n", "table.dataframe a {\n", " cursor: pointer;\n", " color: var(--link-color);\n", " text-decoration: none;\n", "}\n", "\n", "table.dataframe tr:hover > td a {\n", " color: var(--link-color-pale);\n", "}\n", "\n", "table.dataframe a:hover {\n", " color: var(--link-hover);\n", " text-decoration: underline;\n", "}\n", "\n", "table.dataframe img {\n", " max-width: fit-content;\n", "}\n", "\n", "table.dataframe th.complex {\n", " background-color: var(--background);\n", " border: 1px solid var(--background);\n", "}\n", "\n", "table.dataframe .leftBorder {\n", " border-left-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightBorder {\n", " border-right-color: var(--inner-border-color);\n", "}\n", "\n", "table.dataframe .rightAlign {\n", " text-align: right;\n", "}\n", "\n", "table.dataframe .expanderSvg {\n", " width: 8px;\n", " height: 8px;\n", " margin-right: 3px;\n", "}\n", "\n", "table.dataframe .expander {\n", " display: flex;\n", " align-items: center;\n", "}\n", "\n", "/* formatting */\n", "\n", "table.dataframe .null {\n", " color: var(--text-color-pale);\n", "}\n", "\n", "table.dataframe .structural {\n", " color: var(--text-color-medium);\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .dataFrameCaption {\n", " font-weight: bold;\n", "}\n", "\n", "table.dataframe .numbers {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe td:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "table.dataframe tr:hover .formatted .structural, .null {\n", " color: var(--text-color-dark);\n", "}\n", "\n", "\n", " </style>\n", " </head>\n", " <body>\n", " <table class=\"dataframe\" id=\"static_df_-1157627881\"><thead><tr><th class=\"bottomBorder\" style=\"text-align:left\">distribution</th><th class=\"bottomBorder\" style=\"text-align:left\">jsd</th><th class=\"bottomBorder\" style=\"text-align:left\">adjustedJSD</th><th class=\"bottomBorder\" style=\"text-align:left\">FFB Luck</th><th class=\"bottomBorder\" style=\"text-align:left\">zScore</th><th class=\"bottomBorder\" style=\"text-align:left\">normalDist%</th><th class=\"bottomBorder\" style=\"text-align:left\">luckSym</th><th class=\"bottomBorder\" style=\"text-align:left\">luckSymPercentile</th></tr></thead><tbody><tr><td style=\"vertical-align:top\">All 1&#39;s</td><td style=\"vertical-align:top\">0.654858</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">-11.962754</td><td style=\"vertical-align:top\">-0.000000</td><td style=\"vertical-align:top\">-100.000000</td><td style=\"vertical-align:top\">0.000000</td></tr><tr><td style=\"vertical-align:top\">All 6&#39;s</td><td style=\"vertical-align:top\">0.654858</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">1.000000</td><td style=\"vertical-align:top\">11.867150</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">100.000000</td><td style=\"vertical-align:top\">100.000000</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All fail</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">1.000000</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">null</td><td style=\"vertical-align:top\">null</td><td style=\"vertical-align:top\">-100.000000</td><td style=\"vertical-align:top\">0.000000</td></tr><tr><td style=\"vertical-align:top\">Even buckets - All succed</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">1.000000</td><td style=\"vertical-align:top\">1.000000</td><td style=\"vertical-align:top\">null</td><td style=\"vertical-align:top\">null</td><td style=\"vertical-align:top\">100.000000</td><td style=\"vertical-align:top\">100.000000</td></tr><tr><td style=\"vertical-align:top\">Even buckets - Half succeed</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">1.000000</td><td style=\"vertical-align:top\">0.500000</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">50.000000</td><td style=\"vertical-align:top\">0.000000</td><td style=\"vertical-align:top\">50.000000</td></tr><tr><td style=\"vertical-align:top\">Scewed towards bottom</td><td style=\"vertical-align:top\">0.055145</td><td style=\"vertical-align:top\">0.915791</td><td style=\"vertical-align:top\">0.284483</td><td style=\"vertical-align:top\">-4.313146</td><td style=\"vertical-align:top\">-0.000805</td><td style=\"vertical-align:top\">-99.998497</td><td style=\"vertical-align:top\">0.000751</td></tr><tr><td style=\"vertical-align:top\">Scewed towards top</td><td style=\"vertical-align:top\">0.059779</td><td style=\"vertical-align:top\">0.908715</td><td style=\"vertical-align:top\">0.691604</td><td style=\"vertical-align:top\">4.044112</td><td style=\"vertical-align:top\">0.002626</td><td style=\"vertical-align:top\">99.995101</td><td style=\"vertical-align:top\">99.997551</td></tr><tr><td style=\"vertical-align:top\">Random (4+)</td><td style=\"vertical-align:top\">0.002482</td><td style=\"vertical-align:top\">0.996210</td><td style=\"vertical-align:top\">0.491667</td><td style=\"vertical-align:top\">-0.182574</td><td style=\"vertical-align:top\">-42.756607</td><td style=\"vertical-align:top\">-14.417840</td><td style=\"vertical-align:top\">42.791080</td></tr><tr><td style=\"vertical-align:top\">Random 1</td><td style=\"vertical-align:top\">0.006924</td><td style=\"vertical-align:top\">0.989426</td><td style=\"vertical-align:top\">0.424620</td><td style=\"vertical-align:top\">-1.858757</td><td style=\"vertical-align:top\">-3.153082</td><td style=\"vertical-align:top\">-93.573787</td><td style=\"vertical-align:top\">3.213106</td></tr><tr><td style=\"vertical-align:top\">Random 2</td><td style=\"vertical-align:top\">0.004032</td><td style=\"vertical-align:top\">0.993842</td><td style=\"vertical-align:top\">0.512951</td><td style=\"vertical-align:top\">0.311458</td><td style=\"vertical-align:top\">37.772629</td><td style=\"vertical-align:top\">24.336664</td><td style=\"vertical-align:top\">62.168332</td></tr><tr><td style=\"vertical-align:top\">Random 3</td><td style=\"vertical-align:top\">0.005037</td><td style=\"vertical-align:top\">0.992308</td><td style=\"vertical-align:top\">0.596568</td><td style=\"vertical-align:top\">1.576281</td><td style=\"vertical-align:top\">5.748050</td><td style=\"vertical-align:top\">88.322126</td><td style=\"vertical-align:top\">94.161063</td></tr></tbody></table>\n", " </body>\n", " <script>\n", " document.getElementById(\"static_df_-1157627881\").style.display = \"none\";\n", " </script>\n", " </html>" ],
"application/kotlindataframe+json" : "{\"$version\":\"2.1.1\",\"metadata\":{\"columns\":[\"distribution\",\"jsd\",\"adjustedJSD\",\"FFB Luck\",\"zScore\",\"normalDist%\",\"luckSym\",\"luckSymPercentile\"],\"types\":[{\"kind\":\"ValueColumn\",\"type\":\"kotlin.String\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double?\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Double?\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Any\"},{\"kind\":\"ValueColumn\",\"type\":\"kotlin.Any\"}],\"nrow\":11,\"ncol\":8},\"kotlin_dataframe\":[{\"distribution\":\"All 1's\",\"jsd\":0.6548575458269756,\"adjustedJSD\":4.119314821038707E-11,\"FFB Luck\":0.0,\"zScore\":-11.962753722931613,\"normalDist%\":-0.0,\"luckSym\":\"-100.0\",\"luckSymPercentile\":\"0.0\"},{\"distribution\":\"All 6's\",\"jsd\":0.6548575458269756,\"adjustedJSD\":4.119314821038707E-11,\"FFB Luck\":1.0,\"zScore\":11.867149605784947,\"normalDist%\":0.0,\"luckSym\":\"100.0000000000004\",\"luckSymPercentile\":\"100.0000000000002\"},{\"distribution\":\"Even buckets - All fail\",\"jsd\":0.0,\"adjustedJSD\":1.0,\"FFB Luck\":0.0,\"zScore\":null,\"normalDist%\":null,\"luckSym\":\"-100.0\",\"luckSymPercentile\":\"0.0\"},{\"distribution\":\"Even buckets - All succed\",\"jsd\":0.0,\"adjustedJSD\":1.0,\"FFB Luck\":1.0,\"zScore\":null,\"normalDist%\":null,\"luckSym\":\"100.0\",\"luckSymPercentile\":\"100.0\"},{\"distribution\":\"Even buckets - Half succeed\",\"jsd\":0.0,\"adjustedJSD\":1.0,\"FFB Luck\":0.5,\"zScore\":0.0,\"normalDist%\":50.0,\"luckSym\":\"2.220446049250313E-14\",\"luckSymPercentile\":\"50.000000000000014\"},{\"distribution\":\"Scewed towards bottom\",\"jsd\":0.05514474124552049,\"adjustedJSD\":0.9157912410123433,\"FFB Luck\":0.28448275862068995,\"zScore\":-4.313146128651913,\"normalDist%\":-8.047383087683713E-4,\"luckSym\":\"-99.99849725580138\",\"luckSymPercentile\":\"7.513720993088668E-4\"},{\"distribution\":\"Scewed towards top\",\"jsd\":0.05977887473465095,\"adjustedJSD\":0.9087146889914467,\"FFB Luck\":0.6916043225270161,\"zScore\":4.044111609448659,\"normalDist%\":0.0026260948221668023,\"luckSym\":\"99.99510121798447\",\"luckSymPercentile\":\"99.99755060899224\"},{\"distribution\":\"Random (4+)\",\"jsd\":0.0024820077233640193,\"adjustedJSD\":0.9962098509221087,\"FFB Luck\":0.49166666666666664,\"zScore\":-0.18257418583505536,\"normalDist%\":-42.7566070292353,\"luckSym\":\"-14.417840078891997\",\"luckSymPercentile\":\"42.791079960554\"},{\"distribution\":\"Random 1\",\"jsd\":0.006924380262487557,\"adjustedJSD\":0.98942612739687,\"FFB Luck\":0.4246201791975073,\"zScore\":-1.8587566552180916,\"normalDist%\":-3.153081943852709,\"luckSym\":\"-93.5737874558042\",\"luckSymPercentile\":\"3.2131062720979027\"},{\"distribution\":\"Random 2\",\"jsd\":0.004032435849078475,\"adjustedJSD\":0.9938422701625094,\"FFB Luck\":0.5129514775629337,\"zScore\":0.31145784309268787,\"normalDist%\":37.772629324558004,\"luckSym\":\"24.336664151898812\",\"luckSymPercentile\":\"62.16833207594941\"},{\"distribution\":\"Random 3\",\"jsd\":0.005037249228076367,\"adjustedJSD\":0.9923078702224883,\"FFB Luck\":0.5965682362330412,\"zScore\":1.5762812492341312,\"normalDist%\":5.7480500483650605,\"luckSym\":\"88.32212628082203\",\"luckSymPercentile\":\"94.16106314041102\"}]}"
},
"execution_count" : 11,
"metadata" : { },
"output_type" : "execute_result"
} ],
"execution_count" : 11
} ],
"metadata" : {
"kernelspec" : {
"display_name" : "Kotlin",
"language" : "kotlin",
"name" : "kotlin"
},
"language_info" : {
"name" : "kotlin",
"version" : "2.2.20-Beta2",
"mimetype" : "text/x-kotlin",
"file_extension" : ".kt",
"pygments_lexer" : "kotlin",
"codemirror_mode" : "text/x-kotlin",
"nbconvert_exporter" : ""
}
},
"nbformat" : 4,
"nbformat_minor" : 0
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment