I think it does like rootSU said - it goes in, checks the voltage, and if you, at this moment are pushing your phone, the voltage is dropping, so it makes a prediction and you get a drop in % of battery. When you stop using your phone so heavy, the voltage raises a bit, because the battery is not so heavily used, the phone checks voltage, it's more than before, so you get a percent or two. I'd say it's not just a statistic, the battery, when heavily used, drops in voltage, but when you offload it, it recovers some ammount, witch means you gain some battery life. And if someone wants to know why it's like that, think of what happens when you plug in something with a high wattage use in your home - the lights dimm a little bit, because the bigger load, requires more power, meaning voltage and amps, so, the voltage drops. When you unplug it, voltage goes up. It's the same thing.
Current phone: LG Nexus 5
franco r6x, SlimKat Weekly ROM | Old: Samsung Nexus S 9020T | Samsung Galaxy S3 I9300 /sold/
Calibration Charts for color profiles, found in franco's kernel