Do two variables need to be independent in order to obtain a correlation? I would like to find the correlation between two variables. It was suggested to me that two variables should be independent; otherwise it is not meaningful statistically to calculate a correlation. For example, variable is x and another is $y$ which won't be calculated from $x$, e.g., $y=ab/c+x$. $a$, $b$, and $c$ are some constant value that are the same for all $y$.
Questions


*

*Is what I understand correct?

*The data set is $y = P+Q+x$. $P$ and $Q$ depends on each $x$, and the same $x$ value can have different value of $P$ and $Q$. Is it meaningful to find a correlation given this data?

 A: What was suggested to you is absolutely wrong.  Correlation is calculated to investigate if there is some relation between two variables.  If the two variables (lets call them $x$ and $y$) are independent, then the correlation is zero, for sure, so no need to compute it. That conclusion cannot be inverted, though, even if the correlation is zero, they might be dependent, in some non-linear way.  
A: It is very hard to find out what the OP really means. For sure, his/her view that " two variables should be independent; otherwise it is not meaningful statistically to calculate a correlation." is utterly incorrect, as explicitly stated by kjetil b halvorsen. 
However, perhaps the relation between $y$ and $x$ is not deterministic after all. It could be that the functions $P(x)$ and $Q(x)$ are themselves stochastic, in the sense that they contain some error component (additive, multiplicative or otherwise). In that case, it absolutely makes sense to study the correlation between $y$ and $x$. The way to proceed largely depends on whether the models $P(x)$ and $Q(x)$ are known or not. If so, it may be possible to determine the correlation analytically. If not, (polynomial) linear regression is likely the best approach to reconstruct a good model from the data.
