Calculates a oneway chi square test.
The chi square test tests the null hypothesis that the categorical data has the given frequencies.
Parameters :  f_obs : array
f_exp : array, optional
ddof : int, optional


Returns :  chisquare statistic : float
p : float

Notes
This test is invalid when the observed or expected frequencies in each category are too small. A typical rule is that all of the observed and expected frequencies should be at least 5. The default degrees of freedom, k1, are for the case when no parameters of the distribution are estimated. If p parameters are estimated by efficient maximum likelihood then the correct degrees of freedom are k1p. If the parameters are estimated in a different way, then then the dof can be between k1p and k1. However, it is also possible that the asymptotic distributions is not a chisquare, in which case this test is not appropriate.
References
[R171]  Lowry, Richard. “Concepts and Applications of Inferential Statistics”. Chapter 8. http://faculty.vassar.edu/lowry/ch8pt1.html 