Statistics for Efficient Computation with Sparse and Dense Polynomials