  Relying on the classical second moment formula of Rogers we give an effective
asymptotic formula for the number of integer vectors $v$ in a ball of radius
$t$, with value $Q(v)$ in a shrinking interval of size $t^{-\kappa}$, that is
valid for almost all indefinite quadratic forms in $n$ variables for any
$\kappa<n-2$. This implies in particular, the existence of such integer
solutions establishing the prediction made by Ghosh Gorodnik and Nevo. We also
obtain similar results for random polynomials of higher degree.
