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

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.


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.)


There are infinitely many quadratics, so the number you get in the end is completely up to how "sample" from the set of all possible curves. For example, if you sample $a\in[1,2]$, and $c\in[-2, -1]$, then all the curves will have a real intercept. On the other hand, if $a,c\in [1,2]$ and $b\in[-1,1]$, then none of the curves will have a real intercept.

Edit:

Now that you said that $a,b,c$ are all uniformly distributed on $[-n, n]$, your problem translates to this:

  • Each selection of $(a,b,c)$ is one point in the cube $C=(-n, n)\times(-n, n)\times(-n,n)$.
  • Each selection is equally likely.
  • Therefore, you are really asking about the volume of the set $\{(a,b,c)\in\mathbb C| b^2-4ac \geq 0\}$. Once you get that volume, the ration of that volume to the volume of $C$ is what you need.