l1 l2 hi for in range len l1 hi l1 len l1 l2 len l2 l2 print hi

1
2
3
4
5
6
7
8
l1 = [3.5, 7. , 4. , 2.5, 1.8, 1. , 6. , 0.0, 1.1, 8.8, 4.1, 7.8, 2.6, 7. , 1.9, 0.4, 3.5, 0.3, 3.1, 5.2, 6.5, 3.1, 5.2, 7.1]
l2 = [3.2, 2.7, 5.0, 3.6, 5.5, 4.4, 2.4, 3.2, 1.8, 4.2, 5.8, 4.7, 5.0, 4.3, 3.1, 3.0, 5.9, 3.5, 3.2, 3.3, 5.0, 4.3, 5.0, 4.3]
hi = 0
for i in range(len(l1)):
hi += (l1[i]/len(l1) - l2[i]/len(l2))**2/l2[i]
print hi