I have a set of inequalities:
(β - x - 19/2) Piecewise[{{0.3333333333333333 (1. - 1. y), -1. < y < 1.}}, 0.] >
(β - z - 23/ 2) Piecewise[{{1., -1. < w < 0.},
{0.3333333333333333 (3. - 1. w), 0. <= w < 1.}}, 0.] && (β - x -19/2)
Piecewise[{{0.3333333333333333 (1. - 1. y), -1. < y < 1.}}, 0.] >
(β - z - 21/2) Piecewise[{{0.3333333333333333 (2. - 1. w), -1. < w < 1.}}, 0.]
and I'm trying to calculate the probability that these inequalities hold given that β is distributed as a uniform between 8.5 and 11.5 and that 1 > z >= w > -1 && 1 > x >= y > -1.
I'm doing this:
Probability[(β - x - 19/2) Piecewise[{{0.3333333333333333 (1. - 1. y),
-1. < y < 1.}}, 0.] > (β - y - 23/ 2)
Piecewise[{{1., -1. < w < 0.}, {0.3333333333333333 (3. - 1. w), 0. <= w < 1.}}, 0.] &&
(β - z - 19/2) Piecewise[{{0.3333333333333333 (1. - 1. y), -1. < y < 1.}}, 0.] >
(β - z - 21/2) Piecewise[{{0.3333333333333333 (2. - 1. w), -1. < w < 1.}}, 0.] &&
1 > z >= w > -1 && 1 > x >= y > -1,
β \[Distributed] UniformDistribution[{8.5, 11.5}]]
This has been running for 26 hours now and mathematica has not found a solution yet. Is there any way I can speed up the calculation?
If the parameter space is just x and y it takes less than a second to get the solution:
Probability[(β - x - 19/2) Piecewise[{{0.3333333333333333 (1. -1. y), -1. < y < 1.}},
0.] > (β - x - 23/2) Piecewise[{{1.,-1.< y < 0.}, {0.3333333333333333 (3. - 1. y),
0. <= y < 1.}}, 0.] && (β - x - 19/2) Piecewise[{{0.3333333333333333 (1. - 1. y),
-1. < y < 1.}}, 0.] >
(β - x -21/2) Piecewise[{{0.3333333333333333 (2. -1. x), -1. < x < 1.}}, 0.] &&
1 > x > -1 && 1 > y > -1, β \[Distributed] UniformDistribution[{8.5, 11.5}]]
Addition:
if I try to use reduce with these two inequalities:
kk = Table[Reduce[(β - x - 19/2) Piecewise[{{1/3 (1 - y), -1 < y < 1}}, 0] >
(β - y - 23/2) Piecewise[{{1, -1 < w < 0}, {1/3 (3 - w), 0 <= w < 1}}, 0] &&
(β - x - 19/2) Piecewise[{{1/3 (1 - y), -1 < y < 1}}, 0] >
(β - y - 21/2) Piecewise[{{1/3 (2 - w), -1 < w < 1}}, 0] && 1 > z >= w > -1
&& 1 > x >= y > -1 /. β -> a, {x, y, z, w}, Reals], {a, 17/2, 23/2, 1/10}]
I get the solution in about 5 minutes.
If instead I try to reduce these inequalities:
kk = Table[Reduce[(β - x - 19/2) Piecewise[{{1/3 (1 - y), -1 < y < 1}}, 0] >
(β - z - 23/2) Piecewise[{{1, -1 < w < 0}, {1/3 (3 - w), 0 <= w < 1}}, 0] &&
(β - x - 19/2) Piecewise[{{1/3 (1 - y), -1 < y < 1}}, 0] >
(β - z - 21/2) Piecewise[{{1/3 (2 - w), -1 < w < 1}}, 0] && 1 > z >= w > -1
&& 1 > x >= y > -1 /. β -> a, {x, y, z, w}, Reals], {a, 17/2, 23/2, 1/10}]
I can't get the solution within 2 hours.
Note that in the first case the parameters are effectively 3 since z is not used in any inequality, whereas in the second case the parameters are 4.
Edited: the first set of inequalities I posted was
(β - x - 19/2) Piecewise[{{0.3333333333333333 (1. - 1. y), -1. < y < 1.}}, 0.] >
(β - y - 23/ 2) Piecewise[{{1., -1. < w < 0.},
{0.3333333333333333 (3. - 1. w), 0. <= w < 1.}}, 0.] && (β - x -19/2)
Piecewise[{{0.3333333333333333 (1. - 1. y), -1. < y < 1.}}, 0.] >
(β - y - 21/2) Piecewise[{{0.3333333333333333 (2. - 1. w), -1. < w < 1.}}, 0.]
the set of inequalities that I'm actually trying to solve is
(β - x - 19/2) Piecewise[{{0.3333333333333333 (1. - 1. y), -1. < y < 1.}}, 0.] >
(β - z - 23/ 2) Piecewise[{{1., -1. < w < 0.},
{0.3333333333333333 (3. - 1. w), 0. <= w < 1.}}, 0.] && (β - x -19/2)
Piecewise[{{0.3333333333333333 (1. - 1. y), -1. < y < 1.}}, 0.] >
(β - z - 21/2) Piecewise[{{0.3333333333333333 (2. - 1. w), -1. < w < 1.}}, 0.]

NIntegrateforIntegrate. But the computation takes so long that I aborted it. You can try for yourself if you want to, but I really think numerical is the way to go here -- the symbolic result won't be illuminating. $\endgroup$