Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Plots to Compare | The First A/B Test
A/B Testing in Python

book
Plots to Compare

I advise you to compare 2 groups from the A/B using the criterion and other comparing methods. For example, we can build 2 distplots:

  • One distplot for the control group;

  • The second one for the test group.

After building plots, we can't say if we can believe our A/B test, but we can see approximately what results we will receive.

Tarefa

Swipe to start coding

  1. Build the distpot using the seaborn library for the df_control.
  2. Build the distpot using the seaborn library for the df_test.

orange color - test group, blue color - control group.

Solução

# Importing the pandas
import pandas as pd
# Importing the seaborn
import seaborn as sns

# Reading the file
df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/ae14b913-9d96-48cb-ace7-a332315f7cf4/ab+test+1.csv')
# Control group
df_control = df.query('group == "control" ')
# Test group
df_test = df.query('group == "test" ')

# Build the distpot for the df_control
sns.distplot(df_control.clicks)
# Build the distplot for the df_test
sns.distplot(df_test.clicks)

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 2. Capítulo 5
# Importing the pandas
import pandas as pd
# Importing the seaborn
import seaborn as sns

# Reading the file
df = pd.read_csv('https://codefinity-content-media.s3.eu-west-1.amazonaws.com/ae14b913-9d96-48cb-ace7-a332315f7cf4/ab+test+1.csv')
# Control group
df_control = df.query('group == "control" ')
# Test group
df_test = df.query('group == "test" ')

# Build the distpot for the df_control
sns.___(___.clicks)
# Build the distplot for the df_test
___

Pergunte à IA

expand
ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

some-alt