Now We Can Answer
This chapter will help us to answer the question 'Can we believe that the variant of the site will help us to increase in clicks?'
So, we have studied how do 2 groups' distributions look like:
Their plots don't look similar;
Their confidence intervals don' cover each other a lot.
Earlier, we decided that we were going to use t-criterion criterion to cope with our problem. It is our last check to prove whether there is a NON-RANDOM difference between groups.
To perform the
t-test
usescipy.stats.ttest_ind(control_group_data, test_group_data)
.
Task
Swipe to start coding
- Perform the
t-test
.
Solution
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Importing the pandas
import pandas as pd
# Importing the seaborn
import seaborn as sns
# Importing the scipy
import scipy
# 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" ')
# Perform the t-test
print(scipy.stats.ttest_ind(df_control.clicks, df_test.clicks))
Everything was clear?
Thanks for your feedback!
Section 2. Chapter 7
single
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Importing the pandas
import pandas as pd
# Importing the seaborn
import seaborn as sns
# Importing the scipy
import scipy
# 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" ')
# Perform the t-test
print(___.stats.___(df_control.___, ___))
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat