Questions tagged [correlation]

For questions about correlation of two random variables. Correlation is a statistical technique that can show whether and how strongly pairs of variables are related. Use it with [tag: random-variables] and [tag: probability].

The correlation is one of the most common and most useful statistics. It is a statistical measure that indicates the extent to which two or more variables fluctuate together. A positive correlation indicates the extent to which those variables increase or decrease in parallel; a negative correlation indicates the extent to which one variable increases as the other decreases.

Let $X$ and $Y$ two random variables such that $X^2$, $Y^2$ have an expectation. We define the correlation between $X$ and $Y$ by $$\rho(X,Y)=\frac{\mathbb E[(X-\mathbb EX)(Y-\mathbb EY)]}{\sqrt{\mathbb EX^2\mathbb EY^2}}$$ when $\mathbb EX^2\mathbb EY^2\neq0$, and $0$ otherwise.

In terms of the strength of relationship, the value of the correlation coefficient varies between $-1$ and $1$. A value of $\pm1$ indicates a perfect degree of association between the two variables. As the correlation coefficient value goes towards $0$, the relationship between the two variables weakens. The direction of the relationship is indicated by the sign of the coefficient; a $+$ sign indicates a positive relationship and a $-$ sign indicates a negative relationship. Usually, in statistics, we measure four types of correlations: Pearson correlation, Kendall rank correlation, Spearman correlation, and the Point-Biserial correlation.

References:

https://en.wikipedia.org/wiki/Correlation_and_dependence

https://www.surveysystem.com/correlation.htm

1393 questions
56
votes
2 answers

Generating correlated random numbers: Why does Cholesky decomposition work?

Let's say I want to generate correlated random variables. I understand that I can use Cholesky decomposition of the correlation matrix to obtain the correlated values. If $C$ is the correlation matrix, then we can do the cholesky…
46
votes
2 answers

Generate Correlated Normal Random Variables

I know that for the $2$-dimensional case: given a correlation $\rho$ you can generate the first and second values, $ X_1 $ and $X_2$, from the standard normal distribution. Then from there make $X_3$ a linear combination of the two $X_3 = \rho X_1 +…
jameselmore
  • 5,038
  • 3
  • 24
  • 36
43
votes
4 answers

Determining variance from sum of two random correlated variables

I understand that the variance of the sum of two independent normally distributed random variables is the sum of the variances, but how does this change when the two random variables are correlated?
29
votes
4 answers

How can I simply prove that the pearson correlation coefficient is between -1 and 1?

For building a recommendation system, I also use the Pearson correlation coefficient. This is the definition: $r(x, y)=\frac{\sum_{i=1}^n (x_i-\bar{x})(y_i-\bar{y})}{\sqrt{\sum_{i=1}^n (x_i-\bar{x})^2 \cdot \sum_{i=1}^n (y_i-\bar{y})^2}}$ $x$ and…
Xiphias
  • 657
  • 1
  • 6
  • 14
25
votes
6 answers

Correlation between three variables question

I was asked this question regarding correlation recently, and although it seems intuitive, I still haven't worked out the answer satisfactorily. I hope you can help me out with this seemingly simple question. Suppose I have three random variables…
tanvach
  • 375
  • 1
  • 3
  • 8
22
votes
1 answer

How to construct a covariance matrix from a 2x2 data set

so if given a covariance matrix I can find the eigenvalues and move forward from there... but I seem to have trouble with the step before if I am given a data set and am told to create the covariance matrix. Looking at the notes I see the…
user3037172
  • 369
  • 1
  • 2
  • 8
21
votes
4 answers

Correlation Coefficient and Determination Coefficient

I'm new to linear regression and am trying to teach myself. In my textbook there's a problem that asks "why is $R^{2}$ in the regression of $Y$ on $X$ equal to the square of the sample correlation between X and Y?" I've been throwing my head…
Scubadiver
  • 211
  • 1
  • 2
  • 3
18
votes
1 answer

Covariance, covariance operator, and covariance function

I am trying to get my head wrapped around this article in Wikipedia. The first definition given there is the covariance of a probability measure $\mathbf{P}$: $$\mathrm{Cov}(x, y) = \int_{H} \langle x, z \rangle \langle y, z \rangle \, \mathrm{d}…
Ivan
  • 1,153
  • 9
  • 25
14
votes
3 answers

Is correlation (in some sense) transitive?

If we know that A has some correlation with B ($\rho_{AB}$), and that B has some with C ($\rho_{BC}$), is there something we know to say about the correlation between A and C ($\rho_{AC}$)? Thanks.
Tal Galili
  • 457
  • 4
  • 13
11
votes
2 answers

Probability of three events occurring given correlation?

I am facing a problem that I cannot find the answer to. I have three variables, A, B and C. There are only two possibilities for each of these, A either happens or it does not, B happens or it does not and C happens or it does not. I know that if…
Hugh
  • 111
  • 1
  • 1
  • 3
10
votes
4 answers

Going back from a correlation matrix to the original matrix

I have N sensors which are been sampled M times, so I have an N by M readout matrix. If I want to know the relation and dependencies of these sensors simplest thing is to do a Pearson's correlation which gives me an N by N correlation matrix. Now…
Ali
  • 1,531
  • 4
  • 16
  • 17
10
votes
1 answer

Necessary and sufficient conditions for a matrix to be a valid correlation matrix.

It's not too hard to see that any correlation matrix must have certain properties, such as all entries in the range -1 to 1, symmetric, positive semi-definite (excluding pathological cases like singular matrices for the moment). But I'm wondering…
ely
  • 2,455
  • 1
  • 21
  • 25
9
votes
1 answer

Uncorrelated but not independent random variables

Is it possible to construct two random variables $X, Y$ both of them assuming exactly two non-zero values which are uncorrelated, i. e. $\mathbf{E}[X \, Y] = \mathbf{E}[X]\,\mathbf{E}[Y]$, but not independent? If that is not possible, what is the…
Qyburn
  • 1,547
  • 11
  • 23
8
votes
1 answer

Weighing correlation by sample size

I'm a scholar in the humanities trying to not be a complete idiot about statistics. I have a problem relevant to some philological articles I'm writing. To avoid introducing the obscure technicalities of my field I'll recast this as a simple…
8
votes
1 answer

How to explain tie-correction for Spearman's Rank Correlation?

In Mathematics at my college we are being taught correlation in which when there are ties in ranks we take average rank for all of the ties and then total correction factor is added summation of square of difference in ranks. The formula for…
Mihir Solanki
  • 357
  • 3
  • 9
1
2 3
92 93