0
$\begingroup$

This question already has an answer here:

I'm calculating Pearson's r for a set of dichotomous values.

For one item in my data set, all values are identical. Since the variance in y will be 0, I will ultimately end up with a division by 0.

I guess I have two questions:

  1. Is it fair to say that the correlation coefficient is 0, or is it more valid to say that it cannot be calculated for this item?

  2. Is manually checking for 0 variance and treating this as an exception the accepted best practice, or can the formula be modified to cater to this scenario?

$\endgroup$

marked as duplicate by mdewey, Community Jun 7 '17 at 9:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ I think we normally say it is undefined. $\endgroup$ – mdewey Jun 7 '17 at 8:55
  • $\begingroup$ @mdewey: Thanks. After searching for some time for a discussion like this, searching for pearson's r undefined gave me this identical discussion. Someone with proper privileges can vote to close this as a duplicate, I suppose. $\endgroup$ – David Hedlund Jun 7 '17 at 9:00
  • $\begingroup$ Thanks for the feedback, I have voted for closure as you suggest. $\endgroup$ – mdewey Jun 7 '17 at 9:04

Browse other questions tagged or ask your own question.