Let's consider two random variables $A$ and $B$ having joint probability distribution $P(A,B)$.
I would like to understand better the limit cases of the correlation coefficient $r=\frac{C(A,B)}{\sigma(A)\sigma(B)}$
I first show what I understand and where I struggle.
In the case $A$ and $B$ are not correlated, it means that $P(b|a)=P(b)$ (or equivalently $P(a|b)=P(a)$). In this case:
$\int da db P(a,b) *a*b = \int da P(a)*a \int db P(b)*b$ which implies $C(A,B)=0$ and thus $r=0$.
In the case $A$ and $B$ are perfectly correlated, I can imagine a specific case which is: $P(b|a)=\delta(b-a)$ ($b$ is always equal to $a$). Then we have:
$$P(a) = \int db P(a,b) = \int da P(a) \delta(b-a) = P(b)$$
And finally:
$$C(A,B)=\int da db P(a,b) a*b = \int da db P(a) \delta(b-a) * a * b - \int da P(a)*a \int db P(b)*b=Var(A)$$
And as $P(a)=P(b)$ I have $Var(A)=\sigma(A)^2=\sigma(A) \sigma(B)$ which proves $r=1$.
My question is the following:
In the case of perfect correlations, the case $P(b|a)=\delta(b-a)$ is very specific. I would imagine a more general case like $P(b|a)=\delta(b-f(a))$ meaning that if I know $a$ I can deduce for sure $b$ but it is not necesserally the same as $a$. I tried to derive something in this more general case but I didn't manage to find anything. Are there some properties here ?
I also saw the case of "anti correlation" case for which $r=-1$. To which $P(b|a)$ does that correspond to ? $P(b|a)=\delta(b+a)$ ?