Italy is playing the U.S.A. in a football World Cup match. A successful pass is when a player on one team kicks the ball to a player on their team and it is not intercepted by the opposition. Is it possible for Italy to have a higher proportion of its passes be successful than the U.S. in both the first and second halves, and yet for the U.S. to have a higher proportion of its passes be successful over the game as a whole?
It is possible due to the Simpson paradox. One possibility is that Italy successful passing rates in first and second half are $\frac{60}{120}$ and $\frac{60}{60}$ respectively. For US, let its successful passing rate in first and second half be $\frac{10}{50}$ and $\frac{190}{200}.$ Then in first and second half, Italy has a better successful passing rate than US. But in overall, Italy successful passing rate is $\frac{120}{180} = \frac{2}{3}$ whereas US has $\frac{200}{250} = \frac{4}{5}.$
My question is that whether we can find the set of solutions for this kind of problem.
Let $a_i,\;\; i=1,2$ be the number of attempts made by Team A in the first and second halves respectively. Let $s_i$ be the number of successful passes, with $b_i, t_i$ the corresponding values for Team B. I have assumed $a_i,b_i\gt0$.
$$\frac{t_1}{b_1}\lt \frac{s_1}{a_1}$$ $$\frac{t_2}{b_2}\lt \frac{s_2}{a_2}$$ $$\frac{t_1+t_2}{b_1+b_2}\gt \frac{s_1+s_2}{a_1+a_2}$$
This effectively implies that the gradient of Team A is steeper than Team B for both halves, but not overall, which appears to depend on the fraction without simplification, which is related to the mediant.
There are more examples at Cut-The-Knot.
This image from the Wikipedia page:
shows the 'sweet spot'.
Let's say the $a/b, c/d$ are Team B's rate, so both of Team A's lines are steeper, so that their mediant lies in the light green region - anywhere between the extended vectors of $\frac ab, \frac{a+c}{b+d}$, then we have achieved a Simpson paradox. For example see the green line I've added to the image.
As there are $8$ unknowns, each with a different role to play, there are eight different solutions, depending on which unknown you wish to determine.
For example, if we wish to determine $t_1$ and we are given the rest, we know:
$$\frac{(s_1+s_2)(b_1+b_2)}{a_1+a_2}-t_2\lt t_1\lt \frac{s_1 b_1}{a_1}$$
remembering that $t_1\in\mathbb{Z^+}$.
An example is $a_1=100,a_2=150, s_1=50, s_2=100$ for Team A. Then if $b_1=40, b_2=120$, we need $t_1\lt20, t_2\lt80$ and
$$\frac{150\cdot160}{250}-t_2=96-t_2\lt t_1\lt\frac{50\cdot40}{100}=20$$
so $77\lt t_2\lt80$.
The trick is to see the relative sizes of $\frac{s_1+s_2}{a_1+a_2}$ and $\frac{s_1}{a_1}$ as then changing the value of $b_1$ allows us to change the valid range for $t_2$ as we want.