Skip to content

Instantly share code, notes, and snippets.

View IgorFobia's full-sized avatar

Fabio Gori IgorFobia

  • The Hague
View GitHub Profile
import numpy as np
from scipy.stats import chisqprob, chisquare
def gtest(f_obs, f_exp=None, ddof=0):
"""
http://en.wikipedia.org/wiki/G-test
The G test can test for goodness of fit to a distribution
Parameters