Skip to content

Instantly share code, notes, and snippets.

@smzn
Last active October 4, 2020 13:23
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 smzn/4e9c410c46b2942beadfe834f9bc8e30 to your computer and use it in GitHub Desktop.
Save smzn/4e9c410c46b2942beadfe834f9bc8e30 to your computer and use it in GitHub Desktop.
幾何分布の適合度検定
def getCSV(file):
return pd.read_csv(file, engine='python')
use_day = getCSV('use_day.csv')
use_day
plt.bar(range(30), use_day['frequency'])
#幾何分布で作成した度数
plt.bar(range(30), use_day['geometric'])
#利用日数が幾何分布になるか検定 -> p < 0.05なので 「同一の分布とは言えない」
chisquare(use_day['frequency'], use_day['geometric'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment