Do $3/8$ (37.5%) of Quadratics Have No $x$-Intercepts?

I randomly had a thought about what proportion of quadratics don't have real $x$-intercepts. Initially I thought 33%, because 0,1,2 intercepts, then I thought that the proportion of 1 intercepts is infinitesimal. So I then thought 50%, as graphically half the quadratics would be above the $x$-axis, the other half below.

If you put it into a list of (max,min) and (above,below): Minimum + Above = no $x$-intercepts

Minimum + Below = 2 $x$-intercepts

Maximum + Above = 2 $x$-intercepts

Maximum + Below = no $x$-intercepts.

Hence 50% right?

Well I simulated it using code. I randomised a, b and c, and output the discriminant. If it is less than 0, add 1 to a variable. Do this about 100000 times. Now divide the variable by 100000. I get numbers like $(37.5\pm0.2)$%.

I hypothesise that it averages $3/8$.

Why?

There may be a fallacy to my approach of finding the 'proportion'. Fundamentally, it is the probability of getting a quadratic with no $x$-intercepts. However, I am not sure.

EDIT: The range was from $(-n,n)$, where $n$ was 100000, or even higher.


Solution 1:

The problem isn't that there's no way to choose a random quadratic. The problem is that there's many ways, and there's no obvious reason to think of any of them as "the" way to pick one.

For starters, even picking a "random number" is something you can do in many ways:

  • uniformly from some interval, say $(-1,1)$, or $(0, 1)$, or $(2,17)$,
  • from a normal distribution with any mean or variance,
  • from an exponential distribution with any mean,
  • from a Cauchy distribution,
  • from some weird arbitrary distribution you make up yourself

(Note that "a number uniformly randomly chosen from all real numbers" is not possible, simply because the integral of the density function over all real numbers (i.e. the total probability) must be $1$, and no constant function does that.)

Now, with that in mind, here are some ways you could pick a random quadratic:

  • choosing each of $a$, $b$ and $c$ randomly by any of the above methods (or some combination of them) and constructing $ax^2 + bx + c$,
  • choosing $(a, b)$ as the stationary point and a scaling factor $c$ (again, by any / several of the methods above) and writing $c(x - a)^2 + b$,
  • choosing $f(0)$, $f(1)$, $f(2)$ randomly and using the unique quadratic that goes through all three (of course, you could replace $0$, $1$, $2$ with any other three real numbers),
  • choosing $f(0)$, $f'(0)$, and $f''(0)$ randomly, and picking the quadratic that has those values (which is admittedly very similar to the first method, but not quite),
  • ... I could go on.

All of these are plausible interpretations of "a random quadratic", depending on where the randomness is coming from. They will all (in general) produce different answers to questions like these.

(And note that for the same reasons as before, you can't have any way of picking random quadratics that is "translation-invariant" in the sense that $f(x)$ and $f(x - a)$ are equally likely, or $f(x)$ and $f(x) + b$ are equally likely.)

Now you could ask for your particular way of choosing a random quadratic, why the probability of having no x-intercepts is what you found it out to be. I think another of this question's answers points you in the right direction for that.

Solution 2:

It's helpful to think of each quadratic polynomial as corresponding to a point in "coefficient space", an abstract 3D space whose coordinates are $(a,b,c)$. The question "What fraction of quadratic polynomials have no $x$-intercept?" can then be rephrased as "What fraction of coefficient space lies in the region $b^2 < 4 a c$?"

The problem is, of course, that this "coefficient space" has an infinite volume: $a$, $b$, or $c$ can be arbitrarily large. What's more, the region of coefficient space corresponding to polynomials without intercepts is also infinitely large: for any polynomial without an $x$-intercept, you can multiply it by any real number and get another polynomial without an $x$-intercept. And if mathematics has taught us anything, it's that if we try to divide ∞ by ∞ we cannot expect a meaningful result.

You can, however, place bounds on the values of $a$, $b$, and $c$, so that these volumes of "coefficient space" are finite. In your code, you picked the quantities $(a, b, c)$ with uniform probability from the range $(-10^5, 10^5)$. This corresponds to the region of coefficient space below:

enter image description here

Mathematica (which I used to make this plot), tells me that the fraction of this cube that is filled is $$ \frac{31 - 6 \ln 2}{72} = 0.3727932905... \neq \frac{3}{8}. $$ So the ratio you found "experimentally" is not actually equal to 3/8, but it's pretty close.

On the other hand, you could have also decided to pick all your coefficients such that $a^2 + b^2 + c^2 < (10^5)^2$. This would correspond to allowing $a$, $b$, and $c$ to lie in some spherical region of "coefficient space". Spheres are nice, right? Everybody likes spheres.

enter image description here

The fraction of this region out of the allowed spherical volume in coefficient space is (again, relying on Mathematica) is only about 0.3514..., noticeably less than 3/8. The region of coefficients you allow, and how you parametrize them, turns out to make a difference in what your final answer is (which is what some of the other answers are trying to point out.)