Good question. At dynos they have been calculating it for ages. It's a bit complicated. I use this site:
http://wahiduddin.net/calc/calc_hp_dp.htm
Diggin deeper than usual into the site, I find that the equation to determine power in an engine is, "according to SAE method J1349 Revised AUG2004" (all hail burocracy! It sounds as if you don't use it, the Feds will get you...).
Where:
cf = the dyno correction factor
Pd = the pressure of the dry air, mb
Tc = ambient temperature, deg C
This equation is valid only for 15 to 35 degrees celsius and pressures between 900 and 1050 mbars. What I see in it is that Pressure and HP are correlated directly. Temperature and HP go as an inverse square root.
In english, the lower you are, the more power you have and, also, the cooler the night, the more power, but not that much.
So, the fastest races in the world, are in a Finland beach in the middle of a winter night (avoiding the reno! wow!).
There are more tricks, I should have assumed (darn mechanical engineers!): relationship between Altitude and Pressure is quite complicated, because this is not your everyday pressure but the "mechanical engineers pressure".
Read here for more data. It gives you also a calculator of density, pressure, full of moles and bars and Torricellis and whatnot:
http://wahiduddin.net/calc/density_altitude.htm I confess I skipped that part.
Actually,
what you can really do is to go to this site to know the data you have to input
to get a real information on how much power your car actually gives you (you have to know the altitude of your city only).
http://weather.noaa.gov/international.html
Pick your country and beloved town from the lists you'll see and, armed with the figures you'll get, click on the first link I gave, enter the data and presto.
If I try to use 29.7 inches of mercury, a dewpoint of 15 degrees celsius, and 20 degrees celsius of temperature, kind of spring night, I get 100.8% of horsepower, in a cold night in Cartagena at a pleasant 0 meters over sea level. Nice motto: "Cartagena, more than 100%".
Now, at 2000 meters, in the outskirts of Bogotá, I get 75% of HP, keeping constant the other data.
At half way the altitude, at 1000 meters, in Cali, you get 87.5% of your engine. So, I'd say from these three points that power is roughly proportional to altitude.
So,
I happily conclude that both effects of altitude, drag and power, should cancel each other, assuming you're right in the thing of "drag proportional to density" and, rest assured, somehow you'll find that also you have to take in account a "mechanical engineers drag", which is not your ordinary drag.
OF COURSE,
I assume this relationship also depends on a freaking high number of other things, as that in Cali this night I am at a happy 25 degrees, while in Bogotá the night is at 12 degrees and people there are freezing their butts because dew point is 10 degrees, and it all depends on altitude, etc., etc., etc., but please, spare me the details.
I guess people here can tell you if you're marginally faster at an oval track in the Dead Sea or in a street course in Tibet, but I give up. I've learned enough and I do not discuss that kind of things if I don't have a rum bottle at hand.
As some of us reside in a rough country, probably other people could comment on the effects of altitude on engines. I can attest that driving a non injected underpowered car in this country is an exercise in self control, at more than 3000 meters.
And when I say self control, I mean self control. When I was young I had to walk through snow to go to school, young man.