{"id":1907,"date":"2026-06-24T15:47:58","date_gmt":"2026-06-24T08:47:58","guid":{"rendered":"https:\/\/people.usd.ac.id\/~ydkristanto\/?page_id=1907"},"modified":"2026-06-24T16:42:34","modified_gmt":"2026-06-24T09:42:34","slug":"discovering-the-idea-behind-the-chi-squared-test","status":"publish","type":"page","link":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/","title":{"rendered":"Discovering the Idea Behind the Chi-Squared Test"},"content":{"rendered":"\n<div class=\"wp-block-buttons is-content-justification-right\">\n<div class=\"wp-block-button is-style-outline\"><a class=\"wp-block-button__link\" href=\"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/media-pengajaran\/menemukan-ide-di-balik-uji-chi-kuadrat\/\">ID<\/a><\/div>\n<\/div>\n\n\n\n<p class=\"has-drop-cap\">Imagine asking a group of children, &#8220;What makes you well liked by your classmates?&#8221; Would they say that good grades, sports, attractive appearance, or having lots of money are most important? Would girls and boys give different answers? Questions like these were investigated by <a href=\"https:\/\/doi.org\/10.1080\/02701367.1992.10608764\" target=\"_blank\" rel=\"noreferrer noopener\">a group of researchers at Michigan State University in the United States<\/a>. Part of their data is shown in <a href=\"#figure-1\">Figure 1<\/a>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\" id=\"figure-1\"><img loading=\"lazy\" width=\"1200\" height=\"675\" src=\"https:\/\/people.usd.ac.id\/~ydkristanto\/wp-content\/uploads\/2026\/06\/gender-personal-popularity-en.png\" alt=\"A stacked bar chart showing the proportions of choices made by two groups: boys and girls. Each bar is divided into four categories: grades, sports, appearance, and money. Among boys, sports is the most frequently chosen factor for being well liked by classmates. Among girls, appearance is the most frequently chosen factor. Grades are chosen at similar rates by both groups, while money is the least frequently chosen option for both boys and girls.\" class=\"wp-image-1908\"\/><figcaption>Figure 1: Preferences of girls and boys regarding the factor they considered most important for being well liked by their classmates<\/figcaption><\/figure>\n\n\n\n<p>The data shown in <a href=\"#figure-1\">Figure 1<\/a> are represented more clearly in <a href=\"#calculator1\">Visualization 1<\/a>. In this visualization, each child is represented by a square, and the color of the square indicates that child&#8217;s preference. The 16 squares in the top row represent the preferences of girls, while the 16 squares in the bottom row represent the preferences of boys.<\/p>\n\n\n\n<p>Take another look at <a href=\"#figure-1\">Figure 1<\/a>. Do the differences shown in the data suggest a relationship between gender and children&#8217;s preferences? Or could these differences have arisen by chance alone? In this interactive simulation, you will explore how the chi-squared test helps answer this question.<\/p>\n\n\n\n<div class=\"wp-block-group alignfull has-gray-background-color has-background\"><div class=\"wp-block-group__inner-container\">\n<h3>Could the Differences Be Due to Chance?<\/h3>\n\n\n\n<p>Let&#8217;s imagine that gender has no influence on children&#8217;s preferences. If that were true, what might the data look like? Click &#8220;Shuffle&#8221; to find out!<\/p>\n\n\n\n<div class=\"wp-block-columns alignwide\">\n<div class=\"wp-block-column\">\n<figure>\n<div id=\"calculator1\" class=\"aligncenter size-full\" style=\"width: 400px; height: 400px;\"><\/div>\n<figcaption>Visualization 1: Original data (adapted from <a href=\"https:\/\/doi.org\/10.1080\/02701367.1992.10608764\" target=\"_blank\" rel=\"noopener\">Chase &amp; Dummer (1992)<\/a>]<\/figcaption>\n<\/figure>\n<\/div>\n\n\n\n<div class=\"wp-block-column\">\n<figure>\n<div id=\"calculator2\" class=\"aligncenter size-full\" style=\"width: 400px; height: 400px;\"><\/div>\n<figcaption>Visualization 2: Children&#8217;s preferences randomly reassigned (left), then sorted within each gender group (right)<\/figcaption>\n<\/figure>\n<\/div>\n<\/div>\n\n\n\n<p>The results of each shuffle in <a href=\"#calculator2\">Visualization 2<\/a> are also summarized in <a href=\"#contingency-table\">Table 1<\/a>. The corresponding <em>\u03c7<\/em>\u00b2 statistics from repeated shuffles are displayed in <a href=\"#calculator3\">Visualization 3<\/a>.<\/p>\n\n\n\n<table id=\"contingency-table\">\n  <caption>\n    Table 1: Distribution of preferences by gender\n  <\/caption>\n\n  <thead>\n    <tr>\n      <th>Gender<\/th>\n      <th>Grades<\/th>\n      <th>Sports<\/th>\n      <th>Appearance<\/th>\n      <th>Money<\/th>\n    <\/tr>\n  <\/thead>\n\n  <tbody>\n    <tr>\n      <td>Girls<\/td>\n      <td id=\"cell11\" style=\"text-align: right;\"><\/td>\n      <td id=\"cell12\" style=\"text-align: right;\"><\/td>\n      <td id=\"cell13\" style=\"text-align: right;\"><\/td>\n      <td id=\"cell14\" style=\"text-align: right;\"><\/td>\n    <\/tr>\n    <tr>\n      <td>Boys<\/td>\n      <td id=\"cell21\" style=\"text-align: right;\"><\/td>\n      <td id=\"cell22\" style=\"text-align: right;\"><\/td>\n      <td id=\"cell23\" style=\"text-align: right;\"><\/td>\n      <td id=\"cell24\" style=\"text-align: right;\"><\/td>\n    <\/tr>\n  <\/tbody>\n<\/table>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-group is-style-twentytwentyone-border\"><div class=\"wp-block-group__inner-container\">\n<p><strong>Note:<\/strong> In both <a href=\"#calculator1\">Visualization 1<\/a> and <a href=\"#calculator2\">Visualization 2<\/a>, you&#8217;ve seen the chi-squared statistic (<em>\u03c7<\/em>\u00b2). Put simply, this statistic measures how different the observed pattern in the data is from the pattern we would expect if there were no relationship between the two variables.<\/p>\n<\/div><\/div>\n\n\n\n<p>Now examine the distribution of <em>\u03c7<\/em>\u00b2 values in <a href=\"#calculator3\">Visualization 3<\/a>. Remember that these <em>\u03c7<\/em>\u00b2 values were generated under the assumption that gender has no influence on children&#8217;s preferences.<\/p>\n\n\n\n<figure>\n<div id=\"calculator3\" class=\"aligncenter size-full\" style=\"width: 480px; height: 360px;\"><\/div>\n<figcaption>Visualization 3: Distribution of <i>\u03c7<\/i>\u00b2 values from repeated shuffles<\/figcaption>\n<\/figure>\n\n<script>\n  var calculator1 = Desmos.GraphingCalculator(document.getElementById('calculator1'), {\n    expressions: false,\n    settingsMenu: false,\n    trace: false\n  });\n  var calculator2 = Desmos.GraphingCalculator(document.getElementById('calculator2'), {\n    expressions: false,\n    settingsMenu: false,\n    trace: false\n  });\n  var calculator3 = Desmos.GraphingCalculator(document.getElementById('calculator3'), {\n    expressions: false,\n    settingsMenu: false,\n    trace: false\n  });\n\n  var state1 = {\n    \"version\": 11,\n    \"graph\": {\n        \"viewport\": {\n            \"xmin\": -4,\n            \"ymin\": -5.2379636976454,\n            \"xmax\": 9,\n            \"ymax\": 14.2379636976454\n        },\n        \"showGrid\": false,\n        \"showXAxis\": false,\n        \"showYAxis\": false,\n        \"xAxisStep\": 1,\n        \"yAxisStep\": 1,\n        \"userLockedViewport\": true,\n        \"__v12ViewportLatexStash\": {\n            \"xmin\": \"-4\",\n            \"xmax\": \"9\",\n            \"ymin\": \"-5.2379636976454\",\n            \"ymax\": \"14.2379636976454\"\n        }\n    },\n    \"expressions\": {\n        \"list\": [\n            {\n                \"type\": \"folder\",\n                \"id\": \"2\",\n                \"title\": \"Data\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"9\",\n                \"folderId\": \"2\",\n                \"text\": \"x_1: 1 = Perempuan; 2 = Laki-laki\\ny_1: 1 = Nilai; 2 = Olahraga; 3 = Penampilan; 4 = Uang\\nData diadaptasi dari doi: 10.1080\/02701367.1992.10608764\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"19\",\n                \"folderId\": \"2\",\n                \"color\": \"#388c46\",\n                \"latex\": \"x_{1}=\\\\left[\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"18\",\n                \"folderId\": \"2\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"y_{1}=\\\\left[\\\\right]\"\n            },\n            {\n                \"type\": \"folder\",\n                \"id\": \"11\",\n                \"title\": \"Visualisasi\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"51\",\n                \"folderId\": \"11\",\n                \"text\": \"Posisi kartu:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"13\",\n                \"folderId\": \"11\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"L_{x}=\\\\operatorname{mod}([0...31],4)+1\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"15\",\n                \"folderId\": \"11\",\n                \"color\": \"#c74440\",\n                \"latex\": \"L_{y}=8-\\\\operatorname{floor}([0...31]\/4)\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"125\",\n                \"folderId\": \"11\",\n                \"text\": \"Posisi legenda:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"126\",\n                \"folderId\": \"11\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"l_{x}=\\\\left[5,5,5,5\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"127\",\n                \"folderId\": \"11\",\n                \"color\": \"#388c46\",\n                \"latex\": \"l_{y}=\\\\left[5.25,4.75,4.25,3.75\\\\right]\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"130\",\n                \"folderId\": \"11\",\n                \"text\": \"Isi legenda:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"128\",\n                \"folderId\": \"11\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(l_{x}-0.2,l_{y}-0.2\\\\right),\\\\left(l_{x}+0.2,l_{y}-0.2\\\\right),\\\\left(l_{x}+0.2,l_{y}+0.2\\\\right),\\\\left(l_{x}-0.2,l_{y}+0.2\\\\right)\\\\right)\",\n                \"lines\": false,\n                \"colorLatex\": \"w_{legenda}\",\n                \"fillOpacity\": \"1\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"134\",\n                \"folderId\": \"11\",\n                \"text\": \"Bingkai legenda:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"135\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(l_{x}-0.2,l_{y}-0.2\\\\right),\\\\left(l_{x}+0.2,l_{y}-0.2\\\\right),\\\\left(l_{x}+0.2,l_{y}+0.2\\\\right),\\\\left(l_{x}-0.2,l_{y}+0.2\\\\right)\\\\right)\",\n                \"fill\": false,\n                \"lineWidth\": \"1\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"136\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(5.25,5.25\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"Grades\",\n                \"hidden\": true,\n                \"labelOrientation\": \"right\",\n                \"labelSize\": \".7\",\n                \"pointOpacity\": \".8\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"137\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(5.25,4.75\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"Sports\",\n                \"hidden\": true,\n                \"labelOrientation\": \"right\",\n                \"labelSize\": \".7\",\n                \"pointOpacity\": \".8\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"138\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(5.25,4.25\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"Appearance\",\n                \"hidden\": true,\n                \"labelOrientation\": \"right\",\n                \"labelSize\": \".7\",\n                \"pointOpacity\": \".8\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"139\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(5.25,3.75\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"Money\",\n                \"hidden\": true,\n                \"labelOrientation\": \"right\",\n                \"labelSize\": \".7\",\n                \"pointOpacity\": \".8\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"25\",\n                \"folderId\": \"11\",\n                \"text\": \"Isi kartu:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"26\",\n                \"folderId\": \"11\",\n                \"color\": \"#c74440\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(L_{x}-0.4,L_{y}-0.4\\\\right),\\\\left(L_{x}+0.4,L_{y}-0.4\\\\right),\\\\left(L_{x}+0.4,L_{y}+0.4\\\\right),\\\\left(L_{x}-0.4,L_{y}+0.4\\\\right)\\\\right)\",\n                \"lines\": false,\n                \"colorLatex\": \"w_{kotak}\",\n                \"fillOpacity\": \"1\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"23\",\n                \"folderId\": \"11\",\n                \"text\": \"Bingkai kartu:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"16\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(L_{x}-0.4,L_{y}-0.4\\\\right),\\\\left(L_{x}+0.4,L_{y}-0.4\\\\right),\\\\left(L_{x}+0.4,L_{y}+0.4\\\\right),\\\\left(L_{x}-0.4,L_{y}+0.4\\\\right)\\\\right)\",\n                \"fillOpacity\": \"0\",\n                \"lineWidth\": \"1\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"141\",\n                \"folderId\": \"11\",\n                \"text\": \"Label kelompok:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"142\",\n                \"folderId\": \"11\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"t_{kelompok}=-1\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"143\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=8.4\\\\left\\\\{t_{kelompok}+0.3\\\\le x\\\\le t_{kelompok}+1.3\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"144\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=4.6\\\\left\\\\{t_{kelompok}+0.3\\\\le x\\\\le t_{kelompok}+1.3\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"145\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"x=t_{kelompok}+0.3\\\\left\\\\{4.6\\\\le y\\\\le8.4\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"146\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=4.4\\\\left\\\\{t_{kelompok}+0.3\\\\le x\\\\le t_{kelompok}+1.3\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"147\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=0.6\\\\left\\\\{t_{kelompok}+0.3\\\\le x\\\\le t_{kelompok}+1.3\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"148\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"x=t_{kelompok}+0.3\\\\left\\\\{0.6\\\\le y\\\\le4.4\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"149\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(t_{kelompok},6.5\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"Girls\",\n                \"hidden\": true,\n                \"labelSize\": \".8\",\n                \"pointOpacity\": \".8\",\n                \"labelAngle\": \"\\\\frac{\\\\pi}{2}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"150\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(t_{kelompok},2.5\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"Boys\",\n                \"hidden\": true,\n                \"labelSize\": \".8\",\n                \"pointOpacity\": \".8\",\n                \"labelAngle\": \"\\\\frac{\\\\pi}{2}\"\n            },\n            {\n                \"type\": \"folder\",\n                \"id\": \"94\",\n                \"title\": \"Perhitungan statistik\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"99\",\n                \"folderId\": \"94\",\n                \"text\": \"Frekuensi tiap sel:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"95\",\n                \"folderId\": \"94\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"f_{11}=3\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"100\",\n                \"folderId\": \"94\",\n                \"color\": \"#c74440\",\n                \"latex\": \"f_{12}=9\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"101\",\n                \"folderId\": \"94\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"f_{13}=3\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"102\",\n                \"folderId\": \"94\",\n                \"color\": \"#388c46\",\n                \"latex\": \"f_{14}=1\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"103\",\n                \"folderId\": \"94\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"f_{21}=3\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"104\",\n                \"folderId\": \"94\",\n                \"color\": \"#000000\",\n                \"latex\": \"f_{22}=2\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"105\",\n                \"folderId\": \"94\",\n                \"color\": \"#c74440\",\n                \"latex\": \"f_{23}=10\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"106\",\n                \"folderId\": \"94\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"f_{24}=1\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"117\",\n                \"folderId\": \"94\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"H_{f}=\\\\left[f_{11},f_{12},f_{13},f_{14},f_{21},f_{22},f_{23},f_{24}\\\\right]\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"108\",\n                \"folderId\": \"94\",\n                \"text\": \"Ekspektasi tiap sel:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"109\",\n                \"folderId\": \"94\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"E_{11}=\\\\frac{6\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"110\",\n                \"folderId\": \"94\",\n                \"color\": \"#000000\",\n                \"latex\": \"E_{12}=\\\\frac{11\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"111\",\n                \"folderId\": \"94\",\n                \"color\": \"#c74440\",\n                \"latex\": \"E_{13}=\\\\frac{13\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"112\",\n                \"folderId\": \"94\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"E_{14}=\\\\frac{2\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"113\",\n                \"folderId\": \"94\",\n                \"color\": \"#388c46\",\n                \"latex\": \"E_{21}=\\\\frac{6\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"114\",\n                \"folderId\": \"94\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"E_{22}=\\\\frac{11\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"115\",\n                \"folderId\": \"94\",\n                \"color\": \"#000000\",\n                \"latex\": \"E_{23}=\\\\frac{13\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"116\",\n                \"folderId\": \"94\",\n                \"color\": \"#c74440\",\n                \"latex\": \"E_{24}=\\\\frac{2\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"118\",\n                \"folderId\": \"94\",\n                \"color\": \"#388c46\",\n                \"latex\": \"H_{E}=\\\\left[E_{11},E_{12},E_{13},E_{14},E_{21},E_{22},E_{23},E_{24}\\\\right]\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"120\",\n                \"folderId\": \"94\",\n                \"text\": \"Chi kuadrat:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"121\",\n                \"folderId\": \"94\",\n                \"color\": \"#000000\",\n                \"latex\": \"c_{hi}=\\\\operatorname{total}\\\\left(\\\\frac{\\\\left(H_{f}-H_{E}\\\\right)^{2}}{H_{E}}\\\\right)\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"122\",\n                \"folderId\": \"94\",\n                \"color\": \"#c74440\",\n                \"latex\": \"t_{chi}=\\\\operatorname{round}\\\\left(c_{hi},4\\\\right)\"\n            },\n            {\n                \"type\": \"folder\",\n                \"id\": \"152\",\n                \"title\": \"Visualisasi chi kuadrat\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"154\",\n                \"folderId\": \"152\",\n                \"text\": \"Garis bilangan:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"155\",\n                \"folderId\": \"152\",\n                \"color\": \"#388c46\",\n                \"latex\": \"g_{kecil}=\\\\left[-3.4,-3.4+\\\\frac{11.8}{15}...8.4\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"156\",\n                \"folderId\": \"152\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"g_{besar}=\\\\left[-3.4,-3.4+5\\\\cdot\\\\frac{11.8}{15}...8.4\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"157\",\n                \"folderId\": \"152\",\n                \"color\": \"#000000\",\n                \"latex\": \"g_{teks}=\\\\left[0,5,10,15\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"158\",\n                \"folderId\": \"152\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=-0.5\\\\left\\\\{-3.4\\\\le x\\\\le8.4\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"159\",\n                \"folderId\": \"152\",\n                \"color\": \"#000000\",\n                \"latex\": \"x=g_{kecil}\\\\left\\\\{-0.6\\\\le y\\\\le-0.5\\\\right\\\\}\",\n                \"lineWidth\": \"1\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"160\",\n                \"folderId\": \"152\",\n                \"color\": \"#000000\",\n                \"latex\": \"x=g_{besar}\\\\left\\\\{-0.7\\\\le y\\\\le-0.5\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"161\",\n                \"folderId\": \"152\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(g_{besar},-0.7\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"${g_{teks}}\",\n                \"hidden\": true,\n                \"points\": false,\n                \"labelOrientation\": \"below\",\n                \"labelSize\": \".8\",\n                \"pointOpacity\": \".8\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"163\",\n                \"folderId\": \"152\",\n                \"text\": \"Titik chi kuadrat:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"164\",\n                \"folderId\": \"152\",\n                \"color\": \"#c74440\",\n                \"latex\": \"\\\\left(\\\\frac{59}{75}c_{hi}-3.4,-0.5\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"`\\\\chi^2=${t_{chi}}`\",\n                \"labelOrientation\": \"above\",\n                \"labelSize\": \".8\",\n                \"pointOpacity\": \"1\"\n            },\n            {\n                \"type\": \"folder\",\n                \"id\": \"28\",\n                \"title\": \"Warna\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"29\",\n                \"folderId\": \"28\",\n                \"color\": \"#000000\",\n                \"latex\": \"w_{putih}=\\\\operatorname{rgb}\\\\left(255,255,255\\\\right)\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"35\",\n                \"folderId\": \"28\",\n                \"color\": \"#000000\",\n                \"latex\": \"r_{0}\\\\left(x\\\\right)=\\\\left\\\\{x=1:166,x=2:31,x=3:178,x=4:51\\\\right\\\\}\",\n                \"hidden\": true\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"36\",\n                \"folderId\": \"28\",\n                \"color\": \"#c74440\",\n                \"latex\": \"g_{0}\\\\left(x\\\\right)=\\\\left\\\\{x=1:206,x=2:120,x=3:223,x=4:160\\\\right\\\\}\",\n                \"hidden\": true\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"37\",\n                \"folderId\": \"28\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"b_{0}\\\\left(x\\\\right)=\\\\left\\\\{x=1:227,x=2:180,x=3:138,x=4:44\\\\right\\\\}\",\n                \"hidden\": true\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"38\",\n                \"folderId\": \"28\",\n                \"color\": \"#388c46\",\n                \"latex\": \"w_{kotak}=\\\\operatorname{rgb}\\\\left(r_{0}\\\\left(y_{1}\\\\right),g_{0}\\\\left(y_{1}\\\\right),b_{0}\\\\left(y_{1}\\\\right)\\\\right)\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"131\",\n                \"folderId\": \"28\",\n                \"color\": \"#c74440\",\n                \"latex\": \"w_{legenda}=\\\\operatorname{rgb}\\\\left(r_{0}\\\\left(\\\\left[1,2,3,4\\\\right]\\\\right),g_{0}\\\\left(\\\\left[1,2,3,4\\\\right]\\\\right),b_{0}\\\\left(\\\\left[1,2,3,4\\\\right]\\\\right)\\\\right)\"\n            }\n        ]\n    },\n    \"includeFunctionParametersInRandomSeed\": true,\n    \"doNotMigrateMovablePointStyle\": true\n};\n\n  var state2 = {\n    \"version\": 11,\n    \"graph\": {\n        \"viewport\": {\n            \"xmin\": 0,\n            \"ymin\": -5.2379636976454,\n            \"xmax\": 13,\n            \"ymax\": 14.2379636976454\n        },\n        \"showGrid\": false,\n        \"showXAxis\": false,\n        \"showYAxis\": false,\n        \"xAxisStep\": 1,\n        \"yAxisStep\": 1,\n        \"userLockedViewport\": true,\n        \"__v12ViewportLatexStash\": {\n            \"xmin\": \"0\",\n            \"xmax\": \"13\",\n            \"ymin\": \"-5.2379636976454\",\n            \"ymax\": \"14.2379636976454\"\n        }\n    },\n    \"expressions\": {\n        \"list\": [\n            {\n                \"type\": \"folder\",\n                \"id\": \"2\",\n                \"title\": \"Data\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"9\",\n                \"folderId\": \"2\",\n                \"text\": \"x_1: 1 = Perempuan; 2 = Laki-laki\\ny_1: 1 = Nilai; 2 = Olahraga; 3 = Penampilan; 4 = Uang\\nData diadaptasi dari doi: 10.1080\/02701367.1992.10608764\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"19\",\n                \"folderId\": \"2\",\n                \"color\": \"#388c46\",\n                \"latex\": \"x_{1}=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"18\",\n                \"folderId\": \"2\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"y_{1}=[1,1,1,2,2,3,3,3,3,3,3,3,3,3,3,4,1,1,1,2,2,2,2,2,2,2,2,2,3,3,3,4]\"\n            },\n            {\n                \"type\": \"folder\",\n                \"id\": \"49\",\n                \"title\": \"Pengacakan\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"20\",\n                \"folderId\": \"49\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"R=\\\\left[0.8694,0.0255,0.3539,0.6391,0.4699,0.5349,0.5708,0.8651,0.8785,0.0789,0.8802,0.4599,0.5397,0.1435,0.3077,0.4312,0.5994,0.6214,0.2663,0.6545,0.5384,0.5085,0.0702,0.1358,0.0303,0.9143,0.9608,0.9407,0.8309,0.0934,0.0966,0.6608\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"21\",\n                \"folderId\": \"49\",\n                \"color\": \"#000000\",\n                \"latex\": \"a_{cak}=R\\\\to\\\\operatorname{round}\\\\left(\\\\operatorname{random}\\\\left(32\\\\right),4\\\\right)\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"30\",\n                \"folderId\": \"49\",\n                \"color\": \"#c74440\",\n                \"latex\": \"y_{2}=\\\\operatorname{sort}\\\\left(y_{1},R\\\\right)\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"39\",\n                \"folderId\": \"49\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"y_{21}=\\\\operatorname{sort}\\\\left(y_{2}\\\\left[1...16\\\\right]\\\\right)\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"40\",\n                \"folderId\": \"49\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"y_{22}=\\\\operatorname{sort}\\\\left(y_{2}\\\\left[17...32\\\\right]\\\\right)\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"41\",\n                \"folderId\": \"49\",\n                \"color\": \"#000000\",\n                \"latex\": \"y_{2urut}=\\\\operatorname{join}\\\\left(y_{21},y_{22}\\\\right)\"\n            },\n            {\n                \"type\": \"folder\",\n                \"id\": \"11\",\n                \"title\": \"Visualisasi\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"51\",\n                \"folderId\": \"11\",\n                \"text\": \"Posisi kartu:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"13\",\n                \"folderId\": \"11\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"L_{x}=\\\\operatorname{mod}([0...31],4)+1\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"15\",\n                \"folderId\": \"11\",\n                \"color\": \"#c74440\",\n                \"latex\": \"L_{y}=8-\\\\operatorname{floor}([0...31]\/4)\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"54\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"t_{engah}=\\\\frac{h+5}{2}\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"25\",\n                \"folderId\": \"11\",\n                \"text\": \"Isi kartu acak:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"26\",\n                \"folderId\": \"11\",\n                \"color\": \"#c74440\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(L_{x}-0.4,L_{y}-0.4\\\\right),\\\\left(L_{x}+0.4,L_{y}-0.4\\\\right),\\\\left(L_{x}+0.4,L_{y}+0.4\\\\right),\\\\left(L_{x}-0.4,L_{y}+0.4\\\\right)\\\\right)\",\n                \"lines\": false,\n                \"colorLatex\": \"w_{kotak}\",\n                \"fillOpacity\": \"1\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"43\",\n                \"folderId\": \"11\",\n                \"text\": \"Isi kartu acak:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"45\",\n                \"folderId\": \"11\",\n                \"color\": \"#388c46\",\n                \"latex\": \"h=8\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"44\",\n                \"folderId\": \"11\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(L_{x}-0.4+h,L_{y}-0.4\\\\right),\\\\left(L_{x}+0.4+h,L_{y}-0.4\\\\right),\\\\left(L_{x}+0.4+h,L_{y}+0.4\\\\right),\\\\left(L_{x}-0.4+h,L_{y}+0.4\\\\right)\\\\right)\",\n                \"lines\": false,\n                \"colorLatex\": \"w_{kotakUrut}\",\n                \"fillOpacity\": \"1\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"23\",\n                \"folderId\": \"11\",\n                \"text\": \"Bingkai kartu:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"16\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(L_{x}-0.4,L_{y}-0.4\\\\right),\\\\left(L_{x}+0.4,L_{y}-0.4\\\\right),\\\\left(L_{x}+0.4,L_{y}+0.4\\\\right),\\\\left(L_{x}-0.4,L_{y}+0.4\\\\right)\\\\right)\",\n                \"fillOpacity\": \"0\",\n                \"lineWidth\": \"1\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"47\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(L_{x}-0.4+h,L_{y}-0.4\\\\right),\\\\left(L_{x}+0.4+h,L_{y}-0.4\\\\right),\\\\left(L_{x}+0.4+h,L_{y}+0.4\\\\right),\\\\left(L_{x}-0.4+h,L_{y}+0.4\\\\right)\\\\right)\",\n                \"fillOpacity\": \"0\",\n                \"lineWidth\": \"1\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"62\",\n                \"folderId\": \"11\",\n                \"text\": \"Label:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"67\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=8.4\\\\left\\\\{t_{engah}-1.3\\\\le x\\\\le t_{engah}-0.3\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"68\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=4.6\\\\left\\\\{t_{engah}-1.3\\\\le x\\\\le t_{engah}-0.3\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"65\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"x=t_{engah}-0.3\\\\left\\\\{4.6\\\\le y\\\\le8.4\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"70\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=4.4\\\\left\\\\{t_{engah}-1.3\\\\le x\\\\le t_{engah}-0.3\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"69\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=0.6\\\\left\\\\{t_{engah}-1.3\\\\le x\\\\le t_{engah}-0.3\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"66\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"x=t_{engah}-0.3\\\\left\\\\{0.6\\\\le y\\\\le4.4\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"73\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=8.4\\\\left\\\\{t_{engah}+0.3\\\\le x\\\\le t_{engah}+1.3\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"74\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=4.6\\\\left\\\\{t_{engah}+0.3\\\\le x\\\\le t_{engah}+1.3\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"72\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"x=t_{engah}+0.3\\\\left\\\\{4.6\\\\le y\\\\le8.4\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"75\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=4.4\\\\left\\\\{t_{engah}+0.3\\\\le x\\\\le t_{engah}+1.3\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"76\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=0.6\\\\left\\\\{t_{engah}+0.3\\\\le x\\\\le t_{engah}+1.3\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"71\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"x=t_{engah}+0.3\\\\left\\\\{0.6\\\\le y\\\\le4.4\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"63\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(t_{engah},6.5\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"Girls\",\n                \"hidden\": true,\n                \"labelSize\": \".8\",\n                \"pointOpacity\": \".8\",\n                \"labelAngle\": \"\\\\frac{\\\\pi}{2}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"64\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(t_{engah},2.5\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"Boys\",\n                \"hidden\": true,\n                \"labelSize\": \".8\",\n                \"pointOpacity\": \".8\",\n                \"labelAngle\": \"\\\\frac{\\\\pi}{2}\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"56\",\n                \"folderId\": \"11\",\n                \"text\": \"Judul:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"58\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(2.5,9\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"Shuffle\",\n                \"hidden\": true,\n                \"labelSize\": \".9\",\n                \"pointOpacity\": \".8\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"57\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(t_{engah},9\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"Group\",\n                \"hidden\": true,\n                \"labelSize\": \".9\",\n                \"pointOpacity\": \".8\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"60\",\n                \"folderId\": \"11\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(10.5,9\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"Sort within Group\",\n                \"hidden\": true,\n                \"labelSize\": \".85\",\n                \"pointOpacity\": \".8\"\n            },\n            {\n                \"type\": \"folder\",\n                \"id\": \"94\",\n                \"title\": \"Perhitungan statistik\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"99\",\n                \"folderId\": \"94\",\n                \"text\": \"Frekuensi tiap sel:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"95\",\n                \"folderId\": \"94\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"f_{11}=\\\\left\\\\{n_{klik}=0:3,n_{klik}\\\\ge1:\\\\operatorname{length}\\\\left(y_{21}\\\\left[y_{21}=1\\\\right]\\\\right)\\\\right\\\\}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"100\",\n                \"folderId\": \"94\",\n                \"color\": \"#c74440\",\n                \"latex\": \"f_{12}=\\\\left\\\\{n_{klik}=0:2,n_{klik}\\\\ge1:\\\\operatorname{length}\\\\left(y_{21}\\\\left[y_{21}=2\\\\right]\\\\right)\\\\right\\\\}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"101\",\n                \"folderId\": \"94\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"f_{13}=\\\\left\\\\{n_{klik}=0:10,n_{klik}\\\\ge1:\\\\operatorname{length}\\\\left(y_{21}\\\\left[y_{21}=3\\\\right]\\\\right)\\\\right\\\\}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"102\",\n                \"folderId\": \"94\",\n                \"color\": \"#388c46\",\n                \"latex\": \"f_{14}=\\\\left\\\\{n_{klik}=0:1,n_{klik}\\\\ge1:\\\\operatorname{length}\\\\left(y_{21}\\\\left[y_{21}=4\\\\right]\\\\right)\\\\right\\\\}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"103\",\n                \"folderId\": \"94\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"f_{21}=\\\\left\\\\{n_{klik}=0:3,n_{klik}\\\\ge1:\\\\operatorname{length}\\\\left(y_{22}\\\\left[y_{22}=1\\\\right]\\\\right)\\\\right\\\\}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"104\",\n                \"folderId\": \"94\",\n                \"color\": \"#000000\",\n                \"latex\": \"f_{22}=\\\\left\\\\{n_{klik}=0:9,n_{klik}\\\\ge1:\\\\operatorname{length}\\\\left(y_{22}\\\\left[y_{22}=2\\\\right]\\\\right)\\\\right\\\\}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"105\",\n                \"folderId\": \"94\",\n                \"color\": \"#c74440\",\n                \"latex\": \"f_{23}=\\\\left\\\\{n_{klik}=0:3,n_{klik}\\\\ge1:\\\\operatorname{length}\\\\left(y_{22}\\\\left[y_{22}=3\\\\right]\\\\right)\\\\right\\\\}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"106\",\n                \"folderId\": \"94\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"f_{24}=\\\\left\\\\{n_{klik}=0:1,n_{klik}\\\\ge1:\\\\operatorname{length}\\\\left(y_{22}\\\\left[y_{22}=4\\\\right]\\\\right)\\\\right\\\\}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"117\",\n                \"folderId\": \"94\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"H_{f}=\\\\left[f_{11},f_{12},f_{13},f_{14},f_{21},f_{22},f_{23},f_{24}\\\\right]\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"108\",\n                \"folderId\": \"94\",\n                \"text\": \"Ekspektasi tiap sel:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"109\",\n                \"folderId\": \"94\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"E_{11}=\\\\frac{6\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"110\",\n                \"folderId\": \"94\",\n                \"color\": \"#000000\",\n                \"latex\": \"E_{12}=\\\\frac{11\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"111\",\n                \"folderId\": \"94\",\n                \"color\": \"#c74440\",\n                \"latex\": \"E_{13}=\\\\frac{13\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"112\",\n                \"folderId\": \"94\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"E_{14}=\\\\frac{2\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"113\",\n                \"folderId\": \"94\",\n                \"color\": \"#388c46\",\n                \"latex\": \"E_{21}=\\\\frac{6\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"114\",\n                \"folderId\": \"94\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"E_{22}=\\\\frac{11\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"115\",\n                \"folderId\": \"94\",\n                \"color\": \"#000000\",\n                \"latex\": \"E_{23}=\\\\frac{13\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"116\",\n                \"folderId\": \"94\",\n                \"color\": \"#c74440\",\n                \"latex\": \"E_{24}=\\\\frac{2\\\\cdot8}{16}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"118\",\n                \"folderId\": \"94\",\n                \"color\": \"#388c46\",\n                \"latex\": \"H_{E}=\\\\left[E_{11},E_{12},E_{13},E_{14},E_{21},E_{22},E_{23},E_{24}\\\\right]\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"120\",\n                \"folderId\": \"94\",\n                \"text\": \"Chi kuadrat:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"121\",\n                \"folderId\": \"94\",\n                \"color\": \"#000000\",\n                \"latex\": \"c_{hi}=\\\\left\\\\{n_{klik}=0:8.2238,n_{klik}\\\\ge1:\\\\operatorname{total}\\\\left(\\\\frac{\\\\left(H_{f}-H_{E}\\\\right)^{2}}{H_{E}}\\\\right)\\\\right\\\\}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"122\",\n                \"folderId\": \"94\",\n                \"color\": \"#c74440\",\n                \"latex\": \"t_{chi}=\\\\operatorname{round}\\\\left(c_{hi},4\\\\right)\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"138\",\n                \"folderId\": \"94\",\n                \"color\": \"#c74440\",\n                \"latex\": \"H_{chi}=\\\\left[\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"139\",\n                \"folderId\": \"94\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"t_{ambah}=H_{chi}\\\\to\\\\operatorname{join}\\\\left(H_{chi},c_{hi}\\\\right)\"\n            },\n            {\n                \"type\": \"folder\",\n                \"id\": \"125\",\n                \"title\": \"Visualisasi chi kuadrat\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"134\",\n                \"folderId\": \"125\",\n                \"text\": \"Garis bilangan:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"127\",\n                \"folderId\": \"125\",\n                \"color\": \"#388c46\",\n                \"latex\": \"g_{kecil}=\\\\left[0.6,0.6+\\\\frac{11.8}{15}...12.4\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"128\",\n                \"folderId\": \"125\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"g_{besar}=\\\\left[0.6,0.6+5\\\\cdot\\\\frac{11.8}{15}...12.4\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"131\",\n                \"folderId\": \"125\",\n                \"color\": \"#c74440\",\n                \"latex\": \"g_{teks}=\\\\left[0,5,10,15\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"126\",\n                \"folderId\": \"125\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=-0.5\\\\left\\\\{0.6\\\\le x\\\\le12.4\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"129\",\n                \"folderId\": \"125\",\n                \"color\": \"#000000\",\n                \"latex\": \"x=g_{kecil}\\\\left\\\\{-0.6\\\\le y\\\\le-0.5\\\\right\\\\}\",\n                \"lineWidth\": \"1\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"130\",\n                \"folderId\": \"125\",\n                \"color\": \"#000000\",\n                \"latex\": \"x=g_{besar}\\\\left\\\\{-0.7\\\\le y\\\\le-0.5\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"132\",\n                \"folderId\": \"125\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(g_{besar},-0.7\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"${g_teks}\",\n                \"hidden\": true,\n                \"labelOrientation\": \"below\",\n                \"labelSize\": \".8\",\n                \"pointOpacity\": \".8\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"136\",\n                \"folderId\": \"125\",\n                \"text\": \"Titik chi kuadrat:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"137\",\n                \"folderId\": \"125\",\n                \"color\": \"#c74440\",\n                \"latex\": \"\\\\left(\\\\frac{59}{75}c_{hi}+0.6,-0.5\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"`\\\\chi^2=${t_{chi}}`\",\n                \"labelOrientation\": \"above\",\n                \"labelSize\": \".8\"\n            },\n            {\n                \"type\": \"folder\",\n                \"id\": \"78\",\n                \"title\": \"Tombol\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"90\",\n                \"folderId\": \"78\",\n                \"text\": \"Parameter:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"91\",\n                \"folderId\": \"78\",\n                \"color\": \"#388c46\",\n                \"latex\": \"n_{klik}=0\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"80\",\n                \"folderId\": \"78\",\n                \"text\": \"Acak:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"81\",\n                \"folderId\": \"78\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(12.75,10.75\\\\right),\\\\left(9.75,10.75\\\\right),\\\\left(9.75,9.75\\\\right),\\\\left(12.75,9.75\\\\right)\\\\right)\",\n                \"lines\": false,\n                \"colorLatex\": \"w_{putih}\",\n                \"fillOpacity\": \"1\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"85\",\n                \"folderId\": \"78\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(12.75,10.75\\\\right),\\\\left(9.75,10.75\\\\right),\\\\left(9.75,9.75\\\\right),\\\\left(12.75,9.75\\\\right)\\\\right)\",\n                \"fillOpacity\": \"0\",\n                \"lineWidth\": \"1.5\",\n                \"clickableInfo\": {\n                    \"enabled\": true,\n                    \"latex\": \"n_{klik}\\\\to n_{klik}+1,a_{cak},t_{ambah}\"\n                }\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"87\",\n                \"folderId\": \"78\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(\\\\frac{12.75+9.75}{2},\\\\frac{10.75+9.75}{2}\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"Shuffle\",\n                \"hidden\": true,\n                \"labelSize\": \".8\",\n                \"pointOpacity\": \".8\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"83\",\n                \"folderId\": \"78\",\n                \"text\": \"Ulang:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"140\",\n                \"folderId\": \"78\",\n                \"color\": \"#c74440\",\n                \"latex\": \"u_{lang}=n_{klik}\\\\to0,H_{chi}\\\\to\\\\left[\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"84\",\n                \"folderId\": \"78\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(12.75-3.25,10.75\\\\right),\\\\left(9.75-3.25,10.75\\\\right),\\\\left(9.75-3.25,9.75\\\\right),\\\\left(12.75-3.25,9.75\\\\right)\\\\right)\\\\left\\\\{n_{klik}\\\\ge1\\\\right\\\\}\",\n                \"lines\": false,\n                \"colorLatex\": \"w_{putih}\",\n                \"fillOpacity\": \"1\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"86\",\n                \"folderId\": \"78\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(12.75-3.25,10.75\\\\right),\\\\left(9.75-3.25,10.75\\\\right),\\\\left(9.75-3.25,9.75\\\\right),\\\\left(12.75-3.25,9.75\\\\right)\\\\right)\\\\left\\\\{n_{klik}\\\\ge1\\\\right\\\\}\",\n                \"fillOpacity\": \"0\",\n                \"lineWidth\": \"1.5\",\n                \"clickableInfo\": {\n                    \"enabled\": true,\n                    \"latex\": \"u_{lang}\"\n                }\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"88\",\n                \"folderId\": \"78\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(\\\\frac{12.75+9.75}{2}-3.25,\\\\frac{10.75+9.75}{2}\\\\left\\\\{n_{klik}\\\\ge1\\\\right\\\\}\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"Reset\",\n                \"hidden\": true,\n                \"labelSize\": \".8\",\n                \"pointOpacity\": \".8\"\n            },\n            {\n                \"type\": \"folder\",\n                \"id\": \"28\",\n                \"title\": \"Warna\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"29\",\n                \"folderId\": \"28\",\n                \"color\": \"#000000\",\n                \"latex\": \"w_{putih}=\\\\operatorname{rgb}\\\\left(255,255,255\\\\right)\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"35\",\n                \"folderId\": \"28\",\n                \"color\": \"#000000\",\n                \"latex\": \"r_{0}\\\\left(x\\\\right)=\\\\left\\\\{x=1:166,x=2:31,x=3:178,x=4:51\\\\right\\\\}\",\n                \"hidden\": true\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"36\",\n                \"folderId\": \"28\",\n                \"color\": \"#c74440\",\n                \"latex\": \"g_{0}\\\\left(x\\\\right)=\\\\left\\\\{x=1:206,x=2:120,x=3:223,x=4:160\\\\right\\\\}\",\n                \"hidden\": true\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"37\",\n                \"folderId\": \"28\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"b_{0}\\\\left(x\\\\right)=\\\\left\\\\{x=1:227,x=2:180,x=3:138,x=4:44\\\\right\\\\}\",\n                \"hidden\": true\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"38\",\n                \"folderId\": \"28\",\n                \"color\": \"#388c46\",\n                \"latex\": \"w_{kotak}=\\\\left\\\\{n_{klik}=0:\\\\operatorname{rgb}\\\\left(r_{0}\\\\left(y_{1}\\\\right),g_{0}\\\\left(y_{1}\\\\right),b_{0}\\\\left(y_{1}\\\\right)\\\\right),n_{klik}\\\\ge1:\\\\operatorname{rgb}\\\\left(r_{0}\\\\left(y_{2}\\\\right),g_{0}\\\\left(y_{2}\\\\right),b_{0}\\\\left(y_{2}\\\\right)\\\\right)\\\\right\\\\}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"46\",\n                \"folderId\": \"28\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"w_{kotakUrut}=\\\\left\\\\{n_{klik}=0:\\\\operatorname{rgb}\\\\left(r_{0}\\\\left(y_{1}\\\\right),g_{0}\\\\left(y_{1}\\\\right),b_{0}\\\\left(y_{1}\\\\right)\\\\right),n_{klik}\\\\ge1:\\\\operatorname{rgb}\\\\left(r_{0}\\\\left(y_{2urut}\\\\right),g_{0}\\\\left(y_{2urut}\\\\right),b_{0}\\\\left(y_{2urut}\\\\right)\\\\right)\\\\right\\\\}\"\n            }\n        ]\n    },\n    \"includeFunctionParametersInRandomSeed\": true,\n    \"doNotMigrateMovablePointStyle\": true\n};\n  \n  var state3 = {\n    \"version\": 11,\n    \"graph\": {\n        \"viewport\": {\n            \"xmin\": -2.5,\n            \"ymin\": -0.3,\n            \"xmax\": 15,\n            \"ymax\": 1.2\n        },\n        \"showGrid\": false,\n        \"showXAxis\": false,\n        \"showYAxis\": false,\n        \"userLockedViewport\": true,\n        \"squareAxes\": false,\n        \"__v12ViewportLatexStash\": {\n            \"xmin\": \"-2.5\",\n            \"xmax\": \"15\",\n            \"ymin\": \"-0.3\",\n            \"ymax\": \"1.2\"\n        }\n    },\n    \"expressions\": {\n        \"list\": [\n            {\n                \"type\": \"folder\",\n                \"id\": \"8\",\n                \"title\": \"Variabel\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"1\",\n                \"folderId\": \"8\",\n                \"color\": \"#c74440\",\n                \"latex\": \"c_{hi}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"2\",\n                \"folderId\": \"8\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"H_{chi}=\\\\left[\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"44\",\n                \"folderId\": \"8\",\n                \"color\": \"#c74440\",\n                \"latex\": \"n_{klik}=0\"\n            },\n            {\n                \"type\": \"folder\",\n                \"id\": \"6\",\n                \"title\": \"Histogram\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"13\",\n                \"folderId\": \"6\",\n                \"text\": \"Dasar:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"16\",\n                \"folderId\": \"6\",\n                \"color\": \"#c74440\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(-0.2,-0.1\\\\right),\\\\left(11,-0.1\\\\right),\\\\left(11,1.1\\\\right),\\\\left(-0.2,1.1\\\\right)\\\\right)\",\n                \"lines\": false,\n                \"colorLatex\": \"w_{putih}\",\n                \"fillOpacity\": \"1\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"26\",\n                \"folderId\": \"6\",\n                \"text\": \"Kisi-kisi:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"27\",\n                \"folderId\": \"6\",\n                \"color\": \"#388c46\",\n                \"latex\": \"L_{y}=\\\\left[0,0.2,...1\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"28\",\n                \"folderId\": \"6\",\n                \"color\": \"#6042a6\",\n                \"latex\": \"L_{x}=\\\\left[0...15\\\\right]\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"38\",\n                \"folderId\": \"6\",\n                \"color\": \"#c74440\",\n                \"latex\": \"x=L_{x}\\\\left\\\\{-0.1\\\\le y\\\\le1.1\\\\right\\\\}\",\n                \"colorLatex\": \"w_{lightgray}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"39\",\n                \"folderId\": \"6\",\n                \"color\": \"#c74440\",\n                \"latex\": \"x=\\\\left[0.5,1.5...14.5\\\\right]\\\\left\\\\{-0.1\\\\le y\\\\le1.1\\\\right\\\\}\",\n                \"colorLatex\": \"w_{lightgray}\",\n                \"lineWidth\": \"1\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"40\",\n                \"folderId\": \"6\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"y=\\\\left[0.2,0.4...1\\\\right]\\\\left\\\\{-0.2\\\\le x\\\\le15\\\\right\\\\}\",\n                \"colorLatex\": \"w_{lightgray}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"41\",\n                \"folderId\": \"6\",\n                \"color\": \"#2d70b3\",\n                \"latex\": \"y=\\\\left[0.1,0.3...0.9\\\\right]\\\\left\\\\{-0.2\\\\le x\\\\le15\\\\right\\\\}\",\n                \"colorLatex\": \"w_{lightgray}\",\n                \"lineWidth\": \"1\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"15\",\n                \"folderId\": \"6\",\n                \"text\": \"Histogram:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"3\",\n                \"folderId\": \"6\",\n                \"color\": \"#388c46\",\n                \"latex\": \"H=\\\\operatorname{join}\\\\left(H_{chi},c_{hi}\\\\right)\\\\left\\\\{n_{klik}\\\\ge1\\\\right\\\\}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"4\",\n                \"folderId\": \"6\",\n                \"color\": \"#c74440\",\n                \"latex\": \"\\\\operatorname{histogram}\\\\left(H,1\\\\right)\",\n                \"disableGraphInteractions\": true,\n                \"dragMode\": \"NONE\",\n                \"vizProps\": {\n                    \"binAlignment\": \"left\",\n                    \"histogramMode\": \"relative\"\n                }\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"17\",\n                \"folderId\": \"6\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=0\\\\left\\\\{-0.2\\\\le x\\\\right\\\\}\",\n                \"colorLatex\": \"w_{lightgray}\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"10\",\n                \"folderId\": \"6\",\n                \"color\": \"#c74440\",\n                \"latex\": \"\\\\left(H_{chi},-0.05\\\\right)\",\n                \"pointOpacity\": \".5\",\n                \"pointSize\": \"8\",\n                \"movablePointSize\": \"8\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"11\",\n                \"folderId\": \"6\",\n                \"color\": \"#c74440\",\n                \"latex\": \"\\\\left(c_{hi},-0.05\\\\right)\\\\left\\\\{n_{klik}\\\\ge1\\\\right\\\\}\",\n                \"dragMode\": \"NONE\",\n                \"pointOutline\": true\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"19\",\n                \"folderId\": \"6\",\n                \"text\": \"Bingkai:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"20\",\n                \"folderId\": \"6\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\operatorname{polygon}\\\\left(\\\\left(-0.2,-0.1\\\\right),\\\\left(16,-0.1\\\\right),\\\\left(16,1.1\\\\right),\\\\left(-0.2,1.1\\\\right)\\\\right)\",\n                \"fill\": false,\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"31\",\n                \"folderId\": \"6\",\n                \"text\": \"Tik:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"32\",\n                \"folderId\": \"6\",\n                \"color\": \"#000000\",\n                \"latex\": \"y=L_{y}\\\\left\\\\{-0.25\\\\le x\\\\le-0.2\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"33\",\n                \"folderId\": \"6\",\n                \"color\": \"#000000\",\n                \"latex\": \"x=L_{x}\\\\left\\\\{-0.12\\\\le y\\\\le-0.1\\\\right\\\\}\",\n                \"lineWidth\": \"1.5\"\n            },\n            {\n                \"type\": \"text\",\n                \"id\": \"35\",\n                \"folderId\": \"6\",\n                \"text\": \"Teks:\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"37\",\n                \"folderId\": \"6\",\n                \"color\": \"#388c46\",\n                \"latex\": \"L_{yPer}=L_{y}\\\\cdot100\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"36\",\n                \"folderId\": \"6\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(-0.25,L_{y}\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"${L_{yPer}}%\",\n                \"hidden\": true,\n                \"labelOrientation\": \"left\",\n                \"labelSize\": \".8\",\n                \"pointOpacity\": \".8\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"42\",\n                \"folderId\": \"6\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(L_{x},-0.12\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"${L_x}\",\n                \"hidden\": true,\n                \"labelOrientation\": \"below\",\n                \"labelSize\": \".8\",\n                \"pointOpacity\": \".8\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"43\",\n                \"folderId\": \"6\",\n                \"color\": \"#000000\",\n                \"latex\": \"\\\\left(8,-.22\\\\right)\",\n                \"showLabel\": true,\n                \"label\": \"`\\\\chi^2`\",\n                \"hidden\": true,\n                \"labelSize\": \".9\"\n            },\n            {\n                \"type\": \"folder\",\n                \"id\": \"22\",\n                \"title\": \"Warna\",\n                \"collapsed\": true\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"23\",\n                \"folderId\": \"22\",\n                \"color\": \"#c74440\",\n                \"latex\": \"w_{putih}=\\\\operatorname{rgb}\\\\left(255,255,255\\\\right)\"\n            },\n            {\n                \"type\": \"expression\",\n                \"id\": \"24\",\n                \"folderId\": \"22\",\n                \"color\": \"#c74440\",\n                \"latex\": \"w_{lightgray}=\\\\operatorname{rgb}\\\\left(211,211,211\\\\right)\"\n            }\n        ]\n    },\n    \"includeFunctionParametersInRandomSeed\": true,\n    \"doNotMigrateMovablePointStyle\": true\n};\n\n  calculator1.setState(state1);\n  calculator2.setState(state2);\n  calculator3.setState(state3);\n\n  \/\/ Source\n  var x1List = calculator2.HelperExpression({ latex: 'x_{1}' });\n  var y1List = calculator2.HelperExpression({ latex: 'y_{1}' });\n  var nklik = calculator2.HelperExpression({ latex: 'n_{klik}' });\n  var HfList = calculator2.HelperExpression({ latex: 'H_{f}' });\n  var statChi = calculator2.HelperExpression({ latex: 'c_{hi}' });\n  var statHchi = calculator2.HelperExpression({ latex: 'H_{chi}' });\n\n  \/\/ Sink\n  x1List.observe('listValue', function() {\n    var value = x1List.listValue;\n\tcalculator1.setExpression({ id: '19', latex: `x_{1}=[${value.join(',')}]` });\n  });\n  y1List.observe('listValue', function() {\n    var value = y1List.listValue;\n\tcalculator1.setExpression({ id: '18', latex: `y_{1}=[${value.join(',')}]` });\n  });\n  HfList.observe('listValue', function () {\n    var values = HfList.listValue;\n    document.getElementById('cell11').textContent = values[0];\n\tdocument.getElementById('cell12').textContent = values[1];\n\tdocument.getElementById('cell13').textContent = values[2];\n\tdocument.getElementById('cell14').textContent = values[3];\n\tdocument.getElementById('cell21').textContent = values[4];\n\tdocument.getElementById('cell22').textContent = values[5];\n\tdocument.getElementById('cell23').textContent = values[6];\n\tdocument.getElementById('cell24').textContent = values[7];\n  });\n  statChi.observe('numericValue', function() {\n    var value = statChi.numericValue;\n    if (!isNaN(value)) {\n      calculator3.setExpression({ id: '1', latex: `c_{hi}=${value}` });\n    }\n  });\n  nklik.observe('numericValue', function() {\n    var value = nklik.numericValue;\n    if (!isNaN(value)) {\n      calculator3.setExpression({ id: '44', latex: `n_{klik}=${value}` });\n    }\n  });\n  statHchi.observe('listValue', function() {\n    var value = statHchi.listValue;\n\tcalculator3.setExpression({ id: '2', latex: `H_{chi}=[${value.join(',')}]` });\n  });\n\n<\/script>\n\n\n\n<p>Based on Visualization 3, do you think the difference in preference patterns between girls and boys shown in <a href=\"#figure-1\">Figure 1<\/a> and <a href=\"#calculator1\">Visualization 1<\/a> (<em>\u03c7<\/em>\u00b2 \u2248 8.2238) could be explained by chance alone? Or is there a more reasonable conclusion?<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<div style=\"height:100px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-group is-style-twentytwentyone-border\"><div class=\"wp-block-group__inner-container\">\n<div class=\"related-topics\">\n  <h3>Explore related topics<\/h3>\n  <p>Discover more contents with related topics in this website.<\/p>\n  <ul class=\"topics-list\">\n    <li><a href=\"https:\/\/people.usd.ac.id\/~ydkristanto\/?s=Mathematics\">Mathematics<\/a><\/li>\n    <li><a href=\"https:\/\/people.usd.ac.id\/~ydkristanto\/?s=Statistics\">Statistics<\/a><\/li>\n    <li><a href=\"https:\/\/people.usd.ac.id\/~ydkristanto\/?s=Hypothesis+Testing\">Hypothesis Testing<\/a><\/li>\n    <li><a href=\"https:\/\/people.usd.ac.id\/~ydkristanto\/?s=Chi+Squared+Test\">Chi-Squared Test<\/a><\/li>\n    <li><a href=\"https:\/\/people.usd.ac.id\/~ydkristanto\/?s=Randomization\">Randomization<\/a><\/li>\n    <li><a href=\"https:\/\/people.usd.ac.id\/~ydkristanto\/?s=Data+Visualization\">Data Visualization<\/a><\/li>\n    <li><a href=\"https:\/\/people.usd.ac.id\/~ydkristanto\/?s=Interactive+Learning+Resource\">Interactive Learning Resource<\/a><\/li>\n  <\/ul>\n<\/div>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Imagine asking a group of children, &#8220;What makes you well liked by your classmates?&#8221; Would they say that good grades, sports, attractive appearance, or having lots of money are most important? Would girls and boys give different answers? Questions like these were investigated by a group of researchers at Michigan State University in the United&hellip; <a class=\"more-link\" href=\"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/\">Continue reading <span class=\"screen-reader-text\">Discovering the Idea Behind the Chi-Squared Test<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":1923,"parent":1140,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v17.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Discovering the Idea Behind the Chi-Squared Test<\/title>\n<meta name=\"description\" content=\"Learn the idea behind the chi-squared test through an interactive simulation that shows how the \u03c7\u00b2 statistic helps evaluate whether patterns in data suggest a relationship between variables or can be explained by chance alone.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Discovering the Idea Behind the Chi-Squared Test\" \/>\n<meta property=\"og:description\" content=\"Learn the idea behind the chi-squared test through an interactive simulation that shows how the \u03c7\u00b2 statistic helps evaluate whether patterns in data suggest a relationship between variables or can be explained by chance alone.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/\" \/>\n<meta property=\"og:site_name\" content=\"Yosep Dwi Kristanto \u2014 Universitas Sanata Dharma\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-24T09:42:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/people.usd.ac.id\/~ydkristanto\/wp-content\/uploads\/2026\/06\/header-discovering-chi-squared-test.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"600\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"17 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/#website\",\"url\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/\",\"name\":\"Yosep Dwi Kristanto \\u2014 Universitas Sanata Dharma\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/wp-content\/uploads\/2026\/06\/header-discovering-chi-squared-test.png\",\"contentUrl\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/wp-content\/uploads\/2026\/06\/header-discovering-chi-squared-test.png\",\"width\":1200,\"height\":600},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/#webpage\",\"url\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/\",\"name\":\"Discovering the Idea Behind the Chi-Squared Test\",\"isPartOf\":{\"@id\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/#primaryimage\"},\"datePublished\":\"2026-06-24T08:47:58+00:00\",\"dateModified\":\"2026-06-24T09:42:34+00:00\",\"description\":\"Learn the idea behind the chi-squared test through an interactive simulation that shows how the \\u03c7\\u00b2 statistic helps evaluate whether patterns in data suggest a relationship between variables or can be explained by chance alone.\",\"breadcrumb\":{\"@id\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Interactive Mathematics Learning Resources\",\"item\":\"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Discovering the Idea Behind the Chi-Squared Test\"}]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Discovering the Idea Behind the Chi-Squared Test","description":"Learn the idea behind the chi-squared test through an interactive simulation that shows how the \u03c7\u00b2 statistic helps evaluate whether patterns in data suggest a relationship between variables or can be explained by chance alone.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/","og_locale":"en_US","og_type":"article","og_title":"Discovering the Idea Behind the Chi-Squared Test","og_description":"Learn the idea behind the chi-squared test through an interactive simulation that shows how the \u03c7\u00b2 statistic helps evaluate whether patterns in data suggest a relationship between variables or can be explained by chance alone.","og_url":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/","og_site_name":"Yosep Dwi Kristanto \u2014 Universitas Sanata Dharma","article_modified_time":"2026-06-24T09:42:34+00:00","og_image":[{"width":1200,"height":600,"url":"https:\/\/people.usd.ac.id\/~ydkristanto\/wp-content\/uploads\/2026\/06\/header-discovering-chi-squared-test.png","type":"image\/png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"17 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebSite","@id":"https:\/\/people.usd.ac.id\/~ydkristanto\/#website","url":"https:\/\/people.usd.ac.id\/~ydkristanto\/","name":"Yosep Dwi Kristanto \u2014 Universitas Sanata Dharma","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/people.usd.ac.id\/~ydkristanto\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"ImageObject","@id":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/#primaryimage","inLanguage":"en-US","url":"https:\/\/people.usd.ac.id\/~ydkristanto\/wp-content\/uploads\/2026\/06\/header-discovering-chi-squared-test.png","contentUrl":"https:\/\/people.usd.ac.id\/~ydkristanto\/wp-content\/uploads\/2026\/06\/header-discovering-chi-squared-test.png","width":1200,"height":600},{"@type":"WebPage","@id":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/#webpage","url":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/","name":"Discovering the Idea Behind the Chi-Squared Test","isPartOf":{"@id":"https:\/\/people.usd.ac.id\/~ydkristanto\/#website"},"primaryImageOfPage":{"@id":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/#primaryimage"},"datePublished":"2026-06-24T08:47:58+00:00","dateModified":"2026-06-24T09:42:34+00:00","description":"Learn the idea behind the chi-squared test through an interactive simulation that shows how the \u03c7\u00b2 statistic helps evaluate whether patterns in data suggest a relationship between variables or can be explained by chance alone.","breadcrumb":{"@id":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/discovering-the-idea-behind-the-chi-squared-test\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/people.usd.ac.id\/~ydkristanto\/"},{"@type":"ListItem","position":2,"name":"Interactive Mathematics Learning Resources","item":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/learning-resources\/"},{"@type":"ListItem","position":3,"name":"Discovering the Idea Behind the Chi-Squared Test"}]}]}},"_links":{"self":[{"href":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/wp-json\/wp\/v2\/pages\/1907"}],"collection":[{"href":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/wp-json\/wp\/v2\/comments?post=1907"}],"version-history":[{"count":7,"href":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/wp-json\/wp\/v2\/pages\/1907\/revisions"}],"predecessor-version":[{"id":1921,"href":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/wp-json\/wp\/v2\/pages\/1907\/revisions\/1921"}],"up":[{"embeddable":true,"href":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/wp-json\/wp\/v2\/pages\/1140"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/wp-json\/wp\/v2\/media\/1923"}],"wp:attachment":[{"href":"https:\/\/people.usd.ac.id\/~ydkristanto\/index.php\/wp-json\/wp\/v2\/media?parent=1907"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}