To ride along at an average of 12 mph takes about 150 watts of power.
1. Rider puts in 100W, battery puts in 50W = 150W
2. Rider puts in 50W, battery puts in 100W = 150W.
Both situations go exactly the same speed with the same power, but the battery on the first one will last twice as long as the second. 50W is typical of what an unfit person would sustain. 150w is what a regular cyclist would sustain.
You can extrapolate that further:
3. Rider puts in 150W, battery puts in 0W = 150W
4. Rider puts in 0W, battery puts in 150W = 150W.
if you had a 300Wh battery the ranges would be:
1. 6 hours 72 miles
2. 3 hrs 36 miles
3. Infinite
4. 2 hours 24 miles
All those differences are for the same rider, on the same rides on the same bike with the same conditions.
Now add different hills, rider weight, wind, etc. and you can see why there's so much difference.
The only thing you need to understand is that the more watt-hours you have in the battery, the further you'll go. There's very little difference between any bikes, except that light thin bikes will be more efficient than heavy wide MTB-types with fat knobbly tyres.