Probability of real Roots of the Equation At² + Bt + C = 0?

Browsing back through Q & A I found this:
http://answers.yahoo.com/question/index;_ylt=Ak69jySnt0dwy9IOIM12Oi0Cxgt.;_ylv=3?qid=20081007064619AAs2Jyy

It reminded me another similar question, asked some time ago (see links below) but I haven't encountered much more interesting generalized question: if A, B, C are random real coefficients (not necessarily digits!), what is the probability the equation:
At² + Bt + C = 0 to have real roots?

To avoid any misunderstanding what exactly "random real coefficients" should mean, I suggest the following:
Approach 1) Let the point (A,B,C) is uniformly distributed in the cube [-R,R; -R,R; -R,R] /R=const>0/, or, equivalently, A, B, C are uniformly distributed independent random variables in [-R,R] each. Express the probability in terms of R, then let R → ∞.
Approach 2) Same as above, but the point (A,B,C) to be uniformly distributed in a sphere with radius R.
I consider Approach 1) most natural, but feel free to choose 2) instead (that could led to more complicated integrations), or to suggest another eventual approach (and solution) You find reasonable enough. It may be useful to read the following comments and discussions:
http://answers.yahoo.com/question/index;_ylt=AugFJHUJ3VcYlZiPpW9KxQfty6IX;_ylv=3?qid=20080308190622AARKowf&show=7#profile-info-DiIetF7Waa
http://answers.yahoo.com/question/index;_ylt=AkJiR5Bva7XqnbJqWVTX_Gbty6IX;_ylv=3?qid=20080308204357AAEdyRP&show=7#profile-info-AA10667595
and Pascal's excellent explanation:
http://answers.yahoo.com/question/index;_ylt=AjfKrzRmAbT5YiBUfEFiWxDty6IX;_ylv=3?qid=20080314012855AAVWC3v&show=7#profile-info-f70e2c276c18aa87d9308f09887e96b6aa

Of course P(Real Roots) =
= P[(A≠0 and B²-4AC ≥ 0) or (A=0 and B≠0) or (A=0 and B=0 and C=0)]=
= P(B² ≥ 4AC) since P(A=0) = 0. So what is P(B² ≥ 4AC)?

2008-11-13T01:22:20Z

Amazing interest so far!
The surface y² = 4xz /I'll use x, y, z instead of A, B, C/ is an elliptic cone with axis through the origin along the vector (1,0,1), intersections, perpendicular to the axis are ellipses, whose axes are in ratio 1 : √2. Here is how it is looking like:
http://farm4.static.flickr.com/3010/2998319685_971a02e07a_o.gif

Using Approach 1) above, I tried to calculate the volume of that part of the cube, that is outside the cone, and indeed got a value, independent of R, but I'd wish to check my result. I hope many of those, who answered the previous similar question, to share their opinions now too - Ksoileau and Scythian - many thanks for answering!

2008-11-16T05:56:09Z

Scythian, thanks for the article, I read it very carefully, it emphasizes once more the importance of the precise formulation, what I think I have done above (maybe I shouldn't have used words like "random real", but Approach 1 & 2 make things perfectly clear - we can compare with the well-known Bertrand's Paradox). Now we have 2 distinct problems, shown by Dr D's and JB's excellent contributions (JB's Approach 3 very interesting!), I can confirm their numeric results by computer simulations that I made also.
I have a sound reason to prefer Approach 1 - if (A,B,C) is uniformly distributed in a cube, as described above, the component random variables A,B,C are INDEPENDENT, what is not the case with Approach 2. The volume of that part of the cube, inside the cone is 4 times
∫∫ [D] 2√(xz) dx dz - ∫∫ [D'] (√(xz) - R) dx dz, where
D = { 0 ≤ x ≤ R, 0 ≤ z ≤ R },
D' = { 0 ≤ x ≤ R, 0 ≤ z ≤ R, 4xz ≥ R² }
as shown here:
http://farm4.static.flickr.com/3157/3034029625_d33e72e947_o.gif

2008-11-17T07:29:59Z

That's it, Dr D! You got it done!
The answer is shape dependent as JB notes, and if we agree on Approach 1, the rest is somewhat dull integration exercise. Over the weekend I had enough time to check it thoroughly, the analytic result is:
∫∫ [D] 2√(xz) dx dz = 2∫ [0, R]√(x) dx * ∫ [0, R] √z dz = 8R³/9;
∫∫ [D']((2√(xz) - R) dx dz) = ∫ [x=0 to x=R] (∫ [z=R²/(4x) to z=R] 2√(xz) dz) dx =
= (1/36 + ln 2 /6)R³
The volume V' of the part of the cube inside the cone is:
V' = (31/36 - ln 2 /6)R³
The required probability (according Approach 1):
4V'/(2R)³ = (41 + ln 64)/72 ≈ 0.627206708491 according Windows Calculator.

2008-11-17T07:39:49Z

1 - 4V'/(2R)³ on the previous text line, sorry!

2008-11-17T07:49:03Z

And (√(xz) - R) instead of √(xz) only in the inner integral, of course!

2008-11-18T10:29:47Z

We have already a full solution of the problem according Approach 1 and valuable overall comments, so there is no need to keep it open any more.
Try the next, more difficult one:
http://answers.yahoo.com/question/index;_ylt=AoK2QthlhX0_F_9_eo8iWdPsy6IX;_ylv=3?qid=20081118094923AAdfWVF

Dr D2008-11-13T17:30:20Z

Favorite Answer

APPROACH #2
I'm not going to type everything out. I'm just going to sketch what I did and report the numerical answer.
We're picking a point randomly inside a sphere with coordinates (x,y,z) and we wish to find the fraction of the volume where
z^2 > 4xy

In the 2nd and 4th x-y quadrants, this is always the case so the answer is at least half the volume.
In the 1st and 3rd x-y quadrants, this is true for a fraction of the volume.

First we need to find where the curved surface z^2 = 4xy intersects the sphere x^2 + y^2 + z^2 = R^2.
This happens at y = -2x + √(3x^2 + R^2)

We need to integrate dx dy dz between the limits
0 < x < R
0 < y < -2x + √(3x^2 + R^2)
2√(xy) < z < √(R^2 - x^2 - y^2)
Then we need to multiply this by 4.

This integral works out numerically to 0.622 R^3
Total volume where z^2 > 4xy = (2π/3 + 0.622) R^3
Required probability = 0.64851...

This result is independent of R as is the case with ksoileau.


APPROACH #1
I'm posting my result for the first approach only because I'm getting a different result from ksoileau.
We need to find the fraction of hte volume of the cube where z^2 > 4xy. Let's focus on the first x-y quadrant as above.

We have 2√(xy) < z < 1
On the z = 0 plane, z^2 = 4xy are simply the x and y axes.
On the z = 1 plane, z^2 = 4xy is 4xy = 1

For 0 < x < 1/4, y ranges from 0 < y < 1
For 1/4 < x < 1, y ranges from 0 < y < 1/(4x)
So we need to perform the integral of dz dy dx between those limits. After simplification that works out to be
(5 + 6ln2) / 36

Then we multiply this by 4, divide it by 8 (the total volume of the cube). Finally we add 1/2 to this result for the quadrants where xy < 0 (z^2 > 4xy automatically).

Final result: (41 + 6ln2) / 72 = 0.6272..

This result matches JB's simulation as well as one I did myself.


COMMENTS:
Mathematically, the difference in numerical values using these various approaches comes down to how the cone z^2 = 4xy intersects the domain of interest. It turns out that the limits of integration are more straightforward with the sphere, but the integration more difficult. The limits are less straightforward with the cube, but the expression is integrable.
For those interested, this is the integral for approach #1 which works out numerically to 0.622.... See if you have any luck simplifying it to obtain a closed form expression.
http://i36.tinypic.com/116km5u.jpg

Scythian19502008-11-12T21:31:15Z

This problem has no unambiguous solution. We can plot A, B, C in a 3D space, and let a surface be defined where B = 2√(AB). If we limited the range of A, B, C, such as 0 > A, B, C > k, where k is some constant, then we'd have a cubical volume divided into two parts by this surface, the volume under 2√(AB) being 8/9 k³, so that the odds that B > 2√(AB) would be 1/9. However, we would get a different result if we insisted that √(A²+B²+C²) = r for some constant r. There is no "shape to the range of A, B, C" at infinity, so this problem has no answer without some constraint on the range of A, B, C, and that answer would depend on the kind of constraint imposed.

Addendum: A problem similiar to this is the classic: Three points are picked at random on a plane. What's the probability that they form the vertices of an obtuse triangle? Lewis Carroll suggested a solution, but his solution was later repudiated, and a different answer was offered. It's one of those very rare and interesting cases where a mathematical finding moves into the realm of philosophy and not unambiguous fact. See link for an interesting paper on this, which should be relevant to your problem.

JB2008-11-15T07:55:58Z

The integrations were too daunting for me, so instead I tried to estimate them (and hence the probabilities) by Monte Carlo simulations. I used the random number generator of Maple, uniform on [0,1] and generated random deviates on [0,1]x[0,1]x[0,1]. Here are the results:

approach 1) the cube: P(B² ≥ 4AC) = 0.627

approach 2) the sphere: P(B² ≥ 4AC) = 0.648

approach 3) the octahedron: P(B² ≥ 4AC) = 0.667

These numbers come by generating a random point in the first octant 100,000 times and computing a probability (by symmetry and adjusting for the octants where AC is negative) and repeating this experiment about 10 or so times. The results were so consistent that I did not compute a confidence interval. There was only small variation in the third decimal digit.

Comments:

1) The result for the cube is sufficiently different from ksoileau's 0.6389 to make me believe we are computing different things.

2) For the sphere, this corroborates (Ω) Dr D's answer of 0.6485... BTW my uniform points inside the sphere were obtained by generating points in [0,1]x[0,1]x[0,1] and rejecting those that were outside the sphere.

3) The octahedron means the set |A| + |B| + |C| <= 1. These were also obtained by generating points uniformly in [0,1]x[0,1]x[0,1] and rejecting those that fell outside the octahedron. The result 0.667 is so close to 2/3 as to almost tempt me to evaluate the integral for this region.

4) There is no doubt in my mind that the answers are different for these three regions, leading me to believe that the answer depends not on the size of the region but on its shape, corroborating some of the comments of Scythian1950.

5) I have no idea of the quality of the uniform random number generator of Maple 7.0. I no longer have access to SAS or SPSS or other statistical software whose random number generators might be better. It would be interesting if someone could try to confirm these numbers using some other software with possibly more reliable pseudo-random-number generators.

?2016-05-28T05:53:31Z

The probability that the quadratic equation x^2 + 2bx + c = 0 has two distinct roots is equal to the probability that its determinant (2b)^2-4*1*c is positive which in turn equals the probability that b^2>c. So the answer depends on the joint density of b and c. If it happens that b and c are independent, their joint density is simply the product of their individual densities.

Anonymous2008-11-12T12:44:02Z

(Using Approach 1)
Because scaling in each variable does not change B^2-4*A*C, it suffices to calculate the probability in case R=1.

P(B^2-4*A*C>=0)
=P(B^2-4*A*C>=0,A*C>=0)
+P(B^2-4*A*C>=0,A*C<0)
=P(B^2-4*A*C>=0,A*C>=0)
+P(A*C<0)
=2*P(B^2-4*A*C>=0,A>=0,C>=0)
+2*P(A>0)*P(C<0)
=2*int(int(int(1/8,b=sqrt(a*c)..1),
a=0..1),c=0..1)+2*(1/2)*(1/2)
=23/36
=.6388888888...

I take it from the thumbs down that someone thinks I made a mistake. By all means, point out my error as you see it. I would mention that I have confirmed my answer through simulation.