0% found this document useful (0 votes)
57 views10 pages

Chi Square Test

Uploaded by

Anurag Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
57 views10 pages

Chi Square Test

Uploaded by

Anurag Sharma
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 10
(2), test as a non-paramtric teat :3?-test fan imporant non-parametric test and a8 sch 0 ‘igi assumptions are necessary in respect ofthe type of population. We require ony the degrees of freedom for using this test Asa non-parametric test 2test can be sed () 3 test of goodness fit (i as test of independence of ateibutes. (0 2-test as atest of goodness of it: Under the test of goodness offi we ry to find outhow forthe observed values ofa given phenomenon are significantly different fom the expected values ie. there is good compatiblity between theory and experiment ofthe fit is good. The term goodness of fii also used for comparison of observed sample dstrbuton withthe expected probability distributions (such as Binomial, Poisson, Normal) test determines how well {heoretcal distributions (cuch as Binomial, Poisson), fit the empirical dstrbutons (le. those obtained from sample dats) Procedure: {@) Setup the null hypothesis that there sno significant iference betwen the observed and the expected (or theoretical) values Le there is good compatbily between theory and ‘experiment or the fis good. @) We compute the valu of, by using the formula: 2_y|O-b ef] Where, © = Observed frequen, E = Expected frequeney he above onl cana wit o [eh Wers,N she ttl expecte frequency and 20 “58 ‘ies The second foot the ols o more convenient forcomputaon case he expected freuen comes a tons {) Dagres of fredom ae worked ou by ing th following formal: Degree ofteedon n- Incate of Binomisl Pesan and Normal stint epee freedom are ane by ssbinctng te munbe of independon constant om theft! equency (9. The numberof Independent contains na gto daa cepende upon he number opel ivaved nthe ‘Sit dota Tass indlned onder x © scanned with OKEN Scanner Chi-square Tey 1s _ arid ——~Conatral 7 No. of ais “Constraints oe The a aiaton [eta a aa 1 T] Binsin asain Fat ray 1 : ” " andl arithmetic mean Ct) 3] Noms tats and | 2 spared with the table value of 2 for {@) The calculated value of? as sch is than comp: el na dege ot recom a ana 1% evel sigicance ne afeulated 7.” excewds the able vay sr we rojo fy and conch tha the it isnot good the calculated value f° ea than ke : . « fit is good which means that the dive tne value, we accept Hp and contd thatthe fit is Bon eans thatthe deg between the observed and expected frequencies satribuable 12. TN fuctuations of sampling —~ CONDITIONS FOR USING THE 2 TEST {test asa goodness of fit can be used only when ()n ie. total frequency is lange ie.n > 506) ‘The cample sbservatons ace independent (i) The constraints on the cell equi, any, ae Treen Gano theoretical (or expected) frequency should be small ie. E < 5; # any E <5, ewe esl achnigue te. we ada the small requencis with the preceding or succeeding frequency» Eptain the requried sum >5 and adjust degrees of freedom (€.£) accordingly Example 6; A die is thrown 180 times with the following results ¢ —~ [Newmeaup?] 1] 2-[ 3 [« [Ts [os Tra] Frequency : z= | | « | 2 | 3 | 2% | wl] ‘Test the hypothesis that dieis unbiased: Solution. Setup the null hypothesis that the die is unbiased. On the Basis OF RE hypotiess the expected frequency of each number tumed up =n 180.2 : Se Applying 1-test : o E (o-5 O-n? Fa % 3 5 x» 6 3 © x» #10 100 2 x» 3 ot 23 Fs s 2 4 os a 16 0533 310 = 8 ulated value of? at ‘The tabulated value of 1? at 5% level of significance for 5 df, = 1107 © scanned with OKEN Scanner oun Tet ‘Since, the calculated value of x? is less than the table val ae of? tes than the able vale, we act he ml / hype and cone tha dee untae ape: /) The lowing gre show he ditions of ign mune cone trandon from a telephone directory " Da Pe [1 [apo Fingueney oe |e? [a7 [os [ra | [07 s [6 [7 [4 [9 [ron] ora | | oa) ly frequently in “eat at 5% level whether he diptemay be aken acu equal the ecto. Given hy fr 9c» 1691) Lets ake th hypothesis that the digits may be aken to occur ually frequently inthe diner. On the basso this hypothe the expected requences ar i 1 i i woos 10.00%, rom, 10m, 1000075 1 1 10,000% 75, 1000055 Solution. 1 1 1 35710.000%;5, 10,000% 5, 10,000: Applying x2-test [o E (Ob (o-_| (0-BE ms 7000 | +25 w% 0-676 1307 1000 +107 nats 14s 337 1000 3 3 0008 966 x00 =36 1156 1156 1075 1.000 +75 505 5-695 33 41000 “0 4489 88 107 +000 +107 149 49 om 00 = 738 0-788 964 11900 -36 1296 0.296 353, +000 a7 21608 21609, TO-BF/E 257.502 fo-p?1 pes e par sia Degrees of freedom (i) =10-1=9 The table viaue of for 9d. at 5% level of significance = 16-919. Since, the caleulated value of is greater than the table value, we reject the hypothesis and conclude that the digits may not be taken to occur equally frequently in the directory. | ‘Nsample analysis of examination results of 500 students were made. Btwas found ‘hat 220 students had failed, 170 had secured a thied class, 90 were placed in second class and 20 got a fist clas. Are these figures commensurate with the © scanned with OKEN Scanner 6 Chi-square Test general examination result which is in the ratio of 4: 3:2: 1 for the various ‘categories respectively ? (The table value of x? (or 3d. at 5% level of significance is 780. Let stake th ype thatthe seed rel ae commensurate wth he geval examiatn shinee oa s3-27 Theespcted ne often who faved = 4500 Meespatatno olsen whee ole al dss =2 1500=150 The expected no of students who have obtained aI class = 2 500 = 100 The expected no of students who have obtained a Tclass = 75500 =5 Applying x?-test: category [0 E o-5 | o-» [0-5] Fralled 20 200 +20 300 200 | Seddas | 170 150 +20 400 267 | 2nd cass | 90 100 100 | Istclass 20 so S00 18.00 23-667 | 2 [2 =5 |» 6 E Degrees of freedom(s) =4-1=3 ‘The tabulated value of z? at 5% level of significance for 3 df. =781. Since, the calculated value of ,? is greater than the table value of x7, we reject the null hypothesis and conclude that the observed results arenot commensurate with the general examination result. In an experiment on peas breeding, Mendal obtained the following frequencies of seeds :315 round and yellow, 101 wrinked and yellow, 108 round and green, ‘2 wrinkled and green, According to his theory of heredity the numbers should | bbein proportion :3:3:1. 1s there any evidence to doubt his theory at 5% level of significance ? ution. _Let us take the hypothesis that there is no siginficant difference inthe observed and expected values. On the basis of this assumpation, the expected frequencis should be: 2. x 586x2.= 312-75, 556 1 P x4 = 34-75 04-25, 556x 7 3 «3. 108-25, 556x3 we © scanned with OKEN Scanner chi-Square Test — 17 Categor > y | oe |e [on [o-m fon Round and Yellow | 315 | i275 | 2.25 | 6 oms | 0.016 Wrinkted and Yetlow] 101 | 104.25 | —a.25 | 5005 | oor Round and green | 108 | 104-25, 375 | 4095 | os Wrinkled and green | 32 m7 | -275 | 7565 | one Ino -? /e | eo Degrees of freedom: Foro = 3, 1305 = 782 Since, the calculated vlaue of 1? is less than the table value, we accept sll hypothesis. Hence, there is no evidence to doubt the theory at 5% level of ignificance. ‘The following table gives the number of aircraft accidents that occured during the various days of the week. [Daye of the week] Sun. | Mon. | Tue. No.of accidents| ¢ | 16 | 6 | 2 | mu | 9 Example 10: Wed-| Thur | Fe. | Sat | Tout ra ~ ind whether the accidents are uniformily dstibuted over the wee (Given the table value of 1395 for 6 dis 12-59) Solution. _Let us take the hypothesis that the accidents are uniformly distributed over the ‘week iz they are independent of the day ofthe week. On the basis of thishypothesis, ‘we should expect 84/7 = 12 accidents on each day. Applying 17-test: [oe E (o-B? (0- BE ve 2 4 0.333 16 ry 16 1.383 8 2 16 1.383 ns 2 a 0.00 u 2 1 0-088 9 2 9 0.750 rn 2 , 4 0.339 BO=84 l B(O-B'E J 24-155 © scanned with OKEN Scanner 138 Example 11: Solution. ChiSquare Test eal 2 ase 7-1-6 Degrees of freedom =17=1-1= For =6,xgq5 "1259 since, the ealeulated value of 2 is less than the table value, we accept the null Iypothesis and conchde that the acidents are uniformily distributed over the week. “The number of automobile accidents per week ina certain city were a follows: 12, 8,20, 2,14, 10,15, 6,9,4 ‘Are these frequencies in agreement with the belief that accidents numbers ‘were the same during these 10 week period. Let us take the this hypothesis be that the number of accidents ps certain are equal during the 10 week period. ‘On the basis of this hypothesis, the expected number of accidents per week jer week in a 100 pet Applying 2- test : o E (O-B* (O- BE 2 10 4 ot 8 10 4 ot » 10 100 10-0 2 10 a ot 4 10 6 16 10 10 ° 00 15 10 2B 25 6 10 16 16 5 10 1 oa 4 10 % 36 20-8 /E =26.6 Dees of reedom0 Forv=9, 295 “16-92 ‘Since, the calculated value of z? is greater than the table value, we reject the null ‘hypothesis and conclude that the accident conditions were not the same (uniform) ner the 10 week period © scanned with OKEN Scanner Pen as a test of independence of attributes : y7-test enables us to ¢ two attributes are associated or independent of one another. For example, we may be interés in knowing whether a new medicine is effective in controlling fever or not. x” i deciding this issue. Procedure : iSet up the null hypothesis that the two attributes (viz. new medicine and control of fever) are independent which means that new ‘medicine is not effective in controlling fever. (i) On the basis of the null hypothesis, we calculate the expected frequencies by using the following formula : (R)x(© N Where, R = Row Total, C = Column total, N = Total number of observations. (ii) We compute the x2-value by using the following formula : 2 2 yf OB] vale | Expected frequenc; © scanned with OKEN Scanner 146 Chi-square Test ns, degrees of freedom are worked a a (6) Oblain the critical value (or table value) of 12 with reference to the degrees of freedom for (vi) Ifthe calculated value of x? is less than the table value at a a level Cae for Bul if the calculated value Z2 is greater than its table value, we reject the null hypothesis eee Example 16; A sample of 200 persons with a particular disease was selected. Out of them, 109 ‘were given drug and others were not. The resulis were observed as follows: No, of Fessons Given Drug No Drug, Total Cured 3 6 m0 ‘Not Cured 5 35 0 Total 100 100, 200 ‘Test whether the drug has been effective in curing the disease. Solution. Let the null hypothesis be that dug has not been effective in curing the disease. Cn the basis ofthis hypothesis, the expected frequencies arecaleulated a fallow: foo 120 Ro Ea 200 The remaining frequencies canbe found by subtractions from the column androw & toals. ‘The expected frequencies table would be as follows a a" a0 0 "00. Applying x2- test: 2. £ (O-B (o-F? (O-B/E 2 ce “5 5 0-416 2 o +5 5 0-625 © +5 3 0-416 38 40 E is E(O-B? /E= 2.082 © scanned with OKEN Scanner i-Square Test GaSe 147 Degrees of fredom Foro=1,xg95 = 3-84 2-2-1 at Since, the calculated vale of is less than the table value of 12, we accept the null hypothesis and conclude thatthe dy has nol been effective in curing the disease. Example 17: The table given below sh 1s the data during and epidemic of cholera Altacked [Not Attacked ‘Toul Inoculated a 1 0 [Not Inoculated. s | sais 3,300 Total 216 108 2000 Use x?test to determine whether inoculation is effective in preventing the attack of cholera (Given as 5% level of significance, the value of 75 9s for 1 4. 3-89. Solution. _Let us take the hypothesis that inoculation is not effective in preventing the attack cof cholera. On the basis ofthis hypothesis, the expected frequencies are a 1, = 2165800 1-7, 000 “The remaining frequencies can be found out by subtractions from the column and. row totals. ‘The expected frequecies table would be as follows: e Bi 4 00 162 1338 1500, 1 784 2000 Applying x2-test °. E o-p | o-5* (O-BUE 3 EI zB 29 9.797 185, 16 +2 29 3.266 469 46 +B 59 187 315. 1 23 9 0.396 E(O=D? /E~14 616 Since the calculated value of? is greater than the table value, we reject the nll hypothesis and conchide that inoculation is effective in preventing the attack of cholera. © scanned with OKEN Scanner 148 Example 18: Chi-square Test Two investigators study the income of group of persons by the method of sampling, Following resulte were oblate by them _ Investigator [Mite clae_{— Wetlto-4 i [a 1 10 | 299 ‘Show that the sampling technique of at least one of the investigator is suspected. (Given the value of x3 9s for 2 df. = 5:991) Let us take the hypothesis that there is no suspicion about the sampling technique ‘of the two investigators. On the basis of this hypothesis, the expected frequencies shall be 300200 yy 130200 500 J 2500 ‘The remaining frequencies can be found out by subtractions from the column and row totals. ‘The table of expected frequencies is given below : 20 a: 20 200 10 20 20 200 00 150 0 500 applying x-test o E (O-B wo-b? (O-DNE 160 120 0 1600 13-358 0 wo | -40 1600 5-888 2 |. o -2 00 15.000 120 0 x» 500 10-000 10 20 a0 100 5-000 40__| _39 +10 100. 3.333 E(O-B? /E~ 55.554 Forv=2,1i95 =5:991 Since, the calculated value of? is greater than the table value, we reject the mill hypothesis and conclude that the sampling technique of at least one of the investigators is suspected. ns i © scanned with OKEN Scanner

You might also like