I'm trying to find the p-value in a goodness of fit test comparing a set of observed values to a set of expected values. In Maple I can do it with ChiSquareGoodnessOfFitTest(Ob, Ex, level = 0.5, summarize = true), but I can't figure out its equivalence in Sage.
There's a function sage.stats.r.ttest(x, y), but when I run it on my sets, it says the p-value is 1 (it's supposed to be 0.1778, as in Maple).
The sets for reference are expected=[47.04, 25.48, 31.36, 39.2, 25.48, 27.44], observed=[42, 35, 9, 41, 41, 28].