Likelihood of circle vs. ellipse vs. parabola vs. hyperbola from $ax^2+bxy+cy^2+dx+ey+f=0$ with coefficients uniformly random in $[-1,1]$

conic sectionspolynomialsprobability

Q. What is the probability that a random quadratic equation describes a
circle, an ellipse, a parabola, or a hyperbola?
Let's use this definition of a random quadratic:

$$a\, x^2 + b\, x y + c\, y^2 + d\, x + e\, y + f = 0 \;$$

where $a,b,c,d,e,f$ are each uniformly random within $[-1,1]$.

For a circle the probability should be $0$, but I am unclear on the likelihood of ellipse vs. parabola vs. hyperbola.

Each conic can be represented as a point in a $5$-dimensional projective space.
So I'm asking for the corresponding portions/volumes within this space.

My trigger for this question is a quote from Colin Adams:
"So if we want to understand the geometry of surfaces, it's all about
the hyperbolic case." So I was wondering if hyperbolas dominate even
in the plane. (Colin Adams, "What is … a Hyperbolic 3-Manifold?" AMS 65, no. 5, pp.544-546.PDF download).

Added: Simulations suggest that hyperbolas occur roughly 73% of the time,
ellipses 14%, and the remainder have only imaginary solutions.

Best Answer

Leaving aside the presence of imaginary ellipses, what you ask is the probability that, given three numbers $a$, $b$, $c$ chosen at random in $[-1,1]$, then $b^2>4ac$ (hyperbolic case).

But $b^2=4ac$ is the equation of a cone in $abc$ space, hence that probability is the same as the fraction of the volume of cube $[-1,1]^3$ which is outside that cone. To compute this volume, let's focus on the first octant and unit cube $[0,1]^3$. The intersection between the cone and a plane $b=\text{constant}$ is a hyperbola in $ac$-plane with equation $ac=b^2/4$. The intersection of the same plane with the unit cube is a square and the area in that square outside the hyperbola is: $$ A(b)={b^2\over4}+\int_{b^2/4}^1{b^2/4\over a}da= {b^2\over4}\left(1-\ln{b^2\over4}\right). $$ The required volume can then be computed by integrating that over $b$: $$ V=\int_0^1 A(b)\,db={5\over36}+{1\over6}\ln2. $$ The cone intersects the original $[-1,1]^3$ cube in other three octants, with the same external volume, while the unit cubes in the remaining four octants are completely outside the cone. Hence the requested probability is: $$ p={1\over8}(4V+4)={41\over72}+{1\over12}\ln2\approx 0.627207. $$ This result is confirmed by a quick simulation with Mathematica:

tot = 0; niter = 1000000;

Do[
  a = RandomReal[{-1, 1}];
  b = RandomReal[{-1, 1}];
  c = RandomReal[{-1, 1}];
  If[b^2 - 4 a c > 0, tot++],
  {niter}];

tot/niter // N

Out[20]= 0.627543