# Chii Square test

Six Sigma – iSixSigma Forums Old Forums General Chii Square test

Viewing 8 posts - 1 through 8 (of 8 total)
• Author
Posts
• #29649

Member

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
Chi-Sq = 0.917 + 2.715 +
7.860 + 23.270 = 34.762
DF = 1, P-Value = 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

0
#76411

James A
Participant

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 A

0
#76412

Member

James,
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
Venkat

0
#76413

John Noguera
Participant

Your analysis looks correct, but in this case a simpler approach could be used –  the two sample proportions test. The p-values 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.

0
#76415

James A
Participant

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 A

0
#76416

Member

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.

0
#76432

Carl Haeger
Participant

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 P-Value = 0.000

0
#76445

LAguy
Participant

Hi Venkat
Great Choice of test! Contingency Tables and Chi-squared 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 in-house software to track and report our sub-contractor 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 Chi-Squared 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 Chi-squared 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
Chi-Sq = 1.333 + 3.528 +
10.096 + 26.709 = 41.666
DF = 1, P-Value = 0.000

0
Viewing 8 posts - 1 through 8 (of 8 total)

The forum ‘General’ is closed to new topics and replies.