Your average speed is time averaged. You spend much more time going up then coming down. Hills will always lower your average speed.
How much? Depends on the size and number of hills. I have two routes one with hills and one that is relatively flat of roughly the same length. My average speed on the hill route is consistently 3 mph less then flat. And the hill course is more taxing then the flat course.
Someday I hope to be able to maintain my speed up those hills but not right now....