octane levels

ok guys, ive been following some of these threads here and keep seeing octane and compression ratio. my Q is how do you know what octane gas will work with say, 10-1 compression. is there some formula or is this just common knowledge?
also i understand that you can bump up 1 point with aluminum heads?
thanx sb