A measure of the degree of linear association among a pair of variables.

learn more… | top users | synonyms

29
votes
4answers
26k views

Pearson's or Spearman's correlation with non-normal data

I get this question frequently enough in my statistics consulting work, that I thought I'd post it here. I have an answer, which is posted below, but I was keen to hear what others have to say. ...
11
votes
2answers
7k views

What is the difference between doing linear regression on y with x versus x with y?

What is the difference between doing linear regression on y with x versus x with y? I guess my confusion arises from the fact that the Pearson correlation coefficient of x and y is the same no matter ...
28
votes
4answers
3k views

Look and you shall find (a correlation)

I have a several hundreds of measurements. Now I am considering utilizing some kind of software to correlate every measure with every measure. This means that there are hundreds of correlations. Among ...
8
votes
3answers
1k views

How to generate correlated random numbers (given means, variances and degree of correlation)?

I'm sorry if this seems a bit too basic, but I guess I'm just looking to confirm understanding here. I get the sense I'd have to do this in two steps, and I've started trying to grok correlation ...
34
votes
14answers
6k views

Under what conditions does correlation imply causation?

We all know the mantra "correlation does not imply causation" which is drummed into all first year statistics students. There are some nice examples here to illustrate the idea. But sometimes ...
14
votes
5answers
67k views

How to choose between Pearson and Spearman correlation?

How do I know when to choose between Spearman's $\rho$ and Pearson's $r$? My variable includes satisfaction and the scores were interpreted using the sum of the scores. However, these scores could ...
5
votes
3answers
2k views

X and Y are not correlated, but X is significant predictor of Y in multiple regression. What does it mean?

X and Y are not correlated (-.01); however, when I place X in a multiple regression predicting Y, alongside three (A,B, C) other (related) variables, X and two other variables (A,B) are significant ...
25
votes
6answers
2k views

If A and B are correlated with C, why are A and B not necessarily correlated?

I know empirically that is the case. I have just developed models that run into this conundrum. I also suspect it is not necessarily a yes/no answer. I mean by that if both A and B are correlated ...
21
votes
2answers
6k views

What is covariance in plain language?

What is covariance in plain language and how is it linked to the terms dependence, correlation and variance-covariance structure with respect to repeated-measures designs?
6
votes
4answers
1k views

Averaging correlation values

Let's say I test how variable Y depends on variable X under different experimental conditions and obtain the following graph: ...
3
votes
1answer
2k views

How to correlate two time series with gaps and different time bases?

I asked this question over on StackOverflow, and was recommended to ask it here. Rather than duplicate the entire question here, I hope I can start new comment/solution chains here. If I should ...
28
votes
24answers
14k views

Examples to teach: Correlation does not mean causation

We all know the old saying "Correlation does not mean causation". When I'm teaching I tend to use these standard examples to illustrate this point: Number of storks and birth rate in Denmark; Number ...
8
votes
1answer
697 views

Least angle regression keeps the correlations monotonically decreasing and tied?

I'm trying to solve a problem for least angle regression (LAR). This is a problem 3.23 on page 97 of Hastie et al., Elements of Statistical Learning, 2nd. ed. (5th printing). Consider a regression ...
13
votes
1answer
1k views

Manually calculated $R^2$ doesn't match up with randomForest() $R^2$ for testing new data

I know this is a fairly specific R question, but I may be thinking about proportion variance explained, $R^2$, incorrectly. Here goes. I'm trying to use the ...
6
votes
4answers
913 views

Is there a simple way of detecting outliers?

I am wondering if there is a simple way of detecting outliers. For one of my projects, which was basically a correlation between the number of times respondents participate in physical activity in a ...
6
votes
4answers
5k views

How to compute correlation between/within groups of variables?

I have a matrix of 1000 observations and 50 variables each measured on a 5-point scale. These variables are organized into groups, but there aren't an equal number of variables in each group. I'd ...
4
votes
1answer
1k views

How do I compare correlation coefficients of the same variables across different groups?

I am testing the correlation between Variable A and Variable B by gender and marital status. So I have the coefficients for males and females and single, married and other. I want to compare the ...
5
votes
1answer
496 views

How to define a distribution such that draws from it correlate with a draw from another pre-specified distribution?

How do I define the distribution of a random variable $Y$ such that a draw from $Y$ has correlation $\rho$ with $x_1$, where $x_1$ is a single draw from a distribution with cumulative distribution ...
16
votes
6answers
18k views

What's the difference between correlation and simple linear regression?

Is it cheating if I know the answer, but ask it anyways? I figure it's good for people to know :) In particular, I am referring to the Pearson product-moment correlation coefficient
8
votes
3answers
391 views

First quick glance at a dataset

Please pardon my ignorance, but... I keep finding myself in a situation, where I'm faced with a bunch of new data I managed to find. This data usually looks something like this: ...
11
votes
3answers
6k views

r-squared: I have never fully grasped the interpretation

I want to fully grasp the notion of $r^2$ describing the amount of variation between variables. Every web explanation is a bit mechanical and obtuse. I want to "get" the concept, not just mechanically ...
9
votes
3answers
8k views

Kendall Tau or Spearman's rho?

In which cases should one prefer the one over the other? I found someone who claims an advantage for Kendall, for pedagogical reasons, are there other reasons?
17
votes
1answer
4k views

What is compound symmetry in plain english?

I recently realized that a mixed-model with only subject as a random factor and the other factors as fixed factors is equivalent to an ANOVA when setting the correlational structure of the mixed model ...
5
votes
2answers
1k views

Correlation analysis and correcting $p$-values for multiple testing

I am investigating the effect of a drug on EEG and cognition in epilepsy patients. We have done EEG and neuropsychological (NP) tests twice, before and after medical treatment. Some of parameters in ...
3
votes
2answers
5k views

Threshold for correlation coefficient to indicate statistical significance of a correlation in a correlation matrix

I have computed a correlation matrix of a data set which contains 455 data points, each data point containing 14 characteristics. So the dimension of the correlation matrix is 14 x 14. I was ...
2
votes
2answers
821 views

Working with correlation coefficients

I have three Pearson correlation coefficients (.8978, .5676 and .7865) for three age groups (i.e. 21 to 30 years, 31 to 40 years and 41 to 50 years) whose behaviour I am studying in regard to their ...
2
votes
1answer
701 views

How do I weigh several variables at two levels to create an overall composite variable score?

Context I am trying to find the correlation between two latent variables. Let's call them A and B. A has two dimensions. Let's call them Dimension 1 and 2. B also has two dimensions. Let's call ...
1
vote
2answers
574 views

How to determine the number of clusters when using correlation as the distance?

How does using 1 - correlation as the distance influence the determination of the number of clusters when doing kmeans? Is it still valid to use the classical indices (Dunn, Davies-Bouldin...)?
6
votes
2answers
988 views

Computing correlation (and the significance of said correlation) between a pair of time series

I have two time series S, and T. they have the same frequency and the same length. I would like to calculate (using R), the correlation between this pair (i.e. S and T), and also be able to calculate ...
37
votes
5answers
2k views

Does causation imply correlation?

Correlation does not imply causation, as there could be many explanations for the correlation. But does causation imply correlation? Intuitively, I would think that the presence of causation means ...
6
votes
2answers
2k views

Quickly evaluate (visually) correlations between ordered categorical data in R?

I'm looking for correlations between the answers to different questions in a survey ("umm, let's see if answers to question 11 correlate with those of question 78"). All answers are categorical (most ...
11
votes
1answer
578 views

What are some techniques for sampling two correlated random variables?

What are some techniques for sampling two correlated random variables: if their probability distributions are parameterized (e.g., log-normal) if they have non-parametric distributions. The data ...
10
votes
3answers
2k views

R: compute correlation by group

In R, I have a data frame comprising a class label C (a factor) and two measurements, M1 and M2. How do I compute the correlation between M1 and M2 within each class? Ideally, I'd get back a data ...
8
votes
2answers
2k views

Does correlation assume stationarity of data?

Inter-market analysis is a method of modeling market behavior by means of finding relationships between different markets. Often times, a correlation is computed between two markets, say S&P 500 ...
7
votes
4answers
409 views

Generate sets of values with high correlation coefficient

Apology if this is too simple. I couldn't get the more advanced r-help group to respond. I am planning to characterize workloads by measuring the correlation coefficient of two sets of real values ...
13
votes
3answers
729 views

Unbiased estimation of covariance matrix for multiply censored data

Chemical analyses of environmental samples are often censored below at reporting limits or various detection/quantitation limits. The latter can vary, usually in proportion to the values of other ...
7
votes
3answers
7k views

How to test the autocorrelation of the residuals?

I have a matrix with two columns that have many prices (750). In the image below I plotted the residuals of the follow linear regression: ...
4
votes
1answer
374 views

Random permutation of a vector with a fixed expected sample correlation to the original?

Suppose you have an $n$-vector $X$. For a fixed real number, $r$ between $-1$ and $1$, can one generate a random permutation of the integers $1,2,\ldots,n$, call it $i_1,i_2,\ldots,i_n$ such that the ...
3
votes
4answers
1k views

Measure of association for 2x3 contingency table

I have a 2x3 contingency table - the row variable is a factor, the column variable is an ordered factor (ordinal level). I'd like to apply either symmetrical or asymmetrical association technique. ...
2
votes
2answers
729 views

Correlating volume timeseries

Consider the following graph: The red line (left axis) describes the trading volume of a certain stock. The blue line (right axis) describes the twitter message volume for that stock. For instance, ...
4
votes
3answers
235 views

How to succinctly report the correlation between two variables for 20 different subsets of the data in a table?

I have 20 correlation coefficients (r) to report, for example, .34, .45, .67, .23. and so on. These are correlations between Variable A and Variable B, based on gender, age, education levels etc. I ...
1
vote
3answers
108 views

Are observations consistent with each other?

I have 60 apps. For each app, I look at 10 review of that app, and count how many of the reviews say the app is unreliable. Let $X_i$ denote the number of such reviews, for the $i$th app. I want to ...
14
votes
4answers
3k views

Correcting p values for multiple tests where tests are correlated (genetics)

I have p values from a lot of tests and would like to know whether there is actually something significant after correcting for multiple testing. The complication: my tests are not independent. The ...
5
votes
2answers
366 views

A reliable measure of series similarity - correlation just doesn't cut it for me

I'm trying to determine a method to compare one particular time series against about 10,000+ reference time series programmatically, and shortlist those reference time series which can be of interest. ...
3
votes
4answers
316 views

Comparing smoke and hormones level in two groups of people. Which test?

I'm totally not a pro in statistics so i hope the question is not too simple! I have two groups of patients. One group are smokers, the second are non-smokers. I want to compare the level of some ...
3
votes
2answers
238 views

How to report general precision in estimating correlations within a context of justifying sample size?

I have a study with 130 participants where most of my analyses involve examining the relative size of correlations between various psychological variables. I'm trying to comply with recommendations ...
3
votes
2answers
476 views

Correlation stress testing

Could you suggest good articles / books / online materials on correlation stress testing? Correlation stress testing: say, we have a positive semidefinite correlation matrix. We might want to explore ...
2
votes
0answers
67 views

Find correlation when SD and mean are given

A guy got 88 in his test which has mean score of 64 with SD 8. He missed the second exam in which the meanscore was 45 and SD was 5. He got a prorated marks of 55. The prof used regression to get his ...
2
votes
2answers
418 views

Determining a correction factor and applying it to a second set of numbers

1st- I would like to figure out the correction factor between two sets of numbers (time series). 2nd- I want to apply that correction factor to a second set of numbers. As an example- say I have two ...
2
votes
1answer
3k views

What's the order of correlation?

What is expressed by the terms zeroth-, first-, second-, third-, etc. order of correlation? Thanks!

1 2 3