Saturday, November 6, 2010

3. Balanced designs

3.1  Cochran's C ratio
In a balanced design, all data sets have the same number of observations.  The G ratio (General summary of G test: § 2.1) then reduces to the well-known Cochran's C ratio [23]:
Where:
Gj = G test statistic for data set j
Cj = Cochran's C test statistic for data set j

3.2 Computing critical C values
For balanced designs the critical values CUL and  CLL take the reduced forms:
Fc is available in Excel: Fc = FINV(probability, degrees of freedom 1, degrees of freedom 2)

Below you find a simple example spreadsheet to calculate critical values for balanced designs:








Cell contents:

B11:  "=1/(1+(B5-1)/FINV(1-B4/B5,B6-1,(B5-1)*(B6-1)))"
B12:  "=1/(1+(B5-1)/FINV(1-B4/2/B5,B6-1,(B5-1)*(B6-1)))"
C10:  "=1/(1+(B5-1)/FINV(B4/B5,B6-1,(B5-1)*(B6-1)))"
C12:  "=1/(1+(B5-1)/FINV(B4/2/B5,B6-1,(B5-1)*(B6-1)))"


Current practitioners of Cochran's test may prefer to continue working from tables. For their convenience, Appendices A to F provide extensive lists with critical values for balanced designs:

Appendix
Limit
ζ
One-sided α
Two-sided α
A
Upper Limit
0.01
0.01
0.02
B
Upper Limit
0.025
0.025
0.05
C
Upper Limit
0.05
0.05
0.1
D
Lower Limit
0.01
0.01
0.02
E
Lower Limit
0.025
0.025
0.05
F
Lower Limit
0.05
0.05
0.1


3.3  One-sided upper limit G test
When conducting a one-sided upper limit G test on balanced data, it is not necessary to evaluate Gj for all data sets j.  It is sufficient to evaluate:
Where:
   Gmax = G test statistic for the data set with the highest variance  
   Cmax = Cochran's C test statistic for the data set with the highest variance

Running a one-sided upper limit G test on balanced data is similar to running a traditional Cochran's C test: 

Determine the upper limit value CUL according to § 3.2. If Gmax exceeds CUL, label the corresponding variance value as "exceptionally large", remove the value from the variance data, and repeat the test on the remaining variance values. Continue the process until you have identified all remaining variance outliers.

Several text books [1,2,6] and ISO 5725 [19] provide guidance on conducting a C test.  The main advantages of conducting a G test in stead are:
  1. The G test is not restricted to the significance levels α = 0.01 and α = 0.05 but will run at any significance level.
  2. The upper limit values for the G test need not be obtained from tables, but can be computed (§ 3.2). 
  3. The limit values for Cochran's C test have only been tabulated for selected numbers of data sets (L) and selected numbers of observations (n) per data set; whereas the G test allows limit values to be calculated for any combination of L and n.
3.4  One-sided lower limit G test
When conducting a one-sided lower limit G test on balanced data, it is not necessary to evaluate Gj for all data sets j.  It is sufficient to evaluate:
Where:
  Gmin = G test statistic for the data set with the lowest variance

Cochran's C test does not allow for lower limit tests. A one-sided lower limit G test on balanced data is conducted as follows:  

Determine the lower limit value CLL according to § 3.2. If Gmin is less than CLL, label the corresponding variance value as "exceptionally small", remove the value from the variance data, and repeat the test on the remaining variance values. Continue the process until you have identified all remaining variance outliers.

3.5  Two-sided G test
When conducting a two-sided G test on balanced data, it is not necessary to evaluate Gj for all data sets j.  It is sufficient to evaluate:

Where:
   Gmax = G test statistic for the data set with the highest variance  
   Gmin = G test statistic for the data set with the lowest variance  

Usually a two-sided G test on balanced data can be conducted as follows: 

Determine the upper limit value CUL and the lower limit value CLL according to § 3.2, taking ζ = α/2. If Gmax exceeds CUL, label the highest variance value as "deviant" and remove this value from the variance data.  Likewise,  if Gmin is less than CLL, label the lowest variance value as "deviant", remove that value from the variance data, and repeat the test on the remaining variance values. Continue the process continues until you have identified all remaining variance outliers.

Occasionally both the highest variance and the lowest variance value may appear "deviant".  In that case you should only remove the variance value that has the highest probability to be deviant indeed, and continue the process from there. There are two equivalent ways to identify the variance value that is most likely to be deviant. Conceptually the simplest approach is: 

Lower the initial significance level of the two-sided test such that only one of the variance values will still be marked "deviant".   Remove only that value from the variance data, and repeat the test at the lower significance level on the remaining variance values. Continue the process until you have identified and removed all variance outliers at the lower significance level. Then run the two-sided test on the remaining variance data; let the significance level gradually increase until you reach your initial significance level.

While conceptually simple, the above approach has the drawback that it will require more calculation work than is strictly necessary.  If you plan to apply the G test routinely, you may prefer to directly calculate the probability that a specific variance is truly deviant according to § 3.6 of the manuscript.

1 comment:

  1. Just want to say a big "Thank you" to Ruben for being so responsive to my questions and helping me understand his formulas better.

    I am Maintenance Analyst in the U.S. military and I needed some assistance computing Cochran C-critical values in Excel. My main problem was that there is no easy formula to compute these values and the values are only available inside of a table. Rather than do a Vlookup or Hlookup in excel, I needed to find a way to compute the critical values so that I could automate some of my hypothesis testing.

    I emailed Ruben, explaining my issue and hoping that I would get a response. Within a day, I had a quick response my questions and asking me a few too. A week later of emailing back and forth, Ruben explained quite a bit in his emails, gave me a formula in excel to calculate Cochran’s C critical values, and I had a better understanding of this blog and the G-test. I plan on using what he showed me and incorporating it into my work. With any luck, I can pass this knowledge on throughout my career field, so that no one else has the same issue as me.

    For anyone with questions, don't hesitate to ask on this blog or email him like me. Ruben is knowledgeable, friendly, and responsive to any question. Never in my life did I think I would email a random person from the Netherlands that I read about in a blog but I am glad I did it. It was definitely worth it and I enjoyed talking to Ruben for the small amount of time that I interacted with him.

    Thanks again for your help, Ruben.

    ReplyDelete