Gravity effects on molecular gases are generally weaker than solar wind. Solar wind is what abraded mars atmosphere until most of the O2 was gone, leaving more of the heavier and unbreathable combinations. Ozone is a molecule of three oxygen atoms bound together. ozone affects UV penetration. We are concerned with the infrared of heat range of the spectrum. The gases that affect temperature range on a planet are things like carbon dioxide, methane, water vapor and perhaps a few others. Don't get me wrong ozone is important but ozone will form naturally provided the atmosphere has enough normal oxygen and water. Lightning, other electrostatic forces and radiation will convert it. Our ozone layer will replenish itself within 50 years if left alone by man.
Because of Mars' weak gravity, the solar pressure and impacts were enough to force the lighter molecules out of Mars' atmosphere. That is why we need more planetary mass than Mars.