I dont understand the way we measure loudness. I know that it is in some way related to the magnitude of pressure variations. please help me figure out where my understanding fails. Let $p(t)$ be the pressure at a point at time $t$. The sound pressure level $L_P$, measured in $Db$, is defined to be \begin{equation}L_p=20\log_{10}(\dfrac{P}{P_0})\end{equation} where P is the RMS pressure, itself defined as \begin{equation}P=\sqrt{\dfrac{1}{T_2-T_1}\int^{T_2}_{T_1}p(t)^2dt}\end{equation}
The function of RMS pressure seems to be to provide an average pressure. Obviously it is not possible to merely use the mean pressure of a wave form because the contributions to the sum above and below the equilibrium pressure will largely cancel. But why not define the average to be \begin{equation}Q=\sqrt{\dfrac{1}{T_2-T_1}\int^{T_2}_{T_1}|p(t)|dt}\end{equation} This way all the contributions are positive, but it is a true average rather than being off by some fraction (due to the fact that the sum of the squares is not equal to the square of the sum). In trying to answer this question independently I came across this question, which is skeletally the same as mine but to do with voltages instead of pressure. In the answers to that question it is pointed out that the RMS of a varying AC voltage is the constant voltage a DC source must sustain to provide the same average power, a fact which itself is due to the relation that voltage is proportional to power squared.
Similarly, the intensity of a wave is proportional to the square of the pressure. The same justification (given in an answer to the question I linked) implies that a wave with constant pressure equal to the RMS pressure of a given wave would have the same average intensity (over some time interval).
In order for this to be a justification for $P$ (or its logarithm) measuring loudness, intensity must have some effect on loudness. If I'm correct so far, my question is now: what has intensity to do with percieved loudness? I understand the percieved loudness of a sound is a complex issue, affected by frequency response etc. But I imagine that the volume knob on a stereo controls a parameter which is loosely proportional to percieved loudness. Is that parameter $L_P?$ If so, why not $L_{Q}$?