Relative risk from group compositions (source code)

= Relative risk from group compositions
{title2=$\operatorname{RR}=\dfrac{a(1-p)}{p(1-a)}$}

Let $G$ be the <event> of membership in the first of two groups and $A$ the <event> of selection. Write $p=P(G)$, $a=P(G\mid A)$ and $q=P(A)>0$, with $0<p,a<1$. <Bayes' theorem> gives the <conditional probabilities> $r_1=P(A\mid G)=aq/p$ and $r_0=P(A\mid G^c)=(1-a)q/(1-p)$. Their <risk ratio> is the displayed expression: the unknown overall selection <probability> cancels. Equivalently, it is the ratio of the group-membership <odds> after selection to those before selection.

When both selection <probabilities> lie strictly between zero and one, the selection <odds ratio> is $[r_1/(1-r_1)]/[r_0/(1-r_0)]$ and generally depends on $q$. Thus compositions alone do not identify that <odds ratio> or provide sample sizes for a <standard error>. When $a<p$, the first group's observed selection rate is lower; this comparison alone does not establish a <causal effect> of group membership.