Skip to main content
unnecessary comment about answering old question
Source Link

(I recognize this is a late answer, but it could help some future readers.)

If you want to explore your data it is best to compute both, since the relation between the Spearman (S) and Pearson (P) correlations will give some information. Briefly, S is computed on ranks and so depicts monotonic relationships while P is on true values and depicts linear relationships.

As an example, if you set:

x=(1:100);  
y=exp(x);                         % then,
corr(x,y,'type','Spearman');      % will equal 1, and 
corr(x,y,'type','Pearson');       % will be about equal to 0.25

This is because $y$ increases monotonically with $x$ so the Spearman correlation is perfect, but not linearly, so the Pearson correlation is imperfect.

corr(x,log(y),'type','Pearson');  % will equal 1

Doing both is interesting because if you have S > P, that means that you have a correlation that is monotonic but not linear. Since it is good to have linearity in statistics (it is easier) you can try to apply a transformation on $y$ (such a log).

I hope this helps to make the differences between the types of correlations easier to understand.

(I recognize this is a late answer, but it could help some future readers.)

If you want to explore your data it is best to compute both, since the relation between the Spearman (S) and Pearson (P) correlations will give some information. Briefly, S is computed on ranks and so depicts monotonic relationships while P is on true values and depicts linear relationships.

As an example, if you set:

x=(1:100);  
y=exp(x);                         % then,
corr(x,y,'type','Spearman');      % will equal 1, and 
corr(x,y,'type','Pearson');       % will be about equal to 0.25

This is because $y$ increases monotonically with $x$ so the Spearman correlation is perfect, but not linearly, so the Pearson correlation is imperfect.

corr(x,log(y),'type','Pearson');  % will equal 1

Doing both is interesting because if you have S > P, that means that you have a correlation that is monotonic but not linear. Since it is good to have linearity in statistics (it is easier) you can try to apply a transformation on $y$ (such a log).

I hope this helps to make the differences between the types of correlations easier to understand.

If you want to explore your data it is best to compute both, since the relation between the Spearman (S) and Pearson (P) correlations will give some information. Briefly, S is computed on ranks and so depicts monotonic relationships while P is on true values and depicts linear relationships.

As an example, if you set:

x=(1:100);  
y=exp(x);                         % then,
corr(x,y,'type','Spearman');      % will equal 1, and 
corr(x,y,'type','Pearson');       % will be about equal to 0.25

This is because $y$ increases monotonically with $x$ so the Spearman correlation is perfect, but not linearly, so the Pearson correlation is imperfect.

corr(x,log(y),'type','Pearson');  % will equal 1

Doing both is interesting because if you have S > P, that means that you have a correlation that is monotonic but not linear. Since it is good to have linearity in statistics (it is easier) you can try to apply a transformation on $y$ (such a log).

I hope this helps to make the differences between the types of correlations easier to understand.

edited for English & formatting; feel free to rollback if you disagree
Source Link
gung - Reinstate Monica
  • 147.5k
  • 89
  • 406
  • 717

(lateI recognize this is a late answer, but it could help some futurfuture readers.)

If you want to explore your data it is best to compute both, since the relation between the Spearman (S) and Pearson (P) correlations will give some information.

  Briefly, S is computed on ranks and so depicts monotonic relationships while P is on true values and depicts linear relationships.

As an example, if you set: x=(1:100)'; y=exp(x);

then, corr(x,y,'type','Spearman')=1; and corr(x,y,'type','Pearson')=0.25; (about)

x=(1:100);  
y=exp(x);                         % then,
corr(x,y,'type','Spearman');      % will equal 1, and 
corr(x,y,'type','Pearson');       % will be about equal to 0.25

thisThis is because y$y$ increases monotonically increase with x$x$ so the spearmanSpearman correlation is perfect, but not in a linear waylinearly, so the pearsonPearson correlation is badimperfect. corr(x,log(y),'type','Pearson')=1;

corr(x,log(y),'type','Pearson');  % will equal 1

doingDoing both areis interesting because if you have S > P, that means that you have a correlation (monotonic)that is monotonic but not linear. Since it is good to have linearity in statistics (it is more easyeasier) you can try to apply a transformation on y$y$ (such a log).

I hope this helphelps to understandmake the differences between boththe types of correlations easier to understand.

(late answer, but could help some futur readers)

If you want to explore your data it is best to compute both since the relation between Spearman (S) and Pearson (P) correlations give some information.

  Briefly, S is computed on ranks and so depicts monotonic relationships while P is on true values and depicts linear relationships.

As an example if you set: x=(1:100)'; y=exp(x);

then, corr(x,y,'type','Spearman')=1; and corr(x,y,'type','Pearson')=0.25; (about)

this is because y monotonically increase with x so the spearman correlation is perfect, but not in a linear way, so the pearson correlation is bad. corr(x,log(y),'type','Pearson')=1;

doing both are interesting because if you have S > P that means that you have a correlation (monotonic) but not linear. Since it is good to have linearity in statistics (it is more easy) you can try to apply a transformation on y (such a log).

hope this help to understand the differences between both correlations.

(I recognize this is a late answer, but it could help some future readers.)

If you want to explore your data it is best to compute both, since the relation between the Spearman (S) and Pearson (P) correlations will give some information. Briefly, S is computed on ranks and so depicts monotonic relationships while P is on true values and depicts linear relationships.

As an example, if you set:

x=(1:100);  
y=exp(x);                         % then,
corr(x,y,'type','Spearman');      % will equal 1, and 
corr(x,y,'type','Pearson');       % will be about equal to 0.25

This is because $y$ increases monotonically with $x$ so the Spearman correlation is perfect, but not linearly, so the Pearson correlation is imperfect.

corr(x,log(y),'type','Pearson');  % will equal 1

Doing both is interesting because if you have S > P, that means that you have a correlation that is monotonic but not linear. Since it is good to have linearity in statistics (it is easier) you can try to apply a transformation on $y$ (such a log).

I hope this helps to make the differences between the types of correlations easier to understand.

Source Link
Bonoboticians
  • 1.8k
  • 1
  • 10
  • 2

(late answer, but could help some futur readers)

If you want to explore your data it is best to compute both since the relation between Spearman (S) and Pearson (P) correlations give some information.

Briefly, S is computed on ranks and so depicts monotonic relationships while P is on true values and depicts linear relationships.

As an example if you set: x=(1:100)'; y=exp(x);

then, corr(x,y,'type','Spearman')=1; and corr(x,y,'type','Pearson')=0.25; (about)

this is because y monotonically increase with x so the spearman correlation is perfect, but not in a linear way, so the pearson correlation is bad. corr(x,log(y),'type','Pearson')=1;

doing both are interesting because if you have S > P that means that you have a correlation (monotonic) but not linear. Since it is good to have linearity in statistics (it is more easy) you can try to apply a transformation on y (such a log).

hope this help to understand the differences between both correlations.