I have been wondering about an issue connected with prevalence. And came up to some conclusions which I would like to verify. It's not complicated. Let's assume we have two prevalences: (A) percentage of population with cancer - 10% and (B) population of smokers - 20%. If there would be no correlation: C = 0, the populatin smokers with cancer (D) would be D = AB = 2%. If The correlation would be C = 100% then everyone with cancer would be a smoker - D = A = 10%. So the correlation proportion wolud be:
C         D
0%      AB
50%    ((A or B) - AB)/2
F%     ((A or B) - AB)*F/100
100%  if A < B then A, if A > B then B

Is this right?

Might be easier to think in terms of conditional probability. I'll rephrase your question...

Let $$A$$ = cancer, and $$B$$ = smoke

$$C$$ becomes $$P(A|B) - P(A|\neg B)$$ and $$D$$ becomes $$P(A \land B)$$.

Using Bayes' theorem to expand $$C$$ and realizing that $$D = P(A|B) \cdot P(B)$$, you'll get that

$$D = C \cdot P(B) \cdot (1 - P(B)) + P(A)P(B)$$

I think this is more or less what you have... except for the last case since if $$C = 1$$ then you have cancer iff you smoke, so $$P(A) = P(B)$$ and $$D = P(A) = P(B)$$.

Quick derivation scratchbook

P(X|Y) = P(Y|X)P(X) / P(Y)
P(X|\neg Y) = P(\neg Y|X)P(X) / P(\neg Y) = (1 - P(Y|X))P(X) / (1 - P(Y))

C = P(Y|X)P(X) / P(Y)  -  (1 - P(Y|X))P(X) / (1 - P(Y))
= (1 - P(Y)) P(Y|X) P(X)  -  (P(Y)) (1 - P(Y|X)) P(X)  /  (P(Y) (1 - P(Y))
= P(X)P(Y|X) - P(X)P(Y)P(Y|X) - P(X)P(Y) + P(X)P(Y)P(Y|X)  /  P(Y) (1 - P(Y))
= P(X)P(Y|X) - P(X)P(Y)  /  P(Y) (1 - P(Y))

D = P(X|Y) P(Y) = P(Y|X) P(X) / P(Y) * P(Y) = P(Y|X)P(X)

so C = D - P(X)P(Y)   /  P(Y)(1 - P(Y))
D = C * P(Y) * (1 - P(Y)) + P(X)P(Y)

• Hi, I really appreciate your help, but this solution is too complicated for me. I heard about conditional probability and planning to read about it but for now I'll stick to my method... – Ady Sep 2 '19 at 17:32