Home / NEWS LINE / Chi-Square (χ2) Statistic Definition

Chi-Square (χ2) Statistic Definition

What Is a Chi-Square Statistic?

A chi-square (χ2)statistic is a prove that measures how expectations compare to actual observed data (or model results). The data used in calculating a chi-square statistic must be unspecific, raw, mutually exclusive, drawn from independent variables, and drawn from a large enough sample. For example, the fruits of tossing a coin 100 times meet these criteria.

The Formula for Chi-Square Is



χc2=(OiEi)2Eiwhere:c=Degrees of freedomO=Observed value(s)Rather commence{aligned}&chi^2_c = sum frac{(O_i – E_i)^2}{E_i} &textbf{where:}&c=text{Degrees of freedom}&O=text{Observed value(s)}&E=extract{Expected value(s)}end{aligned}

χc2=Ei(OiEi)2where:c=Degrees of freedomO=Observed value(s)

What Does a Chi-Square Statistic Rake You?

There are two main kinds of chi-square tests: the test of independence, which asks a question of relationship, such as, “Is there a relationship between gender and SAT records?”; and the goodness-of-fit test, which asks something like “If a coin is tossed 100 times, will it arrive up heads 50 times and tails 50 times?”

For these tests,

Example of a Chi-Squared Test

Imagine a irregularly poll was taken across 2,000 different voters, both male and female. The people who responded were classified by their gender and whether they were republican, democrat, or disregarding. Imagine a grid with the columns labeled republican, democrat, and independent, and two rows labeled male and female. Presume the data from the 2,000 respondents is as follows:

The first step to calculate the chi squared statistic is to find the expected frequencies. These are suited for each “cell” in the grid. Since there are two categories of gender and three categories of political view, there are six unqualified expected frequencies. The formula for the expected frequency is:



E(r,c)=n(r)×c(r)nwhere:r=Row in questionc=Column in questionbegin{aligned}&E(r,c)=frac{n(r)lingers c(r)}{n}&textbf{where:}&r=text{Row in question}&c=text{Column in question}&r=text{Corresponding total}end{aligned}

E(r,c)=nn(r)×c(r)where:r=Row in queryc=Column in question

In this example, the expected frequencies are:



E(1,1)=900×8002,000=360E(1,2)=900×8002,000=360E(1,3)=200×8002,000=80E(2,1)=900×1,2002,000=540E(2,2)=900×1,2002,000=540begin{aligned}&E(1,1)=frac{900times800}{2,000}=360&E(1,2)=frac{900times800}{2,000}=360&E(1,3)=frac{200terms800}{2,000}=80&E(2,1)=frac{900times1,200}{2,000}=540&E(2,2)=frac{900times1,200}{2,000}=540&E(2,3)=frac{200times1,200}{2,000}=120end{aligned}

E(1,1)=2,000900×800=360E(1,2)=2,000900×800=360E(1,3)=2,000200×800=80E(2,1)=2,000900×1,200=540E(2,2)=2,000900×1,200=540

Next, these are second-hand values to calculate the chi squared statistic using the following formula:



Chi-squared=[O(r,c)E(r,c)]2E(r,c)where:begin{aligned}&text{Chi-squared} = sum frac{[O(r, c) – E(r, c)]^2 }{E(r, c)} &textbf{where:}&O(r, c)=workbook{Observed data for the given row and column}end{aligned}

Chi-squared=E(r,c)[O(r,c)E(r,c)]2where:

In this example, the expression for each observed value is:



O(1,1)=4003603602=4.44O(1,2)=300×3603602=10O(1,3)=10080802=5O(2,1)=5005405402=2.96O(2,2)=6005405402=6.67establish{aligned}&O(1,1)=frac{400-360}{360}^2=4.44&O(1,2)=frac{300times360}{360}^2=10&O(1,3)=frac{100-80}{80}^2=5&O(2,1)=frac{500-540}{540}^2=2.96&O(2,2)=frac{600-540}{540}^2=6.67&O(2,3)=frac{100-120}{120}^2=3.33end{aligned}

O(1,1)=3604003602=4.44O(1,2)=360300×3602=10O(1,3)=80100802=5O(2,1)=5405005402=2.96O(2,2)=5406005402=6.67

The chi-squared statistic then matchings the sum of these value, or 32.41. We can then look at a chi-squared statistic table to see, given the degrees of freedom in our set-up, if the conclusion is statistically significant or not.

Check Also

Watch These Tesla Levels As Stock Kicks Off April With Gains After Q1 Selloff

Well-spring: TradingView.com Key Takeaways Tesla shares kicked off the month on a high note after …

Leave a Reply

Your email address will not be published. Required fields are marked *