# R/ counterexample correlation

## 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

Related Set Theory, Logic, Probability, Statistics News on Phys.org
Stephen Tashi
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.)

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))
 0.6556251
> # perfectly correlated but correlation less than 1
> cor(exp(z),exp(2*z))
 0.8726321
> # perfectly anticorrelated but correlation is almost zero
> cor(exp(z),exp(-2*z))
 -0.08543019
Other measures of dependence such as rank correlation have much nicer properties.

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.

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.

Stephen Tashi
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".

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.