﻿{"id":1095,"date":"2012-12-03T21:17:01","date_gmt":"2012-12-03T12:17:01","guid":{"rendered":"http:\/\/fujiitoshiki.com\/improvesociety\/?p=1095"},"modified":"2017-04-27T12:37:29","modified_gmt":"2017-04-27T03:37:29","slug":"how-to-execute-%cf%87-square-test-with-cross-tabulation","status":"publish","type":"post","link":"https:\/\/www.fujiitoshiki.com\/improvesociety\/?p=1095","title":{"rendered":"How to execute \u03c7-square test with cross tabulation?"},"content":{"rendered":"<div class=\"theContentWrap-ccc\"><p> You can execute <img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cchi%5E2&#038;bg=T&#038;fg=000000&#038;s=0' alt='\\chi^2' title='\\chi^2' class='latex' \/> test with cross tabulation by such formula as below. In each cells, subtract expected value (E) from observed value (O), square the subtraction, divide the squared by expected value and add them all. <\/p>\n<p><img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle%5Cchi%5E2%28df%29%3D%5Csum%5Cfrac%7B%28O-E%29%5E2%7D%7BE%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\\displaystyle\\chi^2(df)=\\sum\\frac{(O-E)^2}{E}' title='\\displaystyle\\chi^2(df)=\\sum\\frac{(O-E)^2}{E}' class='latex' \/><\/p>\n<p>df: degree of freedom<\/p>\n<p> <img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cchi%5E2&#038;bg=T&#038;fg=000000&#038;s=0' alt='\\chi^2' title='\\chi^2' class='latex' \/> statistics follows <img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cchi%5E2&#038;bg=T&#038;fg=000000&#038;s=0' alt='\\chi^2' title='\\chi^2' class='latex' \/> distribution. When degree of freedom is 1, <img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cchi%5E2&#038;bg=T&#038;fg=000000&#038;s=0' alt='\\chi^2' title='\\chi^2' class='latex' \/> statistics is 3.841 if probability is smaller than 0.05 in one sided test, <img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cchi%5E2&#038;bg=T&#038;fg=000000&#038;s=0' alt='\\chi^2' title='\\chi^2' class='latex' \/> is 6.635 if p < 0.01, [latex]\\chi^2[\/latex] is 10.828 if p < 0.001, respectively. In two-tailed test, [latex]\\chi^2[\/latex] is 5.024 if p < 0.05, [latex]\\chi^2[\/latex] is 7.879 if p < 0.01, respectively. <\/p>\n<table border=\"0\" align=\"left\">\n<tbody>\n<tr style=\"background-color: #a9a9a9;\">\n<td style=\"background-color: #a9a9a9;\">\u00a0<\/td>\n<td align=\"center\" valign=\"middle\"><strong><span style=\"font-size: small; font-family: georgia, palatino; color: #ffffff;\">TRUE<\/span><\/strong><\/td>\n<td align=\"center\" valign=\"middle\"><strong><span style=\"font-size: small; font-family: georgia, palatino; color: #ffffff;\">FALSE<\/span><\/strong><\/td>\n<td style=\"background-color: #a9a9a9;\" align=\"center\" valign=\"middle\"><span style=\"font-size: small; font-family: georgia, palatino; color: #ffffff;\">Marginal total<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"background-color: #a9a9a9;\"><strong><span style=\"font-size: small; font-family: georgia, palatino; color: #ffffff;\">POSITIVE<\/span><\/strong><\/td>\n<td align=\"center\" valign=\"middle\"><span style=\"font-size: small; font-family: georgia, palatino;\">a<\/span><\/td>\n<td align=\"center\" valign=\"middle\"><span style=\"font-family: georgia, palatino; font-size: small;\"><span style=\"line-height: 19px;\">b<\/span><\/span><\/td>\n<td style=\"background-color: #a9a9a9;\" align=\"center\" valign=\"middle\"><span style=\"font-size: small; font-family: georgia, palatino; color: #ffffff;\">a + b<\/span><\/td>\n<\/tr>\n<tr>\n<td style=\"background-color: #a9a9a9;\"><strong><span style=\"font-size: small; font-family: georgia, palatino; color: #ffffff;\">NEGATIVE<\/span><\/strong><\/td>\n<td align=\"center\" valign=\"middle\"><span style=\"font-size: small; font-family: georgia, palatino;\">c<\/span><\/td>\n<td align=\"center\" valign=\"middle\"><span style=\"font-size: small; font-family: georgia, palatino;\">d<\/span><\/td>\n<td style=\"background-color: #a9a9a9;\" align=\"center\" valign=\"middle\"><span style=\"font-size: small; font-family: georgia, palatino; color: #ffffff;\">c + d<\/span><\/td>\n<\/tr>\n<tr style=\"background-color: #a9a9a9;\">\n<td style=\"background-color: #a9a9a9;\"><span style=\"font-size: small; font-family: georgia, palatino; color: #ffffff;\">Marginal total<\/span><\/td>\n<td align=\"center\" valign=\"middle\"><span style=\"font-size: small; font-family: georgia, palatino; color: #ffffff;\">a + c<\/span><\/td>\n<td align=\"center\" valign=\"middle\"><span style=\"font-size: small; font-family: georgia, palatino; color: #ffffff;\">b + d<\/span><\/td>\n<td align=\"center\" valign=\"middle\"><span style=\"font-size: small; font-family: georgia, palatino; color: #ffffff;\">N<\/span>\u00a0<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><img src='https:\/\/s0.wp.com\/latex.php?latex=%5Cdisplaystyle+%5Cbegin%7Barray%7D%7Brcl%7D%5Cchi%5E2%26%3D%26%28ad-bc%29%5E2%5Ctimes%5Cfrac%7BN%7D%7B%28a%2Bb%29%28c%2Bd%29%28a%2Bc%29%28b%2Bd%29%7D%5Cvspace%7B0.2in%7D%5C%5C%5Cchi%5E2%28Yates%29%26%3D%26%5Cleft%28%7Cad-bc%7C-%5Cfrac%7B1%7D%7B2%7D%5Cright%29%5E2%5Ctimes%5Cfrac%7BN%7D%7B%28a%2Bb%29%28c%2Bd%29%28a%2Bc%29%28b%2Bd%29%7D%5Cend%7Barray%7D&#038;bg=T&#038;fg=000000&#038;s=0' alt='\\displaystyle \\begin{array}{rcl}\\chi^2&amp;=&amp;(ad-bc)^2\\times\\frac{N}{(a+b)(c+d)(a+c)(b+d)}\\vspace{0.2in}\\\\\\chi^2(Yates)&amp;=&amp;\\left(|ad-bc|-\\frac{1}{2}\\right)^2\\times\\frac{N}{(a+b)(c+d)(a+c)(b+d)}\\end{array}' title='\\displaystyle \\begin{array}{rcl}\\chi^2&amp;=&amp;(ad-bc)^2\\times\\frac{N}{(a+b)(c+d)(a+c)(b+d)}\\vspace{0.2in}\\\\\\chi^2(Yates)&amp;=&amp;\\left(|ad-bc|-\\frac{1}{2}\\right)^2\\times\\frac{N}{(a+b)(c+d)(a+c)(b+d)}\\end{array}' class='latex' \/><\/p>\n<\/div>","protected":false},"excerpt":{"rendered":"<p>You can execute test with cross tabulation by such formula as below. In each cells, subtract expected value (E &hellip; <a href=\"https:\/\/www.fujiitoshiki.com\/improvesociety\/?p=1095\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;How to execute \u03c7-square test with cross tabulation?&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[7],"tags":[32,23,53,52],"class_list":["post-1095","post","type-post","status-publish","format-standard","hentry","category-statistics","tag-chi-square-test","tag-cross-tabulation","tag-yates","tag--square-test"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts\/1095","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1095"}],"version-history":[{"count":28,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts\/1095\/revisions"}],"predecessor-version":[{"id":7711,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=\/wp\/v2\/posts\/1095\/revisions\/7711"}],"wp:attachment":[{"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1095"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1095"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.fujiitoshiki.com\/improvesociety\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1095"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}