When I filled the car in Stanley, Idaho, the Chevron choices were 85,87 or 89 octane. the elevation at Stanley is 6400 ft, so the actual air density is about 80% of sea level. Sea level is 14.7 PSI, the pressure at 6000 ft is 11.78 PSI. At altitude, you can back off the octane rating since the pressure in the cylinder is less than at sea level. The compression ratio stays the same, but the actual cylinder pressure decreases since the air is less dense. Since the pressure isn't as high in the cylinder, the propensity for pinging isn't as high.
As a rough rule of thumb, the barometric pressure decreases about 1 inch of Mercury for every 1000 feet of elevation. When the weather service gives you the current barometer reading, it is corrected for the altitude of the reporting station.