Aim: Statistical power calculation: Chi-square test of Goodness of fit.


Example:

A researcher wants to find whether there is significant difference in proportions of various blood groups amongst doctors than general population. The study has revealed that the number of doctors with blood groups A, B, AB and O awere 20, 40, 15 and 10 respectively. The expected values for these 85 doctors, based on population proportions of blood groups were 20, 35, 10 and 20 respectively. How much was the statistical power, if confidence level is 95%.

Solution:

Here

Confidence level = 95%, Observed values are 20, 40, 15 and 10, corresponding expected values are 20, 35, 10 and 20

After putting these values, we get power = 66.7%.


Illustrative screenshot:


How sample size is calculated? (Exclusively for advanced users)

1. Calculation of sample size required for Chi-Square GoF requires a complex approach.

2. Based on the number of groups / levels in group (k) degrees of freedom(df) is calculated as k -1.

3. Based on degree of freedom and confidence level, critical chi-square value (x) is calculated. For example, if the number of groups / levels are 4, then df = 3. Critical chi-square value for confidence level of 95% (or alpha of 5%) and df =3 is 7.815. (It is the chi-square table value for given alpha and degrees of freedom)

4. Based on given observed and expected values, chi-square values are calculated for each cell.

5 A. Chi-square value for each cell is calculated using following formula. This chi-square value is also equal to the non-centrality parameter

    B. Alternatively non centrality parameter (lambda) can also be calculated using following formula.

λ = N * w ^2                       Where w is the effect size, N is the sample size. w is calculatd as follows.

Where P1i is the proportion under alternate hypothesis in group i (observed proportions).Where P0i is the proportion under null hypothesis in group i (expected proportions)

7. Using the values of non-centrality parameter (λ), df and x; power of the test is calculated using non central chi square cumulative distribution function formula.

Where, Q (x, k + 2 * m) is the CDF of central chi-square distribution with critical value of x and df of k + 2 * m . 


@ Sachin Mumbare