<P> If we have a series of n measurements of X and Y written as x and y for i = 1, 2,..., n, then the sample correlation coefficient can be used to estimate the population Pearson correlation r between X and Y . The sample correlation coefficient is written as </P> <Dl> <Dd> r x y = ∑ i = 1 n (x i − x _̄) (y i − y _̄) (n − 1) s x s y = ∑ i = 1 n (x i − x _̄) (y i − y _̄) ∑ i = 1 n (x i − x _̄) 2 ∑ i = 1 n (y i − y _̄) 2, (\ displaystyle r_ (xy) = (\ frac (\ sum \ limits _ (i = 1) ^ (n) (x_ (i) - (\ bar (x))) (y_ (i) - (\ bar (y)))) ((n - 1) s_ (x) s_ (y))) = (\ frac (\ sum \ limits _ (i = 1) ^ (n) (x_ (i) - (\ bar (x))) (y_ (i) - (\ bar (y)))) (\ sqrt (\ sum \ limits _ (i = 1) ^ (n) (x_ (i) - (\ bar (x))) ^ (2) \ sum \ limits _ (i = 1) ^ (n) (y_ (i) - (\ bar (y))) ^ (2)))),) </Dd> </Dl> <Dd> r x y = ∑ i = 1 n (x i − x _̄) (y i − y _̄) (n − 1) s x s y = ∑ i = 1 n (x i − x _̄) (y i − y _̄) ∑ i = 1 n (x i − x _̄) 2 ∑ i = 1 n (y i − y _̄) 2, (\ displaystyle r_ (xy) = (\ frac (\ sum \ limits _ (i = 1) ^ (n) (x_ (i) - (\ bar (x))) (y_ (i) - (\ bar (y)))) ((n - 1) s_ (x) s_ (y))) = (\ frac (\ sum \ limits _ (i = 1) ^ (n) (x_ (i) - (\ bar (x))) (y_ (i) - (\ bar (y)))) (\ sqrt (\ sum \ limits _ (i = 1) ^ (n) (x_ (i) - (\ bar (x))) ^ (2) \ sum \ limits _ (i = 1) ^ (n) (y_ (i) - (\ bar (y))) ^ (2)))),) </Dd> <P> where x and y are the sample means of X and Y, and s and s are the corrected sample standard deviations of X and Y . </P>

Test to see if two variables are independent