Created
May 13, 2019 07:47
-
-
Save vlavorini/2802b3e5731fe67c40d3eb662165b8a3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import seaborn as sns | |
import pandas as pd | |
import numpy as np | |
imps_ctrl,convs_ctrl=16500, 30 | |
imps_test, convs_test=17000, 50 | |
#here we create the Beta functions for the two sets | |
a_C, b_C = convs_ctrl+1, imps_ctrl-convs_ctrl+1 | |
a_T, b_T = convs_test+1, imps_test-convs_test+1 | |
val_C=np.random.beta(a_C, b_C, 1000000) | |
val_T=np.random.beta(a_T, b_T, 1000000) | |
vals=np.vstack([val_C, val_T]).T | |
limit=0.004 | |
df=pd.DataFrame(vals, columns=['Control', 'Test']) | |
df=df[df['Control']<limit] | |
df=df[df['Test']<limit] | |
g=sns.jointplot(x=df.Control, y=df.Test, kind='kde', n_levels=15) | |
g.ax_joint.plot([0.0015, limit], [0.0015, limit]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment