Octane is a measurement of a gasoline's resistance to preignition or knock. Spark ignition engines rely on very precise ignition timing. Combustion occurs when the piston reaches TDC (Top Dead Center). Knock occurs when the fuel air mixture detonates by heat prior to TDC which is bad for the engine. Modern engines have knock sensors and will retard timing and other things to reduce knock. At high altitude the air is less dense and the higher octane isn't required because the computer also injects less fuel. All of this reduces the effective compression ratio of the engines thus reducing knock. The notable exception is turbocharged or supercharged engines that have above atmospheric intake pressure.
__________________
|