Computing a Spearman correlation coefficient and test if it is significant or not

Conjunto de datos para Pruebas de correlación XLS59.0 KB

Vídeo de tutorial

Ventajas

  • Sencillo y dirigido a los usuarios
    Sencillo y dirigido a los usuarios XLSTAT es un software que se integra de forma transparente con Microsoft Excel, que es la hoja de cálculo más difundida del mundo. Esta integración hace que sea una de las herramientas más sencillas para trabajar ya que utiliza la misma filosofía que Microsoft Excel. El programa está disponible en una ficha de XLSTAT. Los análisis se agrupan en menús funcionales. Los cuadros de diálogo están dirigidos a los usuarios, por lo que la preparación de los análisis es tarea sencilla.
  • Resultados y datos compartidos sin dificultad
    Resultados y datos compartidos sin dificultad Una de las mayores ventajas de XLSTAT es la forma transparente con la que se pueden compartir los datos y los resultados. Los resultados se almacenan en Microsoft Excel de modo que cualquier usuario puede acceder a ellos. No es necesario que el destinatario tenga una licencia de XLSTAT o cualquier visor adicional, lo que facilita y rentabiliza el trabajo en equipo. Del mismo modo, es fácil integrar los resultados en otras aplicaciones de Microsoft Office, como PowerPoint, por lo que se pueden crear estupendas presentaciones en cuestión de minutos.
  • Modular
    Modular XLSTAT es un producto modular. XLSTAT-Pro es un módulo principal de estadística de XLSTAT, que incluye todas las funcionalidades dominantes en el análisis estadístico y multivariado. Es posible añadir funciones más avanzadas por medio de módulos complementarios para aplicaciones específicas. De este modo es posible adaptar el software a sus necesidades, aumentando la rentabilidad.
  • Didáctico
    Didáctico Los resultados de XLSTAT están organizados por análisis y es fácil desplazarse por ellos. La información útil se proporciona junto con los resultados para ayudarle en su interpretación.
  • Asequible
    Asequible XLSTAT es una solución completa y modular que se puede ajustar a cualquier necesidad de análisis comercial. Tiene un precio muy razonable, por lo que el retorno de su inversión es casi inmediato. Todas las licencias de XLSTAT incluyen también un servicio de asistencia de la mayor calidad.
  • Accesible: disponible en muchos idiomas
    Accesible: disponible en muchos idiomas Nos hemos asegurado de que XLSTAT sea accesible para todos traduciendo el programa a muchos idiomas, incluyendo chino, inglés, alemán, italiano, japonés, polaco, portugués y español.
  • Automatizable y personalizable
    Automatizable y personalizable La mayoría de las funciones estadísticas disponibles en XLSTAT pueden llamarse directamente desde la ventana Visual Basic de Microsoft Excel. Pueden modificarse e integrarse en código fuente adicional para ajustarse a sus necesidades. Añadir tablas y trazados, así como modificar los resultados existentes se convierte en tarea sencilla. Además, XLSTAT incluye algunas herramientas especiales en los cuadros de diálogo para generar automáticamente el código fuente VBA para reproducir su análisis empleando el editor de VBA o simplemente cargar ajustes predeterminados. Esta automatización de análisis rutinarios sin esfuerzo le ahorrará gran cantidad de tiempo.

Dataset to run a Spearman correlation coefficient test

An Excel sheet containing both the data and the results for use in this tutorial can be downloaded by clicking here.

The data used in this example correspond to a survey where a given brand/type of potato chips has been evaluated by 100 consumers. Each consumer gave a rating on 1 to 5 scale for four attributes (Saltiness, Sweetness, Acidity, Crunchiness) - 1 means "little", and 5 "a lot" -, and then gave an overall liking score on a 1-10 likert scale. Our goal is to check how the attributes are correlated with the liking score.

Correlations are computed in many of the XLSTAT features. However two functions are dedicated to that: the Describing data / Similarity/Dissimilarity matrices feature, and the Correlation/Association tests / Correlation tests feature. In this tutorial, we use the Correlation/Association tests / Correlation tests tool.

Setting up a Spearman correlation coefficient test

After opening XLSTAT, select the Correlation/Association tests / Correlation tests command, or click on the corresponding button of the Correlation/Association tests toolbar (see below).

barcorrsp.gif

Once you've clicked on the button, the dialog box appears. We select the liking scores and the four attributes in the Observations/Variables box. As the first row of the table corresponds to headers, we leave the Variable labels option checked.

Because the data are not continuous but ordinal, we choose to use the Spearman correlation coefficient instead of the Pearson correlation coefficient which is the usual one for continuous data.

corrsp1.gif

In the Outputs tab, we choose the results we want to display.

corrsp2.gif

In the Charts tab, we select the correlations maps we want to display.

corrsp3.gif

The computations begin once you have clicked on OK. The results will then be displayed.

Interpreting the results of a Spearman correlation coefficient test

The first results are the descriptive statistics for the liking data and the attributes. The correlations matrix is then displayed.

corrsp4.gif

The correlations between the liking scores and the attributes are mostly low. The correlation between the liking scores and the Crunchiness is higher than average with 0.466. This suggests that the only criterion for which we have "the more, the better" is the crunchiness. For the other criteria it is likely that there is an intermediate optimal level, above which the consumers will show their insatisfaction.

Values displayed in bold are significant at 0.05 significance level. That means that the risk of being wrong when rejecting the null hypothesis that the correlations are not significantly different from 0 is less than 5%.

The corresponding p-values (the estimated risk) are displayed in the next table. The lower the p-value, the more different from 0 the correlation. Note: the tests are two-sided.

corrsp5.gif

XLSTAT is among the few software that generates correlation maps. Correlation maps allow to visually identify patterns in correlations. While this has more meaning when there are many dimensions, we take advantage of this example to show how the maps can be used.

The first correlation map uses a blue-red (cold-hot) scale to display the correlations. The blue color corresponds to a correlation close to -1 and the red color corresponds to a correlation close to 1. Green corresponds to a correlation close to 0.

corrsp6.gif

The second correlation map uses black and white to respectively identify positive and negative correlations. The diagonal is displayed in grey color.

corrsp7.gif

The third correlation map uses patterns to identify both the sign and the intensity of the correlations:

  • lines that go from the bottom left to the top right correspond to positive correlations, and vice versa;
  • the tighter the lines, the closer the correlation to 0.

corrsp8.gif

Note: if you only want to compute the correlation coefficient between two samples, you can use directly in the Excel sheet the XLSTAT XLSTAT_Spearman function. Example: on the "Data" sheet, type in the G2 cell, "=XLSTAT_Spearman(A2:A101,B2:B101)".