Statistical hysteresis model for anisotropic and isotropic magnetic materials