R/ counterexample correlation

  • Thread starter alex.kin.
  • Start date
  • #1
6
0

Main Question or Discussion Point

Hi,

Are you aware of any dataset (in R or elsewhere) consisting of a sample from two variables where the correlation coefficient is (approximately) equal to 1, but the variables refer to completely irrelevent things, i.e. one measuring something that happens on earth and the other something on a distant planet?

or

a case where a parameter causauly affects a measure, but because other such 'causual' parameters also exist, a sample from the respective two variables has correlation coefficient far distant from 1 or -1?

My point is that the correlation coefficient is really an indicator that is informative?

Any suggestions?

thanx, alex
 

Answers and Replies

  • #2
Stephen Tashi
Science Advisor
7,185
1,317
Perhaps you should look at the correlation between two nearly constant "random" variables. Something like X = 1 if there are at least 100 sunny days this year and Y = 1 if the Cubs don't win the world series this year. ( I supose you need a little variation to prevent the covriances from being 0.)
 
  • #3
525
5
Hi,

Are you aware of any dataset (in R or elsewhere) consisting of a sample from two variables where the correlation coefficient is (approximately) equal to 1, but the variables refer to completely irrelevent things, i.e. one measuring something that happens on earth and the other something on a distant planet?

or

a case where a parameter causauly affects a measure, but because other such 'causual' parameters also exist, a sample from the respective two variables has correlation coefficient far distant from 1 or -1?

My point is that the correlation coefficient is really an indicator that is informative?

Any suggestions?

thanx, alex
You could create your own data, for example:

Code:
> z<-rnorm(1000)
> w<-rnorm(1000)
> # spurious correlation (random walks)
> cor(cumsum(z),cumsum(w))
[1] 0.6556251
> # perfectly correlated but correlation less than 1
> cor(exp(z),exp(2*z))
[1] 0.8726321
> # perfectly anticorrelated but correlation is almost zero
> cor(exp(z),exp(-2*z))
[1] -0.08543019
Other measures of dependence such as rank correlation have much nicer properties.
 
  • #4
6
0
Perhaps you should look at the correlation between two nearly constant "random" variables. Something like X = 1 if there are at least 100 sunny days this year and Y = 1 if the Cubs don't win the world series this year. ( I supose you need a little variation to prevent the covriances from being 0.)
Thanks Stephen,

I know that it is possible to create such a dataset, however so far I havent found any real-world dataset with the data I have access to.
 
  • #5
6
0
Thanks Stephen,

I know that it is possible to create such a dataset, however so far I havent found any real-world dataset with the data I have access to.
 
  • #6
Stephen Tashi
Science Advisor
7,185
1,317
Thanks Stephen,

I know that it is possible to create such a dataset, however so far I havent found any real-world dataset with the data I have access to.
You'll have to distinguish between the existence of data and the existence of datasets. There are cultural reasons why people would not bother to publish a dataset of nearly constant random variables. This doesn't mean that the data isn't "real world".
 
  • #7
525
5
Thanks Stephen,

I know that it is possible to create such a dataset, however so far I havent found any real-world dataset with the data I have access to.
Stock price data has properties very similar to the examples described in post #3.
 

Related Threads on R/ counterexample correlation

Replies
16
Views
1K
  • Last Post
Replies
9
Views
2K
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
0
Views
2K
  • Last Post
Replies
1
Views
609
  • Last Post
Replies
3
Views
8K
  • Last Post
Replies
17
Views
1K
  • Last Post
Replies
1
Views
6K
Replies
4
Views
5K
Top