Fix stats.mean() for empty sequences

Signed-off-by: Pekka Enberg <penberg@kernel.org>
Explain failure reason for empty sequences

Signed-off-by: Pekka Enberg <penberg@kernel.org>