# Find the probability that the roots of the quadratic $U_1x^2+U_2x+U_3$ are real

The question, from the textbook: Mathematical Statistics and Data Analysis

Let $$U_1, U_2, U_3$$ be independent random variables uniform on $$[0,1]$$. Find the probability that the roots of the quadratic $$U_1x^2+U_2x+U_3$$ are real.

I know this question has already been asked on StackExchange but I'd like to present my incorrect attempt at it in the hopes that someone could tell me where I went wrong.

So this question boils down to finding $$P(U_2^2-4U_1U_3\ge 0)$$ which is the discriminant. Which is equivalent to $$1-P(-\sqrt{4U_1U_3} \lt U_2\lt \sqrt{4U_1U_3})$$

Since all three random variables are uniform on $$[0,1]$$, their density function would be just be $$1$$.

Putting it all together, I get the triple integral of

$$\int_{0}^{1}\int_{0}^{1}\int_{-\sqrt{4u_1u_3}}^{\sqrt{4u_1u_3}}du_2du_1du_3$$

Which is what I think should equal to $$P(-\sqrt{4U_1U_3} \lt U_2\lt \sqrt{4U_1U_3})$$

The triple integral turns out to be a number greater than 1 which is obviously wrong. Where did I go wrong? Can anything be salvaged here, perhaps a triple integral with different bounds? I saw the solution to this question done by someone else: Probability that a quadratic polynomial with random coefficients has real roots but I don't think I would be able to think of something like that in a test setting. Any pointers would be much appreciated!

Your errors are that (a) $$u_2$$ can never be negative, so the lower limit should have been $$0$$; and (b) your triple integral's innermost upper bound isn't clipped to the unit cube's boundaries. So $$u_1$$ and $$u_3$$ are properly confined to be less than $$1$$, but you have let $$u_2$$ go as high as $$2$$ (when $$u_1 = u_3 = 1$$).
There are a few ways to deal with this second issue. One is to break the expression up into two integrals: one over the domain where $$4u_1u_3 \leq 1$$ (so, for example, let the middle bounds range from $$u_1 = 0$$ to $$\frac{1}{4u_3}$$), over which $$u_2$$ ranges from $$0$$ to $$\sqrt{4u_1u_3}$$; and a second integral over the domain where $$4u_1u_3 > 1$$ (let the middle bounds range from $$u_1 = \frac{1}{4u_3}$$ to $$1$$), over which $$u_2$$ ranges only between $$0$$ and $$1$$.
• Why are the bounds $u_2$ for the second integral $0$ to $1$. I get that the middle bounds would go from $1/4u_3$ to $1$, but doesn't $4u_1u_3$ being greater than $1$ affect the bounds of $u_2$ in some way? I hope my question makes sense.. – PurpleBlueJeans Nov 26 '18 at 2:17
• @PurpleBlueJeans: The upper bound for $u_2$ should be $\min\{1, 4u_1u_3\}$. – Brian Tung Nov 26 '18 at 4:50