Skip to content

Instantly share code, notes, and snippets.

View mintaow's full-sized avatar

Mintao Wei mintaow

View GitHub Profile
@mintaow
mintaow / Medium_Workbook_Sample_Size_Calculation (The Standard Formulation).ipynb
Last active January 31, 2023 19:53
Example with Code: A/B Test Sample Size Estimation - Evan's Calculator
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mintaow
mintaow / Medium_Workbook_Sample_Size_Calculation(The Naive Formulation).ipynb
Last active August 7, 2023 18:18
Example with Code: Offline Sample Size Estimation
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@mintaow
mintaow / SampleSize_Table1_DownloadSpeed.csv
Last active January 8, 2023 17:09
Table 1 (Download Speed) in Medium's Sample Size Calculation Article
household_id download_speed(mbps) group
1001 533.51 south_shore
1002 510.07 south_shore
1003 505.02 south_shore
1004 505.68 south_shore
1005 485.92 south_shore
1006 506.63 south_shore
1007 474.58 south_shore
1008 509.12 south_shore
1009 469.79 south_shore
@mintaow
mintaow / viz4_barplots.py
Last active June 11, 2022 23:10
Viz 4: Categorical Bar Plot Series
# Matplotlib version: 3.5.2 (My Local Jupyter Notebook)
# Seaborn version: 0.11.2 (My Local Jupyter Notebook)
# Python version: 3.7.4 (My Local Jupyter Notebook)
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
sns.set(style="white",context="talk")
# Matplotlib version: 3.5.2 (My Local Jupyter Notebook)
# Seaborn version: 0.11.2 (My Local Jupyter Notebook)
# Python version: 3.7.4 (My Local Jupyter Notebook)
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
%matplotlib inline
sns.set(style="white",context="talk")
@mintaow
mintaow / viz2_scatter.py
Last active July 20, 2022 17:26
Viz 2: Scatter Plot with Fitted Trendlines
# Matplotlib version: 3.5.2 (My Local Jupyter Notebook)
# Seaborn version: 0.11.2 (My Local Jupyter Notebook)
# Python version: 3.7.4 (My Local Jupyter Notebook)
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
from datetime import datetime
@mintaow
mintaow / viz1_ts_plot.py
Last active June 11, 2022 23:15
Visualization Template: Double-axis Time Series Plot with Auxiliary Lines/Bands
# Matplotlib version: 3.5.2 (My Local Jupyter Notebook)
# Seaborn version: 0.11.2 (My Local Jupyter Notebook)
# Python version: 3.7.4 (My Local Jupyter Notebook)
import numpy as np
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
import matplotlib.ticker as ticker
from datetime import datetime