In this paper we introduce recent mathematical tools for shape description called size functions. Some features of these descriptors such as robustness with respect to noise are pointed out. A first attempt to join the theory of size functions with randomness and to develop the related statistical analysis is then presented. The resulting procedure is applied to some specific problems which arise in microlithography of electronic devices.