In [G. Bouchitte and D. Felbacq, C. R. Math. Acad. Sci. Paris 339 (2004) 377-382; D. Felbacq and G. Bouchitte, Phys. Rev. Lett. 94 (2005) 183902; D. Felbacq and G. Bouchitte, New J. Phys. 7 (2005) 159], a theory for artificial magnetism in two-dimensional photonic crystals has been developed for large wavelength using homogenization techniques. In this paper we pursue this approach within a rigorous stochastic framework: dielectric parallel nanorods are randomly disposed, each of them having, up to a large scaling factor, a random permittivity epsilon(omega omega) whose law is represented by a density on a window Delta h = [a(-), a(+)] x [0, h] of the complex plane. We give precise conditions on the initial probability law (permittivity, radius and position of the rods) under which the homogenization process can be performed leading to a deterministic dispersion law for the effective permeability with possibly negative real part. Subsequently a limit analysis h -> 0, accounting a density law of e which concentrates on the real axis, reveals singular behavior due to the presence of resonances in the microstructure.