Exercise

Computing Cohen's d

Now, using the same comparison of Weight difference between Sports, let's calculate the actual effect size for this comparison. As a reminder, these data are summarized in the boxplot below.

Boxplots of body weights of Olympic athletes from two sports

Using the formula seen in the previous video, calculate Cohen's d for the difference in Weight between each Sport. Your data is contained in athletes. pandas and math are loaded into your workspace as pd and ma.

Instructions

100 XP
  • Create two series, one for the samples from each Sport.
  • Calculate diff, the difference between the mean of each sample, and pooledstdev, the pooled standard deviation.
  • Calculate Cohen's d and print it.