>So if a battery is 200 mAh and takes 20mA >while running, the battery will last 10 >hours?
Yes, well sort of, the problem is as the battery dies it will drop the voltage and then the load (led) will draw less power. So say you start at 20mA, when the battery is half empty (100mA left in the battery) you will probably be drawing about 15mA, and half of that (50mA left) you might be drawing 10mA. I believe this is how you get those really long run times on some LED lights.
Also you can check the voltage of the battery under load. 4 AA in series will supply 6v at 2750 mA. While 2 2016's lithium coin cells will produce 6v at 80mA. Now put them both under load, say a single 5600mcd white and the AA will drop to 5.9v supplying 200mA and the lithium's will drop to 4.5v and supply about 50mA. This is due to the internal resistance of each battery. Every battery type is different and has different characteristics.
So this is why I usually tell people it is more important to watch the mA draw rather than the voltage. Really both are important, but I can tell you if you have 50mA at the LED you have 4.5v. Of course the reverse is true also. If you have 4.5v at the LED you will also have 50mA. The thing is you can't rely on the battery itself for the voltage in your circuit. It's voltage will change a lot depending on load and how dead the battery is.
Now every LED has a different voltage / mA draw, but once you know what it is you are set. The best thing to really do is measure both under load and then you know for sure.
Hope this helps
Brock