Aan de slagGa gratis aan de slag

Sample size for A/B test

We know now that we need to analyze our A/B test results with a t-test after we've collected data. We have two pretty important questions we need to answer before we do that: what's the effect size and what's the sample size required for this test?

In this case, effect size was given to us. Lending Club is looking to detect the relatively small effect size of 0.2. We'll again use the pwr package and calculate sample size using an appropriate function to find out how many we'll need to recruit into each group, A and B.

Deze oefening maakt deel uit van de cursus

Experimental Design in R

Cursus bekijken

Oefeninstructies

  • Use the correct function from the pwr package to calculate the required sample size for each group with d = 0.2, a power of 0.8, and a 0.05 significance level. Check the pwr help docs with ?pwr if you need help remembering which function to use and what arguments it takes.

Praktische interactieve oefening

Probeer deze oefening eens door deze voorbeeldcode in te vullen.

# Load the pwr package
___

# Use the correct function from pwr to find the sample size
___(___, 
    ___, 
    ___, 
    ___, 
    ___)
Code bewerken en uitvoeren