Greetings! I'm submitting to the list several additions to Goose that I hope you will find useful. First, I looked through the source code for a while for statistical tests, and while my knowledge of statistics hardly qualifies me as an expert, I was somewhat hard-pressed to find anything that did a performed the tests for sample proportions and sample means. I did find a relatively complete chi square test (although there are a few ideas I have for extending it), and I found what appeared to be semi-complete 1-sample and 1-proportion z-tests in runs.h and runs.cpp, but there did not appear to be any t-tests nor any ability to change the alternative hypothesis. In any case, I decided to write a new set of tests under a more unified, recognizable architecture. `hypo-test.patch.gz' implements several common tests, including 1- and 2- proportion z-tests, 1- and 2- sample t-tests, a 1-sample z-test, and a paired t-test. It also has a rather rudimentary chi square test based on CategoricalSet, but it is currently #ifdef'ed out since CategoricalSet is apparently not functioning. Each test is implemented as a class inheriting the base HypothesisTest, which defines functions for reporting the test statistic and the probability value. The idea is that one forms the dataset first and then creates the test object; it is not possible to modify the statistics for a test object once the test has been created. In that respect, tests are `throw-away' objects in that once the test has been performed and all of the data have been extracted, one can simply delete them. If you feel this approach appropriate, you might consider adapting the GoodnessOfFit class in fit.h/fit.cpp to this model. The proportion z-tests' constructors throw an exception if the basic assumptions to combat skewness in the sampling distribution are not met. I also implemented and tested Guile bindings for the statistical tests. `ndtr.patch.gz' justs adds a couple of overloads for the normal_cdf and t_cdf functions, allowing the calculation of the cdf between two points rather than just the area to the left of the given point. `confint-smob.patch.gz' implements some Guile bindings to produce confidence intervals in the Guile console. `specfns-smob.patch.gz' adds bindings for the t cdf (t-cdf) and the inverse t cdf (inv-t-cdf) to Guile. Finally, `confint-prop.patch.gz' implements a couple of functions to produce confidence intervals for proportions. I am assuming they were not implemented before as I could not find them anywhere. It adds them to normal.h/normal.cpp; I don't know, however, if that is where you intend those functions to be (since you say `inference for normally distributed data' in normal.h). You may move them wherever you feel it is appropriate. I hope I'm not duplicating too much of your work here. If I am, please let me know so that I know where to look for these features in the future. -Bradford Hovinen
Guile bindings for forming CIs
Guile bindings for Student's t CDF
Functions to form CIs for proportions
Hypothesis testing, both C code and Guile bindings