Quadratic generator statistics

— 1 minute read

Set-up permalink

Suppose $a,b,c \in \mathbb{Z}$, $-9 \leq a,b,c \leq 9$ and $a \neq 0$, how are the roots of the quadratic equation $$ ax^2 + bx + c = 0 $$ distributed (assuming a uniform distribution).

Results permalink

-Rational rootsIrrational real rootsComplex roots
Probability0.1610.4610.378

A quick analysis will also show that the discriminant ranges from -324 to 405, and there are a total of 6498 unique quadratic equations.

5538 of them are such that $\gcd(a,b,c) = 1$.