Pinning of dislocations at nanosized obstacles like precipitates, voids and bubbles, is a crucial mechanism in the context of phenomena like hardening and creep. The interaction between such an obstacle and a dislocation is often explored at fundamental level by means of analytical tools, atomistic simulations and finite element methods. Nevertheless, the information extracted from such studies has not been utilized to its maximum extent on account of insufficient information about the underlying statistics of this process comprising a large number of dislocations and obstacles in a system. Here we propose a new statistical approach, where the statistics of pinning of dislocations by idealized spherical obstacles is explored by taking into account the generalized size-distribution of the obstacles along with the dislocation density within a three-dimensional framework. The application of this approach, in combination with the knowledge of fundamental dislocation-obstacle interactions, has successfully been demonstrated for dislocation pinning at nanovoids in neutron irradiated type 316-stainless steel in regard to both conservative and non-conservative motions of dislocations.