At distances greater than 10 Mpc neither parallax nor spectroscopic parallax can be relied upon to measure the distance to a star. The essential difficulty is that when we iobserve the light from a star at these distances we do not kbow the difference between a bright source that is far away and a dimmer source that is closer. This is the principle problem in the experimental determination of astronomical distances to other galaxies.
When we another galaxy, all the stars in that galaxy are approximately the same distance from the |Earth. If we could locate in that galaxy a light source of known luminosity, we could determine the distance of the galaxy by comparing the apparent luminosity of that source with the luminosity it actually has. We need in fact, a 'standard candle' – a star of known luminosity. Cepheid variables are standard candles that can be used in this way.
A Cepheid variable is quite a rare type of star. It's outer layers undergo a periodic compression and contraction and this produced a periodic variation in luminosity.
The period of this variation is related to the absolute magnitude of the Cepheid variable, so we can deduce the luminosity by finding the period and then find the distance using alaw for example.
Example: A Cepheid variable has a period of 5.0 days and a maximum apparent magnitude of 8.0. Find the distance of the star from Earth.
Using the graph above, the absolute magnitude is -3.0
Alternatively, difference between apparent and absolute magnitude = 11