Lights comes on sometimes before it even gets to an "Empty", usually when you have about 2-3 gallons left in the tank, as for miles remaining on your fuel info, it most likely will say about 20-40 miles remaining, even thought your it says your have 20-40 miles remaining and your fuel arrow is not on "Empty" yet, your light will come on, most likely because it knows that you have 2-3 gallons left in the tank.
Also, every gas station has different level of fuel top off, on the other hand, its also important if you parked on the flat surface to get accurate fill up, than on little bit inclined surface. I have noticed whenever i parked on inclined surface most of the time i fill up more than i usually do for miles i drive, or less than i usually fill up. So, for the most accurate self MPG i would got to the same gas station and the same pump at least 4-5 times, and coprate it to your current MPG you get on your Fuel info. I have been going to the same Shell station for the past couple of months, and the same pump for the past a month, and i get pretty accurate reading unless i drive beyond "EMPTY" and when my fuel info miles remaining was "0" after 25-30 miles driven, where as i know i should have 1-1.5 gallons left in the tank, but when i filled up i realized that for some strange reason i filled 12.5 gallons, where i should have had 13-13.5, anyways, if you do it right and compare u will know that your fuel infor i accurate. Oh, yes, when you fill up i realized that most of the time your miles remaining when "full" is usually 370-390 miles on ("S" model) is based on 12-12.5 gallons not your full tank.