Session Ready
Exercise

How bad can it be?

You have concluded that with 98% probability, clothes ads have a higher click-through ratio than sneakers ads. This suggests rolling out the clothes campaign to a larger audience. However, there is a 2% risk that it's the sneakers ads that are actually better. If that's the case, how many clicks do we lose if we roll out the clothes campaign?

The answer to this is the expected loss: the average posterior difference between the two click-through ratios given that sneakers ads do better. To calculate it, you only need to take the entries in the posterior difference where the sneakers click-through rate is higher and compute their average.

The posterior difference between the click rates, diff, is available in your workspace. Let's find out how much is at risk!

Instructions
100 XP
  • Slice diff to take only cases where it is negative (corresponding to sneakers click rate being higher) and assign the result to loss.
  • Calculate the average loss, assign it to expected_loss and print it.