The light from distant stars and more distant galaxies is not featureless, but has distinct spectral features characteristic of the atoms in the gases around the stars. When these spectra are examined, they are found to be shifted toward the red end of the spectrum. This shift is apparently a Doppler shift and indicates that essentially all of the galaxies are moving away from us. Using the results from the nearer ones, it becomes evident that the more distant galaxies are moving away from us faster. This is the kind of result one would expect for an expanding universe.
The building up of methods for measuring distance to stars and galaxies led Hubble to the fact that the red shift (recession speed) is proportional to distance. If this proportionality (called Hubble's Law) holds true, it can be used as a distance measuring tool itself.
The measured red shifts are usually stated in terms of a z parameter. The largest measured z values are associated with the quasars.