# How important it is to have an intuition of why various statistical tests work?

I sometimes have difficulty understanding the intuition behind some tests. Is it important to know why some test works in a particular situation, or is it enough to learn things at the level "OK, now I can check homoscedasticity" or "I have no idea why we divide by 12 in Mann–Whitney U-test, but trust me, it works"? Or are there books where the authors have explained the ideas behind every test and provided some reasons to "prove" that the tests work?

-

Broadly speaking, the more you understand a test (or indeed any other aspect of the vrious calculations one does in statistics), the better, but it's not usually necessary to understand every specific detail of each constant in a formula to have a good understanding of what's going on.

For example, sometimes (particularly when trying to compute the distribution under the null hypothesis), people formulate a Spearman correlation as $\rho = 1- {\frac {6 \sum d_i^2}{n(n^2 - 1)}}$, where $d_i$ is the difference between the $x_i$ rank and the $y_i$ rank. Is it necessary to understand where the "6" comes from? I don't think it's necessary if you're just trying to get intuition about the test (though in fact it's pretty straightforward) - if you comprehend the test as "a correlation calculated on the ranks", you pretty much have most of the useful intuition there. There are some additional bits of intuition that can be gleaned from the fact that it can also be written as a linear function of squared rank-differences, but the constants themselves aren't especially enlightening.

You can check the formula easily enough, in several ways (e.g. by computing the value for both the 'correlation of the ranks' form and the '$\sum d_i^2$' form for some small samples), and you can check the null distribution easily enough (by simple enumeration for very small samples, and by simulation for larger samples), without necessarily knowing how to do the algebra.

I'd urge you to do as much as you can - there are few things I've learned along those lines that don't help in some ways - but not to fret over much when you can't. There's always somewhere you can ask about how the details come to be as they are (in the case of the Spearman correlation, some of those details have been explained here already).

Basic intuition about t-tests would include, for example, what the denominator is trying to measure (the formulas for different t-statistics look different, but they're always an estimate of the standard deviation of the distribution of the numerator), and also if possible why the different numerators are as they are, and why the denominators are then of the form they have.

With F-tests, it's certainly useful to know that the numerator and denominator are two different estimates of variance - which if the null is true should be independence estimates of the same variance. (It's also useful to have some sense of how the distribution changes as the degrees of freedom change.)

-

It's never bad to understand more details of what is going on, but I think there is an intermediate ground. E.g. take the formula for the pdf normal density

$\frac{1}{\sigma\sqrt{2\pi}}\, e^{-\frac{(x - \mu)^2}{2 \sigma^2}}$

Do you need to know how this was derived and why each part of it is the way it is in order to know a lot about normality and the requirement for it? No. But it's good to know more than just "normality of the residuals is a requirement".

(The above is if you are the data analyst sort of statistician; if you want to prove theorems and such, you will need to know a lot more about this sort of thing).

-
I agree with the answer, but I think the example is a bad one. We know from calculus that are under $e^{-x^2}$ is $\sqrt{\pi}$. That means we normalize it by dividing it by $\sqrt{\pi}$. And to keep the area constant, if we need to divide it by a factor of $\sigma\sqrt{2}$, we have to divide $x$ by the the same factor as well... which gives us the formula after a simple shift by $\mu$. It's so trivial that you should definitely understand where it comes from. –  Mehrdad Mar 23 at 9:17