It's exactly 2. It's not so much about how we perceive them (well in the end it is I guess), but there is a real, physical relationship between the two notes.
It depends on the timbre, the frequency makeup, of the sound. If all frequencies present are integer multiples of the fundamental frequency, a 2:1 ratio will line up all the frequencies nicely, which "sounds right."
This frequency relationship is approximately true for many, but not all, acoustic instruments.
The mp3 at the above website called "Challenging the octave" gives an example of a bell that sounds more in tune when the "octave" is a frequency ratio of 2.1 vs the usual 2.
If you have any interest in music theory, even if you've already studied traditional western music theory, read Dr. Sethares' work on the subject: http://sethares.engr.wisc.edu/ttss.html (He was mentioned elsewhere in the comments, but he's too awesome to risk missing.)
The problem is that we use approximate with irrational numbers. Naturally they are all integer ratios.
In the perfect world you have e.g.:
+ C major scale: C D E F G A B C, where frequencies of all notes depend on frequency of note C (like, “fifth” from C is G and it's exactly 3/2 of C)
+ and D major: D E* F♯* G* A* B* C♯* … D (and depend likewise). But now G is not necessary equal to G*, but they are close. So here comes the idea of equal temperament where octaves are strictly 2:1 as they suppose to be, but all notes between are equally scattered (on log scale) in between.
So TL;DR: nowadays it's all approximation. You can do it perfectly, but only for one root.
Is this problem then because we start with integer ratios? Is this problem solvable if we started a "true(?)" irrational ratio?