# Thread: Correlation r for horizontal points

1. ## Correlation r for horizontal points

Hi,
I got different results for the correlation-coefficient r

x y
----
1 3
2 3
3 3
4 3

Excel returns div/0
TI 84+ returns blank
other programs returns 0.0

my opinion is div/0, because the standard deviation is 0
BUT my maths book has a multiple choice answer : a)-1 b)0 c)1
no div/0 answer possible.

2. Originally Posted by gwauck
Hi,
I got different results for the correlation-coefficient r

x y
----
1 3
2 3
3 3
4 3

Excel returns div/0
TI 84+ returns blank
other programs returns 0.0

my opinion is div/0, because the standard deviation is 0
BUT my maths book has a multiple choice answer : a)-1 b)0 c)1
no div/0 answer possible.

Hi qwauck,

The correct answer is that the correlation is undefined.

The correlation coefficient is defined only if the standard deviations of X and Y are finite and non-zero. See Correlation (in statistics - Wikipedia, the free encyclopedia).

3. Thanks for your answer and the link to Wikipedia, but this image from Wikipedia 'correlation' adds to my confusion. The horizontal line in the middle is marked with 0.0 instead with undefined.

As an attachment comes the question from the book.

Gwauck

4. Originally Posted by gwauck
Thanks for your answer and the link to Wikipedia, but this image from Wikipedia 'correlation' adds to my confusion. The horizontal line in the middle is marked with 0.0 instead with undefined.

As an attachment comes the question from the book.

Gwauck
Notice the caption beneath the figure in Wikipedia:

"N.B.: the figure in the center has a slope of 0 but in that case the correlation coefficient is undefined because the variance of Y is zero."