A criterion for selection of length of record for a moving arithmetic mean for hydrologic data