A star inherits the gas-phase metallicity at its birth. Set ; the preceding calculation gives and . If the initial mass function is fixed, let be the number of the counted stars per unit formed stellar mass; this includes any restriction to surviving long-lived tracers. The metallicity distribution in a leaky box is therefore
The total eventual formed stellar mass is , so and the equivalent normalized metallicity distribution function is
If means a cumulative count rather than a count per stellar metallicity interval, integration yields
At a finite observation time these expressions end at the current gas-phase metallicity and the normalized distribution divides by . A distribution per logarithmic stellar metallicity instead multiplies by ; it is not the same shape as the distribution per linear stellar metallicity.
Assume the stellar yield is common to the compared stellar populations and compare their mass-weighted stellar metallicities. Inverting the metallicity distribution in a leaky box result gives
For example, with , a solar-metallicity massive elliptical galaxy requires , whereas in a dwarf galaxy requires . A supersolar stellar metallicity requires a correspondingly supersolar stellar yield: outflow alone cannot raise above . If , a massive elliptical galaxy with between and has , while the same low-metallicity dwarf galaxy needs .
For a yield of order solar, the required mass loading runs from order zero or unity in massive spheroids to order one hundred or more in faint dwarfs. Without a specified stellar yield, the robust comparison is
This explains the sense of the galaxy mass--metallicity relation; galactic gas inflow, incomplete depletion, and changes in the initial mass function can also change observed stellar metallicity.