Miyamoto 2008 describes computation of a number of statistical properties of the co-occurrence matrix first, followed by computation of the Haralick texture features.
$R = \sum_{i=1}^{N_g} \sum_{j=1}^{N_g} P(i,j)$ = sum of all elements of co-occurrence frequency matrix
$p(i,j) = \frac {P(i,j)}{R}$ = co-occurence probability matrix
$p_x(i) = \sum_{j=1}^{N_g} p(i,j)$ = $i^{th}$ entry in the marginal-probability matrix obtained by summing the rows of $p(i,j)$.
$p_y(j) = \sum_{i=1}^{N_g} p(i,j)$ = $j^{th}$ entry in the marginal-probability matrix obtained by summing the columns of $p(i,j)$.