Chii Square test
Six Sigma – iSixSigma › Forums › Old Forums › General › Chii Square test
 This topic has 7 replies, 6 voices, and was last updated 18 years, 11 months ago by LAguy.

AuthorPosts

June 14, 2002 at 9:43 am #29649
Am presently working on a project dealing with attritube type of data & am currently in the Improve phase. Need help to validate my findings and conclusions:
Given below is the data on the units checked and Defects found both before and after Improvement
Initial Units :1045 Defects: 395Final: Units : 157 Defects: 11
Have attempted to do a Chi Sq test on the above data & the output is as follows:
Column1 Column2 Total
Initial 1045 395 1440
Exp. counts 1076.42 363.58
Final 157 11 168
Exp. counts 125.58 42.42
Total 1202 406 1608
ChiSq = 0.917 + 2.715 +
7.860 + 23.270 = 34.762
DF = 1, PValue = 0.000
Since the pvalue is less than 0.05 & there are no expected counts less than 5, is my conclusion right that there has been a significant reduction in the Defect Levels?
Regards
Venkat
0June 14, 2002 at 10:30 am #76411
James AParticipant@JamesA Include @JamesA in your post and this person will
be notified via email.Venkat,
I am a bit worried that your expected number of counts is more than your initial observed number of counts in Column 1. This should not happen if you have calculated Expected Frequency using (Row Total x Column Total) / Grand Total.
Before you draw any conclusions, check your data for sanity. However, on the basis of your question, on the face of it there is a significant difference between the two populations.
But check your numbers before proceeding further. It’s the end of our week now, so I’m logging off, and am out of town next week. Have a good weekend all.
Can anyone else help?
James A0June 14, 2002 at 10:46 am #76412James,
Firstly, thanks for your prompt response.
Have checked up the calculations manually as well as using Minitab & have come to the same conclusions.
Was hence seeking others views on my conclusions
thanks once again
Venkat0June 14, 2002 at 10:54 am #76413
John NogueraParticipant@JohnNoguera Include @JohnNoguera in your post and this person will
be notified via email.Your analysis looks correct, but in this case a simpler approach could be used – the two sample proportions test. The pvalues work out to be the same, but it is easier to do.
In Minitab: Stat > Basic Statistics > 2 Proportions. Use summarized data. Recommended that under options you check the “used pooled estimate of p for test” option.0June 14, 2002 at 11:26 am #76415
James AParticipant@JamesA Include @JamesA in your post and this person will
be notified via email.Venkat,
I have just given myself a quick refresher on Chi sqrd tests – I was wrong in my views about expected not being greater than observed. But I’ve (re) learned something, so that must be good.
Having cleared my conscience, I can now go home.
James A0June 14, 2002 at 12:14 pm #76416
Shree PhadnisMember@ShreePhadnis Include @ShreePhadnis in your post and this person will
be notified via email.Dear Venkat,
While your calculations are correct, I would like to draw your attention to application of a P chart or a U chart which are more powerful then hypothesis test as an Hypothesis is a post martem while a control chart would be a analytic type of study.I would like to take you the comment made by Dr Deming about Chisquare testing and Control Charts.
Shree Phadnis0June 14, 2002 at 5:07 pm #76432
Carl HaegerParticipant@CarlHaeger Include @CarlHaeger in your post and this person will
be notified via email.Using 2 sample P test it looks like the difference is at least a 26% drop in rate (from 37%). With the improved data collected your CI for new rate is (3% to 12%).
Good luck in Control !
Test and CI for Two Proportions
Sample X N Sample p
1 395 1045 0.377990
2 11 157 0.070064
Estimate for p(1) – p(2): 0.307927
95% lower bound for p(1) – p(2): 0.266315
Test for p(1) – p(2) = 0 (vs > 0): Z = 12.17 PValue = 0.0000June 14, 2002 at 11:27 pm #76445Hi Venkat
Great Choice of test! Contingency Tables and Chisquared testing are powerfull, general purpose tools. Our company makes extensive use of such tables that can grow to hundreds and thousands of rows and columns (We have developed inhouse software to track and report our subcontractor performances using Contingency Tables).
While others have pointed out correctly that the 2 Proportion Test can also be used in this case, they seem to have missed one of the most common mistakes in the use of Contingency Tables and associated ChiSquared tests… put simply, the totals of the rows and columns must add up to something meaning full in order to calculate the expected values for each cell. Take your initial sample of 1045 units. You had 157 defects. The total of the column is 1045+157 = 1202. This number 1202 does not have any meaning. For the initial situation, you need to subtract out the 157 defects from the total, such that in column 1 of your table you have the good units (888) on line 1 and the defects (157) on line 2. Same principle for Column 2, where you should have good units (384) on line 1 and defects (11) on line 2. Remember that the Expected Values for each cell are calculated as “(Row Total * Column Total)/Grand Total”. In this case, there is no practical difference ( P is very low) given the large Chisquared value, but the error in the calculation will get larger as the proportion of defects (in this case) rises. I included a printout below of the applicable MiniTAB session window. There is also the question of what is known as “Yates” correction for 2×2 Contingency tables, but that’s something for another day :))
Before After Total
1 888 384 1272
923.08 348.92
2 157 11 168
121.92 46.08
Total 1045 395 1440
ChiSq = 1.333 + 3.528 +
10.096 + 26.709 = 41.666
DF = 1, PValue = 0.0000 
AuthorPosts
The forum ‘General’ is closed to new topics and replies.