Simple average calculating formula 1.{% set totalDeliveryTime = 0 %}
2.{% set countDeliveries = 0 %}
3.{% set averageDeliveryTime = 0 %}    
4.{% for order in pastOrders %}
5. to--{{order.orderDeliveryTime}}--
6.{% set totalDeliveryTime = totalDeliveryTime + order.orderDeliveryTime %}
7.  td--{{totalDeliveryTime}}
8.{% set countDeliveries = countDeliveries + 1 %}
9.  tc--{{countDeliveries}}
10.{% endfor %}
11.  result--{{ totalDeliveryTime / countDeliveries }}


Result:
to--15--
td--1
tc--1 

to--30--
td--2
tc--2

to--60--
td--3
tc--3

to--60--
td--4
tc--4

result--1

Its a simple average calculating formula. I want to add my all 'orderDeliveryTime' in 'totalDeliveryTime' through line 6. As in line 5, it returns correct values of orderDeliveryTime which is in 'to' you can see in Result but when we add in totalDeliveryTime through line 6 it return 'td' values (please look 'td' in Result). I think it should 15+30+60+60 (addition of all orderDeliveryTime).

Beside this I also used 

{% set ratingsSum = 0 %}
{% if pastOrders | length %}
{% for order in pastOrders %}
{% set ratingsSum = ratingsSum + order.orderDeliveryTime %}
{% endfor %}
{% set ratingAverage = ratingsSum / pastOrders | length %}
AverageTime:{{ratingAverage}}
{% endif %}


https://cliveportman.co.uk/code/calculate-average-of-numbers-in-craft-cms-using-twig
But it also returns the same result which is 1.
You can try the following code

{% set ratingsSum = 0 %}
{% for order in pastOrders %}
    {% set ratingsSum = ratingsSum + order.orderDeliveryTime.value %}
{% endfor %}

{% set ratingAverage = ratingsSum / pastOrders | length %}
AverageTime:{{ratingAverage}}


Difference between yours and my code is i have added .value with order.orderDeliveryTime