In the SciPy stack, we have two means for determining probability: a symbolic setting and a numerical setting. In this brief section, we are going to compare both with a sequence of examples.
For the symbolic treatment of random variables, we employ the module
sympy.stats, while for the numerical treatment, we use the module
scipy.stats. In both cases, the goal is the same—the instantiation of any random variable, and the following three kinds of operations on them:
Let's observe several situations through the scope of the two different settings.