interval mean calculation