Using Excel's correlation function I get a correlation of -7% between data sets A &amp; B.  Data set C has a 92% correlation to A and an 84% correlation to B.  How can C be strongly correlated to A and B, but A and B are slightly negatively correlated to one another?  What other tests can I perform to help me better understand the relationships between A, B &amp; C?
69300
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 with C, this may have some implication regarding the correlation between A and B.  But, this implication may be weak.  It may be just a sign direction and nothing else.    Here is what I mean...  Let's say A and B both have a 0.5 correlation with C.  Given that, the correlation between A and B could well be 1.0.  I think it also could be 0.5 or even lower.  But, I think it is unlikely that it would be negative.  Do you agree with that?    Also, is there an implication if you are considering the standard Pearson Correlation Coefficient or instead the Spearman (rank) Correlation Coefficient?  My recent empirical observations were associated with the Spearman Correlation Coefficient.
10584
What's a meaningful "correlation" measure to study the relation between the such two types of variables?  In R, how to do it?
103313
Is there any adjustment required when computing the correlation coefficient between:   continuous and discrete variable  two discrete variables ?    Thanks !
99864
I have created a mixed distribution model comprising 80% $H_0$ plus 20% $H_1$ to illustrate the link between the expected proportions of true and false positives and negatives in the PDF, CDF and p-value distributions.  When the effect size is small (25% increase in expected correlations vs $H_0$), everything looks consistent:    However, when I increase the effect size to 75% by separating $H_1$ from $H_0$, things don't seem to add up because I get apparent false negatives (grey area) in the p-value distribution, which are no longer there in the PDF and CDF distributions:    Conversely, when I reduce the effect size to 0% (so that $H_1$ = $H_0$), the grey area disappears altogether from the p-value distribution, whereas it is even more prominent in the PDF and CDF distributions:    Now, I'm sure I have done all the maths right and the actual distribution curves are correct and consistent, but perhaps I am misinterpreting the areas between these curves?  What do these four different coloured areas mean in each chart, and how do they relate to the expected proportions of true and false positives and negatives?  How can I show the link between these proportions in the three distributions, and why don't they correspond with each other as shown?  Please help me understand the apparent discrepancy, thanks!
14203
Let's say I have two 1-dimensional arrays, $a_1$ and $a_2$. Each contains 100 data points. $a_1$ is the actual data, and $a_2$ is the model prediction. In this case, the $R^2$ value would be: $$ R^2 = 1 - \frac{SS_{res}}{SS_{tot}} \quad\quad\quad\quad\quad\ \ \quad\quad(1).  $$ In the meantime, this would be equal to the square value of the correlation coefficient,  $$ R^2 = (\text{Correlation Coefficient})^2 \quad (2). $$ Now if I swap the two: $a_2$ is the actual data, and $a_1$ is the model prediction. From equation $(2)$, because correlation coefficient does not care which comes first, the $R^2$ value would be the same. However, from equation $(1)$, $SS_{tot}=\sum_i(y_i - \bar y )^2$, the $R^2$ value will change, because the $SS_{tot}$ has changed if we switch $y$ from $a_1$ to $a_2$; in the meantime, $SS_{res}=\sum_i(f_i-\bar y)^2$ does not change.   My question is: How can these contradict each other?  Edit:    I was wondering that, will the relationship in Eq. (2) still stand, if it is not a simple linear regression, i.e., the relationship between IV and DV is not linear (could be exponential / log)? Will this relationship still stand, if the sum of the prediction errors does not equal zero?
123684
I am running Pearson's correlation on an overall sample of 400 respondents.   When I isolate male and female responses, my sample becomes 220 male responses and 180 female responses.   If I further isolate male and female responses by (say) age groups, some sample sizes become as low as 35 responses (for example, for females over the age of 65).  My question: How good are these sample sizes for correlation analysis? (I am looking at the relationship between income levels and overseas travel.)   (I think this has something to do with margin of error but how does this apply to inferential analysis which is based on probability. I can understand its role in descriptive statistics such as results of a political poll).
101841
I have a linear regression and two estimates, say A and B and their standard errors. I need to find the standard error of a ratio A/B [or A/(1-B)].  I guess the main problem is that I don't know the correlation between A and B. I also guess that makes this unsolvable, since the correlation plays a major role. Is this correct?  If I knew it, what would be the way to calculate the standard error?
25992
Give some examples where a simple correlation coefficient has a sign opposite to that of the corresponding partial correlation coefficient and comment on it.   It is a question from an examination paper.Please help.
1989
If two variables have 0 correlation, why are they not necessarily independent? Are zero correlated variables independent under special circumstances ?  If possible, I am looking for an intuitive explanation, not a highly technical one.
24472
My professor was discussing correlation and when it implies independence. It was fairly clear to me that, if $X$ and $Y$ are independent, then their correlation is zero. The reverse direction is less clear. Correlation being zero doesn't imply independence. This makes some sense to me because correlation measures linear association in some sense, but I am having trouble coming up with a concrete example of this. He also stated that, if $X$ and $Y$ are bivariate normal and correlation is zero, then $X$ and $Y$ are independent. Can someone provide a proof/intuition about this?
30175
I'm not a statistic major, so my knowledge of statistics is quite limited but I've found myself in need of learning about and using mutual information. I believe I understand the concept and formula, but it seems counter-intuitive that perfectly similar data would have 0 mutual information. I would expect two sets of data with perfect similarity to have mutual information of 1.  I'm writing a program which calculates Mutual Information between two columns (i and j) in a pairwise protein sequence, and I'm not sure if I should manually fix the MI to be 1 if the columns are exactly the same. For example, if the two columns (written as lines) were:  CLLYFFDTTQGILMIGCL IILLIIIIFLIVILVIFV   Then I've calculated the MI by hand to be equal to 0.8384. However, if the two columns (written as lines) were:  GGGGGGGGGG GGGGGGGGGG   The mutual information will be equal to 0 because the formula will result in:  $$\sum \left( p(1) \times \log \left( \frac{p(1)}{p(1) p(1)} \right) \right) = 1 \times \log \left( \frac{1}{1} \right) = 0$$  In my program I have it check if the columns are identical (i = j) and just manually assign Mi = 1. So I'm wondering: Is this bad practice? Does it only consider one possible case of many? Should I not do this at all? The professor I'm working with suggested I incorporate a pseudo-count for every other non-existing amino acid and ignoring a manual fix for when i = j.  Would a pseudo-count fix this? Counting each existing amino acid as 1.1 and everything else as 0.1, or would it result in the same mutual information? Again, I'm far from a statistics major so if you can explain simply, that would be best. Thanks.
95394
It is well-known that if two random variables are jointly normal and uncorrelated, then they are independent. Does anyone have an intuitive reason why this is true? Explanation in terms of data is greatly appreciated.  Updates:  After seeing the answer by @kjetil b halvorsen, I feel I should give some more details. As far I know, that result (uncorrelated implies independence) is true if the variables are Bernoulli or they are jointly normal. I would like to stress that I completely understand the math behind the truthfulness of the mentioned result. When they are jointly normal, $\rho = 0$, so the joint density will factor into two, one a function of $x$ alone and another function of $y$ alone, hence independent. What I am looking for is some intuition why is this the case? For example, in case of Bernoulli, the only possible data are $(0,0), (0,1), (1,0), \text{ or } (1,1)$. So, if there is no linear relationship between them (uncorrelated), then there is none (independent)! I am just wondering whether there is anything like this?
70908
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 $A$, $B$, $C$. Is it possible to have these three relationships satisfied? $$ \mathrm{corr}[A,B] = 0.9 $$ $$ \mathrm{corr}[B,C] = 0.8 $$ $$ \mathrm{corr}[A,C] = 0.1 $$ My intuition is that it is not possible, although I can't see right now how I can prove this conclusively.
57590
I've got another moment generating function question. I've uploaded the question as a link.   Joint Moment Generating Question:   My Solution: Not exactly sure how to approach this one  Also just another clarification. If the  correlation between random variables X and Y is zero, are X and Y are independent? I do know that if Covariance(X,Y) = 0, X and Y are said to be uncorrelated. But how about for correlation?  Thank you so much for your help guys!! Much appreciated =)
36176
Most modern texts spend some time deriving the  that connects S matrix elements to time ordered field correlation functions. It seems essential, and really helps clear up what you are calculating. Yet some earlier texts and even some modern texts (e.g.  by R. Klauber) seem to skip right past this, working everything out in the "interaction" picture. It seems there must be something going wrong with this latter procedure, but I am not quite able to put it together.
120509
I have a group of correlation coefficients (more than two). They are all dependent on one variable A in the form of r_A1, r_A2, r_A3....r_Ak, where 1, 2 ...k denote other variables; they all have the same sample size.   My question is: what statistics should I use when I want to know whether any one of the correlation coefficients is any different to any of the others? I know if there are only two dependent correlation coefficients, this can be easily compared using most statistical tools, but this is a multiple correlations test. I know that a Chi-square test can be used to compare equality of several correlation coefficients (see  for an example), but to my knowledge this approach is for testing the difference between INDEPENDENT correlation coefficients. So I am wondering whether there is any approach that is equivalent to Fisher's least significant difference that can be used to make comparisons among several dependent correlation coefficients?  EDIT: thanks @russ-lenth for your answer. In general, I found that CIs computed from lsmeans are larger than those computed using Fisher's Z method. Here's an example of the CIs that I get through the lsmeans function:   rep.meas      lsmean         SE df   lower.CL  upper.CL  M1        0.76914236 0.13325688 23  0.4934795 1.0448052  M2        0.82346705 0.11830361 23  0.5787374 1.0681967  M3        0.89294217 0.09386717 23  0.6987631 1.0871212  M4       -0.09985512 0.20747224 23 -0.5290441 0.3293339  M5        0.56183690 0.17249315 23  0.2050076 0.9186662  M6        0.79086279 0.12760947 23  0.5268825 1.0548431  M7        0.14667681 0.20625924 23 -0.2800029 0.5733566   Take M1 whose r = 0.769 as an example: the width of the CI from lsmeans is (1.0448-0.4935) 0.5513. The width of the CI computed from Fisher’s Z is (0.8948-0.5302) 0.3646, which is much smaller than the former. Is the difference between the widths of the two confidence intervals too large?
18045
Let's say I test how variable Y depends on variable X under different experimental conditions and obtain the following graph:    The dash lines in the graph above represent linear regression for each data series (experimental setup) and the numbers in the legend denote the Pearson correlation of each data series.  I would like to calculate the "average correlation" (or "mean correlation") between X and Y. May I simply average the r values? What about the "average determination criterion", $R^2$? Should I calculate the average r and than take the square of that value or should I compute the average of individual $R^2$'s?