Skip to content

Instantly share code, notes, and snippets.

@shks
Last active January 2, 2021 18:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shks/88390e2c7fb8950c076bd6661ac59bd8 to your computer and use it in GitHub Desktop.
Save shks/88390e2c7fb8950c076bd6661ac59bd8 to your computer and use it in GitHub Desktop.
doShapirotest in python
from scipy.stats import shapiro
#https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.shapiro.html
def doShapirotest(data):
stat, p = shapiro(data)
print("Shapirotest Wstat , p-value", stat, p)
if(p < 0.05):
print("USE NON-PARAMETRIC TEST :(p < 0.05)")
else:
print("USE PARAMETRIC TEST : (p > 0.05)")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment