TriaLab Power Studio · Method
Chi-square test of independence — groups by an unordered categorical outcome
Sizes a study comparing two or more groups on an outcome with three or more categories by Pearson’s chi-square on the r × c table. The effect is Cohen’s w for the whole table, or the two groups’ distributions over the outcome categories.
Also known as: contingency table, r x c table, Pearson chi-square, test of association, Cramer’s V, Cohen’s w, multinomial comparison, categorical outcome.
Maturity
Validated: 24 published examples from 2 independent publications (Chow, Shao, Wang & Lokhnygina 2017; PASS) reproduce on every build (ADR-0001 §58).
What it solves for
- Sample size: offered.
- Power: offered.
- Detectable effect: offered.
- Precision: not offered — An omnibus chi-square has no single estimand to put a confidence interval around.
- Assurance: not offered — No source on disk states a prior on this design’s effect, so the assurance modifier is not admitted here.
- Duration: not offered — This design has no time axis: each subject is classified once (or once before and once after), so calendar time does not enter the power function.
Size axes:
- Subjects in the whole table (
participants_total), Count
Inputs
Every field as the form shows it, with its help. A field marked advanced sits behind Expert mode.
Common to every method
- Significance level (alpha) (
alpha): a number, above 0 and below 1; default 0.05; typically 0.01 to 0.05 (0.05 in most trials; 0.01 for confirmatory claims); entered as proportion (0-1) or percent The type I error rate. Interpreted as two-sided when testing plain equality and one-sided when a margin frame is active, following the usual convention. - Target power (
power_target): a number, above 0 and below 1; default 0.8; typically 0.8 to 0.9 (0.80 is conventional; 0.90 for definitive trials); entered as proportion (0-1) or percent The chance of a significant result if the assumed effect is real. Used when solving for sample size or detectable effect; ignored when solving for power.
The method’s own
- Rows (groups) (
rows): a whole number, at least 2 and at most 64; default 2 How many groups are compared — the rows of the table. Two when the two groups’ distributions are entered. - Columns (outcome categories) (
columns): a whole number, at least 2 and at most 64; default 3; typically 3 to 8 (two columns are a two-proportion test) How many categories the outcome has — the columns of the table. The test has (rows − 1)(columns − 1) degrees of freedom. - Effect size w (Cohen) (
effect_size_w): a number, above 0; default 0.3; typically 0.1 to 0.5 (Cohen’s small to large) Cohen’s w = √Σ(p_ij − p_i·p_·j)²/(p_i·p_·j) over the cells: the root of the chi-square statistic per subject. Cohen calls 0.1 small, 0.3 medium and 0.5 large; Cramér’s V is w/√(min(r, c) − 1). Enter the two groups’ distributions instead to have it computed. - Group 1 (control) distribution (
probability_group_1): one number per element, as many ascolumns; default (1, 1, 1) The probability of each outcome category in group 1. Counts or percentages are accepted: the list is scaled to sum to one. - Group 2 (treatment) distribution (
probability_group_2): one number per element, as many ascolumns; default (1, 1.5, 2) The probability of each outcome category in group 2, scaled likewise. The groups’ shares of the sample follow the allocation modifier (equal when it is off).
Sizes entered when another axis is solved for
- Subjects in the whole table (
participants_total): a whole number, at least 1 Subjects in the whole table. Required when solving for power or detectable effect; produced by the solver when solving for sample size.
Ways to express an input
Association — Cohen’s w for the whole table, or the two groups’ outcome distributions it is computed from (a two-row table).
- Effect size w, the form’s default: One number for any r × c table; Cohen’s conventions apply. (fields
effect_size_w) - Two groups’ distributions: One probability per outcome category in each of two groups; w is derived and shown. Rows must be 2. (fields
probability_group_1,probability_group_2)
Modifiers admitted
allocation: Allocationdropout: Dropout
Published examples it reproduces (24)
Each is a worked example: the inputs as a user enters them, and the number the source prints, which the engine reproduces within the tolerance on every build (the Validation screen runs them on your machine).
| Source | Example | Solves for | Inputs | Published |
|---|---|---|---|---|
| Chow, Shao, Wang & Lokhnygina 2017, §6.2.3 (printed p. 136) | A 2 x 3 pilot table (2/7/1 against 2/5/3, equal groups) giving w² 0.0667, two-sided 0.05, 80% power => 145 subjects (144.52) | Sample size | alpha = 0.05; columns = 3; power_target = 0.8; probability_group_1 = (2, 7, 1); probability_group_2 = (2, 5, 3); rows = 2; effect expressed as two_groups |
participants_total = 145 ± 0 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 20, alpha 0.01 => power 0.12127 | Power | alpha = 0.01; columns = 2; effect_size_w = 0.366213; participants_total = 20; rows = 3; effect expressed as w |
power = 0.12127 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 20, alpha 0.05 => power 0.29104 | Power | alpha = 0.05; columns = 2; effect_size_w = 0.366213; participants_total = 20; rows = 3; effect expressed as w |
power = 0.29104 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 20, alpha 0.1 => power 0.41007 | Power | alpha = 0.1; columns = 2; effect_size_w = 0.366213; participants_total = 20; rows = 3; effect expressed as w |
power = 0.41007 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 50, alpha 0.01 => power 0.39621 | Power | alpha = 0.01; columns = 2; effect_size_w = 0.366213; participants_total = 50; rows = 3; effect expressed as w |
power = 0.39621 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 50, alpha 0.05 => power 0.63538 | Power | alpha = 0.05; columns = 2; effect_size_w = 0.366213; participants_total = 50; rows = 3; effect expressed as w |
power = 0.63538 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 50, alpha 0.1 => power 0.74622 | Power | alpha = 0.1; columns = 2; effect_size_w = 0.366213; participants_total = 50; rows = 3; effect expressed as w |
power = 0.74622 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 100, alpha 0.01 => power 0.78214 | Power | alpha = 0.01; columns = 2; effect_size_w = 0.366213; participants_total = 100; rows = 3; effect expressed as w |
power = 0.78214 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 100, alpha 0.05 => power 0.91678 | Power | alpha = 0.05; columns = 2; effect_size_w = 0.366213; participants_total = 100; rows = 3; effect expressed as w |
power = 0.91678 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 100, alpha 0.1 => power 0.95512 | Power | alpha = 0.1; columns = 2; effect_size_w = 0.366213; participants_total = 100; rows = 3; effect expressed as w |
power = 0.95512 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 200, alpha 0.01 => power 0.98840 | Power | alpha = 0.01; columns = 2; effect_size_w = 0.366213; participants_total = 200; rows = 3; effect expressed as w |
power = 0.9884 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 200, alpha 0.05 => power 0.99795 | Power | alpha = 0.05; columns = 2; effect_size_w = 0.366213; participants_total = 200; rows = 3; effect expressed as w |
power = 0.99795 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 200, alpha 0.1 => power 0.99927 | Power | alpha = 0.1; columns = 2; effect_size_w = 0.366213; participants_total = 200; rows = 3; effect expressed as w |
power = 0.99927 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 311, alpha 0.01 => power 0.99980 | Power | alpha = 0.01; columns = 2; effect_size_w = 0.366213; participants_total = 311; rows = 3; effect expressed as w |
power = 0.9998 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 311, alpha 0.05 => power 0.99998 | Power | alpha = 0.05; columns = 2; effect_size_w = 0.366213; participants_total = 311; rows = 3; effect expressed as w |
power = 0.99998 ± 0.000006 |
| PASS chapter 250, Example 1 (printed p. 250-5) | The 3 x 2 political-party table, w 0.366213, N 311, alpha 0.1 => power 1.00000 | Power | alpha = 0.1; columns = 2; effect_size_w = 0.366213; participants_total = 311; rows = 3; effect expressed as w |
power = 1 ± 0.000006 |
| PASS chapter 250, Example 2 (printed p. 250-8) | A 3 x 3 table, w 0.1, alpha 0.05, power 0.8 => 1194 respondents | Sample size | alpha = 0.05; columns = 3; effect_size_w = 0.1; power_target = 0.8; rows = 3; effect expressed as w |
participants_total = 1194 ± 0 |
| PASS chapter 250, Example 2 (printed p. 250-8) | A 3 x 3 table, w 0.1, alpha 0.05, power 0.9 => 1541 respondents | Sample size | alpha = 0.05; columns = 3; effect_size_w = 0.1; power_target = 0.9; rows = 3; effect expressed as w |
participants_total = 1541 ± 0 |
| PASS chapter 250, Example 2 (printed p. 250-8) | A 3 x 3 table, w 0.3, alpha 0.05, power 0.8 => 133 respondents | Sample size | alpha = 0.05; columns = 3; effect_size_w = 0.3; power_target = 0.8; rows = 3; effect expressed as w |
participants_total = 133 ± 0 |
| PASS chapter 250, Example 2 (printed p. 250-8) | A 3 x 3 table, w 0.3, alpha 0.05, power 0.9 => 172 respondents | Sample size | alpha = 0.05; columns = 3; effect_size_w = 0.3; power_target = 0.9; rows = 3; effect expressed as w |
participants_total = 172 ± 0 |
| PASS chapter 250, Example 2 (printed p. 250-8) | A 3 x 3 table, w 0.5, alpha 0.05, power 0.8 => 48 respondents | Sample size | alpha = 0.05; columns = 3; effect_size_w = 0.5; power_target = 0.8; rows = 3; effect expressed as w |
participants_total = 48 ± 0 |
| PASS chapter 250, Example 2 (printed p. 250-8) | A 3 x 3 table, w 0.5, alpha 0.05, power 0.9 => 62 respondents | Sample size | alpha = 0.05; columns = 3; effect_size_w = 0.5; power_target = 0.9; rows = 3; effect expressed as w |
participants_total = 62 ± 0 |
| PASS chapter 250, Example 3, validating Cohen 1988 p. 251 (printed p. 250-9) | Cohen’s sex-by-party table (2 df), N 140, alpha 0.01, w 0.3 => power 0.74841 (Cohen’s tables print 0.75) | Power | alpha = 0.01; columns = 3; effect_size_w = 0.3; participants_total = 140; rows = 2; effect expressed as w |
power = 0.74841 ± 0.000006 |
| PASS chapter 250, Example 3, validating Cohen 1988 p. 251 (printed p. 250-9) | Cohen’s sex-by-party table (2 df), N 140, alpha 0.01, w 0.4 => power 0.96641 (Cohen’s tables print 0.97) | Power | alpha = 0.01; columns = 3; effect_size_w = 0.4; participants_total = 140; rows = 2; effect expressed as w |
power = 0.96641 ± 0.000006 |
Sources
- Chow S-C, Shao J, Wang H, Lokhnygina Y. Sample Size Calculations in Clinical Research. 3rd ed. Boca Raton: Chapman & Hall/CRC; 2017. §6.2, Equations 6.2-6.3.
- Cohen J. Statistical Power Analysis for the Behavioral Sciences. 2nd ed. Hillsdale, NJ: Lawrence Erlbaum; 1988. Chapter 7, §7.2.2 (contingency tests) and §7.2.7 (Cramér’s φ′).
- NCSS, LLC. PASS 2026 documentation, chapter 250: Chi-Square Tests. Kaysville, UT: NCSS, LLC; 2026.
This page was generated from TriaLab Power Studio 2.0.1's engine, as the method is built, and is published in English only. All methods →