I have obtained a result (perhaps incorrectly; we shall find out) that appears paradoxical.
Suppose I am interested in comparing fractions between 'groups' (not in the strict mathematical sense) $\alpha$ and $\beta$. Within these groups, there are two subgroups (which are present in both $\alpha$ and $\beta$), denoted $y$ and $z$.
Without loss of generality and for sake of argument, suppose that we're interested in United States baseball batting averages, $AVG$, and have data on hits $H$ and at-bats $AB$.
Specifically,
$(H_{\alpha,y}, AB_{\alpha,y}) = (34836, 268206) \Rightarrow AVG_{\alpha,y} = \frac{34836}{268206} = 0.129885237 \ldots$
$(H_{\alpha,z}, AB_{\alpha,z}) = (81311, 366970) \Rightarrow AVG_{\alpha,z} = \frac{81311}{366970} = 0.221573970 \ldots$
$(H_{\beta,y}, AB_{\beta,y}) = (33463, 253042) \Rightarrow AVG_{\beta,y} = \frac{33463}{253042} = 0.132242868 \ldots$
$(H_{\beta,z}, AB_{\beta,z}) = (69498, 312624) \Rightarrow AVG_{\beta,z} = \frac{69498}{312624} = 0.222305389 \ldots$
Note the differences in $AVG$ between groups with the same subgroup,
$d_{y} = AVG_{\alpha,y} - AVG_{\beta,y} = -0.0024 \ldots$
$d_{z} = AVG_{\alpha,z} - AVG_{\beta,z} = -0.0007 \ldots$
However, the difference in $AVG$ between groups, without regard for subgroup has a sign that is not intuitive for me,
$d_{y+z} = AVG_{\alpha, y+z} - AVG_{\beta, y+z} = \frac{(H_{\alpha,y} + H_{\alpha,z})}{(AB_{\alpha,y} + AB_{\alpha,z})} - \frac{(H_{\beta,y} + H_{\beta,z})}{(AB_{\beta,y} + AB_{\beta,z})} = +0.0008 \ldots$
My expectation is that $d_{y+z} \in [\min{(d_y, d_z)}, \max{(d_y, d_z)}]$
Why is the difference in $AVG$ between groups not bounded by the subgroup-level differences?
This is Simpson's Paradox. (see https://en.wikipedia.org/wiki/Simpson%27s_paradox)
The averages hide the quantity of each subset. Your calculations are probably fine, but your expectations hit a well-known paradox.
For ease of explanation, I will be using inequalities $x>y$ rather than the equivalent sign of the difference $x-y>0$.
Consider comparing T-ball players to professional baseball players. We have tee-ball players with 90% hit rate on a tee, but 0% hit rate against a professional pitcher. The professionals might have 100% hit rate on a tee, but 30% hit rate against a professional. The professionals perform better in both cases.
However, most tee-ball players don't bat against professionals, and most professionals don't bat on a tee. We might have .0001% of tee-ball players batting against professionals, and .00001% of professionals using a tee.
Then the average over both cases (all at-bats) would be extremely close to 90% for tee-ball players, and very close to 30% for professionals. The tee-ball players perform better overall.
The conclusion from the overall average is not so much that tee-ball players are better than professionals, but rather that tee-ball players hit stationary balls better than professionals hit 90mph pitches.