# Coding method

• Dec 16th 2009, 10:56 AM
novice
Coding method
One of the formulae for coefficient of correlation is given as
$r=\frac{n\Sigma XY-(\Sigma X)(\Sigma Y)}{\sqrt{[N\Sigma X^2-(\Sigma X)^2][N\Sigma Y^2-(\Sigma Y)^2]}}$ -----eq(1)

For coding method of bivariate frequency table, it's given as

$r=\frac{n\Sigma fu_Xu_Y-(\Sigma f_Xu_X)(\Sigma f_Yu_Y)}{\sqrt{[N\Sigma f_Xu_X^2-(\Sigma f_Xu_X)^2][N\Sigma f_Yu_Y^2-(\Sigma f_Yu_Y)^2]}}$ -----eq(2)

I need to derive eq(2).

I began by $\overline X=A+(\frac{\Sigma f_Xu_X}{n})c$, where c is class interval, and $u=0, \pm1, \pm 2, ...$ and got

$\Sigma X = NA_x+c\Sigma f_xu_x$, similarly $\Sigma Y = NA_y+c\Sigma f_yu_y$, but I do not know how to get to $\Sigma XY$

I have a hunch that I need to make a table, but how?

Can anyone point me in the right direction?
• Dec 16th 2009, 01:36 PM
novice
I solved it.