Skip to content

Instantly share code, notes, and snippets.

Created July 3, 2022 05:20
What would you like to do?
# Function for checking Gaussian distribution
import seaborn as sns
import scipy.stats as stats
def Gaussian_distribution_check(data, variable):
fig = plt.figure(figsize=(15,5), dpi=300)
ax1 = fig.add_subplot(1,2,1)
sns.histplot(data[variable], kde=True, ax=ax1)
ax2 = fig.add_subplot(1,2,2)
stats.probplot(data[variable], dist="norm", plot=ax2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment