Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Histograms and Box Plots | Normality Check
The Art of A/B Testing
course content

Course Content

The Art of 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?

Section 2. Chapter 4
We're sorry to hear that something went wrong. What happened?
some-alt