according to official Android Beacon Library documentation at https://altbeacon.github.io/android-beacon-library/distance_vs_time.html - the averaging time is adjustable, however I found it impossible (so far) to change the variation from 20 seconds (default) to 5 seconds, using code provided:
BeaconManager beaconManager = BeaconManager.getInstanceForApplication(getApplicationContext());
This is supposed to work, but it looks like there may be a bug. Try calling:
And see if that works for you.