negative contingency matrix entries for chi square?
Six Sigma – iSixSigma › Forums › Old Forums › General › negative contingency matrix entries for chi square?
 This topic has 11 replies, 4 voices, and was last updated 18 years ago by Jonathon Andell.

AuthorPosts

December 1, 2004 at 6:22 pm #37720
Can the values in the contingency matrix for chi square be negative including zeroes? My range of values is [1,1]. Some expected values come out 0, and divisions cannot be performed.
Greetings,
Mario0December 1, 2004 at 6:30 pm #111573Yes.
0December 1, 2004 at 6:53 pm #111578If you call contingency matrix to contengency table, and the values that you are asking are the value’s of the factors, then it’s ok your range and the answer is YES.
The variables (X and Y) of the contingency table are nonmetrics.
But if you refer to the frecuencies, the answer of your question is NO.
Remember one assumption of contengency table is: More than about 20 percent of the cells have expected frequencies more than 4 and any cell have an expected frequency more than 0.
Regards,
Nanni0December 1, 2004 at 6:54 pm #111580How are Ei=0 values handeled in x^2 = (OiE)^2/Ei?
Mario0December 1, 2004 at 6:59 pm #111582Maybe then I am applying chi sqaure to the wrong problem? I have a matrix populated with values in [1,1]. I want to find out if the rows and columns are stochastically independent.
Greetings,Mario0December 1, 2004 at 7:03 pm #111583You have a point if the expected value is 0.
Code your data by adding 1 to all cells. The contingency table will be valid.0December 1, 2004 at 7:19 pm #111585Sorry, but I don’t get it.
Have you a matrix with 1 and 1 ??? Mmm… and you need to know if the rows and columns are stochastically independent… ok, let me think…
First, you have to declare wich are your populations.
Second, define the possible values (in this case maybe would be 1 and 1)
Third, count… what many 1’s and 1’s do you have for any populations.
4th, do the contengency table. With the information that you gave us, I will see a table like this:
1 1
Rows Oij = O11 O12
Columns O21 O22
5th, Determine the expected frequency.
6th, Compute the value of X^2
7th, Determine the associated probability under Ho with ChiSquare with df = (r1)(k1). If that probability is equal to or less than alpha, reject Ho in favor of Ha.0December 1, 2004 at 8:13 pm #111589Consider for example the following 4×4 matrix where the values are reals from the range [1,1]:
0 .5 .3 .3
1 1 1 0
0 1 1 1
1 0 0 0
I would like to know if the rows and columns are independent, and more generally if the distribution of these values is from a particular expected distribution. There are no populations and frequencies here, as you would expect in a normal problem, just a matrix of numbers and a question of independence and goodness of fit to a particular expected distribution.
Greetings, Mario0December 1, 2004 at 8:19 pm #111590Yes, I think that is better. In that case my range of real values is shifted from [1,1] to [0,2], so there are no negative values in the matrix, but the distances between the matrix values are preserved. I might still get 0 for Ei because the matrix might be all 0’s. So mabye I should add 2 to every cell and get the [1,3] range instead…
Greetings, Mario0December 1, 2004 at 10:59 pm #111592Actually adding a constant to every cell fixes the problems of expected frequencies less than 1, and 20% expected frequencies less than 5. The problem however is that depending on which constant you add to every cell, the chisquare value is different…
0December 1, 2004 at 11:09 pm #111593How can u get 1 in expected frecuencie ??? It can NOT possible!
0December 7, 2004 at 2:26 am #111856
Jonathon AndellParticipant@JonathonAndell Include @JonathonAndell in your post and this person will
be notified via email.Good approach. You also may select other values instead of 1. Perhaps 0.1 will work in your case? There’s no single “correct” code value to select. But I think Stan knows that alrady…
0 
AuthorPosts
The forum ‘General’ is closed to new topics and replies.