{"id":6968,"date":"2026-09-04T07:47:46","date_gmt":"2026-09-04T12:47:46","guid":{"rendered":"https:\/\/ykim.synology.me\/wordpress\/the-chi-squared-distribution-6968\/"},"modified":"2026-11-26T22:35:42","modified_gmt":"2026-11-27T04:35:42","slug":"the-chi-squared-distribution","status":"publish","type":"post","link":"https:\/\/ykim.synology.me\/wordpress\/the-chi-squared-distribution-6968\/","title":{"rendered":"The Chi-Squared Distribution"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large is-resized\"><img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/yBarn1\/Images\/main\/storefronts\/office-depot-storefront.jpg\" alt=\"\" style=\"width:auto;height:500px\"\/><\/figure>\n\n\n<style>.kt-tabs-id6968_860ebe-cc > .kt-tabs-content-wrap > .wp-block-kadence-tab{border-top:3px solid #0a6689;border-right:0px solid #0a6689;border-bottom:0px solid #0a6689;border-left:0px solid #0a6689;border-top-left-radius:0px;border-top-right-radius:0px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;padding-top:var(--global-kb-spacing-sm, 1.5rem);padding-right:var(--global-kb-spacing-sm, 1.5rem);padding-bottom:var(--global-kb-spacing-sm, 1.5rem);padding-left:var(--global-kb-spacing-sm, 1.5rem);background:var(--global-palette9, #ffffff);}.wp-block-kadence-tabs .kt-tabs-id6968_860ebe-cc > .kt-tabs-title-list li{margin-top:0px;margin-right:8px;margin-bottom:0px;margin-left:0px;}.wp-block-kadence-tabs .kt-tabs-id6968_860ebe-cc > .kt-tabs-title-list li:last-child{margin-right:0px;}.wp-block-kadence-tabs .kt-tabs-id6968_860ebe-cc > .kt-tabs-title-list li .kt-tab-title, .wp-block-kadence-tabs .kt-tabs-id6968_860ebe-cc > .kt-tabs-content-wrap > .kt-tabs-accordion-title .kt-tab-title{line-height:1.4em;font-weight:regular;font-style:normal;border-top-width:0px;border-right-width:0px;border-bottom-width:0px;border-left-width:0px;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0px;border-bottom-left-radius:0px;padding-top:8px;padding-right:20px;padding-bottom:8px;padding-left:20px;border-color:var(--global-palette7, #eeeeee);color:var(--global-palette4, #2D3748);background:var(--global-palette7, #eeeeee);}.wp-block-kadence-tabs .kt-tabs-id6968_860ebe-cc > .kt-tabs-content-wrap > .kt-tabs-accordion-title .kt-tab-title{margin-top:0px;margin-right:8px;margin-bottom:0px;margin-left:0px;}.wp-block-kadence-tabs .kt-tabs-id6968_860ebe-cc > .kt-tabs-title-list li .kt-tab-title:hover, .wp-block-kadence-tabs .kt-tabs-id6968_860ebe-cc > .kt-tabs-content-wrap > .kt-tabs-accordion-title .kt-tab-title:hover{border-color:var(--global-palette7, #eeeeee);color:var(--global-palette3, #1A202C);background:var(--global-palette8, #F7FAFC);}.wp-block-kadence-tabs .kt-tabs-id6968_860ebe-cc > .kt-tabs-title-list li.kt-tab-title-active .kt-tab-title, .wp-block-kadence-tabs .kt-tabs-id6968_860ebe-cc > .kt-tabs-content-wrap > .kt-tabs-accordion-title.kt-tab-title-active .kt-tab-title{border-color:var(--global-palette7, #eeeeee);color:#ffffff;background:#0a6689;}@media all and (max-width: 1024px){.kt-tabs-id6968_860ebe-cc > .kt-tabs-content-wrap > .wp-block-kadence-tab{border-top:3px solid #0a6689;border-right:0px solid #0a6689;border-bottom:0px solid #0a6689;border-left:0px solid #0a6689;}}@media all and (max-width: 767px){.kt-tabs-id6968_860ebe-cc > .kt-tabs-content-wrap > .wp-block-kadence-tab{border-top:3px solid #0a6689;border-right:0px solid #0a6689;border-bottom:0px solid #0a6689;border-left:0px solid #0a6689;}}<\/style>\n<div class=\"wp-block-kadence-tabs alignnone\"><div class=\"kt-tabs-wrap kt-tabs-id6968_860ebe-cc kt-tabs-has-2-tabs kt-active-tab-1 kt-tabs-layout-tabs kt-tabs-tablet-layout-inherit kt-tabs-mobile-layout-inherit kt-tab-alignment-left \"><ul class=\"kt-tabs-title-list\"><li id=\"tab-korean\" class=\"kt-title-item kt-title-item-1 kt-tabs-svg-show-always kt-tabs-icon-side-right kt-tab-title-active\"><a href=\"#tab-korean\" data-tab=\"1\" class=\"kt-tab-title kt-tab-title-1 \"><span class=\"kt-title-text\">Korean<\/span><\/a><\/li><li id=\"tab-english\" class=\"kt-title-item kt-title-item-2 kt-tabs-svg-show-always kt-tabs-icon-side-right kt-tab-title-inactive\"><a href=\"#tab-english\" data-tab=\"2\" class=\"kt-tab-title kt-tab-title-2 \"><span class=\"kt-title-text\">English<\/span><\/a><\/li><\/ul><div class=\"kt-tabs-content-wrap\">\n<div class=\"wp-block-kadence-tab kt-tab-inner-content kt-inner-tab-1 kt-inner-tab6968_29c7ff-ff\"><div class=\"kt-tab-inner-content-inner\"><p><div class=\"github-readme-container markdown-body\"><div id=\"file\" class=\"md\" data-path=\"Distributions\/Chi-squared\/chi-squared-distribution-ko.md\"><article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><div class=\"markdown-heading\" dir=\"auto\"><h1 class=\"heading-element\" dir=\"auto\">The Chi-Squared Distribution<\/h1><a id=\"user-content-the-chi-squared-distribution\" class=\"anchor\" aria-label=\"Permalink: The Chi-Squared Distribution\" href=\"#the-chi-squared-distribution\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Version 6 | Created: 2026-09-04 | Updated: 2026-11-07 13:46 UTC<\/p>\n<ul dir=\"auto\">\n<li><a href=\"#1-scope\">1. Scope<\/a><\/li>\n<li><a href=\"#2-definition\">2. Definition<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#21-construction-from-normal-variables\">2.1. Construction from Normal Variables<\/a><\/li>\n<li><a href=\"#22-density-function\">2.2. Density Function<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#3-properties\">3. Properties<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#31-moments\">3.1. Moments<\/a><\/li>\n<li><a href=\"#32-additivity\">3.2. Additivity<\/a><\/li>\n<li><a href=\"#33-shape\">3.3. Shape<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#4-relation-to-other-distributions\">4. Relation to Other Distributions<\/a><\/li>\n<li><a href=\"#5-role-in-sampling\">5. Role in Sampling<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#51-sample-variance-of-a-normal-population\">5.1. Sample Variance of a Normal Population<\/a><\/li>\n<li><a href=\"#52-degrees-of-freedom\">5.2. Degrees of Freedom<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#6-tests-built-on-the-distribution\">6. Tests Built on the Distribution<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#61-goodness-of-fit\">6.1. Goodness of Fit<\/a><\/li>\n<li><a href=\"#62-independence-in-a-contingency-table\">6.2. Independence in a Contingency Table<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#references\">References<\/a><\/li>\n<li><a href=\"#appendix-a-terminology\">Appendix A. Terminology<\/a><\/li>\n<li><a href=\"#appendix-b-derivations\">Appendix B. Derivations<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#b1-square-of-a-normal-variable\">B.1. Square of a Normal Variable<\/a><\/li>\n<li><a href=\"#b2-moment-generating-function\">B.2. Moment Generating Function<\/a><\/li>\n<li><a href=\"#b3-mean-and-variance\">B.3. Mean and Variance<\/a><\/li>\n<li><a href=\"#b4-loss-of-one-degree-of-freedom\">B.4. Loss of One Degree of Freedom<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#appendix-c-computation\">Appendix C. Computation<\/a><\/li>\n<\/ul>\n<blockquote>\n<p dir=\"auto\">\ud45c\uc900\uc815\uaddc \ud655\ub960\ubcc0\uc218\uc758 \uc81c\uacf1\ud569\uc774 \ub530\ub974\ub294 \ubd84\ud3ec\uc5d0 \ub300\ud55c \uae30\ub85d. \uc5b4\ub5bb\uac8c \ub9cc\ub4e4\uc5b4\uc9c0\ub294\uc9c0, \ubc00\ub3c4\ud568\uc218\uc640 moment \uac00\n\ubb34\uc5c7\uc778\uc9c0, \ub2e4\ub978 \ud45c\ubcf8\ubd84\ud3ec\uc640 \uc5b4\ub5bb\uac8c \uc774\uc5b4\uc9c0\ub294\uc9c0, \uadf8\ub9ac\uace0 \uc774\ub97c \uc4f0\ub294 \uac80\uc815\uc5d0 \uc65c \ub4f1\uc7a5\ud558\ub294\uc9c0\ub97c \ub2e4\ub8ec\ub2e4.<\/p>\n<\/blockquote>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">1. Scope<\/h2><a id=\"user-content-1-scope\" class=\"anchor\" aria-label=\"Permalink: 1. Scope\" href=\"#1-scope\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Chi-squared distribution \uc740 \uc790\ub8cc\uc758 model \ub85c \ub9cc\ub098\ub294 \uc77c\uc774 \ub4dc\ubb3c\ub2e4. \ud1b5\uacc4\ub7c9\uc758 \ubd84\ud3ec\ub85c \ub9cc\ub098\uba70, \uc131\uc9c8\uc774 \uc544\uc8fc\n\ub2e4\ub978 \ub450 \uc591\uc774 \uacf5\uad50\ub86d\uac8c\ub3c4 \uc774 \ubd84\ud3ec\ub97c \ub530\ub974\uae30\uc5d0 \uc790\ub9ac\ub97c \uc5bb\ub294\ub2e4. \ud558\ub098\ub294 \uc815\uaddc\ubaa8\uc9d1\ub2e8\uc758 \ucc99\ub3c4\uc870\uc815\ub41c sample\nvariance \uc774\uace0, \ub2e4\ub978 \ud558\ub098\ub294 \uad00\uce21\ub3c4\uc218\uc640 \uae30\ub300\ub3c4\uc218\uc758 \ucc28\uc774\ub97c \uc7ac\ub294 Pearson \uc758 \uce21\ub3c4\uc774\ub2e4. \ub458 \ub2e4 \uadfc\uc0ac\uc801\uc73c\ub85c\n\ud45c\uc900\uc815\uaddc\uc778 \uc591\ub4e4\uc758 \uc81c\uacf1\ud569\uc73c\ub85c \ud658\uc6d0\ub418\uba70, \uadf8 \uc81c\uacf1\ud569\uc774 \ubc14\ub85c \uc774 \ubd84\ud3ec\uac00 \uae30\uc220\ud558\ub294 \ub300\uc0c1\uc774\ub2e4.<\/p>\n<p dir=\"auto\">\uc774 \ubb38\uc11c\ub294 \ubd84\ud3ec\ub97c \uc815\uc758\ud558\uace0, \ubc00\ub3c4\ud568\uc218\uc640 moment \ub97c \uc81c\uc2dc\ud558\uace0, normal\u00b7gamma\u00b7t\u00b7F distribution \uacfc\uc758 \uad00\uacc4\ub97c\n\uc815\ub9ac\ud558\uace0, \uc704\uc758 \ub450 \uc0c1\ud669\uc744 \ubcf4\uc778\ub2e4. \uc720\ub3c4\ub294 <a href=\"#appendix-b-derivations\">Appendix B<\/a> \uc5d0, \ubd84\ud3ec\ub97c \uacc4\uc0b0\ud558\ub294\n\ud638\ucd9c\uc740 <a href=\"#appendix-c-computation\">Appendix C<\/a> \uc5d0 \ub454\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">2. Definition<\/h2><a id=\"user-content-2-definition\" class=\"anchor\" aria-label=\"Permalink: 2. Definition\" href=\"#2-definition\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">2.1. Construction from Normal Variables<\/h3><a id=\"user-content-21-construction-from-normal-variables\" class=\"anchor\" aria-label=\"Permalink: 2.1. Construction from Normal Variables\" href=\"#21-construction-from-normal-variables\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Z_1, \\ldots, Z_k$<\/math-renderer> \ub97c \ub3c5\ub9bd\uc778 \ud45c\uc900\uc815\uaddc \ud655\ub960\ubcc0\uc218\ub77c \ud558\uc790. \uc790\uc720\ub3c4 (degrees of freedom) \uac00 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k$<\/math-renderer> \uc778\nchi-squared distribution \uc740 \uc774\ub4e4\uc758 \uc81c\uacf1\ud569\uc774 \ub530\ub974\ub294 \ubd84\ud3ec\uc774\uba70 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$X \\sim \\chi^2_k$<\/math-renderer> \ub85c \uc801\ub294\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$X = \\sum_{i=1}^{k} Z_i^{2} \\hspace{19em} (1)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc774 \uad6c\uc131\uc774 \ud55c\uaebc\ubc88\uc5d0 \uc138 \uac00\uc9c0\ub97c \uc815\ud55c\ub2e4. \uc81c\uacf1\ud569\uc740 \uc74c\uc218\uac00 \ub420 \uc218 \uc5c6\uc73c\ubbc0\ub85c support \ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$x \\ge 0$<\/math-renderer> \uc774\ub2e4.\nparameter \ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k$<\/math-renderer> \ud558\ub098\ubfd0\uc774\uba70, \uadf8\uac83\uc740 \ub354\ud574\uc9c0\ub294 \uc81c\uacf1\uc758 \uac1c\uc218\ub97c \uc13c\ub2e4. \uadf8\ub9ac\uace0 \uc81c\uacf1\uc740 \uc815\uaddc\ubd84\ud3ec\uc758 \ub450 \uaf2c\ub9ac\ub97c\n\ud55c\ucabd\uc73c\ub85c \uc811\uc73c\ubbc0\ub85c \uc774 \ubd84\ud3ec\ub294 \ub300\uce6d\uc774 \uc544\ub2c8\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">2.2. Density Function<\/h3><a id=\"user-content-22-density-function\" class=\"anchor\" aria-label=\"Permalink: 2.2. Density Function\" href=\"#22-density-function\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$x \\gt 0$<\/math-renderer> \uc5d0\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\chi^2_k$<\/math-renderer> \uc758 \ubc00\ub3c4\ud568\uc218\uc5d0\ub294 gamma function <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\Gamma$<\/math-renderer> \uac00 \ub4e4\uc5b4\uac04\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$f(x) = \\frac{1}{2^{k\/2} \\Gamma(k\/2)} x^{k\/2 - 1} e^{-x\/2} \\hspace{19em} (2)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc774 \uc2dd\uc758 \uc5b4\ub514\uc5d0\ub3c4 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k$<\/math-renderer> \uac00 \uc815\uc218\uc5ec\uc57c \ud560 \uc774\uc720\ub294 \uc5c6\ub2e4. section 2.1 \uc758 \uc138\ub294 \ubc29\uc2dd\uc740 \uc815\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k$<\/math-renderer> \ub97c \uc8fc\uc9c0\ub9cc,\n\ubc00\ub3c4\ud568\uc218 \uc790\uccb4\ub294 \ubaa8\ub4e0 \uc2e4\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k \\gt 0$<\/math-renderer> \uc5d0 \ub300\ud574 \uc131\ub9bd\ud55c\ub2e4. \uc5b4\ub5a4 \uadfc\uc0ac\uac00 \ub9cc\ub4e4\uc5b4\ub0b4\ub294 \uc18c\uc218 \uc790\uc720\ub3c4\ub97c \uc774 \ubd84\ud3ec\ub85c\n\ubc1b\uc744 \uc218 \uc788\ub294 \uac83\uc740 \uadf8 \ub54c\ubb38\uc774\ub2e4 [<a href=\"#ref-4\">4<\/a>].<\/p>\n<p dir=\"auto\">Moment generating function \uc740 \ubc00\ub3c4\ud568\uc218\ubcf4\ub2e4 \ub2e8\uc21c\ud558\uba70, \ub4a4\uc5d0 \uc624\ub294 \ub300\ubd80\ubd84\uc758 \ub17c\uc758\uac00 \uc774\uac83\uc744 \ub3c4\uad6c\ub85c \uc4f4\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$M(t) = E\\left[ e^{tX} \\right] = (1 - 2t)^{-k\/2}, \\qquad t \\lt \\tfrac{1}{2} \\hspace{19em} (3)$$<\/math-renderer><\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">3. Properties<\/h2><a id=\"user-content-3-properties\" class=\"anchor\" aria-label=\"Permalink: 3. Properties\" href=\"#3-properties\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.1. Moments<\/h3><a id=\"user-content-31-moments\" class=\"anchor\" aria-label=\"Permalink: 3.1. Moments\" href=\"#31-moments\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\uc2dd (3) \uc744 \uc6d0\uc810\uc5d0\uc11c \ubbf8\ubd84\ud558\uba74 moment \uac00 \ub098\uc628\ub2e4. \ud3c9\uade0\uc740 \uc790\uc720\ub3c4\uc640 \uac19\uace0 \ubd84\uc0b0\uc740 \uadf8 \ub450 \ubc30\uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$E[X] = k, \\qquad \\mathrm{Var}[X] = 2k, \\qquad \\gamma_1 = \\sqrt{8\/k}, \\qquad \\gamma_2 = 12\/k \\hspace{19em} (4)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc5ec\uae30\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\gamma_1$<\/math-renderer> \uc740 \uc65c\ub3c4 (skewness), <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\gamma_2$<\/math-renderer> \ub294 \ucd08\uacfc\ucca8\ub3c4 (excess kurtosis) \uc774\ub2e4. \ub458 \ub2e4 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k$<\/math-renderer> \uac00\n\ucee4\uc9c0\uba74 \uc904\uc5b4\ub4e4\uba70, \uc774 \ubd84\ud3ec\uc758 \ub300\ud45c\ubcf8 \uac70\ub3d9\uc740 \uc774 \ub450 \uc218\uac00 \uc804\ubd80\uc774\ub2e4.<\/p>\n<p dir=\"auto\">Table 1. Moments of the chi-squared distribution.<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th align=\"right\">Degrees of freedom<\/th>\n<th align=\"right\">Mean<\/th>\n<th align=\"right\">Variance<\/th>\n<th align=\"right\">Skewness<\/th>\n<th align=\"right\">Excess kurtosis<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"right\">1<\/td>\n<td align=\"right\">1<\/td>\n<td align=\"right\">2<\/td>\n<td align=\"right\">2.8284<\/td>\n<td align=\"right\">12.0<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">2<\/td>\n<td align=\"right\">2<\/td>\n<td align=\"right\">4<\/td>\n<td align=\"right\">2.0000<\/td>\n<td align=\"right\">6.0<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">3<\/td>\n<td align=\"right\">3<\/td>\n<td align=\"right\">6<\/td>\n<td align=\"right\">1.6330<\/td>\n<td align=\"right\">4.0<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">5<\/td>\n<td align=\"right\">5<\/td>\n<td align=\"right\">10<\/td>\n<td align=\"right\">1.2649<\/td>\n<td align=\"right\">2.4<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">10<\/td>\n<td align=\"right\">10<\/td>\n<td align=\"right\">20<\/td>\n<td align=\"right\">0.8944<\/td>\n<td align=\"right\">1.2<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\">\ud3c9\uade0\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k$<\/math-renderer> \uc640 \uac19\ub2e4\ub294 \uac83\uc740 \uae30\uc5b5\ud574 \ub458 \ub9cc\ud558\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\chi^2_k$<\/math-renderer> \ub97c \ub530\ub77c\uc57c \ud560 \uac80\uc815\ud1b5\uacc4\ub7c9\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k$<\/math-renderer> \uadfc\ucc98\uc5d0\uc11c \ub098\uc624\uba74\n\ud2b9\ubcc4\ud560 \uac83\uc774 \uc5c6\uace0, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k$<\/math-renderer> \uc758 \uba87 \ubc30\ub85c \ub098\uc624\uba74 \uadf8\uac83\uc774 \uac80\uc815\uc774 \ucc3e\ub294 \uc2e0\ud638\uc774\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.2. Additivity<\/h3><a id=\"user-content-32-additivity\" class=\"anchor\" aria-label=\"Permalink: 3.2. Additivity\" href=\"#32-additivity\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$X \\sim \\chi^2_m$<\/math-renderer> \uacfc <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Y \\sim \\chi^2_n$<\/math-renderer> \uc774 \ub3c5\ub9bd\uc774\uba74 \uadf8 \ud569\ub3c4 chi-squared \uc774\uba70 \uc790\uc720\ub3c4\ub294 \ub354\ud574\uc9c4\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$X + Y \\sim \\chi^2_{m+n} \\hspace{19em} (5)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\ub3c5\ub9bd\uc778 \ub450 \uc81c\uacf1\ud569\uc758 \ud569\uc740 \ub2e4\uc2dc \uc81c\uacf1\ud569\uc774\ubbc0\ub85c \uc2dd (1) \uc5d0\uc11c \uace7\ubc14\ub85c \ub530\ub974\uace0, \ub450 moment generating function \uc758\n\uacf1\uc774 \uc9c0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$-(m+n)\/2$<\/math-renderer> \uc778 \uac83\uacfc \uac19\uc73c\ubbc0\ub85c \uc2dd (3) \uc5d0\uc11c\ub3c4 \ub611\uac19\uc774 \ub530\ub978\ub2e4. \uc790\uc720\ub3c4\uac00 \uac1c\uc218\ucc98\ub7fc \uc6c0\uc9c1\uc774\ub294 \uac83\uc740\n\uadf8\uac83\uc774 \uac1c\uc218\uc774\uae30 \ub54c\ubb38\uc774\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.3. Shape<\/h3><a id=\"user-content-33-shape\" class=\"anchor\" aria-label=\"Permalink: 3.3. Shape\" href=\"#33-shape\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\ubaa8\uc591\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k$<\/math-renderer> \uc5d0 \ub530\ub77c \uc9c8\uc801\uc73c\ub85c \ub2ec\ub77c\uc9c4\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k = 1$<\/math-renderer> \uc5d0\uc11c \ubc00\ub3c4\ud568\uc218\ub294 \uc6d0\uc810\uc5d0\uc11c \ubc1c\uc0b0\ud558\uace0, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k = 2$<\/math-renderer> \uc5d0\uc11c\ub294\nexponential \ubc00\ub3c4\ud568\uc218\uc5ec\uc11c \uc6d0\uc810\uc5d0\uc11c \uc720\ud55c\ud558\uc9c0\ub9cc \uc5ec\uc804\ud788 \uac10\uc18c\ud55c\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k = 3$<\/math-renderer> \ubd80\ud130\ub294 \uc6d0\uc810\uc5d0\uc11c 0 \uc774 \ub418\uace0\n\ub2e8\ubd09\uc774\uba70, mode \ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k - 2$<\/math-renderer> \uc5d0 \uc788\ub2e4.<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https:\/\/github.com\/ykim2718\/Math\/blob\/main\/Distributions\/Chi-squared\/chi-squared-distribution_fig\/chi_squared_distribution.png\"><img src=\"https:\/\/ykim.synology.me\/wordpress\/wp-json\/gh-readme\/v1\/asset?user=ykim2718&#038;repo=Math&#038;branch=main&#038;path=Distributions\/Chi-squared\/chi-squared-distribution_fig\/chi_squared_distribution.png&#038;sig=2582d54acc3f08675c60e68c2005f472acd3d5ce9afc0d8422ed92ca0308a684\" width=\"900\" alt=\"Fig 1\" style=\"max-width: 100%;\"><\/a><\/p>\n<p dir=\"auto\">Fig 1. Chi-squared density (a) and distribution function (b) for five values of the degrees of\nfreedom. The density for <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k = 1$<\/math-renderer> leaves the top of the panel; it is unbounded at the origin.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k$<\/math-renderer> \uac00 \ucee4\uc9c0\uba74 \ubc00\ub3c4\ud568\uc218\ub294 \uc810\uc810 \ub300\uce6d\uc5d0 \uac00\uae4c\uc6cc\uc9c0\uace0, \ud45c\uc900\ud654\ud55c \ubcc0\uc218\ub294 \ud45c\uc900\uc815\uaddc\ubd84\ud3ec\ub85c \uc218\ub834\ud55c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$\\frac{X - k}{\\sqrt{2k}} \\xrightarrow{d} N(0, 1) \\hspace{19em} (6)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc218\ub834\uc740 \ub290\ub9ac\ub2e4. \uc2dd (4) \uc758 \uc65c\ub3c4\uac00 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k^{-1\/2}$<\/math-renderer> \ub85c\ub9cc \uc904\uae30 \ub54c\ubb38\uc774\uba70, \uadf8 \ub290\ub9bc\uc774 \uc815\uaddc \uadfc\uc0ac \ub300\uc2e0 \uc774 \ubd84\ud3ec\uc758 \ud45c\uac00\n\uc624\ub798 \uc4f0\uc778 \uc774\uc720\uc774\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k = 10$<\/math-renderer> \uc5d0\uc11c \uc0c1\uc704 5 percent \uc810\uc740 18.307 \uc778\ub370 \uc2dd (6) \uc740 17.356 \uc744 \uc8fc\uc5b4 5 percent\n\uc758 \uc624\ucc28\uac00 \ub09c\ub2e4. \uac19\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k$<\/math-renderer> \uc5d0\uc11c Wilson \uacfc Hilferty \uc758 \uc138\uc81c\uacf1\uadfc \ubcc0\ud658 [<a href=\"#ref-1\">1<\/a>] \uc740 18.292 \ub97c \uc8fc\uc5b4 \ud6e8\uc52c\n\ub0ab\ub2e4.<\/p>\n<p dir=\"auto\">Table 2. Upper-tail critical values: the value the statistic exceeds with the stated probability.<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th align=\"right\">Degrees of freedom<\/th>\n<th align=\"right\">0.10<\/th>\n<th align=\"right\">0.05<\/th>\n<th align=\"right\">0.01<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"right\">1<\/td>\n<td align=\"right\">2.706<\/td>\n<td align=\"right\">3.841<\/td>\n<td align=\"right\">6.635<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">2<\/td>\n<td align=\"right\">4.605<\/td>\n<td align=\"right\">5.991<\/td>\n<td align=\"right\">9.210<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">3<\/td>\n<td align=\"right\">6.251<\/td>\n<td align=\"right\">7.815<\/td>\n<td align=\"right\">11.345<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">4<\/td>\n<td align=\"right\">7.779<\/td>\n<td align=\"right\">9.488<\/td>\n<td align=\"right\">13.277<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">5<\/td>\n<td align=\"right\">9.236<\/td>\n<td align=\"right\">11.070<\/td>\n<td align=\"right\">15.086<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">6<\/td>\n<td align=\"right\">10.645<\/td>\n<td align=\"right\">12.592<\/td>\n<td align=\"right\">16.812<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">7<\/td>\n<td align=\"right\">12.017<\/td>\n<td align=\"right\">14.067<\/td>\n<td align=\"right\">18.475<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">8<\/td>\n<td align=\"right\">13.362<\/td>\n<td align=\"right\">15.507<\/td>\n<td align=\"right\">20.090<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">9<\/td>\n<td align=\"right\">14.684<\/td>\n<td align=\"right\">16.919<\/td>\n<td align=\"right\">21.666<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">10<\/td>\n<td align=\"right\">15.987<\/td>\n<td align=\"right\">18.307<\/td>\n<td align=\"right\">23.209<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">15<\/td>\n<td align=\"right\">22.307<\/td>\n<td align=\"right\">24.996<\/td>\n<td align=\"right\">30.578<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">20<\/td>\n<td align=\"right\">28.412<\/td>\n<td align=\"right\">31.410<\/td>\n<td align=\"right\">37.566<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">30<\/td>\n<td align=\"right\">40.256<\/td>\n<td align=\"right\">43.773<\/td>\n<td align=\"right\">50.892<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">4. Relation to Other Distributions<\/h2><a id=\"user-content-4-relation-to-other-distributions\" class=\"anchor\" aria-label=\"Permalink: 4. Relation to Other Distributions\" href=\"#4-relation-to-other-distributions\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Chi-squared distribution \uc740 \uc815\uaddc\uc774\ub860 \ud45c\ubcf8\ubd84\ud3ec\ub4e4\uc758 \ud55c\uac00\uc6b4\ub370\uc5d0 \uc788\uace0, \ub098\uba38\uc9c0 \ub300\ubd80\ubd84\uc740 \uc774\uac83\uc73c\ub85c\ubd80\ud130\n\ub9cc\ub4e4\uc5b4\uc9c4\ub2e4.<\/p>\n<p dir=\"auto\">Table 3. Relations to other distributions.<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th>Distribution<\/th>\n<th>Relation<\/th>\n<th>Note<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Normal<\/td>\n<td><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Z^2 \\sim \\chi^2_1$<\/math-renderer><\/td>\n<td>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k = 1$<\/math-renderer> \uc778 \uacbd\uc6b0<\/td>\n<\/tr>\n<tr>\n<td>Exponential<\/td>\n<td>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\chi^2_2$<\/math-renderer> \ub294 \ud3c9\uade0\uc774 2 \uc778 exponential<\/td>\n<td>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k = 2$<\/math-renderer> \uc778 \uacbd\uc6b0<\/td>\n<\/tr>\n<tr>\n<td>Gamma<\/td>\n<td>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\chi^2_k$<\/math-renderer> \ub294 shape <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k\/2$<\/math-renderer>, scale 2 \uc778 gamma<\/td>\n<td>\ubc00\ub3c4\ud568\uc218\uc758 \uc77c\ubc18\ud615<\/td>\n<\/tr>\n<tr>\n<td>Student t<\/td>\n<td>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Z \/ \\sqrt{V\/k}$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$V \\sim \\chi^2_k$<\/math-renderer> \uc774\uba70 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Z$<\/math-renderer> \uc640 \ub3c5\ub9bd<\/td>\n<td>Chi-squared \uac00 \ubd84\ubaa8<\/td>\n<\/tr>\n<tr>\n<td>F<\/td>\n<td>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$(V_1\/k_1) \/ (V_2\/k_2)$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$V_1, V_2$<\/math-renderer> \ub294 \ub3c5\ub9bd<\/td>\n<td>\ub450 chi-squared \uc758 \ube44<\/td>\n<\/tr>\n<tr>\n<td>Noncentral chi-squared<\/td>\n<td>\ud3c9\uade0\uc774 0 \uc774 \uc544\ub2cc \uc815\uaddc \ubcc0\uc218\ub4e4\uc758 \uc81c\uacf1\ud569<\/td>\n<td>\uc544\ub798 \uac80\uc815\ub4e4\uc758 \uac80\uc815\ub825\uc5d0 \uc4f0\uc784<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\">\uccab \ud589\uc740 Table 2 \ub85c \ud655\uc778\ud560 \uc218 \uc788\ub2e4. \ud45c\uc900\uc815\uaddc\uc758 \uc591\uce21 5 percent \uc810\uc740 1.96 \uc774\uace0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$1.96^2 = 3.8415$<\/math-renderer> \uc778\ub370,\n\uc774\uac83\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\chi^2_1$<\/math-renderer> \uc758 5 percent \uc810\uc774\ub2e4. \uc815\uaddc \ud3c9\uade0\uc5d0 \ub300\ud55c \uc591\uce21\uac80\uc815\uacfc \uadf8 \uc81c\uacf1\uc5d0 \ub300\ud55c \ub2e8\uce21\uac80\uc815\uc740 \uac19\uc740\n\uac80\uc815\uc774\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">5. Role in Sampling<\/h2><a id=\"user-content-5-role-in-sampling\" class=\"anchor\" aria-label=\"Permalink: 5. Role in Sampling\" href=\"#5-role-in-sampling\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.1. Sample Variance of a Normal Population<\/h3><a id=\"user-content-51-sample-variance-of-a-normal-population\" class=\"anchor\" aria-label=\"Permalink: 5.1. Sample Variance of a Normal Population\" href=\"#51-sample-variance-of-a-normal-population\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$x_1, \\ldots, x_n$<\/math-renderer> \uc744 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$N(\\mu, \\sigma^2)$<\/math-renderer> \uc5d0\uc11c \ub3c5\ub9bd\uc73c\ub85c \ubf51\uace0 sample mean \uc744 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\bar{x}$<\/math-renderer>, sample variance\n\ub97c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$s^2$<\/math-renderer> \ub77c \ud558\uba74, \ucc99\ub3c4\uc870\uc815\ub41c sample variance \ub294 \ud45c\ubcf8 \ud06c\uae30\ubcf4\ub2e4 \uc790\uc720\ub3c4\uac00 \ud558\ub098 \uc801\uc740 chi-squared \ub97c\n\ub530\ub974\uba70 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\bar{x}$<\/math-renderer> \uc640 \ub3c5\ub9bd\uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$\\frac{(n-1)s^{2}}{\\sigma^{2}} \\sim \\chi^2_{n-1} \\hspace{19em} (7)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc783\ub294 \uc790\uc720\ub3c4 \ud558\ub098\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\mu$<\/math-renderer> \ub97c \ucd94\uc815\ud558\ub294 \ub370 \uc4f4 \uac83\uc774\ub2e4. \ud3b8\ucc28 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$x_i - \\bar{x}$<\/math-renderer> \ub294 \uad6c\uc131\uc0c1 \ud569\uc774 0 \uc774\ubbc0\ub85c \uadf8\uc911\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$n-1$<\/math-renderer> \uac1c\ub9cc \uc790\uc720\ub86d\uac8c \uace0\ub97c \uc218 \uc788\uace0, \uadf8 \uc81c\uacf1\ud569\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$n$<\/math-renderer> \uac1c\uac00 \uc544\ub2c8\ub77c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$n-1$<\/math-renderer> \uac1c\uc758 \ub3c5\ub9bd\uc778 \uc81c\uacf1\uc758 \ud569\ucc98\ub7fc\n\uc6c0\uc9c1\uc778\ub2e4. \uacb0\uacfc\uac00 \uc815\ud655\ud788 chi-squared \uc774\uace0 \ud3c9\uade0\uacfc \uc815\ud655\ud788 \ub3c5\ub9bd\uc774\ub77c\ub294 \uac83\uc774 Cochran \uc758 \uc815\ub9ac\uc774\ub2e4\n[<a href=\"#ref-2\">2<\/a>].<\/p>\n<p dir=\"auto\">\uc2dd (7) \uc744 \ub4a4\uc9d1\uc73c\uba74 \uc815\uaddc \ubd84\uc0b0\uc758 confidence interval \uc774 \ub098\uc624\uba70, \ubd84\ud3ec\uac00 \ube44\ub300\uce6d\uc774\ubbc0\ub85c \uad6c\uac04\ub3c4 \ube44\ub300\uce6d\uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$\\left[ \\frac{(n-1)s^{2}}{\\chi^2_{n-1, \\alpha\/2}}, \\ \\frac{(n-1)s^{2}}{\\chi^2_{n-1, 1-\\alpha\/2}} \\right] \\hspace{19em} (8)$$<\/math-renderer><\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.2. Degrees of Freedom<\/h3><a id=\"user-content-52-degrees-of-freedom\" class=\"anchor\" aria-label=\"Permalink: 5.2. Degrees of Freedom\" href=\"#52-degrees-of-freedom\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\uc774 \ubd84\ud3ec\ub97c \uc4f0\ub294 \ubaa8\ub4e0 \uc790\ub9ac\uc5d0\uc11c \uc790\uc720\ub3c4\ub294 \uc81c\uc57d\uc774 \uac78\ub9b0 \ub4a4\uc5d0\ub3c4 \uc790\uc720\ub86d\uac8c \ubcc0\ud560 \uc218 \uc788\ub294 \uc591\uc758 \uac1c\uc218\ub97c \uc138\uba70,\n\uac19\uc740 \uc790\ub8cc\uc5d0\uc11c \ucd94\uc815\ud55c parameter \ud558\ub098\ub9c8\ub2e4 \ud558\ub098\uc529 \uc904\uc5b4\ub4e0\ub2e4. \uc2dd (7) \uc5d0\uc11c \uc81c\uc57d\uc740 \ucd94\uc815\ud55c \ud3c9\uade0 \ud558\ub098\uc774\uace0,\nsection 6 \uc758 \uac80\uc815\uc5d0\uc11c\ub294 \uae30\ub300\ub3c4\uc218\uac00 \ub9de\ucdb0\uc57c \ud558\ub294 \ud569\uacc4\uc5d0\uc11c \uc81c\uc57d\uc774 \ub098\uc628\ub2e4. \uc774 \uac1c\uc218\ub97c \ud2c0\ub9ac\uba74 \ud1b5\uacc4\ub7c9\uc774\n\ud2c0\ub9ac\ub294 \uac83\uc774 \uc544\ub2c8\ub77c \uae30\uc900\ubd84\ud3ec\uac00 \ud2c0\ub9ac\ub294\ub370, \uadf8\ucabd\uc774 \uc54c\uc544\ucc44\uae30 \ub354 \uc5b4\ub835\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">6. Tests Built on the Distribution<\/h2><a id=\"user-content-6-tests-built-on-the-distribution\" class=\"anchor\" aria-label=\"Permalink: 6. Tests Built on the Distribution\" href=\"#6-tests-built-on-the-distribution\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">6.1. Goodness of Fit<\/h3><a id=\"user-content-61-goodness-of-fit\" class=\"anchor\" aria-label=\"Permalink: 6.1. Goodness of Fit\" href=\"#61-goodness-of-fit\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$m$<\/math-renderer> \uac1c\uc758 cell \uc5d0 \ub5a8\uc5b4\uc9c4 \ub3c4\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$O_1, \\ldots, O_m$<\/math-renderer> \uacfc \uac00\uc124\uc774 \uae30\ub300\ud558\ub294 \ub3c4\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$E_1, \\ldots, E_m$<\/math-renderer> \uc774 \uc8fc\uc5b4\uc9c0\uba74,\nPearson \uc758 \ud1b5\uacc4\ub7c9\uc774 \uadf8 \ucc28\uc774\ub97c \uc7b0\ub2e4 [<a href=\"#ref-3\">3<\/a>].<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$X^{2} = \\sum_{j=1}^{m} \\frac{(O_j - E_j)^{2}}{E_j} \\hspace{19em} (9)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uac00\uc124 \uc544\ub798\uc5d0\uc11c \uac01 \ud56d\uc740 \ub300\ub7b5 \ud45c\uc900\ud654\ub41c \ud3b8\ucc28\uc758 \uc81c\uacf1\uc774\ubbc0\ub85c \ud569\uc740 \ub300\ub7b5 \ud45c\uc900\uc815\uaddc\uc758 \uc81c\uacf1\ud569\uc774 \ub418\uace0 \uc2dd (1) \uc774\n\uc801\uc6a9\ub41c\ub2e4. \uc790\ub8cc\uc5d0\uc11c \ucd94\uc815\ud55c parameter \uac00 \uc5c6\uc73c\uba74 \uc790\uc720\ub3c4\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$m - 1$<\/math-renderer> \uc774\uba70, \uc720\uc77c\ud55c \uc81c\uc57d\uc740 \uae30\ub300\ub3c4\uc218\uc758 \ud569\uc774\n\uad00\uce21\ub3c4\uc218\uc758 \ud569\uacfc \uac19\uc544\uc57c \ud55c\ub2e4\ub294 \uac83\uc774\ub2e4.<\/p>\n<p dir=\"auto\">\uc8fc\uc0ac\uc704\ub97c 300 \ubc88 \uad74\ub824 43, 52, 54, 61, 48, 42 \uac00 \ub098\uc654\ub2e4\uba74 \uae30\ub300\ub3c4\uc218\ub294 \ubaa8\ub450 50 \uc774\uace0 \ud1b5\uacc4\ub7c9\uc740 \uc790\uc720\ub3c4 5 \uc5d0\uc11c\n5.160 \uc774\ub2e4. Table 2 \uac00 5 percent \uc810\uc73c\ub85c 11.070 \uc744 \uc8fc\ubbc0\ub85c \uc774 \ub3c4\uc218\ub294 \ud2b9\ubcc4\ud560 \uac83\uc774 \uc5c6\uc73c\uba70, \uc815\ud655\ud55c \uc0c1\uc704\uaf2c\ub9ac\n\ud655\ub960\uc740 0.397 \uc774\ub2e4.<\/p>\n<p dir=\"auto\">\uc774 \uac80\uc815\uc744 \ubc1b\uce58\ub294 \uac83\uc740 \uac01 cell \ub3c4\uc218\uc5d0 \ub300\ud55c \uc815\uaddc \uadfc\uc0ac\uc774\uace0, \uae30\ub300\ub3c4\uc218\uac00 \uc791\uc73c\uba74 \uadf8 \uadfc\uc0ac\uac00 \uae68\uc9c4\ub2e4. \ud1b5\uc0c1\uc758\n\uc2e4\ubb34 \uae30\uc900\uc740 \ubaa8\ub4e0 \uae30\ub300\ub3c4\uc218\uac00 5 \uc774\uc0c1\uc774\uc5b4\uc57c \ud55c\ub2e4\ub294 \uac83\uc774\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">6.2. Independence in a Contingency Table<\/h3><a id=\"user-content-62-independence-in-a-contingency-table\" class=\"anchor\" aria-label=\"Permalink: 6.2. Independence in a Contingency Table\" href=\"#62-independence-in-a-contingency-table\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\ud589\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$r$<\/math-renderer> \uac1c, \uc5f4\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$c$<\/math-renderer> \uac1c\uc778 \ub3c4\uc218\ud45c\uc5d0\uc11c \ud589 \ubd84\ub958\uc640 \uc5f4 \ubd84\ub958\uac00 \ub3c5\ub9bd\uc774\ub77c\ub294 \uac00\uc124\uc740 \uac01 cell \uc744 margin \ub9cc\uc73c\ub85c\n\uc608\uce21\ud558\uba70, \uadf8 \uc608\uce21\uac12\uc5d0 \uc2dd (9) \ub97c \uc801\uc6a9\ud55c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$E_{ij} = \\frac{R_i C_j}{n} \\hspace{19em} (10)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc790\uc720\ub3c4\ub294 section 5.2 \ub97c \ub530\ub978\ub2e4. \ud45c\uc5d0\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$rc$<\/math-renderer> \uac1c\uc758 cell \uc774 \uc788\uace0 margin \uc5d0\uc11c \ucd94\uc815\ud55c \ud589\u00b7\uc5f4 \ube44\uc728\uc774 \uadf8\uc911\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$(r-1) + (c-1)$<\/math-renderer> \uac1c\ub97c \uc5c6\uc560\ubbc0\ub85c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$rc - 1 - (r-1) - (c-1) = (r-1)(c-1)$<\/math-renderer> \uc774 \ub0a8\ub294\ub2e4.<\/p>\n<p dir=\"auto\">\ud589\uc774 38, 62 \uc640 51, 49 \uc778 2\u00d72 \ud45c\uc5d0\uc11c\ub294 \uae30\ub300\ub3c4\uc218\uac00 \ubaa8\ub450 44.5 \uc544\ub2c8\uba74 55.5 \uc774\uace0, \ud1b5\uacc4\ub7c9\uc740 \uc790\uc720\ub3c4 1 \uc5d0\uc11c\n3.421, \uc0c1\uc704\uaf2c\ub9ac \ud655\ub960\uc740 0.064 \uc774\ub2e4. Table 2 \uc758 3.841 \uc5d0 \uacac\uc8fc\uba74 \ub450 \ud589\uc758 \ucc28\uc774\ub294 5 percent \uc218\uc900\uc5d0\uc11c\n\uc720\uc758\ud558\uc9c0 \uc54a\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">References<\/h2><a id=\"user-content-references\" class=\"anchor\" aria-label=\"Permalink: References\" href=\"#references\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\"><a id=\"user-content-ref-1\"><\/a>\n[1] Wilson, E. B., &amp; Hilferty, M. M. (1931). <a href=\"https:\/\/doi.org\/10.1073\/pnas.17.12.684\" rel=\"nofollow\">The Distribution of Chi-Square<\/a>. <em>Proceedings of the\nNational Academy of Sciences<\/em>, 17(12), 684\u2013688.<br>\n<a id=\"user-content-ref-2\"><\/a>\n[2] Cochran, W. G. (1934). <a href=\"https:\/\/doi.org\/10.1017\/S0305004100016595\" rel=\"nofollow\">The Distribution of Quadratic Forms in a Normal System, with\nApplications to the Analysis of Covariance<\/a>. <em>Mathematical Proceedings of the Cambridge\nPhilosophical Society<\/em>, 30(2), 178\u2013191.<br>\n<a id=\"user-content-ref-3\"><\/a>\n[3] Pearson, K. (1900). <a href=\"https:\/\/doi.org\/10.1080\/14786440009463897\" rel=\"nofollow\">On the Criterion that a Given System of Deviations from the Probable in the\nCase of a Correlated System of Variables is Such that it Can be Reasonably Supposed to have Arisen\nfrom Random Sampling<\/a>. <em>The London, Edinburgh, and Dublin Philosophical Magazine and Journal of\nScience<\/em>, 50(302), 157\u2013175.<br>\n<a id=\"user-content-ref-4\"><\/a>\n[4] Johnson, N. L., Kotz, S., &amp; Balakrishnan, N. (1994). <em>Continuous Univariate Distributions<\/em>\n(Vol. 1, 2nd ed.). Wiley. ISBN 978-0-471-58495-7.<\/p>\n<hr>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix A. Terminology<\/h2><a id=\"user-content-appendix-a-terminology\" class=\"anchor\" aria-label=\"Permalink: Appendix A. Terminology\" href=\"#appendix-a-terminology\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<ul dir=\"auto\">\n<li>\n<strong>Cell<\/strong>: \ub3c4\uc218\ub97c \ub2f4\ub294, \ubc94\uc8fc \ubd84\ub958\uc758 \ud55c \uac08\ub798.<\/li>\n<li>\n<strong>Contingency table<\/strong>: \ub450 \ubc94\uc8fc\ud615 \ubcc0\uc218\ub85c \uad50\ucc28\ubd84\ub958\ud55c \ub3c4\uc218\ud45c.<\/li>\n<li>\n<strong>Degrees of freedom<\/strong>: \uc81c\uc57d\uc774 \uac78\ub9b0 \ub4a4\uc5d0\ub3c4 \uc790\uc720\ub86d\uac8c \ubcc0\ud560 \uc218 \uc788\ub294 \uc591\uc758 \uac1c\uc218\uc774\uba70, chi-squared\ndistribution \uc758 parameter.<\/li>\n<li>\n<strong>Excess kurtosis<\/strong>: \ub124 \ubc88\uc9f8 \ud45c\uc900\ud654 moment \uc5d0\uc11c 3 \uc744 \ube80 \uac12\uc774\uba70, \uc815\uaddc\ubd84\ud3ec\uc5d0\uc11c 0.<\/li>\n<li>\n<strong>Margin<\/strong>: \ub3c4\uc218\ud45c\uc758 \ud589 \ud569\uacc4 \ub610\ub294 \uc5f4 \ud569\uacc4.<\/li>\n<li>\n<strong>Moment generating function<\/strong>: <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$t$<\/math-renderer> \uc758 \ud568\uc218\ub85c \ubcf8 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$E[e^{tX}]$<\/math-renderer> \uc774\uba70, \uc6d0\uc810\uc5d0\uc11c\uc758 \ub3c4\ud568\uc218\uac00 moment.<\/li>\n<li>\n<strong>Skewness<\/strong>: \uc138 \ubc88\uc9f8 \ud45c\uc900\ud654 moment \uc774\uba70, \ub300\uce6d\ubd84\ud3ec\uc5d0\uc11c 0.<\/li>\n<li>\n<strong>Support<\/strong>: \ubd84\ud3ec\uac00 \uc591\uc758 \ud655\ub960\uc744 \uc8fc\ub294 \uac12\uc758 \uc9d1\ud569.<\/li>\n<li>\n<strong>Survival function<\/strong>: 1 \uc5d0\uc11c \ubd84\ud3ec\ud568\uc218\ub97c \ube80 \uac83, \uace7 \uc0c1\uc704\uaf2c\ub9ac \ud655\ub960.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix B. Derivations<\/h2><a id=\"user-content-appendix-b-derivations\" class=\"anchor\" aria-label=\"Permalink: Appendix B. Derivations\" href=\"#appendix-b-derivations\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">B.1. Square of a Normal Variable<\/h3><a id=\"user-content-b1-square-of-a-normal-variable\" class=\"anchor\" aria-label=\"Permalink: B.1. Square of a Normal Variable\" href=\"#b1-square-of-a-normal-variable\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\uc2dd (1) \uc758 \uad6c\uc131\uc740 \ud45c\uc900\uc815\uaddc \ubcc0\uc218\uc5d0\uc11c \ucd9c\ubc1c\ud558\uc9c0\ub9cc, \uce21\uc815\uac12\uc774 \ud45c\uc900\ud654\ub41c \ucc44\ub85c \uc624\ub294 \uc77c\uc740 \ub4dc\ubb3c\ub2e4. \uc544\ub798 \uc815\ub9ac\ub294\n\uc77c\ubc18\uc801\uc778 \uacbd\uc6b0\ub97c \ub2e4\ub8ec\ub2e4.<\/p>\n<p dir=\"auto\"><strong>\uc815\ub9ac.<\/strong> <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$X$<\/math-renderer> \uac00 \uc5f0\uc18d\ud655\ub960\ubcc0\uc218\uc774\uace0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$X \\sim N(\\mu, \\sigma^{2})$<\/math-renderer>, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\sigma \\gt 0$<\/math-renderer> \uc774\ub77c \ud558\uc790. \uadf8\ub7ec\uba74\n\ud45c\uc900\ud654\ud55c \ud3b8\ucc28\uc758 \uc81c\uacf1\uc740 \uc790\uc720\ub3c4\uac00 1 \uc778 chi-squared distribution \uc744 \ub530\ub978\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$Y = \\frac{(X - \\mu)^{2}}{\\sigma^{2}} \\sim \\chi^2_1 \\hspace{19em} (11)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><strong>\uc99d\uba85.<\/strong> <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Z = (X - \\mu)\/\\sigma$<\/math-renderer> \ub85c \ub450\uc790. \uc815\uaddc \ubcc0\uc218\uc758 \uc77c\ucc28\ubcc0\ud658\uc740 \uc815\uaddc\uc774\uace0 \uc774 \ubcc0\ud658\uc740 \ud3c9\uade0 0, \ubd84\uc0b0 1 \uc744\n\uac00\uc9c0\ubbc0\ub85c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Z \\sim N(0, 1)$<\/math-renderer> \uc774\uace0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Y = Z^{2}$<\/math-renderer> \uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Y$<\/math-renderer> \ub294 \uc81c\uacf1\uc774\ubbc0\ub85c \uc74c\uc218\uac00 \ub420 \uc218 \uc5c6\uace0, \ub530\ub77c\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$y \\le 0$<\/math-renderer> \uc5d0\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$F_Y(y) = 0$<\/math-renderer> \uc774\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$y \\gt 0$<\/math-renderer> \uc5d0\uc11c \uc0ac\uac74\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Y \\le y$<\/math-renderer> \ub294 \uc0ac\uac74 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$-\\sqrt{y} \\le Z \\le \\sqrt{y}$<\/math-renderer> \uc640 \uac19\uc73c\ubbc0\ub85c, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Y$<\/math-renderer> \uc758 \ubd84\ud3ec\ud568\uc218\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\Phi$<\/math-renderer> \ub85c \uc801\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Z$<\/math-renderer> \uc758\n\ubd84\ud3ec\ud568\uc218\uc5d0\uc11c \ub530\ub77c \ub098\uc628\ub2e4. \ub450 \ubc88\uc9f8 \ub4f1\ud638\ub294 \ud45c\uc900\uc815\uaddc\uc758 \ub300\uce6d\uc131\uc744 \uc4f4\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$F_Y(y) = \\Phi(\\sqrt{y}) - \\Phi(-\\sqrt{y}) = 2\\Phi(\\sqrt{y}) - 1 \\hspace{19em} (12)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$y$<\/math-renderer> \ub85c \ubbf8\ubd84\ud55c\ub2e4. \uc5f0\uc1c4\ubc95\uce59\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\sqrt{y}$<\/math-renderer> \uc758 \ub3c4\ud568\uc218\uc778 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$1\/(2\\sqrt{y})$<\/math-renderer> \ub97c \ub0b4\ub193\uace0, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\Phi' = \\phi$<\/math-renderer> \ub294\n\ud45c\uc900\uc815\uaddc \ubc00\ub3c4\ud568\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\phi(z) = e^{-z^{2}\/2}\/\\sqrt{2\\pi}$<\/math-renderer> \uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$f_Y(y) = 2 \\phi(\\sqrt{y}) \\cdot \\frac{1}{2\\sqrt{y}} = \\frac{1}{\\sqrt{2\\pi}} y^{-1\/2} e^{-y\/2} \\hspace{19em} (13)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\ub0a8\uc740 \uc77c\uc740 \uc2dd (13) \uc744 \uc54c\uc544\ubcf4\ub294 \uac83\uc774\ub2e4. \uc2dd (2) \uc5d0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k = 1$<\/math-renderer> \uc744 \ub123\uc73c\uba74 \ubc00\ub3c4\ud568\uc218\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$y^{-1\/2} e^{-y\/2} \/ \\left( 2^{1\/2}\\Gamma(1\/2) \\right)$<\/math-renderer> \uac00 \ub418\ub294\ub370, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\Gamma(1\/2) = \\sqrt{\\pi}$<\/math-renderer> \uc774\ubbc0\ub85c \uadf8\n\uc0c1\uc218\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\sqrt{2}\\sqrt{\\pi} = \\sqrt{2\\pi}$<\/math-renderer> \uc774\ub2e4. \ub450 \ubc00\ub3c4\ud568\uc218\ub294 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$y \\gt 0$<\/math-renderer> \uc5d0\uc11c \uc77c\uce58\ud558\uace0 \uadf8 \ubc16\uc5d0\uc11c\ub294 \ub458 \ub2e4\n0 \uc774\ubbc0\ub85c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Y \\sim \\chi^2_1$<\/math-renderer> \uc774\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\blacksquare$<\/math-renderer><\/p>\n<p dir=\"auto\">\uc2dd (5) \uc640 \ud568\uaed8 \uc77d\uc73c\uba74, \uc774 \uc815\ub9ac\ub294 \ud45c\uc900\uc815\uaddc \ubcc0\uc218\uac00 \uc544\ub2c8\ub77c \uce21\uc815\uac12\uc5d0\uc11c \uc774 \ubd84\ud3ec\uc871\uc5d0 \ub2ff\uac8c \ud574 \uc8fc\ub294 \uac83\uc774\ub2e4.\n\ub3c5\ub9bd\uc778 \uc815\uaddc \uad00\uce21\uac12 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$n$<\/math-renderer> \uac1c\ub97c \ud45c\uc900\ud654\ud574 \uc81c\uacf1\ud558\uba74 \ub3c5\ub9bd\uc778 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\chi^2_1$<\/math-renderer> \ubcc0\uc218 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$n$<\/math-renderer> \uac1c\uac00 \ub418\uace0, \uadf8 \ud569\uc774\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\chi^2_n$<\/math-renderer> \uc774\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">B.2. Moment Generating Function<\/h3><a id=\"user-content-b2-moment-generating-function\" class=\"anchor\" aria-label=\"Permalink: B.2. Moment Generating Function\" href=\"#b2-moment-generating-function\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\uc81c\uacf1 \ud558\ub098\uc5d0 \ub300\ud574, \uc815\uc758\ud558\ub294 \uc801\ubd84\uc5d0\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$u = z\\sqrt{1-2t}$<\/math-renderer> \ub85c \uce58\ud658\ud55c\ub2e4. \uc774 \uce58\ud658\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$t \\lt 1\/2$<\/math-renderer> \uc5d0\uc11c\ub9cc\n\uc815\ub2f9\ud558\uba70, \uadf8 \ubc94\uc704\uc5d0\uc11c \uc9c0\uc218\uac00 \uc74c\uc218\ub85c \ub0a8\uc544 \uc801\ubd84\uc774 \uc218\ub834\ud55c\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$E\\left[ e^{tZ^{2}} \\right] = \\int_{-\\infty}^{\\infty} \\frac{1}{\\sqrt{2\\pi}} e^{tz^{2}} e^{-z^{2}\/2} dz = \\frac{1}{\\sqrt{1-2t}} \\int_{-\\infty}^{\\infty} \\frac{e^{-u^{2}\/2}}{\\sqrt{2\\pi}} du = (1-2t)^{-1\/2} \\hspace{19em} (14)$$<\/math-renderer><\/p>\n<p dir=\"auto\">\ub0a8\uc740 \uc801\ubd84\uc740 \ud45c\uc900\uc815\uaddc \ubc00\ub3c4\ud568\uc218\uc758 \uc804\uccb4 \uc9c8\ub7c9\uc774\ubbc0\ub85c 1 \uc774\ub2e4. \uc2dd (1) \uc758 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$Z_i$<\/math-renderer> \uac00 \ub3c5\ub9bd\uc774\ubbc0\ub85c \uadf8 \ud569\uc758 moment\ngenerating function \uc740 \uc774\ub7f0 \uc778\uc790 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k$<\/math-renderer> \uac1c\uc758 \uacf1\uc774\uace0, \uadf8\uac83\uc774 \uc2dd (3) \uc774\ub2e4. \uc2dd (5) \ub294 \uac19\uc740 \ub9d0\uc744 \uac70\uafb8\ub85c \uc77d\uc740\n\uac83\uc73c\ub85c, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$(1-2t)^{-m\/2}$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$(1-2t)^{-n\/2}$<\/math-renderer> \uc758 \uacf1\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$(1-2t)^{-(m+n)\/2}$<\/math-renderer> \uc774\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">B.3. Mean and Variance<\/h3><a id=\"user-content-b3-mean-and-variance\" class=\"anchor\" aria-label=\"Permalink: B.3. Mean and Variance\" href=\"#b3-mean-and-variance\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\uc2dd (3) \uc744 \uc6d0\uc810\uc5d0\uc11c \uc804\uac1c\ud558\uac70\ub098 \ub450 \ubc88 \ubbf8\ubd84\ud55c\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$t = 0$<\/math-renderer> \uc5d0\uc11c\uc758 \ucc98\uc74c \ub450 \ub3c4\ud568\uc218\uac00 \ucc98\uc74c \ub450 raw moment \ub97c \uc900\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$M'(t) = k(1-2t)^{-k\/2 - 1}, \\qquad M''(t) = k(k+2)(1-2t)^{-k\/2 - 2} \\hspace{19em} (15)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$t = 0$<\/math-renderer> \uc744 \ub123\uc73c\uba74 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$E[X] = k$<\/math-renderer> \uc640 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$E[X^2] = k(k+2)$<\/math-renderer> \uac00 \ub098\uc624\ubbc0\ub85c \ubd84\uc0b0\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$k(k+2) - k^2 = 2k$<\/math-renderer> \uc774\uace0, \uc774\uac83\uc774\n\uc2dd (4) \uc774\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">B.4. Loss of One Degree of Freedom<\/h3><a id=\"user-content-b4-loss-of-one-degree-of-freedom\" class=\"anchor\" aria-label=\"Permalink: B.4. Loss of One Degree of Freedom\" href=\"#b4-loss-of-one-degree-of-freedom\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\ucc38\ud3c9\uade0\uc5d0\uc11c\uc758 \ud3b8\ucc28\uc81c\uacf1\ud569\uc744 \uc4f0\uace0 \uac01 \uc81c\uacf1 \uc548\uc5d0\uc11c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\bar{x}$<\/math-renderer> \ub97c \ub354\ud588\ub2e4 \ube80\ub2e4. \uc804\uac1c\ud558\uba74 \uc138 \uc870\uac01\uc774 \ub098\uc628\ub2e4.\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\bar{x}$<\/math-renderer> \uc5d0\uc11c\uc758 \ud3b8\ucc28\uc81c\uacf1\ud569, \uad50\ucc28\ud56d, \uadf8\ub9ac\uace0 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$n(\\bar{x} - \\mu)^2$<\/math-renderer> \uc774\ub2e4.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$$\\sum_{i=1}^{n} (x_i - \\mu)^{2} = \\sum_{i=1}^{n} (x_i - \\bar{x})^{2} + 2(\\bar{x} - \\mu)\\sum_{i=1}^{n}(x_i - \\bar{x}) + n(\\bar{x} - \\mu)^{2} \\hspace{19em} (16)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\bar{x}$<\/math-renderer> \uc5d0\uc11c\uc758 \ud3b8\ucc28\ub294 \ud569\uc774 0 \uc774\ubbc0\ub85c \uad50\ucc28\ud56d\uc774 \uc0ac\ub77c\uc9c0\uace0 \ub450 \uc870\uac01\uc774 \ub0a8\ub294\ub2e4. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\sigma^2$<\/math-renderer> \uc73c\ub85c \ub098\ub204\uba74\n\uc88c\ubcc0\uc740 \ud45c\uc900\uc815\uaddc \uc81c\uacf1 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$n$<\/math-renderer> \uac1c\uc758 \ud569\uc774\ubbc0\ub85c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\chi^2_n$<\/math-renderer> \uc774\ub2e4. \ub9c8\uc9c0\ub9c9 \ud56d\uc740\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\left( (\\bar{x}-\\mu)\/(\\sigma\/\\sqrt{n}) \\right)^2$<\/math-renderer>, \uace7 \ud45c\uc900\uc815\uaddc \uc81c\uacf1 \ud558\ub098\uc774\ubbc0\ub85c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\chi^2_1$<\/math-renderer> \uc774\ub2e4. Cochran\n\uc758 \uc815\ub9ac [<a href=\"#ref-2\">2<\/a>] \ub294 \uc6b0\ubcc0\uc758 \ub450 \ud56d\uc774 \ub3c5\ub9bd\uc774\uace0 \uac01\uac01 chi-squared \ub77c\uace0 \ub9d0\ud558\ubbc0\ub85c, \uc790\uc720\ub3c4\uac00 \ube7c\uc838 \uccab\n\ud56d\uc740 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$\\chi^2_{n-1}$<\/math-renderer> \uc774\ub2e4. \uadf8 \uccab \ud56d\uc774 <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$(n-1)s^2\/\\sigma^2$<\/math-renderer> \uc774\uba70, \uc774\uac83\uc774 \uc2dd (7) \uc774\ub2e4.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix C. Computation<\/h2><a id=\"user-content-appendix-c-computation\" class=\"anchor\" aria-label=\"Permalink: Appendix C. Computation\" href=\"#appendix-c-computation\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">\ubd84\ud3ec\uc640 \uadf8 \uc5ed\ud568\uc218\ub294 <code>scipy.stats.chi2<\/code> \uc5d0\uc11c \uc5bb\ub294\ub2e4. Survival function <code>sf<\/code> \ub294 \uc0c1\uc704\uaf2c\ub9ac\ub97c \uace7\ubc14\ub85c \uc8fc\uba70\n\uaf2c\ub9ac \uae4a\uc740 \uacf3\uc5d0\uc11c \uc815\ubc00\ub3c4\ub97c \uc783\ub294 <code>1 - cdf<\/code> \ubcf4\ub2e4 \ub0ab\ub2e4. <code>isf<\/code> \ub294 \uadf8\uac83\uc744 \ub4a4\uc9d1\uc5b4 Table 2 \uc758 \uac12\uc744 \ub9cc\ub4e0\ub2e4.<\/p>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Python\nfrom scipy import stats\n\nprint(stats.chi2.isf(0.05, df=5))       # upper 5 percent point\nprint(stats.chi2.sf(5.16, df=5))        # upper tail probability of an observed statistic\nprint(stats.chi2.stats(df=5, moments='mv'))\"><pre><span class=\"pl-c\"># Python<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">scipy<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">stats<\/span>\n\n<span class=\"pl-en\">print<\/span>(<span class=\"pl-s1\">stats<\/span>.<span class=\"pl-c1\">chi2<\/span>.<span class=\"pl-c1\">isf<\/span>(<span class=\"pl-c1\">0.05<\/span>, <span class=\"pl-s1\">df<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">5<\/span>))       <span class=\"pl-c\"># upper 5 percent point<\/span>\n<span class=\"pl-en\">print<\/span>(<span class=\"pl-s1\">stats<\/span>.<span class=\"pl-c1\">chi2<\/span>.<span class=\"pl-c1\">sf<\/span>(<span class=\"pl-c1\">5.16<\/span>, <span class=\"pl-s1\">df<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">5<\/span>))        <span class=\"pl-c\"># upper tail probability of an observed statistic<\/span>\n<span class=\"pl-en\">print<\/span>(<span class=\"pl-s1\">stats<\/span>.<span class=\"pl-c1\">chi2<\/span>.<span class=\"pl-c1\">stats<\/span>(<span class=\"pl-s1\">df<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">5<\/span>, <span class=\"pl-s1\">moments<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s\">'mv'<\/span>))<\/pre><\/div>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"11.070497693516355\n0.3966674666097388\n(np.float64(5.0), np.float64(10.0))\"><pre lang=\"text\" class=\"notranslate\"><code>11.070497693516355\n0.3966674666097388\n(np.float64(5.0), np.float64(10.0))\n<\/code><\/pre><\/div>\n<p dir=\"auto\">Section 6 \uc758 \ub450 \uac80\uc815\uc740 \uac01\uac01 \ud638\ucd9c \ud55c \ubc88\uc774\uace0, \ub458 \ub2e4 \ud1b5\uacc4\ub7c9\uacfc \uadf8 \uc0c1\uc704\uaf2c\ub9ac \ud655\ub960\uc744 \ud568\uaed8 \ub3cc\ub824\uc900\ub2e4.<\/p>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Python\nimport numpy as np\nfrom scipy import stats\n\nprint(stats.chisquare(f_obs=np.array([43, 52, 54, 61, 48, 42])))\nstatistic, p_value, degrees, expected = stats.chi2_contingency(np.array([[38, 62], [51, 49]]),\n                                                               correction=False)\nprint(round(statistic, 4), degrees, round(p_value, 4))\"><pre><span class=\"pl-c\"># Python<\/span>\n<span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">numpy<\/span> <span class=\"pl-k\">as<\/span> <span class=\"pl-s1\">np<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">scipy<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">stats<\/span>\n\n<span class=\"pl-en\">print<\/span>(<span class=\"pl-s1\">stats<\/span>.<span class=\"pl-c1\">chisquare<\/span>(<span class=\"pl-s1\">f_obs<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">np<\/span>.<span class=\"pl-c1\">array<\/span>(&#91;<span class=\"pl-c1\">43<\/span>, <span class=\"pl-c1\">52<\/span>, <span class=\"pl-c1\">54<\/span>, <span class=\"pl-c1\">61<\/span>, <span class=\"pl-c1\">48<\/span>, <span class=\"pl-c1\">42<\/span>&#93;)))\n<span class=\"pl-s1\">statistic<\/span>, <span class=\"pl-s1\">p_value<\/span>, <span class=\"pl-s1\">degrees<\/span>, <span class=\"pl-s1\">expected<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">stats<\/span>.<span class=\"pl-c1\">chi2_contingency<\/span>(<span class=\"pl-s1\">np<\/span>.<span class=\"pl-c1\">array<\/span>(&#91;&#91;<span class=\"pl-c1\">38<\/span>, <span class=\"pl-c1\">62<\/span>&#93;, &#91;<span class=\"pl-c1\">51<\/span>, <span class=\"pl-c1\">49<\/span>&#93;&#93;),\n                                                               <span class=\"pl-s1\">correction<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">False<\/span>)\n<span class=\"pl-en\">print<\/span>(<span class=\"pl-en\">round<\/span>(<span class=\"pl-s1\">statistic<\/span>, <span class=\"pl-c1\">4<\/span>), <span class=\"pl-s1\">degrees<\/span>, <span class=\"pl-en\">round<\/span>(<span class=\"pl-s1\">p_value<\/span>, <span class=\"pl-c1\">4<\/span>))<\/pre><\/div>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"Power_divergenceResult(statistic=np.float64(5.16), pvalue=np.float64(0.3966674666097388))\n3.4214 1 0.0644\"><pre lang=\"text\" class=\"notranslate\"><code>Power_divergenceResult(statistic=np.float64(5.16), pvalue=np.float64(0.3966674666097388))\n3.4214 1 0.0644\n<\/code><\/pre><\/div>\n<p dir=\"auto\">\uae30\ubcf8\uac12 \ub450 \uac00\uc9c0\ub294 \uc54c\uc544 \ub458 \ub9cc\ud558\ub2e4. <code>stats.chisquare<\/code> \ub294 <code>f_exp<\/code> \ub97c \uc8fc\uc9c0 \uc54a\uc73c\uba74 \uae30\ub300\ub3c4\uc218\uac00 \ubaa8\ub450 \uac19\ub2e4\uace0\n\ubcf4\uba70, <code>ddof<\/code> \ub85c \ucd94\uc815\ud55c parameter \uac1c\uc218\ub97c \uc54c\ub824\uc8fc\uc9c0 \uc54a\uc73c\uba74 \uc790\uc720\ub3c4\ub97c <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"827e05d3221ecb79bd859a0fbd9a9cb4\">$m - 1$<\/math-renderer> \ub85c \uc7a1\ub294\ub2e4.\n<code>stats.chi2_contingency<\/code> \ub294 2\u00d72 \ud45c\uc5d0\uc11c Yates \uc758 \uc5f0\uc18d\uc131 \ubcf4\uc815\uc744 \uae30\ubcf8\uc73c\ub85c \uc801\uc6a9\ud558\ubbc0\ub85c, section 6.2 \uc758\n\ubcf4\uc815\ud558\uc9c0 \uc54a\uc740 \ud1b5\uacc4\ub7c9\uc744 \uc7ac\ud604\ud558\ub824\uba74 <code>correction=False<\/code> \uac00 \ud544\uc694\ud558\ub2e4.<\/p>\n<\/article><\/div><\/div><\/p>\n<\/div><\/div>\n\n\n\n<div class=\"wp-block-kadence-tab kt-tab-inner-content kt-inner-tab-2 kt-inner-tab6968_4ea950-d2\"><div class=\"kt-tab-inner-content-inner\"><p><div class=\"github-readme-container markdown-body\"><div id=\"file\" class=\"md\" data-path=\"Distributions\/Chi-squared\/chi-squared-distribution.md\"><article class=\"markdown-body entry-content container-lg\" itemprop=\"text\"><div class=\"markdown-heading\" dir=\"auto\"><h1 class=\"heading-element\" dir=\"auto\">The Chi-Squared Distribution<\/h1><a id=\"user-content-the-chi-squared-distribution\" class=\"anchor\" aria-label=\"Permalink: The Chi-Squared Distribution\" href=\"#the-chi-squared-distribution\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Version 9 | Created: 2026-09-03 | Updated: 2026-11-07 13:46 UTC<\/p>\n<ul dir=\"auto\">\n<li><a href=\"#1-scope\">1. Scope<\/a><\/li>\n<li><a href=\"#2-definition\">2. Definition<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#21-construction-from-normal-variables\">2.1. Construction from Normal Variables<\/a><\/li>\n<li><a href=\"#22-density-function\">2.2. Density Function<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#3-properties\">3. Properties<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#31-moments\">3.1. Moments<\/a><\/li>\n<li><a href=\"#32-additivity\">3.2. Additivity<\/a><\/li>\n<li><a href=\"#33-shape\">3.3. Shape<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#4-relation-to-other-distributions\">4. Relation to Other Distributions<\/a><\/li>\n<li><a href=\"#5-role-in-sampling\">5. Role in Sampling<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#51-sample-variance-of-a-normal-population\">5.1. Sample Variance of a Normal Population<\/a><\/li>\n<li><a href=\"#52-degrees-of-freedom\">5.2. Degrees of Freedom<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#6-tests-built-on-the-distribution\">6. Tests Built on the Distribution<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#61-goodness-of-fit\">6.1. Goodness of Fit<\/a><\/li>\n<li><a href=\"#62-independence-in-a-contingency-table\">6.2. Independence in a Contingency Table<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#references\">References<\/a><\/li>\n<li><a href=\"#appendix-a-terminology\">Appendix A. Terminology<\/a><\/li>\n<li><a href=\"#appendix-b-derivations\">Appendix B. Derivations<\/a>\n<ul dir=\"auto\">\n<li><a href=\"#b1-square-of-a-normal-variable\">B.1. Square of a Normal Variable<\/a><\/li>\n<li><a href=\"#b2-moment-generating-function\">B.2. Moment Generating Function<\/a><\/li>\n<li><a href=\"#b3-mean-and-variance\">B.3. Mean and Variance<\/a><\/li>\n<li><a href=\"#b4-loss-of-one-degree-of-freedom\">B.4. Loss of One Degree of Freedom<\/a><\/li>\n<\/ul>\n<\/li>\n<li><a href=\"#appendix-c-computation\">Appendix C. Computation<\/a><\/li>\n<\/ul>\n<blockquote>\n<p dir=\"auto\">A note on the distribution of a sum of squared standard normal variables: how it is built, what\nits density and moments are, how it relates to the other sampling distributions, and why it turns\nup in the tests that use it.<\/p>\n<\/blockquote>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">1. Scope<\/h2><a id=\"user-content-1-scope\" class=\"anchor\" aria-label=\"Permalink: 1. Scope\" href=\"#1-scope\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">The chi-squared distribution is not usually met as a model of data. It is met as the distribution\nof a statistic, and it earns its place because two very different quantities happen to follow it.\nOne is the scaled sample variance of a normal population. The other is Pearson's measure of the\ngap between observed and expected counts. Both reduce to a sum of squares of quantities that are\napproximately standard normal, and that sum is what the distribution describes.<\/p>\n<p dir=\"auto\">This document defines the distribution, gives its density and moments, sets out its relations to\nthe normal, gamma, t and F distributions, and shows the two settings above. The derivations are in\n<a href=\"#appendix-b-derivations\">Appendix B<\/a> and the calls that evaluate the distribution are in\n<a href=\"#appendix-c-computation\">Appendix C<\/a>.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">2. Definition<\/h2><a id=\"user-content-2-definition\" class=\"anchor\" aria-label=\"Permalink: 2. Definition\" href=\"#2-definition\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">2.1. Construction from Normal Variables<\/h3><a id=\"user-content-21-construction-from-normal-variables\" class=\"anchor\" aria-label=\"Permalink: 2.1. Construction from Normal Variables\" href=\"#21-construction-from-normal-variables\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Let <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Z_1, \\ldots, Z_k$<\/math-renderer> be independent standard normal variables. The chi-squared distribution with\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k$<\/math-renderer> degrees of freedom is the distribution of their sum of squares, written <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$X \\sim \\chi^2_k$<\/math-renderer>.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$X = \\sum_{i=1}^{k} Z_i^{2} \\hspace{19em} (1)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The construction fixes three things at once. The support is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$x \\ge 0$<\/math-renderer>, because a sum of squares\ncannot be negative. The distribution has one parameter, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k$<\/math-renderer>, and it counts the squares being added.\nThe distribution is not symmetric, because squaring folds the two tails of the normal onto one\nside.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">2.2. Density Function<\/h3><a id=\"user-content-22-density-function\" class=\"anchor\" aria-label=\"Permalink: 2.2. Density Function\" href=\"#22-density-function\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">The density of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\chi^2_k$<\/math-renderer> on <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$x \\gt 0$<\/math-renderer> involves the gamma function <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\Gamma$<\/math-renderer>.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$f(x) = \\frac{1}{2^{k\/2} \\Gamma(k\/2)} x^{k\/2 - 1} e^{-x\/2} \\hspace{19em} (2)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Nothing in this expression requires <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k$<\/math-renderer> to be a whole number. The counting construction of\nsection 2.1 gives integer <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k$<\/math-renderer>, but the density is a proper density for every real <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k \\gt 0$<\/math-renderer>, and\nthat is what lets the distribution be used with the fractional degrees of freedom that some\napproximations produce [<a href=\"#ref-4\">4<\/a>].<\/p>\n<p dir=\"auto\">The moment generating function is simpler than the density and is the tool used for most of what\nfollows.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$M(t) = E\\left[ e^{tX} \\right] = (1 - 2t)^{-k\/2}, \\qquad t \\lt \\tfrac{1}{2} \\hspace{19em} (3)$$<\/math-renderer><\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">3. Properties<\/h2><a id=\"user-content-3-properties\" class=\"anchor\" aria-label=\"Permalink: 3. Properties\" href=\"#3-properties\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.1. Moments<\/h3><a id=\"user-content-31-moments\" class=\"anchor\" aria-label=\"Permalink: 3.1. Moments\" href=\"#31-moments\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Differentiating equation (3) at the origin gives the moments. The mean is the degrees of freedom\nand the variance is twice it.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$E[X] = k, \\qquad \\mathrm{Var}[X] = 2k, \\qquad \\gamma_1 = \\sqrt{8\/k}, \\qquad \\gamma_2 = 12\/k \\hspace{19em} (4)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Here <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\gamma_1$<\/math-renderer> is the skewness and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\gamma_2$<\/math-renderer> the excess kurtosis. Both fall as <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k$<\/math-renderer> grows, which\nis the whole of the distribution's large-sample behaviour in two numbers.<\/p>\n<p dir=\"auto\">Table 1. Moments of the chi-squared distribution.<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th align=\"right\">Degrees of freedom<\/th>\n<th align=\"right\">Mean<\/th>\n<th align=\"right\">Variance<\/th>\n<th align=\"right\">Skewness<\/th>\n<th align=\"right\">Excess kurtosis<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"right\">1<\/td>\n<td align=\"right\">1<\/td>\n<td align=\"right\">2<\/td>\n<td align=\"right\">2.8284<\/td>\n<td align=\"right\">12.0<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">2<\/td>\n<td align=\"right\">2<\/td>\n<td align=\"right\">4<\/td>\n<td align=\"right\">2.0000<\/td>\n<td align=\"right\">6.0<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">3<\/td>\n<td align=\"right\">3<\/td>\n<td align=\"right\">6<\/td>\n<td align=\"right\">1.6330<\/td>\n<td align=\"right\">4.0<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">5<\/td>\n<td align=\"right\">5<\/td>\n<td align=\"right\">10<\/td>\n<td align=\"right\">1.2649<\/td>\n<td align=\"right\">2.4<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">10<\/td>\n<td align=\"right\">10<\/td>\n<td align=\"right\">20<\/td>\n<td align=\"right\">0.8944<\/td>\n<td align=\"right\">1.2<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\">That the mean equals <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k$<\/math-renderer> is worth holding on to. A test statistic that is supposed to be <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\chi^2_k$<\/math-renderer>\nand comes out near <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k$<\/math-renderer> is unremarkable; one that comes out at several times <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k$<\/math-renderer> is the signal the\ntest is looking for.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.2. Additivity<\/h3><a id=\"user-content-32-additivity\" class=\"anchor\" aria-label=\"Permalink: 3.2. Additivity\" href=\"#32-additivity\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">If <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$X \\sim \\chi^2_m$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Y \\sim \\chi^2_n$<\/math-renderer> are independent, their sum is chi-squared and the\ndegrees of freedom add.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$X + Y \\sim \\chi^2_{m+n} \\hspace{19em} (5)$$<\/math-renderer><\/p>\n<p dir=\"auto\">This follows immediately from equation (1), since the sum of two independent sums of squares is\nagain a sum of squares, and just as directly from equation (3), since the product of the two moment\ngenerating functions is the one with exponent <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$-(m+n)\/2$<\/math-renderer>. Degrees of freedom behave like a count\nbecause they are one.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">3.3. Shape<\/h3><a id=\"user-content-33-shape\" class=\"anchor\" aria-label=\"Permalink: 3.3. Shape\" href=\"#33-shape\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">The shape changes qualitatively with <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k$<\/math-renderer>. For <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k = 1$<\/math-renderer> the density diverges at the origin, and for\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k = 2$<\/math-renderer> it is the exponential density, which is finite at the origin but still decreasing. From\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k = 3$<\/math-renderer> the density vanishes at the origin and is unimodal, with the mode at <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k - 2$<\/math-renderer>.<\/p>\n<p dir=\"auto\"><a target=\"_blank\" rel=\"noopener noreferrer\" href=\"https:\/\/github.com\/ykim2718\/Math\/blob\/main\/Distributions\/Chi-squared\/chi-squared-distribution_fig\/chi_squared_distribution.png\"><img src=\"https:\/\/ykim.synology.me\/wordpress\/wp-json\/gh-readme\/v1\/asset?user=ykim2718&#038;repo=Math&#038;branch=main&#038;path=Distributions\/Chi-squared\/chi-squared-distribution_fig\/chi_squared_distribution.png&#038;sig=2582d54acc3f08675c60e68c2005f472acd3d5ce9afc0d8422ed92ca0308a684\" width=\"900\" alt=\"Fig 1\" style=\"max-width: 100%;\"><\/a><\/p>\n<p dir=\"auto\">Fig 1. Chi-squared density (a) and distribution function (b) for five values of the degrees of\nfreedom. The density for <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k = 1$<\/math-renderer> leaves the top of the panel; it is unbounded at the origin.<\/p>\n<p dir=\"auto\">As <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k$<\/math-renderer> grows the density becomes more symmetric, and the standardised variable converges to the\nstandard normal.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$\\frac{X - k}{\\sqrt{2k}} \\xrightarrow{d} N(0, 1) \\hspace{19em} (6)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The convergence is slow, because the skewness in equation (4) falls only as <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k^{-1\/2}$<\/math-renderer>, and that\nslowness is why tables of the distribution stayed in use rather than a normal approximation. At\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k = 10$<\/math-renderer> the upper 5 percent point is 18.307, while equation (6) gives 17.356, an error of 5\npercent. The cube-root transform of Wilson and Hilferty [<a href=\"#ref-1\">1<\/a>] is far better at the same\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k$<\/math-renderer>, giving 18.292.<\/p>\n<p dir=\"auto\">Table 2. Upper-tail critical values: the value the statistic exceeds with the stated probability.<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th align=\"right\">Degrees of freedom<\/th>\n<th align=\"right\">0.10<\/th>\n<th align=\"right\">0.05<\/th>\n<th align=\"right\">0.01<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td align=\"right\">1<\/td>\n<td align=\"right\">2.706<\/td>\n<td align=\"right\">3.841<\/td>\n<td align=\"right\">6.635<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">2<\/td>\n<td align=\"right\">4.605<\/td>\n<td align=\"right\">5.991<\/td>\n<td align=\"right\">9.210<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">3<\/td>\n<td align=\"right\">6.251<\/td>\n<td align=\"right\">7.815<\/td>\n<td align=\"right\">11.345<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">4<\/td>\n<td align=\"right\">7.779<\/td>\n<td align=\"right\">9.488<\/td>\n<td align=\"right\">13.277<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">5<\/td>\n<td align=\"right\">9.236<\/td>\n<td align=\"right\">11.070<\/td>\n<td align=\"right\">15.086<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">6<\/td>\n<td align=\"right\">10.645<\/td>\n<td align=\"right\">12.592<\/td>\n<td align=\"right\">16.812<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">7<\/td>\n<td align=\"right\">12.017<\/td>\n<td align=\"right\">14.067<\/td>\n<td align=\"right\">18.475<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">8<\/td>\n<td align=\"right\">13.362<\/td>\n<td align=\"right\">15.507<\/td>\n<td align=\"right\">20.090<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">9<\/td>\n<td align=\"right\">14.684<\/td>\n<td align=\"right\">16.919<\/td>\n<td align=\"right\">21.666<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">10<\/td>\n<td align=\"right\">15.987<\/td>\n<td align=\"right\">18.307<\/td>\n<td align=\"right\">23.209<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">15<\/td>\n<td align=\"right\">22.307<\/td>\n<td align=\"right\">24.996<\/td>\n<td align=\"right\">30.578<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">20<\/td>\n<td align=\"right\">28.412<\/td>\n<td align=\"right\">31.410<\/td>\n<td align=\"right\">37.566<\/td>\n<\/tr>\n<tr>\n<td align=\"right\">30<\/td>\n<td align=\"right\">40.256<\/td>\n<td align=\"right\">43.773<\/td>\n<td align=\"right\">50.892<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">4. Relation to Other Distributions<\/h2><a id=\"user-content-4-relation-to-other-distributions\" class=\"anchor\" aria-label=\"Permalink: 4. Relation to Other Distributions\" href=\"#4-relation-to-other-distributions\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">The chi-squared distribution sits at the centre of the normal-theory sampling distributions, and\nmost of the others are built from it.<\/p>\n<p dir=\"auto\">Table 3. Relations to other distributions.<\/p>\n<markdown-accessiblity-table><table>\n<thead>\n<tr>\n<th>Distribution<\/th>\n<th>Relation<\/th>\n<th>Note<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Normal<\/td>\n<td><math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Z^2 \\sim \\chi^2_1$<\/math-renderer><\/td>\n<td>The case <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k = 1$<\/math-renderer>\n<\/td>\n<\/tr>\n<tr>\n<td>Exponential<\/td>\n<td>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\chi^2_2$<\/math-renderer> is exponential with mean 2<\/td>\n<td>The case <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k = 2$<\/math-renderer>\n<\/td>\n<\/tr>\n<tr>\n<td>Gamma<\/td>\n<td>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\chi^2_k$<\/math-renderer> is gamma with shape <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k\/2$<\/math-renderer> and scale 2<\/td>\n<td>The general form of the density<\/td>\n<\/tr>\n<tr>\n<td>Student t<\/td>\n<td>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Z \/ \\sqrt{V\/k}$<\/math-renderer> with <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$V \\sim \\chi^2_k$<\/math-renderer> independent of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Z$<\/math-renderer>\n<\/td>\n<td>The chi-squared is the denominator<\/td>\n<\/tr>\n<tr>\n<td>F<\/td>\n<td>\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$(V_1\/k_1) \/ (V_2\/k_2)$<\/math-renderer> with <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$V_1, V_2$<\/math-renderer> independent<\/td>\n<td>A ratio of two chi-squared variables<\/td>\n<\/tr>\n<tr>\n<td>Noncentral chi-squared<\/td>\n<td>Sum of squares of normals with nonzero means<\/td>\n<td>Used for the power of the tests below<\/td>\n<\/tr>\n<\/tbody>\n<\/table><\/markdown-accessiblity-table>\n<p dir=\"auto\">The first row can be checked against Table 2. The two-sided 5 percent point of the standard normal\nis 1.96, and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$1.96^2 = 3.8415$<\/math-renderer>, which is the 5 percent point of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\chi^2_1$<\/math-renderer>. A two-sided test on a\nnormal mean and a one-sided test on its square are the same test.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">5. Role in Sampling<\/h2><a id=\"user-content-5-role-in-sampling\" class=\"anchor\" aria-label=\"Permalink: 5. Role in Sampling\" href=\"#5-role-in-sampling\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.1. Sample Variance of a Normal Population<\/h3><a id=\"user-content-51-sample-variance-of-a-normal-population\" class=\"anchor\" aria-label=\"Permalink: 5.1. Sample Variance of a Normal Population\" href=\"#51-sample-variance-of-a-normal-population\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">For <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$x_1, \\ldots, x_n$<\/math-renderer> drawn independently from <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$N(\\mu, \\sigma^2)$<\/math-renderer>, with sample mean <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\bar{x}$<\/math-renderer> and\nsample variance <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$s^2$<\/math-renderer>, the scaled sample variance is chi-squared with one degree of freedom fewer\nthan the sample size, and it is independent of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\bar{x}$<\/math-renderer>.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$\\frac{(n-1)s^{2}}{\\sigma^{2}} \\sim \\chi^2_{n-1} \\hspace{19em} (7)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The degree of freedom that is lost is the one spent estimating <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\mu$<\/math-renderer>. The deviations\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$x_i - \\bar{x}$<\/math-renderer> sum to zero by construction, so only <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$n-1$<\/math-renderer> of them can be chosen freely, and the\nsum of their squares behaves like a sum of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$n-1$<\/math-renderer> independent squares rather than <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$n$<\/math-renderer>. That the\nresult is exactly chi-squared, and exactly independent of the mean, is Cochran's theorem\n[<a href=\"#ref-2\">2<\/a>].<\/p>\n<p dir=\"auto\">Inverting equation (7) gives the confidence interval for a normal variance, which is asymmetric\nbecause the distribution is.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$\\left[ \\frac{(n-1)s^{2}}{\\chi^2_{n-1, \\alpha\/2}}, \\ \\frac{(n-1)s^{2}}{\\chi^2_{n-1, 1-\\alpha\/2}} \\right] \\hspace{19em} (8)$$<\/math-renderer><\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">5.2. Degrees of Freedom<\/h3><a id=\"user-content-52-degrees-of-freedom\" class=\"anchor\" aria-label=\"Permalink: 5.2. Degrees of Freedom\" href=\"#52-degrees-of-freedom\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Across every use of the distribution, the degrees of freedom count the quantities that are free to\nvary once the constraints are imposed, and each parameter estimated from the same data removes one\nmore. In equation (7) the single constraint is the estimated mean; in the tests of section 6 the\nconstraints come from the totals the fitted counts must reproduce. Getting this count wrong does\nnot make the statistic wrong; it makes the reference distribution wrong, which is harder to\nnotice.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">6. Tests Built on the Distribution<\/h2><a id=\"user-content-6-tests-built-on-the-distribution\" class=\"anchor\" aria-label=\"Permalink: 6. Tests Built on the Distribution\" href=\"#6-tests-built-on-the-distribution\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">6.1. Goodness of Fit<\/h3><a id=\"user-content-61-goodness-of-fit\" class=\"anchor\" aria-label=\"Permalink: 6.1. Goodness of Fit\" href=\"#61-goodness-of-fit\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Given counts <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$O_1, \\ldots, O_m$<\/math-renderer> falling into <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$m$<\/math-renderer> cells and the counts <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$E_1, \\ldots, E_m$<\/math-renderer> that a\nhypothesis expects, Pearson's statistic measures the gap [<a href=\"#ref-3\">3<\/a>].<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$X^{2} = \\sum_{j=1}^{m} \\frac{(O_j - E_j)^{2}}{E_j} \\hspace{19em} (9)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Under the hypothesis, each term is roughly a squared standardised deviation, so the sum is roughly\na sum of squared standard normals and equation (1) applies. With no parameter estimated from the\ndata the degrees of freedom are <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$m - 1$<\/math-renderer>, the one constraint being that the expected counts total\nthe observed count.<\/p>\n<p dir=\"auto\">For 300 rolls of a die giving 43, 52, 54, 61, 48 and 42, every expected count is 50 and the\nstatistic is 5.160 on 5 degrees of freedom. Table 2 gives 11.070 as the 5 percent point, so the\ncounts are unremarkable; the exact upper-tail probability is 0.397.<\/p>\n<p dir=\"auto\">The approximation behind the test is the normal approximation to each cell count, and it fails when\nthe expected counts are small. The usual working rule is that every expected count should be at\nleast 5.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">6.2. Independence in a Contingency Table<\/h3><a id=\"user-content-62-independence-in-a-contingency-table\" class=\"anchor\" aria-label=\"Permalink: 6.2. Independence in a Contingency Table\" href=\"#62-independence-in-a-contingency-table\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">For a table of counts with <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$r$<\/math-renderer> rows and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$c$<\/math-renderer> columns, the hypothesis that the row and column\nclassifications are independent predicts each cell from the margins alone, and equation (9) is\napplied to those predictions.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$E_{ij} = \\frac{R_i C_j}{n} \\hspace{19em} (10)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The degrees of freedom follow section 5.2. The table has <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$rc$<\/math-renderer> cells, and the row and column\nproportions estimated from the margins remove <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$(r-1) + (c-1)$<\/math-renderer> of them, leaving\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$rc - 1 - (r-1) - (c-1) = (r-1)(c-1)$<\/math-renderer>.<\/p>\n<p dir=\"auto\">A two-by-two table with rows 38, 62 and 51, 49 has every expected count equal to 44.5 or 55.5, a\nstatistic of 3.421 on 1 degree of freedom, and an upper-tail probability of 0.064. Against the 3.841\nof Table 2 the difference between the two rows is not significant at the 5 percent level.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">References<\/h2><a id=\"user-content-references\" class=\"anchor\" aria-label=\"Permalink: References\" href=\"#references\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\"><a id=\"user-content-ref-1\"><\/a>\n[1] Wilson, E. B., &amp; Hilferty, M. M. (1931). <a href=\"https:\/\/doi.org\/10.1073\/pnas.17.12.684\" rel=\"nofollow\">The Distribution of Chi-Square<\/a>. <em>Proceedings of the\nNational Academy of Sciences<\/em>, 17(12), 684\u2013688.<br>\n<a id=\"user-content-ref-2\"><\/a>\n[2] Cochran, W. G. (1934). <a href=\"https:\/\/doi.org\/10.1017\/S0305004100016595\" rel=\"nofollow\">The Distribution of Quadratic Forms in a Normal System, with\nApplications to the Analysis of Covariance<\/a>. <em>Mathematical Proceedings of the Cambridge\nPhilosophical Society<\/em>, 30(2), 178\u2013191.<br>\n<a id=\"user-content-ref-3\"><\/a>\n[3] Pearson, K. (1900). <a href=\"https:\/\/doi.org\/10.1080\/14786440009463897\" rel=\"nofollow\">On the Criterion that a Given System of Deviations from the Probable in the\nCase of a Correlated System of Variables is Such that it Can be Reasonably Supposed to have Arisen\nfrom Random Sampling<\/a>. <em>The London, Edinburgh, and Dublin Philosophical Magazine and Journal of\nScience<\/em>, 50(302), 157\u2013175.<br>\n<a id=\"user-content-ref-4\"><\/a>\n[4] Johnson, N. L., Kotz, S., &amp; Balakrishnan, N. (1994). <em>Continuous Univariate Distributions<\/em>\n(Vol. 1, 2nd ed.). Wiley. ISBN 978-0-471-58495-7.<\/p>\n<hr>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix A. Terminology<\/h2><a id=\"user-content-appendix-a-terminology\" class=\"anchor\" aria-label=\"Permalink: Appendix A. Terminology\" href=\"#appendix-a-terminology\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<ul dir=\"auto\">\n<li>\n<strong>Cell<\/strong>: one class of a categorical classification, holding a count.<\/li>\n<li>\n<strong>Contingency table<\/strong>: a table of counts cross-classified by two categorical variables.<\/li>\n<li>\n<strong>Degrees of freedom<\/strong>: the number of quantities free to vary once the constraints on them are\nimposed; the parameter of the chi-squared distribution.<\/li>\n<li>\n<strong>Excess kurtosis<\/strong>: the fourth standardised moment less 3, so that the normal distribution has\nthe value 0.<\/li>\n<li>\n<strong>Margin<\/strong>: a row total or a column total of a table of counts.<\/li>\n<li>\n<strong>Moment generating function<\/strong>: <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$E[e^{tX}]$<\/math-renderer> as a function of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$t$<\/math-renderer>, whose derivatives at the origin\nare the moments.<\/li>\n<li>\n<strong>Skewness<\/strong>: the third standardised moment, zero for a symmetric distribution.<\/li>\n<li>\n<strong>Support<\/strong>: the set of values a distribution gives positive probability to.<\/li>\n<li>\n<strong>Survival function<\/strong>: one minus the distribution function, that is the upper-tail probability.<\/li>\n<\/ul>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix B. Derivations<\/h2><a id=\"user-content-appendix-b-derivations\" class=\"anchor\" aria-label=\"Permalink: Appendix B. Derivations\" href=\"#appendix-b-derivations\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">B.1. Square of a Normal Variable<\/h3><a id=\"user-content-b1-square-of-a-normal-variable\" class=\"anchor\" aria-label=\"Permalink: B.1. Square of a Normal Variable\" href=\"#b1-square-of-a-normal-variable\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">The construction in equation (1) starts from standard normal variables, but a measurement rarely\narrives standardised. The theorem below states the general case.<\/p>\n<p dir=\"auto\"><strong>Theorem.<\/strong> Let <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$X$<\/math-renderer> be a continuous random variable with <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$X \\sim N(\\mu, \\sigma^{2})$<\/math-renderer> and\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\sigma \\gt 0$<\/math-renderer>. Then the squared standardised deviation follows the chi-squared distribution with\none degree of freedom.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$Y = \\frac{(X - \\mu)^{2}}{\\sigma^{2}} \\sim \\chi^2_1 \\hspace{19em} (11)$$<\/math-renderer><\/p>\n<p dir=\"auto\"><strong>Proof.<\/strong> Put <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Z = (X - \\mu)\/\\sigma$<\/math-renderer>. A linear transform of a normal variable is normal, and this\none has mean 0 and variance 1, so <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Z \\sim N(0, 1)$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Y = Z^{2}$<\/math-renderer>.<\/p>\n<p dir=\"auto\">Being a square, <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Y$<\/math-renderer> cannot be negative, so <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$F_Y(y) = 0$<\/math-renderer> for <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$y \\le 0$<\/math-renderer>. For <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$y \\gt 0$<\/math-renderer> the event\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Y \\le y$<\/math-renderer> is the event <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$-\\sqrt{y} \\le Z \\le \\sqrt{y}$<\/math-renderer>, so the distribution function of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Y$<\/math-renderer> follows\nfrom that of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Z$<\/math-renderer>, written <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\Phi$<\/math-renderer>, the second step using the symmetry of the standard normal.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$F_Y(y) = \\Phi(\\sqrt{y}) - \\Phi(-\\sqrt{y}) = 2\\Phi(\\sqrt{y}) - 1 \\hspace{19em} (12)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Differentiate with respect to <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$y$<\/math-renderer>. The chain rule contributes the derivative of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\sqrt{y}$<\/math-renderer>, which is\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$1\/(2\\sqrt{y})$<\/math-renderer>, and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\Phi' = \\phi$<\/math-renderer> is the standard normal density\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\phi(z) = e^{-z^{2}\/2}\/\\sqrt{2\\pi}$<\/math-renderer>.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$f_Y(y) = 2 \\phi(\\sqrt{y}) \\cdot \\frac{1}{2\\sqrt{y}} = \\frac{1}{\\sqrt{2\\pi}} y^{-1\/2} e^{-y\/2} \\hspace{19em} (13)$$<\/math-renderer><\/p>\n<p dir=\"auto\">What remains is to recognise equation (13). Setting <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k = 1$<\/math-renderer> in equation (2) gives the density\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$y^{-1\/2} e^{-y\/2} \/ \\left( 2^{1\/2}\\Gamma(1\/2) \\right)$<\/math-renderer>, and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\Gamma(1\/2) = \\sqrt{\\pi}$<\/math-renderer> makes that\nconstant <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\sqrt{2}\\sqrt{\\pi} = \\sqrt{2\\pi}$<\/math-renderer>. The two densities agree on <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$y \\gt 0$<\/math-renderer> and both vanish\nelsewhere, so <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Y \\sim \\chi^2_1$<\/math-renderer>. <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\blacksquare$<\/math-renderer><\/p>\n<p dir=\"auto\">Read together with equation (5), the theorem is what makes the family reachable from measurements\nrather than from standard normal variables: standardising and squaring <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$n$<\/math-renderer> independent normal\nobservations gives <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$n$<\/math-renderer> independent <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\chi^2_1$<\/math-renderer> variables, whose sum is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\chi^2_n$<\/math-renderer>.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">B.2. Moment Generating Function<\/h3><a id=\"user-content-b2-moment-generating-function\" class=\"anchor\" aria-label=\"Permalink: B.2. Moment Generating Function\" href=\"#b2-moment-generating-function\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">For a single square, substitute <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$u = z\\sqrt{1-2t}$<\/math-renderer> in the defining integral. The substitution is\nlegitimate only for <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$t \\lt 1\/2$<\/math-renderer>, which is where the exponent stays negative and the integral\nconverges.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$E\\left[ e^{tZ^{2}} \\right] = \\int_{-\\infty}^{\\infty} \\frac{1}{\\sqrt{2\\pi}} e^{tz^{2}} e^{-z^{2}\/2} dz = \\frac{1}{\\sqrt{1-2t}} \\int_{-\\infty}^{\\infty} \\frac{e^{-u^{2}\/2}}{\\sqrt{2\\pi}} du = (1-2t)^{-1\/2} \\hspace{19em} (14)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The remaining integral is the total mass of the standard normal density and equals 1. Since the\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$Z_i$<\/math-renderer> in equation (1) are independent, the moment generating function of their sum is the product\nof <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k$<\/math-renderer> such factors, which is equation (3). Equation (5) is the same statement read backwards: the\nproduct of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$(1-2t)^{-m\/2}$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$(1-2t)^{-n\/2}$<\/math-renderer> is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$(1-2t)^{-(m+n)\/2}$<\/math-renderer>.<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">B.3. Mean and Variance<\/h3><a id=\"user-content-b3-mean-and-variance\" class=\"anchor\" aria-label=\"Permalink: B.3. Mean and Variance\" href=\"#b3-mean-and-variance\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Expand equation (3) about the origin, or differentiate it twice. The first two derivatives at\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$t = 0$<\/math-renderer> give the first two raw moments.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$M'(t) = k(1-2t)^{-k\/2 - 1}, \\qquad M''(t) = k(k+2)(1-2t)^{-k\/2 - 2} \\hspace{19em} (15)$$<\/math-renderer><\/p>\n<p dir=\"auto\">Setting <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$t = 0$<\/math-renderer> gives <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$E[X] = k$<\/math-renderer> and <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$E[X^2] = k(k+2)$<\/math-renderer>, so the variance is\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$k(k+2) - k^2 = 2k$<\/math-renderer>, which is equation (4).<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h3 class=\"heading-element\" dir=\"auto\">B.4. Loss of One Degree of Freedom<\/h3><a id=\"user-content-b4-loss-of-one-degree-of-freedom\" class=\"anchor\" aria-label=\"Permalink: B.4. Loss of One Degree of Freedom\" href=\"#b4-loss-of-one-degree-of-freedom\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">Write the sum of squared deviations from the true mean and add and subtract <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\bar{x}$<\/math-renderer> inside each\nsquare. The expansion has three pieces: the sum of squared deviations from <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\bar{x}$<\/math-renderer>, a cross term,\nand <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$n(\\bar{x} - \\mu)^2$<\/math-renderer>.<\/p>\n<p dir=\"auto\"><math-renderer class=\"js-display-math\" style=\"display: block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$$\\sum_{i=1}^{n} (x_i - \\mu)^{2} = \\sum_{i=1}^{n} (x_i - \\bar{x})^{2} + 2(\\bar{x} - \\mu)\\sum_{i=1}^{n}(x_i - \\bar{x}) + n(\\bar{x} - \\mu)^{2} \\hspace{19em} (16)$$<\/math-renderer><\/p>\n<p dir=\"auto\">The cross term vanishes because the deviations from <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\bar{x}$<\/math-renderer> sum to zero, leaving two pieces.\nDividing by <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\sigma^2$<\/math-renderer>, the left side is a sum of <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$n$<\/math-renderer> squared standard normals and so is\n<math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\chi^2_n$<\/math-renderer>. The last term is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\left( (\\bar{x}-\\mu)\/(\\sigma\/\\sqrt{n}) \\right)^2$<\/math-renderer>, a single squared\nstandard normal, and so is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\chi^2_1$<\/math-renderer>. Cochran's theorem [<a href=\"#ref-2\">2<\/a>] says that the two terms on\nthe right are independent and each chi-squared, so the degrees of freedom subtract and the first\nterm is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$\\chi^2_{n-1}$<\/math-renderer>. That first term is <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$(n-1)s^2\/\\sigma^2$<\/math-renderer>, which is equation (7).<\/p>\n<div class=\"markdown-heading\" dir=\"auto\"><h2 class=\"heading-element\" dir=\"auto\">Appendix C. Computation<\/h2><a id=\"user-content-appendix-c-computation\" class=\"anchor\" aria-label=\"Permalink: Appendix C. Computation\" href=\"#appendix-c-computation\"><svg data-component=\"Octicon\" class=\"octicon octicon-link\" viewBox=\"0 0 16 16\" version=\"1.1\" width=\"16\" height=\"16\" aria-hidden=\"true\"><path d=\"m7.775 3.275 1.25-1.25a3.5 3.5 0 1 1 4.95 4.95l-2.5 2.5a3.5 3.5 0 0 1-4.95 0 .751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018 1.998 1.998 0 0 0 2.83 0l2.5-2.5a2.002 2.002 0 0 0-2.83-2.83l-1.25 1.25a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042Zm-4.69 9.64a1.998 1.998 0 0 0 2.83 0l1.25-1.25a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042l-1.25 1.25a3.5 3.5 0 1 1-4.95-4.95l2.5-2.5a3.5 3.5 0 0 1 4.95 0 .751.751 0 0 1-.018 1.042.751.751 0 0 1-1.042.018 1.998 1.998 0 0 0-2.83 0l-2.5 2.5a1.998 1.998 0 0 0 0 2.83Z\"><\/path><\/svg><\/a><\/div>\n<p dir=\"auto\">The distribution and its inverse come from <code>scipy.stats.chi2<\/code>. The survival function <code>sf<\/code> gives the\nupper tail directly and is preferred over <code>1 - cdf<\/code>, which loses precision far out in the tail,\nwhile <code>isf<\/code> inverts it and produces the entries of Table 2.<\/p>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Python\nfrom scipy import stats\n\nprint(stats.chi2.isf(0.05, df=5))       # upper 5 percent point\nprint(stats.chi2.sf(5.16, df=5))        # upper tail probability of an observed statistic\nprint(stats.chi2.stats(df=5, moments='mv'))\"><pre><span class=\"pl-c\"># Python<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">scipy<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">stats<\/span>\n\n<span class=\"pl-en\">print<\/span>(<span class=\"pl-s1\">stats<\/span>.<span class=\"pl-c1\">chi2<\/span>.<span class=\"pl-c1\">isf<\/span>(<span class=\"pl-c1\">0.05<\/span>, <span class=\"pl-s1\">df<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">5<\/span>))       <span class=\"pl-c\"># upper 5 percent point<\/span>\n<span class=\"pl-en\">print<\/span>(<span class=\"pl-s1\">stats<\/span>.<span class=\"pl-c1\">chi2<\/span>.<span class=\"pl-c1\">sf<\/span>(<span class=\"pl-c1\">5.16<\/span>, <span class=\"pl-s1\">df<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">5<\/span>))        <span class=\"pl-c\"># upper tail probability of an observed statistic<\/span>\n<span class=\"pl-en\">print<\/span>(<span class=\"pl-s1\">stats<\/span>.<span class=\"pl-c1\">chi2<\/span>.<span class=\"pl-c1\">stats<\/span>(<span class=\"pl-s1\">df<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">5<\/span>, <span class=\"pl-s1\">moments<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s\">'mv'<\/span>))<\/pre><\/div>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"11.070497693516355\n0.3966674666097388\n(np.float64(5.0), np.float64(10.0))\"><pre lang=\"text\" class=\"notranslate\"><code>11.070497693516355\n0.3966674666097388\n(np.float64(5.0), np.float64(10.0))\n<\/code><\/pre><\/div>\n<p dir=\"auto\">The two tests of section 6 are each one call, and both return the statistic with its upper-tail\nprobability.<\/p>\n<div class=\"highlight highlight-source-python notranslate position-relative overflow-auto\" dir=\"auto\" data-snippet-clipboard-copy-content=\"# Python\nimport numpy as np\nfrom scipy import stats\n\nprint(stats.chisquare(f_obs=np.array([43, 52, 54, 61, 48, 42])))\nstatistic, p_value, degrees, expected = stats.chi2_contingency(np.array([[38, 62], [51, 49]]),\n                                                               correction=False)\nprint(round(statistic, 4), degrees, round(p_value, 4))\"><pre><span class=\"pl-c\"># Python<\/span>\n<span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">numpy<\/span> <span class=\"pl-k\">as<\/span> <span class=\"pl-s1\">np<\/span>\n<span class=\"pl-k\">from<\/span> <span class=\"pl-s1\">scipy<\/span> <span class=\"pl-k\">import<\/span> <span class=\"pl-s1\">stats<\/span>\n\n<span class=\"pl-en\">print<\/span>(<span class=\"pl-s1\">stats<\/span>.<span class=\"pl-c1\">chisquare<\/span>(<span class=\"pl-s1\">f_obs<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-s1\">np<\/span>.<span class=\"pl-c1\">array<\/span>(&#91;<span class=\"pl-c1\">43<\/span>, <span class=\"pl-c1\">52<\/span>, <span class=\"pl-c1\">54<\/span>, <span class=\"pl-c1\">61<\/span>, <span class=\"pl-c1\">48<\/span>, <span class=\"pl-c1\">42<\/span>&#93;)))\n<span class=\"pl-s1\">statistic<\/span>, <span class=\"pl-s1\">p_value<\/span>, <span class=\"pl-s1\">degrees<\/span>, <span class=\"pl-s1\">expected<\/span> <span class=\"pl-c1\">=<\/span> <span class=\"pl-s1\">stats<\/span>.<span class=\"pl-c1\">chi2_contingency<\/span>(<span class=\"pl-s1\">np<\/span>.<span class=\"pl-c1\">array<\/span>(&#91;&#91;<span class=\"pl-c1\">38<\/span>, <span class=\"pl-c1\">62<\/span>&#93;, &#91;<span class=\"pl-c1\">51<\/span>, <span class=\"pl-c1\">49<\/span>&#93;&#93;),\n                                                               <span class=\"pl-s1\">correction<\/span><span class=\"pl-c1\">=<\/span><span class=\"pl-c1\">False<\/span>)\n<span class=\"pl-en\">print<\/span>(<span class=\"pl-en\">round<\/span>(<span class=\"pl-s1\">statistic<\/span>, <span class=\"pl-c1\">4<\/span>), <span class=\"pl-s1\">degrees<\/span>, <span class=\"pl-en\">round<\/span>(<span class=\"pl-s1\">p_value<\/span>, <span class=\"pl-c1\">4<\/span>))<\/pre><\/div>\n<div class=\"snippet-clipboard-content notranslate position-relative overflow-auto\" data-snippet-clipboard-copy-content=\"Power_divergenceResult(statistic=np.float64(5.16), pvalue=np.float64(0.3966674666097388))\n3.4214 1 0.0644\"><pre lang=\"text\" class=\"notranslate\"><code>Power_divergenceResult(statistic=np.float64(5.16), pvalue=np.float64(0.3966674666097388))\n3.4214 1 0.0644\n<\/code><\/pre><\/div>\n<p dir=\"auto\">Two defaults are worth knowing. <code>stats.chisquare<\/code> assumes equal expected counts unless <code>f_exp<\/code> is\ngiven, and it takes the degrees of freedom as <math-renderer class=\"js-inline-math\" style=\"display: inline-block\" data-run-id=\"abe5b7097b6d56acac690cd06cb36c17\">$m - 1$<\/math-renderer> unless <code>ddof<\/code> says how many parameters were\nestimated. <code>stats.chi2_contingency<\/code> applies Yates's continuity correction by default on a\ntwo-by-two table, so reproducing the uncorrected statistic of section 6.2 needs\n<code>correction=False<\/code>.<\/p>\n<\/article><\/div><\/div><\/p>\n<\/div><\/div>\n<\/div><\/div><\/div>\n<div style='text-align:center' class='yasr-auto-insert-overall'><\/div><div style='text-align:center' class='yasr-auto-insert-visitor'><\/div>","protected":false},"excerpt":{"rendered":"<p>\ud83c\uddfa\ud83c\uddf8\ud83c\uddf0\ud83c\uddf7 It is met not as a model of data but as the distribution of a statistic, and it earns its place because two unrelated quantities follow it: the scaled sample variance of a normal population, and Pearson&#8217;s gap between observed and expected counts. Both reduce to a sum of squares of approximately standard normal terms.<\/p>\n","protected":false},"author":4,"featured_media":6969,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"_kadence_starter_templates_imported_post":false,"_kad_post_transparent":"","_kad_post_title":"","_kad_post_layout":"","_kad_post_sidebar_id":"","_kad_post_content_style":"","_kad_post_vertical_padding":"","_kad_post_feature":"","_kad_post_feature_position":"","_kad_post_header":false,"_kad_post_footer":false,"_kad_post_classname":"","yasr_overall_rating":0,"yasr_post_is_review":"","yasr_auto_insert_disabled":"","yasr_review_type":"","fifu_image_url":"","fifu_image_alt":"","iawp_total_views":12,"footnotes":""},"categories":[56,434,321],"tags":[411,410,386],"class_list":["post-6968","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-science-slug","category-distribution-slug","category-math-slug","tag-chi-squared","tag-distribution","tag-github-hosted"],"yasr_visitor_votes":{"stars_attributes":{"read_only":false,"span_bottom":false},"number_of_votes":1,"sum_votes":3},"jetpack_featured_media_url":"https:\/\/ykim.synology.me\/wordpress\/wp-content\/uploads\/2026\/09\/office-depot-storefront.jpg","_links":{"self":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/6968","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/comments?post=6968"}],"version-history":[{"count":7,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/6968\/revisions"}],"predecessor-version":[{"id":7442,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/6968\/revisions\/7442"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/media\/6969"}],"wp:attachment":[{"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/media?parent=6968"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/categories?post=6968"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ykim.synology.me\/wordpress\/wp-json\/wp\/v2\/tags?post=6968"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}