$$\require{cancel}$$

The enormous range in the luminosity of stars has several important consequences. High-luminosity stars can be seen out to larger distances than low-luminosity stars. If you did a survey of all stars in a volume of space, you might find that luminous stars are rare. However, because luminous stars can be seen to larger distances and therefore over larger volumes, they get over-represented in surveys down to a fixed brightness limit. Thus the apparently brightest stars in the night sky are giants and super giants, while the closest stars are main sequence stars or dwarfs.

Hertzsprung-Russell diagram showing color and size of stars. Click here for original source URL.

The main sequence lifetime is given by the amount of fuel divided by the rate at which fuel is consumed. Let's do this calculation for the Sun. The Sun consumes 2 × 1019 kilograms of hydrogen per year. If a star has luminosity L in solar units, the rate of fuel consumption is 2 × 1019 L. What about the amount of fuel that is available? The mass of the Sun is 2 × 1030 kilograms, but not all of that mass is available as nuclear fuel. Fusion can only occur in the hot core that contains 10% of the Sun's mass, so the available fuel is 0.1 × 2 × 1030 = 2 × 1029 kilograms. If a star has mass M in solar units, the available fuel is 2 × 1029 M. Now divide to get the lifetime:

t = (2 × 1029 M) / (2 × 1019 L) = 1010 (M/L) years

For the Sun, since M = 1 and L = 1, we get 10 billion years. For a star like Algol, with a mass of 4 solar masses and a 100 times solar luminosity, the main sequence lifetime is 1010(4/100) = 4 x 108 years. A star with a mass of 10 M and a luminosity of 105 times solar luminosity has a main sequence lifetime of 1010 (10/105) = 106 years. Massive stars have much shorter lifetimes than the Sun. We have made some approximations in this calculation, so the answers will only be accurate to about a factor of two.

The main sequence is in fact a sequence of mass, and high-mass stars use their nuclear fuel at a much faster rate than low-mass stars. The relationship between mass and luminosity on the main sequence (in solar units) is L = M3.5. Therefore, a main sequence star with mass 20 times the Sun is 203.5 = 36,000 times more luminous than the Sun, and a star 0.5 times the mass of the Sun is 0.52.5 = 0.088 times the luminosity of the Sun. Since stellar evolution is driven by the mass of a star, it makes sense to substitute for luminosity in the equation above:

t = 1010 (M/L) = 1010 (M/M3.5) = 1010 / M2.5 years

To use the same two examples from above, the main sequence lifetime of a 20 solar mass star is 1010 / 202.5 = 6 × 106, or 6 million years, and the main sequence lifetime of a 0.5 solar mass star is 1010 / 0.52.5 = 5.7 × 1010, or 57 billion years. Since the universe is less than 57 billion years old, no star with half the mass of the Sun has ever left the main sequence.

The time stars spend in the different evolutionary stages varies greatly. For example, a star like the Sun took about 30 million years to reach the main sequence, and it will spend a total of about 9 billion years on the main sequence. Subsequently, the Sun will spend perhaps a billion years as a red giant and then a very long time cooling as a white dwarf. A star ten times the mass of the Sun will spend 10 million years on the main sequence and only a few weeks in the extremely bright state that follows a supernova explosion. For stars of any mass, the late stages of stellar evolution are a crescendo of activity after the steady energy production of the main sequence phase.

Color-magnitude diagram of the globular cluster M55. Click here for original source URL.

Suppose stars were being born all around us continuously. You could look around and find stars in middle age and near death too. But the fraction of stars you saw in each evolutionary phase would equal the fraction of its lifetime spent in that stage — think of the analogous situation of how many babies, children, adults and seniors you would find in the survey of an average city. So rare phases like star birth and death are observed much less frequently than middle age on the main sequence.

If each star like the Sun spent 1% of its main sequence lifetime in a planetary nebula stage (after it finished its red giant stage), astronomers would need to survey 1/0.01 = 100 such stars to expect to find just one in the rare planetary nebula stage. By a similar reasoning, they would need to survey a volume with millions of high-mass stars to expect to find one that had gone supernova. Of course, if we could just wait long enough, you could watch a 10 or 20 solar mass star until it evolved off the main sequence and exploded. But astronomers must make do with a frozen moment in the history of the universe. So the only way to see transient phases of evolution is to observe large enough samples of stars that statistically you expect to detect the rare parts of the life cycle. Again, an analogy with humans would be that in order to see one person who had just turned 21 years old, you could either wait until that event happened in one family, or go and look at hundreds of families and find a 21 year old more easily due to better statistics making that situation more probable.