Exercise

# Exploring the power calculation

As discussed, power is the probability of rejecting the null hypothesis when the alternative hypothesis is true. Here you will explore some properties of the power function and see how it relates to sample size among other parameters. The `get_power()`

function has been included and takes the following arguments in the listed order `n`

for sample size, `p1`

as the baseline value, `p2`

as the value with lift included, and `cl`

as the confidence level.

Instructions

**100 XP**

- Calculate the power using
`n`

=`1000`

and`n`

=`2000`

in that order, along with the pre-loaded parameters,`p1`

,`p2`

, and`cl`

. - Using the variable
`n1`

for the sample size, find the power with a confidence level of`cl`

=`0.8`

and`cl`

=`0.95`

in that order. - Hit 'Submit Answer' to compare the ratios. Which change has the bigger impact, increasing the confidence level or the sample size?