How accurate are the mph on a Garmin.

Lets say I ride for 1 hour with a number of hills & one stop for 10mins. My average mph is 13mph.

Does the Garmin simply do an average on the lowest & highest speed?

Or

Does the Garmin calculate how much time is spent at every speed and then do an average?

Also what’s a decent mph on a road bike but riding loads of hills (west Lancashire – Haslington, Accrington, Rossendale, Rivington, Belmont, Edenfield etc)