Solution (source code)

= Solution

For each auxiliary count $x$, the correctly normalized joint expression above is symmetric in $p_M,p_T$. Summing it over $x=0,\ldots,n$ preserves that symmetry, so these are <exchangeable random variables>. Their <marginal distributions> are therefore identical. Since $p_M$ was generated from a <Beta distribution>,
$$
\boxed{p_T\sim\operatorname{Beta}(\alpha,\beta).}
$$
The <Beta-binomial exchangeable coupling> changes the dependence, while leaving both <prior distributions> unchanged.