Chi-Square Chi-Squ are Test Test Chi-square is a statistical test commonly used to compare observed data with data we would expect to obtain according to a specific hypothesis. For example, if, according to Mendel's laws, you expected ! of "! offspring from a cross to be male and the actual observed number was # males, then you might want to $now about the %goodness to fit% between the observed and expected. &ere the deviations differences between observed and expected( the the result of chance, or were they due to other factors. )ow much deviation can occur before you, the investigator, must must conclude that something other than chance is at wor$, causing the observed to differ from the expected. *he chi-square test is always testing what scientists call the null hypothesis, which states that there is no significant difference between the expected and observed result. *he formula for calculating chi-square
"
"
( is+
(o-e)" /e
*hat is, chi-square is the sum of the squared difference between observed o o( and the expected e e( data or the deviation, d (, (, divided by the expected data in all possible categories. For example, suppose that a cross between two pea plants yields a population of ##! plants, / with green seeds seeds and "0 with yellow yellow seeds. 1o 1ou are as$ed to propose the genotypes of the parents. 1our hypothesis hypothesis is that the allele for green is dominant to the allele for yellow and that the parent plants were both hetero2ygous for this trait. 3f your hypothesis is true, then the predicted ratio of offspring from this cross would be + based on Mendel's laws( as predicted from the results of the 4unnett square Figure 5. (. Figure B.1 - Punnett Square. 4redicted offspring from cross between green and yellow-seeded plants. 6reen 6( is dominant 70 green8 70 yellow(.
*o calculate
"
, first determine the number expected in
each category. 3f the ratio is + and the total number of observed individuals is ##!, then the expected numerical valuesshould values should be ! green and ""! yellow.
Chi-square requires that you use numerical values, not percentages or ratios.
*hen calculate value of ".# for the
"
using this formula, as shown in *able 5.. 9ote that we get a "
. 5ut what does this number mean: )ere's how to interpret
"
value+
. ;etermine degrees of freedom df(. ;egrees of freedom can be calculated as the number of categories in the problem minus . 3n our example, there are two categories green and yellow(8 therefore, there is 3 degree of freedom. ". ;etermine a relative standard to serve as the basis for accepting or re !.!=. *he p value is the probab the probability ility that the deviation of the observed from that expected is due to chance alone no other forces acting(. 3n this case, using p using p > !.!=, you would expect any deviation to be due to chance alone => of the time or less. . ?efer to a chi-square distribution table *able *able 5."(. @sing the appropriate degrees of 'freedom, locate the value closest to your calculated chi-square in the table. ;etermine the closest p probability( p probability( value associated with your chi-square and " degrees of freedom. 3n this case ".#(, the p value is about !.!, which means that there is a !> probability that any deviation from expected results is due to chance only. 5ased 5ased on our standard p > !.!=, this is within the range of acceptable deviation. 3n terms of your hypothesis for this example, the observed chi-squareis not
significantly different from expected. *he observed numbers are consistent with those expected under Mendel's law. Atep-by-Atep 4rocedure for *esting 1our )ypothesis and Calculating Chi-Aquare . Atate the hypothesis being tested and the predicted results. 6ather the data by conducting the proper experiment or, if wor$ing genetics problems, use the data provided in the problem(. problem(. ". ;etermine the expected numbers for each observational class. ?emember to use numbers, not percentages.
Chi-square should not be calculated if the expected value in any category is less than 5.
. Calculate
"
using the formula. Complete all calculations to three significant
digits. ?ound off your answer to two significant digits. 0. @se the chi-square distribution table to determine significance of the value. a. ;eterm ;etermine ine degrees degrees of freedom freedom and locate locate the value value in the the appropriate appropriate column. column. b. Bocate the value closest to your calculated
2
on that degrees of
freedom df row. row. c. Move up the the colum column n to determ determine ine the the p value value.. =. Atate your conclusion in terms of your hypothesis. a. 3f the p p value value for the calculated
"
is p is p > !.!=, accept your hypothesis. '*he
deviation is small enough that chance alone accounts for it. p p value value of !., for example, means that there is a !> probability that any deviation from expected is due to chance only. *his is within the range of acceptable deviation.
b. 3f the p value for the calculated
"
is p is p < !.!=, re
conclude that some factor other than chance is operating for the deviation to be so great. For example, a p value of !.! means that there is only a > chance that this deviation is due to chance alone. *herefore, other factors must be involved. *he chi-square test will be used to test for the %goodness to fit% between observed and expected data from several laboratory investigations in this lab manual. Table B.1 Table Calculating Chi-Aquare
Green
Yellow
Dbserved o(
/
"0
Expected e(
!
""!
;eviation o - e)
-"
"
;eviation" d d"(
00
00
d 2 /e
!.#
"
.
.
"
d"7e ".#
Table B.2 Table Chi-Aquare ;istribution
;egrees of Freedom
p( Probability p(
(df)
!. ! ./=
!./!
!.#!
!.!
!.=!
!.!
!."!
!.!
!.!=
!. !
!.!!
!.!!0
!.!"
!.!
!.=
!.0
.!
.0
".
.#0
. 0
!.#
"
!.!
!."
!.0=
!.
./
".0
.""
0.!
=.//
/ ."
.#"
!.=
!.=#
.!
.0"
".
.
0.0
."=
.#"
.0
."
0
!.
.!
.=
"."!
.
0.##
=.//
.#
/.0/
."#
#.0
=
.0
.
".0
.!!
0.=
.!
."/
/."0
.!
=.!/
"!.="
.
"."!
.!
.#
=.=
."
#.=
!.0
".=/
.#
"".0
".
".#
.#"
0.
.=
#.#
/.#!
".!"
0.!
#.0#
"0."
#
".
.0/
0.=/
=.=
.0
/.="
.!
.
=.=
"!.!/
"."
/
."
0.
=.#
./
#.0
!.
"."0
0.#
./"
".
".##
!
./0
0.#
.#
."
/.0
.#
.00
=.//
#.
"."
"/.=/
9onsignificant
Aignificant
Aource+ ?.. Fisher and F. 1ates, Atatistical *ables for 5iological gricultural and Medical ?esearch, th ed., *able 3G, Dliver H 5oyd, Btd., Edinburgh, by permission of the authors and publishers.
Main 4age I 4age I 3ntroduction and Db
Chi-square test From Wikipedia, the free encyclopedia *his article includes a list of references references,, but its sour!es re"ain un!lear because it has insu##i!ient inline !itations . 4lease help to improve improve this this article by introducing introducing more more precise citations. (November 201)
Chi-square distribution, distribution, showing X 2 on the x-axis and P-alue on the y-axis! test #infrequently as the chi-squared test$, is " chi-square test, also referred to as any statistical hypothesis test in test in which the sampling distribution of distribution of the test statistic is a chi-square distribution when distribution when the null hypothesis is hypothesis is true! "lso considered a chi-square test is a test in which this is asymptotically true, true, meaning that the sampling distribution #if the null hypothesis is true$ can be made to approximate a chi-square distribution as closely as desired by making the sample si%e large enough! &he chi-square #'$ test is used to determine whether there is a significant difference between the expected frequencies and the obsered frequencies in one or more categories! (o the number of indiiduals or ob)ects that fall in each category differ significantly from the number you would expect* 's this difference between the expected and obsered due to sampling ariation, or is it a real difference* Contents
+hide hide •
.xamples of chi-square tests o
! Pearson/s chi-square test
o
!2 0ates/s 0ates/s correction correcti on for contin continuity uity
o
!1 ther chi-square tests
•
2 .xact chi-square distribution distribu tion
•
1 Chi-squ Chi-square are test requi requirements rements
•
3 Chi-square test for ariance in a normal population popul ation
•
4 Chi-square test for independence and homogeneity homogen eity in tables
•
5 6ee also als o
•
7 8efe 8eferenc rences es
Examples of chi-square tests +edit edit &he following are examples of chi-square tests where the chi-square distribution is approximately alid9
Pearson's chi-square test+edit edit Main article: Pearson's chi-square test
Pearson/s chi-square test, test, also known as the chi-square goodness-of-fit test or chi-square test for independence! When the chi-square test is mentioned without any modifiers or without other precluding context, this test is often often meant #for an exact exact test used in place place of of test$! test $!
, see see Fisher/s exact
Yates's Yates's correction for continuity continuity+edit edit Main article: Ya Yates's tes's correction for continuity
:sing the chi-square distribution to distribution to interpret Pearson/s chi-square statistic requires one to assume that the discrete discrete probability probability of obsered binomial frequencies in frequencies in the table can be approximated by the continuous chi-square distribution! distribution! &his assumption is not quite correct, and introduces some error! &o reduce the error in approximation, Frank 0ates, 0ates, an .nglish statistician statistician,, suggested a correction for continuity that ad)usts the formula for Pearson/s for Pearson/s chi-square test by test by subtracting ;!4 from the difference between each obsered alue and its expected alue in a 2 < 2 contingency table!+ &his reduces the chi-square alue obtained and thus increases its p-alue p-alue!!
Other chi-square tests+edit edit •
Cochran=>antel=?aens%el chi-square test! test!
•
>c@emar/s test, test, used in certain 2 < 2 tables with pairing
•
&ukey/s test of additiity
•
•
&he portmanteau test in test in time-series analysis, analysis, testing for the presence of autocorrelation Aikelihood-ratio tests in tests in general statistical modelling, for testing whether there is eidence of the need to moe from a simple model
to a more complicated one #where the simple model is nested within the complicated one$!
Exact chi-square distribution +edit edit ne case where the distribution of the test statistic is statistic is an exact chi-square distribution is the test that the ariance of a normally distributed population has a gien alue based on a sample ariance! ariance! 6uch a test is uncommon in practice because alues of ariances to test against are seldom known exactly!
Chi-square test requirements +edit edit ! Bu Buan antitita tatitie e data data!! 2! n ne e or or mor more e cat categ egor orie ies! s! 1! 'n 'nde depe pend nden entt ob obse ser rat ation ions! s! 3! "de "dequa quate te samp sample le si%e si%e #at #at least least ;$ ;$!! 4! 6i 6imp mple le ra rando ndom m sa samp mple le!! 5! (a (ata ta in fr freq eque uency ncy fo form rm!! 7! "ll obs obser erati ations ons mus mustt be be used used!!
Chi-square test for variance in a normal population +edit edit 'f a sample of si%e n is taken from a population haing a normal distribution, distribution, then there is a result #see distribution of the sample ariance$ ariance$ which allows a test to be made of whether the ariance of the population has a pre-determined alue! For example, a manufacturing process might hae been in stable condition for a long period, allowing a alue for the ariance to be determined essentially without error! 6uppose that a ariant of the process is being tested, giing rise to a small sample of n product items whose ariation is to be tested! &he test statistic T in in this instance could be set to be the sum of squares about the sample mean, diided by the nominal n ominal alue for the ariance #i!e! the alue to be tested as holding$! &hen T has has a chi-square distribution with n degrees of freedom!! For example if the sample si%e is 2, the acceptance region for T for freedom for a significance leel of 4D is the interal E!4E to 13!7!
Chi-square test for independence and homogeneity in tables +edit edit 6uppose a random sample of 54; of the million residents of a city is taken, in which eery resident of each of four neighborhoods, ", , C, and (, is equally likely to be chosen! " null hypothesis says the randomly chosen person/s neighborhood of residence is independent of the person/s occupational classification, which is either Gblue collarG, Gwhite collarG, or GsericeG! &he data are tabulated9
Aet us take the sample proportion liing l iing in neighborhood ", 4;H54;, to estimate what proportion of the whole million people lie in neighborhood "! 6imilarly we take 13EH54; to estimate what proportion of the million people are blue-collar workers! &hen the null hypothesis independence tells us that we should GexpectG the number of blue-collar workers in neighborhood " to be
&hen in that GcellG of the table, we hae
&he sum of these quantities oer all of the cells is the test statistic! :nder the null hypothesis, it has approximately a chi-square distribution whose number of degrees of freedom is 'f the test statistic is improbably large according to that chi-square distribution, then one re)ects the null hypothesis of independence! " related related issue is a test of homogeneity! 6uppose that instead of giing eery resident of each of the four neighborhoods an equal chance of inclusion in the sample, we decide in adance how many residents of each neighborhood to include! &hen each resident has the same chance of being chosen as do all residents of the same neighborhood, but residents of different neighborhoods would hae different probabilities of being chosen if the four sample si%es are not proportional to the populations of the four neighborhoods! 'n such a case, we would be testing GhomogeneityG rather than GindependenceG! &he question is whether the proportions of blue-collar, white-collar, and serice workers in the four neighborhoods are the same! ?oweer, the test is done in the same way!
See also+edit edit Statistics portal
•
Chi-square test nomogram
•
G-test
•
>inimum chi-square estimation
•
&he Wald test can be ealuated against a chisquare distribution!
References+edit edit ! Jump Ju mp up^ 0ates, F #E13$! F #E13$! GContingency table inoling small numbers and the I2 testG! Supplement to the Journal of the Royal Statistical Society 1 Society 1#2$9 27= 214! J6&8 2EK15;3 •
•
•
•
Weisstein, .ric W!, W!, &est!html GChi-6quare &estG,, MathWorl ! &estG Corder, L!W! M Foreman, (!'! #2;3$! !onparametric Statistics: " Step-#y-Step "pproach! Wiley, @ew 0ork! '6@ E7K-KK3;11 to Lreenwood, P!.!, P!.!, @ikulin, >!6! #EE5$ " $uie to chi-square testin$ ! Wiley, @ew 0ork! '6@ ;-374477E-N
@ikulin, >!6! #E71$! GChi-square test for normalityG! 'n9 Proceein$s of the %nternational &ilnius onference on Pro#a#ility Theory an Mathematical Statistics , !2, pp! E=22!
•
agdonaicius, O!, @ikulin, >!6! #2;$ GChi-square goodness-of-fit test for right censored dataG! The %nternational Journal of "pplie Mathematics an Statistics, p! 1;-4;!+full citation neee Jhide hideKK
•
G
•
*
•
E
Statisti!s
Jshow showKK
$es!ripti%e statisti! Jshow showKK
$ata !olle!tion Jshow showKK
Statisti!al in#eren!e Jshow showKK
Correlation &egression ana Jshow showKK
Categori!al ' (ulti%ariate (ulti%ariate ' ' Ti"e-serie Jshow showKK
)ppli!ations • • • •
• • •
Categories9 Categories9 6tatistical tests @on-parametric statistics Categorical data
@aigation menu •
Create account
•
Aog in • •
• • •
8ead .dit Oiew history Lo • • • • •
>ain page Contents Featured content Current eents 8andom article
"rticle &alk
Category 4ortal Dutline 3ndex
• •
(onate to Wikipedia Wikimedia 6hop 'nteraction ?elp "bout Wikipedia Community portal 8ecent changes Contact page &ools What links here 8elated changes :pload file 6pecial pages Permanent link Page information Wikidata item Cite this page PrintHexport Create a book (ownload as P(F Printable ersion Aanguages QRSTUV (ansk (eutsch .spaol .uskara XYZ[\ Laeilge
• • • • •
• • • • • • • •
• • •
• • • • • • • • •
한국어
हनद
•
'taliano ]^_` Aatieu >agyar @ederlands
•
日本語
• • • •
•
Polski Portugus 6imple .nglish asa 6unda 6uomi &jrke &ing Oit
•
中文
• • • • • • • •
.dit links
•
&his page was last modified on K (ecember 2;3 at ;39;E!
•
&ext is aailable under the Creatie Commons "ttribution-6har "ttribution-6hare"like e"like Aicense additional terms may apply! y using this site, you agree to Aicense the &erms of :se and :se and Priacy Policy! Policy! Wikipedia is a registered trademark of the Wikimedia Foundation, 'nc!, 'nc! , a non-profit organi%ation!
•
•
Priacy policy "bout Wikipedia
•
(isclaimers
•
Contact Wikipedia
•
(eelopers
•
>obile iew •
•