Solution (source code)

= Solution

Write $b$ for transmission of <allele> 1 with <allele> 2 untransmitted, and $c$ for the reverse. The informative transmissions give $b=20$, $c=30$. Under the fair-transmission null, conditional on $b+c=50$, $b$ is binomial with success <probability> $1/2$. Its standardized squared deviation is
$$
\boxed{\mathrm{TDT}=\frac{(b-c)^2}{b+c}=\frac{(20-30)^2}{50}=2.}
$$
The reference distribution is asymptotically chi-squared with one degree of freedom, giving a two-sided $p$-value about $0.157$. \b[<Allele> 2 is overtransmitted and hence is the <allele> more associated with disease in this sample], although this result is not strong evidence against the null. The diagonal transmission cells contribute no discordant contrast.