Phi Coefficient - Wikipedia

A Pearson correlation coefficient estimated for two binary variables will return the phi coefficient.[6]

Two binary variables are considered positively associated if most of the data falls along the diagonal cells. In contrast, two binary variables are considered negatively associated if most of the data falls off the diagonal.

If we have a 2×2 table for two random variables x and y

y = 1 y = 0 total
x = 1 n 11 {\displaystyle n_{11}}   n 10 {\displaystyle n_{10}}   n 1 ∙ {\displaystyle n_{1\bullet }}  
x = 0 n 01 {\displaystyle n_{01}}   n 00 {\displaystyle n_{00}}   n 0 ∙ {\displaystyle n_{0\bullet }}  
total n ∙ 1 {\displaystyle n_{\bullet 1}}   n ∙ 0 {\displaystyle n_{\bullet 0}}   n {\displaystyle n}  

where n11, n10, n01, n00, are non-negative counts of numbers of observations that sum to n, the total number of observations. The phi coefficient that describes the association of x and y is

φ = n 11 n 00 − n 10 n 01 n 1 ∙ n 0 ∙ n ∙ 0 n ∙ 1 . {\displaystyle \varphi ={\frac {n_{11}n_{00}-n_{10}n_{01}}{\sqrt {n_{1\bullet }n_{0\bullet }n_{\bullet 0}n_{\bullet 1}}}}.}  

Phi is related to the point-biserial correlation coefficient and Cohen's d and estimates the extent of the relationship between two variables (2×2).[7]

The phi coefficient can also be expressed using only n {\displaystyle n}  , n 11 {\displaystyle n_{11}}  , n 1 ∙ {\displaystyle n_{1\bullet }}  , and n ∙ 1 {\displaystyle n_{\bullet 1}}  , as

φ = n n 11 − n 1 ∙ n ∙ 1 n 1 ∙ n ∙ 1 ( n − n 1 ∙ ) ( n − n ∙ 1 ) . {\displaystyle \varphi ={\frac {nn_{11}-n_{1\bullet }n_{\bullet 1}}{\sqrt {n_{1\bullet }n_{\bullet 1}(n-n_{1\bullet })(n-n_{\bullet 1})}}}.}  

Từ khóa » Phi R2