# How to average the loudness of a audio file from its amplitude?

I would like to average the loudness of different sounds so that their means could be used as a dependent variable in a statistical regression, but I have some troubles to understand how loudness works.

Assume that I have large number of different audio files that are all recorded in the exact same conditions, so that a same original sound would have the exact same frequency and amplitude in each file.

I saw that the loudness of a sound is proportional to the square of its amplitude, but also that $\mathrm{dB} = 10\log_{10}(\mathrm{Amp})$. Therefore I do not know which formula to use, and neither if I should first average the amplitude and then apply the formula, or apply the formula first and then average the dB.

If somebody has some answers or some literature to get me on the right track it would be very helpful.