Sorry, this content is no longer available

Ask Your Question
0

Finding a p-value in goodness of fit test

asked 7 years ago

Ross1856 gravatar image

updated 7 years ago

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.00001778, 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].

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
0

answered 7 years ago

kcrisman gravatar image

This is the same result as in R proper. See this example.

However, as this post points out,

Unlike most statistical packages, the default assumes unequal variance and applies the Welsh df modification.

I don't know much about t tests, and nothing about Maple and stats, so you will have to find out what is up, but my guess is that this has something to do with it.

On another note, if you are only doing statistics, you may wish to use R more directly, as Sage's interface is somewhat cumbersome. (It is quite useful for going back and forth with stuff, though, as I've profited from it myself.)

Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 7 years ago

Seen: 395 times

Last updated: May 01 '17