# Histograms and Box Plots

About **Histograms**

To visually evaluate the distribution, you need to build **histograms**. If the distributions are far from **normal**, we should notice it right away.

Picture time! Let's build distributions for two groups on one graph.

In this code, we use the `sns.histplot`

function from the `seaborn`

library. We pass it to the desired column `df_control['Impression']`

to compare with `df_test['Impression']`

.

Are these distributions **normal**? Hard to tell...

Let's look at **box plots**:

About **Boxplots**

Even after **boxplots**, it is not clear whether the distributions are **normal**.

In order to display two **boxplots** on the same chart, we combine the data frames using the `pd.concat`

function.

Next, we use the `sns.boxplot`

function, passing the combined data frame `df_combined`

to it. On the x-axis are the values of the column `'Impression'`

, and on the y-axis are the **Сontrol** and **Test group**. With the help of the `matplotlib`

library, we sign the plot and axes.

Even after **boxplots**, it is not clear whether the distributions are **normal**. But in normality, we need to be sure.

How to do it? __Statistical tests come to the rescue__, which we will discuss in the next chapter.

Everything was clear?

Course Content

The Art of A/B Testing

## The Art of A/B Testing

1. What is A/B testing?

# Histograms and Box Plots

About **Histograms**

To visually evaluate the distribution, you need to build **histograms**. If the distributions are far from **normal**, we should notice it right away.

Picture time! Let's build distributions for two groups on one graph.

In this code, we use the `sns.histplot`

function from the `seaborn`

library. We pass it to the desired column `df_control['Impression']`

to compare with `df_test['Impression']`

.

Are these distributions **normal**? Hard to tell...

Let's look at **box plots**:

About **Boxplots**

Even after **boxplots**, it is not clear whether the distributions are **normal**.

In order to display two **boxplots** on the same chart, we combine the data frames using the `pd.concat`

function.

Next, we use the `sns.boxplot`

function, passing the combined data frame `df_combined`

to it. On the x-axis are the values of the column `'Impression'`

, and on the y-axis are the **Сontrol** and **Test group**. With the help of the `matplotlib`

library, we sign the plot and axes.

Even after **boxplots**, it is not clear whether the distributions are **normal**. But in normality, we need to be sure.

How to do it? __Statistical tests come to the rescue__, which we will discuss in the next chapter.

Everything was clear?