In Cardan's solution of the general cubic the expression D=81q2+12p3 behaves as a discriminant. If D>0, then there is one real root and a pair of complex conjugate roots. If D=0, there are 3 real roots, one of which is of multiplicity 2. If D<0, then there are 3 real roots and the equation is called an irreducible cubic because the roots cannot be found in closed form by algebraic means.
If the implicit expression D=0 is plotted (with q in the y direction and p in the x direction), the graph will have the shape of an right-pointing arrow with its tip at the origin and the graph will be symmetric about the x-axis. The probability of 3 real roots will be the probability that p and q fall inside the arrowhead.
For example if p and q are independent, i.e. f(p,q)=f1(p)*f2(q) and
f1(p)=1/(b-a) for p in the interval [a,b] and 0 elsewhere and
f2(q)=1/(d-c) for q in the interval [c,d] and 0 elsewhere, then the required probability will be the fraction of the area of the rectangle with diagonal endpoints (a,c) and (b,d) which lies within the arrowhead.