The cavitation of solid elastic spheres is a classical problem of continuum mechanics. Here, we study this problem within the context of "stochastic elasticity" where the constitutive parameters are characterised by probability density functions. We consider homogeneous spheres of stochastic neo-Hookean material, composites with two concentric stochastic neo-Hookean phases, and inhomogeneous spheres of locally neo-Hookean material with a radially varying parameter. In all cases, we show that the material at the centre determines the critical load at which a spherical cavity forms there. However, while under dead-load traction, a supercritical bifurcation, with stable cavitation, is obtained in a static sphere of stochastic neo-Hookean material, for the composite and radially inhomogeneous spheres, a subcritical bifurcation, with snap cavitation, is also possible. For the dynamic spheres, oscillatory motions are produced under suitable dead-load traction, such that a cavity forms and expands to a maximum radius, then collapses again to zero periodically, but not under impulse traction. Under a surface impulse, a subcritical bifurcation is found in a static sphere of stochastic neo-Hookean material and also in an inhomogeneous sphere, whereas in composite spheres, supercritical bifurcations can occur as well. Given the non-deterministic material parameters, the results can be characterised in terms of probability distributions.