Hi all,

I need to build a chi-square table with 100 degree of freedom at

0.05,0.01, 0.001 level using Ruby. Does anyone out there know what the

formula is for this table ?

Thanks,

Li

Hi all,

I need to build a chi-square table with 100 degree of freedom at

0.05,0.01, 0.001 level using Ruby. Does anyone out there know what the

formula is for this table ?

Thanks,

Li

On 7/1/07, Li Chen [email protected] wrote:

–

Posted via http://www.ruby-forum.com/.

The following may be useful to you:

Prasad

Hi Axel,

Thank you very much for the link. Currently I am more interested in

finding the critical value correponding to my chi-square value. But I

will try to figure out how to do it latter.

Li

Dear Li,

if you’re interested in the values rather than

in doing a programming exercise, you can use

the statistics2 package by Shin-ichi Hara:

blade.nagaokaut.ac.jp/~sinara/ruby/math/statistics2/statistics2-0.50/README

From the README:

— Statistics2.chi2dist(n, x)

Returns the integral of Chi-squared distribution with n degrees of

freedom

over (-Infty, x].

— Statistics2.pchi2dist(n, pr)

Returns the P-value of chi2dist().

— Statistics2.chi2X_(n, x)

Returns the integral of Chi-squared distribution with n degrees of

freedom

over [0, x].

— Statistics2.chi2_x(n, x)

Returns the integral of Chi-squared distribution with n degrees of

freedom

over [x, Infty).

— Statistics2.pchi2X_(n, pr)

— Statistics2.pchi2_x(n, pr)

Return the P-value of the corresponding integral.

Best regards,

Axel

Dear Li,

glad to be of help.

Currently I am more interested in

finding the critical value correponding to my chi-square value.

Maybe a worked-through example like this one:

http://stattrek.com/AP-Statistics-4/Goodness-Of-Fit.aspx?Tutorial=AP

can clarify things further.

Best regards,

Axel

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs