Generalized phi coefficient (source code)

= Generalized phi coefficient
{title2=$\phi=\sqrt{X^2/n}$}

For a <contingency table> with <Pearson chi-squared statistic> $X^2$ and <sample size> $n>0$, the nonnegative magnitude $\phi=\sqrt{X^2/n}$ is sometimes reported as generalized phi. It does not encode an ordinal direction. In a two-row or two-column table it coincides with <Cramér's V>; in larger tables it can exceed one, so the normalization in <Cramér's V> matters. In a two-by-two table it is the absolute value of the Pearson correlation coefficient of binary category indicators; a signed binary phi requires a stated coding convention.