According to Hubble, and as verified by many astronomers, a galaxy is receding from us at a speed proportional to its distance. The relationship between speed and distance would be exact in absence of other effects.

In the real Universe, a galaxy is not alone, but it is typically found in a group or a cluster, ranging in size from less than a dozen to several thousands. All these nearby galaxies have a gravitational effect, to the point that the original galaxy can have a velocity of over 1,000 km/s in an apparently random direction. This velocity will therefore add, or subtract, from the radial velocity that one would expect from Hubble's law.

The main consequence is that, in determining the distance of a single galaxy, a possible error must be assumed. This error is smaller, in relative terms, as the distance increase.

A more accurate estimate can be done taking the average velocity of a group of galaxies: the peculiar velocities, assumed essentially random, will cancel each other, leaving a much more accurate measurement.