ComenzarEmpieza gratis

Decision analysis: profit

Good job translating the posterior click rates into cost distributions! In the meantime, a new company policy has been released. From now on, the goal of the marketing department is not to minimize the costs of campaigns, which was quite ineffective, but rather to maximize the profit. Can you adjust your findings accordingly, knowing that the expected revenue per click from a mobile ad is $3.4, and the one from a desktop ad is $3? To calculate the profit, you need to calculate the revenue from all clicks, then subtract the corresponding cost from it.

Everything you have calculated in the previous exercise is available in your workspace: the ads_cost dictionary as well as the number of click distributions: clothes_num_clicks and sneakers_num_clicks.

Este ejercicio forma parte del curso

Bayesian Data Analysis in Python

Ver curso

Instrucciones del ejercicio

  • Create a dictionary ads_profit with four keys: clothes_mobile, sneakers_mobile, clothes_desktop, and sneakers_sneakers, each holding the profit distribution from corresponding clicks.
  • Draw a forest plot of ads_proft using the credible interval of 99%.

Ejercicio interactivo práctico

Prueba este ejercicio completando el código de muestra.

# Calculate profit distributions for each product and platform
ads_profit = {
    "clothes_mobile": ____,
    "sneakers_mobile": ____,
    "clothes_desktop": ____,
    "sneakers_desktop": ____,
}

# Draw a forest plot of ads_profit
____
plt.show()
Editar y ejecutar código