Probability for roots of quadratic equation to be real, with coefficients being dice rolls.

I really need help with this question.

The coefficients $a,b,c$ of the quadratic equation $ax^2+bx+c=0$ are determined by throwing $3$ dice and reading off the value shown on the uppermost face of each die, so that the first die gives $a$, the second $b$ and and third $c$. Find the probabilities that the roots the equations are real, complex and equal.

I was thinking about using the fundamental formula but i'm not sure how to go about doing it. Help would be greatly appreciated.


The formula for the roots is $$ x = \frac{ -b \pm\sqrt{b^2 - 4ac}}{2a}. $$ The real/complex dependence of the roots of the coefficients therefore only depends on $b^2 - 4ac$. Now since $1 \le a,b,c \le 6$ and that those are integers, there are not many possibilities for this to equal zero. By inspection,

  • $1 - 4ac \ge 0$ means $\frac 14 \ge ac$, which is impossible, hence we have $36$ complex-root-cases

  • $4 - 4ac \ge 0$ means $1 \ge ac$, which means $a=c=1$, hence $(1,2,1)$ is one equal-root-case (and real), or the other $35$ cases are complex

  • $9 - 4ac \ge 0$ means $\frac 94 \ge ac$, so that equality is impossible, but we can have $ac = 1$ and $ac=2$ to satisfy this inequality, hence there are three real-roots-cases here ($(1,3,1)$, $(1,3,2)$, $(2,3,1)$) and $33$ other complex-roots-cases

  • $16- 4ac \ge 0$ means $ac \le 4$, hence $(4,4,1)$, $(2,4,2)$ and $(1,2,4)$ are 3 equal-root-cases, the number of ways to get $ac \le 4$ (if you count them, you get 11, 12, 13, 14, 21, 22, 31, 41, so there are $8$) is the number of real-root-cases, and the rest ($28$ cases) are complex

  • $25- 4ac \ge 0$ means $\frac {25}4 \ge ac$, thus equality is impossible, but the number of ways to get $ac \le 6$ is $14$ (11,12,13,14,15,16, 21, 22, 23, 31, 32, 41, 51, 61 are the $14$ cases) hence the $22$ other cases are complex-roots-cases and those $14$ are real-root-cases

  • $36- 4ac \ge 0$ means $ac \le 9$, hence $(3,6,3)$ is one equal-root-case and the real root cases are those with $ac \le 9$, hence giving the $15$ cases as for $ac \le 6$, plus the 3 cases 24, 33 and 42, for a total of $17$ real root-cases and $19$ complex-root-cases. To sum it up,

    • $b=1$ : $0$ equal, $0$ real, $36$ complex
    • $b=2$ : $1$ equal, $1$ real, $35$ complex
    • $b=3$ : $0$ equal, $3$ real, $33$ complex
    • $b=4$ : $3$ equal, $8$ real, $28$ complex
    • $b=5$ : $0$ equal, $14$ real, $22$ complex
    • $b=6$ : $1$ equal, $17$ real, $19$ complex.

Therefore the probability that the roots are equal is $\frac{5}{6^3} = \frac 5{216}$, the probability that the roots are real is $\frac{1+3+8+14+17}{6^3} = \frac{43}{216}$ and the probability that the roots are complex is $\frac{36+35+33+28+22+19}{6^3} = \frac{173}{216}$.

Hope that helps,


The value of the discriminant $b^2−4ac$ tells you which of the three cases, with regards to the roots, you are in. I'm assuming your three cases are: complex non-real roots, real distinct roots, and a real repeated root.

For instance, there are distinct real roots if and only if $b^2−4ac>0$. So, to find the probability that the roots are distinct and real, first find the number of outcomes in which the square of the second roll exceeds 4 times the product of the first and last rolls.

Let's do this. Assuming the dies are all six-sided, computing the number of such outcomes will be easy if you consider the value of the second roll:

If the second roll is 1 or 2 this can't happen (keep in mind we want $b^2>4ac$).

If the second roll is 3, there are exactly three outcomes: first roll 1, third 1 ($9>4\cdot1\cdot1$); first roll 2, third 1 ($9>4\cdot2\cdot1$); and first roll 1, third 2 ($9>4\cdot1\cdot2$).

I'll leave the rest for you...

The point is you can, with a bit of effort, find the number of outcomes for which the roots will be distinct and real. You just need to enumerate them so that you find them all.

Now, if the number of outcomes where the roots are distinct and real is $m$, then the probability that the roots are distinct and real is $m\cdot(1/6^3)$.

That's one case. Now do easy case (with regards to counting outcomes): the probability that the roots are the same is the probability that the square of the second roll is equal to four times the product of the other two rolls (the roots are equal if and only if $b^2=4ac $). Find the number of outcomes for which this happens and multiply by $1/6^3 $.

The last case you can compute more easily. Just sum the two previous probabilities and subtract from 1 (one of the three cases has to happen and the three cases are mutually exclusive).