Let's say that we have four groups of individuals, namely groups A, B, C and D, randomly sampled from a greater population (in the underlying population, each individual also belongs to one of those four groups, necessarily).
Those four samples respectively have known sample sizes $n_A, \ldots, n_D$. In each sample, the relative frequency of a given trait has been measured: a proportion $p_A$ of individuals from sample A have this trait, ..., and a proportion $p_D$ in sample D.
Among other research questions, we would like to say whether the difference between $p_A$ and $p_B$ is significantly greater than the difference between $p_C$ and $p_D$. (I.e., we would like to know whether it is reasonable to accept the hypothesis that we have $p_A - p_B > p_C - p_D$ in the underlying population.)
What would be the appropriate statistical approach?