Probability with constraints

92 Views Asked by At

Four numbers $a, b, c, d$ are independent random variables and given by the uniform distribution in $[-1/2, 1/2]$.
$t$ is a fixed constant greater than $0$.
I would like to compute the probability of the event $(t + 1)b - tc < d$ and $(t + 1)c - tb > a$.
P/S: I can only compute the PDF and CDF of $(t + 1)b - tc$ and $(t + 1)c - tb$ but I don't know how to continue because they are not independent.
Thank you very much for your help.

2

There are 2 best solutions below

2
On BEST ANSWER

At last I've gotten sensible results.

Let $a, b, c, d$ be independent random variables uniformly distributed on $[-\frac12, \frac12]$, and let $t$ be a positive real number. What is the probability that $(t+1)b-tc<d$ and $(t+1)c-tb>a$?

The conditions are equivalent to $$ c>\max\left\{\frac{(t+1)b}{t}-\frac {d}{t}, \frac{tb}{t+1}+\frac {a}{t+1}\right\}\tag1 $$ so the problem is simply to determine the volume of a region in $4$-space bounded by hyperplanes. If we make the change of variables $$ \begin{align} W &= a+\frac12\\ X &= b+\frac12\\ Y &= c+\frac12\\ Z&= d+\frac12 \end{align} $$ Then $(1)$ is equivalent to $$ Y>\max\left\{\frac{(t+1)X}{t}-\frac {Z}{t}, \frac{tX}{t+1}+\frac {W}{t+1}\right\}\tag2 $$ and $W,X,Y,Z$ are independent random variables, uniformly distributed on $[0,1]$.

We find that $$ \frac{(t+1)X}{t}-\frac {Z}{t}\geq\frac{tX}{t+1}+\frac {W}{t+1}\iff\\ \left(\frac{t+1}t-\frac t{t+1}\right)X\geq \frac Zt+\frac W{t+1}\iff\\ \frac{((t+1)^2-t^2)}{t(t+1)}X\geq \frac Zt+\frac W{t+1}\iff\\ (2t+1)X\geq (t+1)Z+tW\iff\\ X \geq\frac t{2t+1}W+\frac{t+1}{2t+1}Z $$ Since the right-hand side is a convex combination of $W$ and $Z$, it always lies between $0$ and $1$.

Whichever function gives the maximum, we must distinguish several cases. First, if the maximum is $\leq 0$, then $Y$ can take any value between $0$ and $1$. Second, if the maximum lies between $0$ and $1$, then $Y$ can take values between that maximum and $1$. Finally, if the maximum is greater than $1$, $Y$ cannot possibly exceed it, so we can ignore this case.

We see that the problem breaks up into several cases.

First suppose that

$X \geq\frac t{2t+1}W+\frac{t+1}{2t+1}Z$, so that the maximum is $\frac{(t+1)X}{t}-\frac {Z}{t}$. We need to know when $$0\leq \frac{(t+1)X}{t}-\frac {Z}{t}\leq1$$ which is when $$\frac Z{t+1}\leq X\leq \frac{Z+t}{t+1}$$

Both the extreme values are nonnegative numbers not exceeding $1$, so that's not a problem, but in order for this case to obtain, we must have $X \geq\frac t{2t+1}W+\frac{t+1}{2t+1}Z$. In the first place, we need $$ \frac{Z+t}{t+1}\geq X\geq\frac t{2t+1}W+\frac{t+1}{2t+1}Z\tag3 $$ For this to hold, we need the left-hand side to be greater than or equal to the right-hand side, which is true if and only if $$ (2t+1)(Z+t)\geq t(t+1)W+(t+1)^2Z $$ or $$ 2t^2+t\geq(t^2+t)W+t^2Z $$ which is true since $W,Z\leq1$.

So $(3)$ doesn't need adjustment, but we must have $$ X\geq \max\left\{\frac Z{t+1},\frac t{2t+1}W+\frac{t+1}{2t+1}Z\right\} $$ However, $$ \frac{t+1}{2t+1}-\frac1{t+1}=\frac{t^2}{(2t+1)(t+1)} $$ so the second element is always the maximum and $(3)$ gives the conditions for this case to hold.

We may write the probability associated with this case as $$ \int_0^1\int_0^1\int_{x_0}^{x_1}\int_{y_0}^1\mathrm{d}y\,\mathrm{d}x\,\mathrm{d}z\,\mathrm{d}w $$ where $$ \begin{align} x_0&=\frac{tw}{2t+1}+\frac{(t+1)z}{2t+1}\\ x_1&=\frac{z+t}{t+1}\\ y_0&=\frac{(t+1)x}{t}-\frac zt \end{align} $$ I get $$ \frac{t \left(7 t^{2} + 7 t + 2\right)}{12 \left(4 t^{3} + 8 t^{2} + 5 t + 1\right)} $$ The maximum will be negative when $X<\frac Z{t+1}$ but we have just seen that this is impossible in this case, so we can move on to the case where the maximum is the second element in $(2)$.

In this case, the maximum is a convex combination of $W$ and $Z$, so it is always between $0$ and $1$, and there are no adjustments needed. We may write the probability associated with this case as $$ \int_0^1\int_0^1\int_{0}^{x_0}\int_{y_0}^1\mathrm{d}y\,\mathrm{d}x\,\mathrm{d}z\,\mathrm{d}w $$ where $$ \begin{align} x_0&=\frac{tw}{2t+1}+\frac{(t+1)z}{2t+1}\\ y_0&=\frac{tx}{t+1}+\frac w{t+1} \end{align} $$ I get $$ \frac{17 t^{3} + 27 t^{2} + 15 t + 3}{12 \left(4 t^{3} + 8 t^{2} + 5 t + 1\right)} $$ The sum of the two integrals is $$ \frac{12 t^{2} + 11 t + 3}{12 \left(2 t^{2} + 3 t + 1\right)} $$ I used sympy to do the integrations. Here is my script:

from sympy import *

w,x,y,z,t = symbols('w x y z t')
x0 = t*w/(2*t+1)+(t+1)*z/(2*t+1)
x1 = (z+t)/(t+1)
y0 = (t+1)*x/t-z/t
s1 = integrate(1, (y,y0,1),(x,x0,x1),(z,0,1),(w,0,1))
print(latex(simplify(s1)))

y0 = (t*x)/(t+1)+w/(t+1)
s2 = integrate(1, (y,y0,1),(x,0,x0),(z,0,1),(w,0,1))
print(latex(simplify(s2)))

s = simplify(s1+s2)
print((latex(s)))

ADDENDUM

I'm confident that this is correct. I ran an experiment for several values of $t$. In each of them, I ran $100,000$ trials, and compared the fraction of successes to the expected value from the formula. Here are the results:

t = 0.1
actual 0.26551
expected 0.26641414141414144

t = 0.4
actual 0.30804
expected 0.3082010582010582

t = 2
actual 0.40456
expected 0.40555555555555556

t = 3.5
actual 0.43681
expected 0.4363425925925926

t = 10
actual 0.47449
expected 0.4736652236652237

t = 100
actual 0.4958
expected 0.4971142636651725 
2
On

Continuing with @saulspatz approach, I solved those two integrals:

The first one is: $\frac{t (t (t (17 t+16)-12)-16)-4}{24 t (t+1) (2 t+1)^2}$

The second one is: $\frac{(2 t+1) \left(4 t^2+11 t+6\right)}{24 (t+1)^3}-\frac{t (t+1)}{24 (2 t+1)^2}$.

Summing them together, the final answer is: $$\frac{(3 t+2) (t (t (t (8 t+21)+12)-2)-2)}{24 t (t+1)^3 (2 t+1)}$$

Also, here is the plot:

enter image description here