Exercise

# Power analysis for a t-test

Now we're going to have another look at the same example, drawn from our Olympic dataset (`Weight`

difference between `Sport`

s). A random subset of 100 samples from each group in this data yields these boxplots.

Knowing the effect size of the difference between these two groups (see the relevant exercise for a refresher), you need to work out what the odds are that your t-test will pick up this difference. Your data is contained in `athletesample`

. `pandas`

and `statsmodels.stats.power`

are loaded into your workspace as `pd`

and `pwr`

.

Instructions

**100 XP**

- Set the parameters as follows: an effect size of 0.42145, 100 samples from each group and a standard alpha value of 0.05.
- Run and print the power analysis.