Why does carbon dioxide not sink in air if other dense gases do? Why does carbon dioxide not sink in air if other dense gases do?
We evidently do not suffocate by carbon dioxide sinking to the bottom of the atmosphere and displacing oxygen and yet there are gases that do sink.  This is commonly a problem in coal mines. Lower layers can fill up with gas that is unbreathable.
Here is a demonstration showing a 'boat' floating on sulphur hexafluoride.
Question
Given a mixture of two mutually non-reactive gases, what property determines whether the denser gas sinks to the bottom?
 A: Gases are all miscible. If initially separate and adjacent, they do not mix instantly, but once mixed (a process that occurs by molecular diffusion and is accelerated by macroscopic stirring or convection, just as for liquids), they do not spontaneously unmix.
During the time before substantial mixing occurs, gases behave somewhat like you may be picturing for immiscible liquids, e.g., water settling below oil. If a heavy gas is introduced into an environment in a pure or somewhat pure form (from some kind of reservoir), it will initially sink and displace lighter gases. This is a real danger with suddenly introduced carbon dioxide, but not with the carbon dioxide that has been in the atmosphere a long time.
In the mixed gas phase, the composition varies with height due to gravitational potential energy of different molecules, but all components are present at all heights, and on human scales the variation is small. In equilibrium, the vertical distance over which the density of a given gas changes substantially is termed the scale height, and is ~8 km for nitrogen, ~7 km for oxygen, and ~5 km for carbon dioxide (in Earth conditions). Even for sulfur hexafluoride it is ~1.5 km. As you go down, all components gradually become denser, the heaviest ones the fastest.
Moreover, as noted in a comment, the outdoor atmosphere is not in equilibrium but has a lot of turbulent motion, so even these gradual variations in composition that might be seen in controlled conditions are washed out in natural conditions.
A: The answers so far all seem to have overlooked the most obvious reason: heavier gasses don't generally settle to the bottom of the atmosphere because the atmosphere is continually being stirred.  It's that thing called weather.
Even inside closed rooms, you have temperature gradients, people moving around, HVAC systems designed to keep the air mixed.  Maybe if you could create an enclosure without such things, you could measure a concentration gradient, but I doubt that many such exist in real life.
Though such things do happen.  When a heavier gas like CO2 is released in a low spot, it does take some time to mix with the rest of the atmosphere.  See for instance the Lake Nyos disaster: https://en.wikipedia.org/wiki/Lake_Nyos_disaster
A: $\mathrm{CO}_2$ does sink in air if it's suitably pure. In particular, you can take a flask of $\mathrm{CO}_2$ and pour it out like a liquid onto something burning, like a candle, and you can watch it smother it.
So why then doesn't the ambient $\mathrm{CO}_2$ all sink? The answer is in the "suitably pure" bit above. You see, $\mathrm{CO}_2$, like any gas in a gas-gas mix, will undergo diffusion as its molecules, bumping around due to their thermal motion, manage to bump their way through and in between molecules of other gases like nitrogen and oxygen that are the dominant constituents of Earth's air. As a result, over time, a $\mathrm{CO}_2$ blanket resting on the ground will slowly expand upwards, becoming mixed with other gases, until eventually it dissolves into the rest of the air. Moreover, once the mixing dilutes it enough that its density is no longer higher than the other gases, it will then rise as expected, rapidly concluding the mixing process as turbulence forms and finishes it off.
Ambient $\mathrm{CO}_2$, then, is in effect, already in its "maximally dissolved" state, so at an approximate equilibrium (modulo factors, such as the incessant pumping of it by manmade factories and power plants, and other fires, but the significance of these depends on the timescale in question). Thus it doesn't just come out of the air.
A: Dense gases can and do sink but two factors prevent that in the atmosphere
Carbon dioxide an other dense gases and vapours do sink. This is the cause of many industrial accidents where vessels fill with some inert gas (carbon dioxide or methylene chloride vapour have killed people entering closed vessels without care and attention, for example and volcanic lakes suddenly emitting carbon dioxide have cause major natural disasters). But this does not happen in the open atmosphere to any large extent.
There are two reasons why the atmosphere is well mixed: diffusion and turbulence.
Ideal gases (and, under normal circumstances, ideality is a good approximation for atmospheric constituents) gases are entirely miscible. One molecule doesn't know what other molecules are doing and there is no strong mechanism to separate them. Diffusion alone will, ultimately, mix the gaseous components in a vessel together thoroughly. But diffusion is slow which is why natural disasters like Lake Nyos can happen and industrial accidents can happen in closed vessels. On very large scales diffusion should compete with gravity to give a concentration gradient but this is not observed in the lower atmosphere and would never affect human-scale experiments.
The lower atmosphere sees another factor that mixes gases faster: weather. Turbulent mixing operates much faster than diffusion and is very obvious on any windy day. Turbulent mixing dominates the lower atmosphere to the extent that it is a major topic of human conversation in some countries. The atmosphere is like a very large vessel that is strongly stirred, thoroughly mixing its components. This mixing force is far stronger than gravity.
If diffusion and gravity were the only factors, we would see a concentration gradient on large scales with denser gases being less common on top of tall mountains. But we don't see that effect in the lower atmosphere because turbulence is far more important. The air composition at the top of Everest is the same as at sea level (apart from being a lot less dense).
So the intuition that dense gases should separate due to gravity is correct but that effect is dominated by diffusion and turbulence. On a planetary scale there is some separation due to gravity but this effect is small and not notable even on top of the tallest mountain. On a human scale you can beat both effects with careful experiments (like filling a vessel with sulfur hexafluoride). But only under conditions where the air is still and, even then, diffusion will eventually mix the heavy gas with the air in the room, though slowly.
A: Because the strict separation of gases occurs only if initially we have them in their pure form. Then due to density difference of pure gas fluids, the denser falls down (buoyant force isn't strong enough to keep it at fixed height).
If the gas column was isolated and kept at constant temperature, each individual gas species in it would eventually distribute along the whole column, with number density (concentration) decreasing with height $h$, according to function
$$
c(h) =c_0 e^{-\frac{mgh}{kT}}\tag{*}
$$
where $m$ is mass of the molecule. This follows from the law of Boltzmann probability distribution: probability of state having energy $E$ is proportional to $e^{-\frac{E}{kT}}$.
Sharp separation of molecular-scale mixture into pure fluids does not happen. Eventually some lighter gases will reach even the greatest depth of the heavier gas and at each height some constant mixture proportion is established.
Molecular nitrogen has mass 28, while oxygen has mass 32, so (*) predicts that in equilibrium, oxygen density is varying more on the ground than the nitrogen density. So it is the oxygen that tends to "stay lower".
A: [edit] As stated in other answers gases in equilibrium are fully mixed by diffusion. The driving force for segregation or mixing, which in liquids is the difference in interaction between like and unlike molecules, is absent. In a gas, molecules only collide and do not stick together. For molecules with different weight in a gravitational field there just will be a different height profile. This is also why molecules heavier than air such cfk's are able to reach the ozone layer. Away from equilibrium gases can be segregated. Such segregation can be enhanced by gravity for gases of very different weight.
N$_2$ and O$_2$ have a mass of 28 and 32 a.u. respectively. At room temperature and in unstable atmospheric conditions this difference is too small for gravitational segregation. The same is true for CO (28 a.u.). CO$_2$ however weighs 44 a.u. and can replace air in stagnant conditions, such as in mines and wells. Besides that, I know of only one fatal incident, when a supersaturated crater lake in Cameroon suddenly released a large amount of CO$_2$. SF$_6$ is quite heavy weighs 140 a.u. so it stays gravitationally segregated for longer. In poorly ventilated places radioactive radon (222 and 220 a.u.) emerging from concrete, poses a risk.
A: Something that the other answers seem to be getting at, but don't explicitly state, is that there is not a sharp separation between "gasses that mix" and "gasses that don't mix". If one gas is one hundred times as dense as the other, there will very little mixture. If one is 1% denser, there will be a lot of mixture. If we could continuously vary the ratio from 1.01 to 100, the amount of mixture would continuously vary from "a lot" to "very little". And it varies exponentially, so the amount of mixture for a ratio of 2 is a lot more than twice the mixture for a ratio of 4.
Also, if we do some dimensional analysis on the sea level pressure of 101,325 N/m^2, we can substitute in N = kg m/s^2 and get 101,325 kg/(m s^2). Divide by the gravitational acceleration and we get a bit more than 10,000 kg/m^2. Divide by the density of air at STP and we get about 10 km. Multiply by the fraction of atmosphere that is CO2 and we get 4m. So very roughly speaking (I did a lot of rounding and swept some complications under the rug), there's only four meter's worth of carbon dioxide in the atmosphere. You would need nearly half of that to be at the ground for a standing adult of average height to be asphyxiated.
