Consider quadratic equations $Ax^2 + Bx + C = 0$ in which $A$, $B$, and $C$ are independently distributed $\mathsf{Unif}(0,1)$. What is the probability that the roots of such an equation are real?
This problem is from Chapter 3 of Rice: Mathematical Statistics and Data Analysis (editions 1 through 3). Until recent printings of 3e, the incorrect answer 1/9 was given for this problem.
However, Horton (2015) http://www3.amherst.edu/~nhorton/precursors/precursors.pdf points out that the correct answer is slightly above 1/4, as can be verified by a simple simulation. (Horton and his colleagues are concerned with elements of an undergraduate curriculum to prepare students in the mathematical sciences to cope with modern data science.)
In a somewhat more practical setting, one might consider a discrete version of this problem. A program that produces random drill problems on quadratic equations $Ax^2 + Bx + C = 0,$ selects values for $A, B,$ and $C$ at random and independently from among the ten equally likely values $0.1, 0.2, \dots, 1.0$. What proportion of such equations have real roots? And what proportion have only one root?
The initial Answer sketches the exact analytic solution of the original problem and shows numerical and graphical results from simulation. A simulated result for the discrete version is also shown.
Additional answers using other methods or discussing related topics are welcome.
Sketch of analytic solution. An analytic solution is based on noting that the density of $Q = B^2$ is $f(q) = \frac{1}{2\sqrt{q}},$ for $q \in (0,1),$ the density of $X = 4AC$ is $g(x) = \frac{-\log(x/4)}{4},$ for $x \in (0,4).$
An appropriate double integration of the joint density $h(q, x) = f(q)g(x)$ gives $P(\text{Real Roots}) = P(Q > X) = \frac{5 + \log(64)}{36} = 0.254413.$ [Note: Details of the integration are shown in Horton (2015) referenced in the Question, and in a subsequent Answer.]
Simulation. A simulation based on a million simulated equations is shown below.
The following figure is based on 30,000 simulated equations. Histograms of simulated values of $Q$ and $X$ show the theoretical density curves. The brown lines in the scatterplot and histogram of values of the discriminant $D\,$ separate equations with real (blue) and complex solutions.
Alternate discrete version. The following simulation of the discrete version of the problem shows that a little over 20% of the computer generated quadratic equations have real roots.
The final result suggests that eight of the 1000 possible equations have only a single root. It is not difficult to see that the discriminant can be zero only if $B = .2, .4, .8,$ or $1.0$. From there, simple arithmetic shows that there are indeed eight possible combinations of values of $A$ and $C$ that produce $D = 0.$
A complete analytic solution to the discrete version would seem to involve some tedious bookkeeping, beginning with the ten possible values of $B^2.$ Perhaps there is a clever way to get an exact analytic solution using convolutions of discrete distributions in Matlab.