added sampling in stats filter

In the accumulator it divides by sample and it defaults to 0.
This produces unexpected results.