Probability that a quadratic equation with random coefficients has two real solutions?

In the following second order equation $ax^2+2bx+1.5=0$ where $a$ and $b$ are given by random points $(a,b)$ in the $[0,2]\times[0,1]$ rectangle, what is the probability of having two real solutions?

I'm a little lost here. I tried integrating $4b^2-6a$ with $a=0\to 2$ and $b=0\to 1$ as limits but the integral comes up negative. I created a simulation of the problem using matlab and the probability is 0.11 but I want to find a way to solve it on paper and not with using matlab.

Any thoughts?

• Hint: I think you are confusing taking the expectation of a certain quantity with finding the probability over a particular region of interest bounded by a function. – cardinal Apr 1 '12 at 19:24
• Should your equation be $a x^2 + 2b + 3/2 = 0$ or $a x^2 + 2 b x + 3/2 = 0$? It seems the latter, but the former is what is given. – cardinal Apr 1 '12 at 19:30
• it's the latter, i missed an x by mistake. – System Apr 1 '12 at 19:38
• Crossposted here: math.stackexchange.com/questions/126985/… – cardinal Apr 1 '12 at 21:42

The quadratic formula tells us this equation has two real solutions exactly when the discriminant $4b^2 - 6a$ is positive. This describes a set of points $R$ in the $(a,b)$ plane, shown in blue here: When the joint density of $(a,b)$ is $f$, then (by definition of pdf) the probability of any event (like $R$) is given by its integral $\int_R f(a,b)da\ db$. Because the distribution is uniform, this is the same as finding the area of the shaded region as a proportion of the total area (equal to $2$), often written as a double integral like

$$\frac{1}{2}\int_0^1 \int_{a\lt 4b^2/6,\ 0\le a\le 2} da\ db.$$

However, we can reduce this to a single integral: the shaded region is bounded by the parabola $a = 2 b^2/3$ on the right, $a=0$ on the left, and extends from $b=0$ to $b=1$. Its area therefore is $\int_0^1 2b^2/3\ db = 2/9$. That amounts to $1/9 = 0.1111\ldots$ of the total area.

Edit (see comments). In case this is unclear, we can proceed more formally. The uniform distribution function $f$ is obtained by knowing (a) it is constant on the rectangle $[0,2]\times[0,1]$ and (b) is zero outside this set. From (a) and the fact that any PDF must integrate to unity forces $f(a,b)=1/2$ inside the rectangle, whence

\eqalign{ f(a,b) = &1/2, &0 \le a \le 2, 0 \le b \le 1\\ &0 &\text{otherwise}. }

Integration is defined in terms of characteristic functions: the integral over an event $E$ with respect to a measure $d\mu$, written, $\int \cdots \int_E d\mu$, equals $\int \cdots \int I_E(x) d\mu(x)$ where the multiple integral is taken over all possible values of $x$ and $I_E(x) = 1$ when $x\in E$ and $I_E(x)=0$ otherwise. The figure immediately shows that the solution is

$${\Pr}_f[(a,b)\in R] = \int \int_R f(a,b)\ da \ db$$

and the original double integral expression follows immediately from this expression by the definition of integration. For more about this, consult any textbook on measure theory and integration or--for a less formal approach--consult any advanced calculus text that covers multiple integration. End of edit.

This is essentially problem #50 from Fred Mosteller's Fifty Challenging Problems in Probability:

What is the probability that the quadratic equation $x^2 + 2bx + c = 0$ has real roots?

Solving it requires proposing some "reasonable" probability distribution for $(b,c)$. Mosteller chooses a set of uniform distributions over a sequence of rectangles that grows without bound and takes the limit.

• (+1) I always like how attractive the graphics you make are and how efficient you are at creating them. :) – cardinal Apr 1 '12 at 19:32
• Thank you, cardinal. As you probably know, the credit goes to Mathematica. Here, the plot is produced by the command RegionPlot[4 b^2 - 6 a > 0, {a, 0, 2}, {b, 0, 1}, AspectRatio -> 1/2] – whuber Apr 1 '12 at 19:35
• The tool can be powerful, but it still takes the craftsman's hand. – cardinal Apr 1 '12 at 19:36
• @whuber the integral is 4 b^2 - 6 a ? – System Apr 1 '12 at 20:14
• System, as explained below the figure in my reply, the integral is $\int_0^1 2b^2/3\ db$. I will edit the reply to make this clearer. – whuber Apr 1 '12 at 20:34