Calculation of the required sample size or statitsical power of a mean comparison test with XLSTAT-Power

Conjunto de datos para Comparar las medias XLS24.5 KB

Vídeo de tutorial
  • Power Software para el cálculo de la potencia estadística

  • Configuración del sistema

    • Windows:
      • Versiones: 9x/Me/NT/2000/XP/Vista/Win 7
      • Excel: 97 o superior
      • Procesador: 32 o 64 bits
      • Disco duro: 150 Mb
    • Mac OS X:
      • OS: OS X
      • Excel: X, 2004 y 2011
      • Disco duro: 150 Mb

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.

XLSTAT-Pro includes several tests to compare means, namely the t and z tests. XLSTAT-Power allows estimating the power of these tests and calculates the number of observations required to obtain sufficient power.

When testing a hypothesis using a statistical test, there are several decisions to take:

  • The null hypothesis H0 and the alternative hypothesis Ha.
  • The statistical test to use.
  • The type I error also known as alpha. It occurs when one rejects the null hypothesis when it is true. It is set a priori for each test and is 5 %.

The type II error or beta is less studied but is of great importance. In fact, it represents the probability that one does not reject the null hypothesis when it is false. We cannot fix it up front, but based on other parameters of the model we can try to minimize it. The power of a test is calculated as 1-beta and represents the probability that we reject the null hypothesis when it is false.

We therefore wish to maximize the power of the test. The XLSTAT-Power module calculates the power (and beta) when other parameters are known. For a given power, it also allows to calculate the sample size that is necessary to reach that power. The statistical power calculations are usually done before the experiment is conducted. The main application of power calculations is to estimate the number of observations necessary to properly conduct an experiment.

We place ourselves in a comparison of two independent samples. We want to know the number of observations required to obtain a power of 0.9 based on the t test based on the null hypothesis H0: Mean1 – Mean2 = 0. Since we do not yet know the parameters of our samples, we will use the concept of effect size. Cohen (1988) introduced this concept which provides an order of magnitude for the effect size, that is to say, the relative difference between the means. So we will test three effect sizes: 0.2 for a small effect, 0.5 for a moderate effect and 0.8 for a strong effect. As the effect size is based on the difference between the means, it is expected that for a greater effect, the sample size required will be smaller.

Dataset for the calculation of the statistical power of a mean comparison test

An Excel spreadsheet containing the results of this example can be downloaded by clicking here.

Setting up of the calculation of the statistical power of a mean comparison test

After opening XLSTAT, click the Power icon and choose compare means.

pwrmoy1.gif

Once the button is clicked, the dialog box appears. You must then choose the objective Find the sample size, then select the test t test for two independent samples, we take as the alternative hypothesis Mean 1 <> Mean 2. The alpha is 0.05. The desired power is 0.9. We suppose our samples are of equal size so the N1/N2 ratio is equal to 1. Rather than detailed input parameters, we select the effect size option and enter the value 0.2 for a weak effect.

pwrmoy2.gif

In the Charts tab, the option simulation plot is activated and the “size of sample 1” will be displayed on the vertical axis and the “power” on the horizontal axis. Power varies between 0.8 and 0.95 by increments of 0.01.

pwrmoy3.gif

Once you have clicked the OK button, the calculations are made, and then the results are displayed.

Results of the calculation of the statistical power of a mean comparison test

The first table shows the calculation results and an interpretation of the results.

pwrmoy4.gif

We see it takes 526 observations per sample to obtain an output as close as possible to 0.9.

The following table summarizes the calculations obtained for each value of power between 0.8 and 0.95.

pwrmoy5.gif

The simulation plot shows the evolution of the sample size depending on the power. We see that for a power of 0.8, just slightly more than 393 observations per sample and as a power of 0.95 we get to 651 observations.

pwrmoy6.gif

For effect sizes of 0.5 and 0.8, we obtain the following results:

pwrmoy7.gifpwrmoy8.gif

The sample size will therefore fall as the difference between the means increases; we see that for a large difference, 34 observations per sample are sufficient.

XLSTAT-Power is a powerful tool both to investigate the sample size required for an analysis and to calculate the power of a test. Obviously, if the user has more information about the samples or populations, he may give details of the input parameters, rather than using the effect size.