IniziaInizia gratis

Determine the ideal sample size

When running an experiment and statistical analyses of any sort, sample size is an important consideration. A sample size that is too small will not reveal an effect, regardless of if there is an effect present to be found. Prior to collecting data, a power analysis can be run to determine the minimum sample size that must be collected to effectively detect an effect, dependent on the analysis that will be performed on the collected data.

Perform a one sample t-test, one group, on experimental data and need to determine the sample size required for a one sample t-test to achieve a large effect size and power with an alpha of 0.05.

Questo esercizio fa parte del corso

A/B Testing in R

Visualizza il corso

Istruzioni dell'esercizio

  • Load the pwr package needed to run a power analysis for the one sample t-test.
  • Use pwr.t.test() to determine the sample size needed for a two-tailed, one sample t-test with an effect size of 0.8, power of 0.9, and significance of 0.05.

Esercizio pratico interattivo

Prova a risolvere questo esercizio completando il codice di esempio.

# Load the `pwr` package
___

# Determine the sample size needed for a one sample t-test
___(d = ___, power = ___, sig.level = ___, type = ___, alternative = ___)
Modifica ed esegui il codice