13. Nonparametric statistics

Summary

First and foremost, many hypotheses go beyond the simple question of whether one (estimated) value equals another, as seen in the previous chapter. For example, one may want to check (reject or not) whether a variable follows a certain distribution, without needing to know or estimate its parameters. Along similar lines, one may want to confirm (reject or not) whether a variable is independent of another, or even whether it is random, which are assumptions in a large share of analyses. Since the aim is neither to obtain nor to use or define a parameter of interest (at least not one associated with a known distribution, such as the median), a battery of methods / tests called nonparametric arises.

As with parametric tests, the situations in which they can be applied are countless, and it is preferable to have the ability to recognize when (or when not) their use is appropriate and under what conditions. It should be noted that these tests, very much at home in the field of statistics, tend to be implemented more completely or in more detail in the R language, and using it is advisable since more documentation and academic information is available.

In recent years, alongside data science and the growth in computing power, one nonparametric method in particular has become quite popular: the bootstrap. In essence, it involves resampling (that is, sampling from a sample) with replacement, so as to generate a set of samples larger than the one initially available (possibly a single one). For each sample an estimator is obtained (in the usual way already seen), and the resulting distribution of estimated values is precisely the added value of this method, something that would otherwise be obtained through real samples (operationally impossible in most cases). It is important to note that, with this extremely simple procedure, any parameter or characteristic of interest of a variable can be estimated. All it takes is one sample, whose quality and representativeness become crucial, and a support for the resampling (a software simulation). Bootstrapping is implemented in Python / R, very well documented and with many examples, given how often it is used today.

Further reading

Test on the median

  • Prueba de los signos. Lind, Marchal and Wathen, Estadística aplicada a los negocios y la economía (in Spanish), 15th ed., pp. 681–685.
  • Inference for the Population Median. STAT 500: Applied Statistics, Penn State, lesson 11.1.

Tests on distributions (goodness of fit / independence / randomness)

  • Métodos no paramétricos: pruebas de bondad de ajuste. Lind, Marchal and Wathen, Estadística aplicada a los negocios y la economía (in Spanish), 15th ed., pp. 648–658.
  • Prueba de hipótesis de que la distribución de datos proviene de una población normal. Lind, Marchal and Wathen, Estadística aplicada a los negocios y la economía (in Spanish), 15th ed., pp. 659–664.
  • Análisis de tablas de contingencia. Lind, Marchal and Wathen, Estadística aplicada a los negocios y la economía (in Spanish), 15th ed., pp. 667–670.
  • La prueba de bondad de ajuste chi-cuadrada. Canavos, Probabilidad y estadística. Aplicaciones y métodos (in Spanish), pp. 363–368.
  • La estadística de Kolmogorov-Smirnov. Canavos, Probabilidad y estadística. Aplicaciones y métodos (in Spanish), pp. 368–370.
  • Chi-Square Test for Independence. STAT 500: Applied Statistics, Penn State, lesson 8.
  • La distribución chi-cuadrado (in Spanish). Introducción a la estadística, OpenStax, ch. 11.

Bootstrapping