Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Courses » ap-stat

Topic: Pr(Z<...) Calculating Chi-square Goodness of Fit using the TI-83 and MINITAB. (fwd)
Replies: 2   Last Post: Nov 5, 1996 10:01 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Bob Hayden

Posts: 2,384
Registered: 12/6/04
Re: Pr(Z<...) Calculating Chi-square Goodness of Fit using the TI-83 and MINITAB. (fwd)
Posted: Nov 4, 1996 7:54 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply


I got this comment re tables.

> Please realize that neither the TI-83 nor MINITAB will determine a p-value
> for a Chi-square Goodness of Fit test.


I can't speak for the TI-83, but Minitab is certainly capable of doing
this, and others on the list might want to see how. There is no
special command for this test; you have to type in the intructions for
doing the calculation. Given that, you might as well just type them
ONCE -- into a macro file. Here is a run of such a macro applied to
60 rolls of a die. The macro follows below. Feel free to snip it out
and use it with your version of Minitab.

****************************** run ******************************

MTB > set c1
DATA> 12 11 7 10 9 11
DATA> end
MTB > set c2
DATA> 10 10 10 10 10 10
DATA> end
MTB > exec 'stats1a/macros/goodfit'
Executing from file: stats1a/macros/goodfit.MTB
This macro carries out the chi-squared goodness-of-fit
test. The observed counts should be in C1 and the
expected in C2. (No, Minitab can't figure out what
you expect -- you have to tell it.) The macro will
destroy anything stored in c3-c5 and k1-k4.


ROW Observed Expected Residual ResidSqr ResSq/Ex

1 12 10 2 4 0.4
2 11 10 1 1 0.1
3 7 10 -3 9 0.9
4 10 10 0 0 0.0
5 9 10 -1 1 0.1
6 11 10 1 1 0.1

Calculated chi-squared statistic =
SUM = 1.6000
Degrees of freedom =

K1 5.00000
p-value

K4 0.901217


****************************** macro ******************************

note This macro carries out the chi-squared goodness-of-fit
note test. The observed counts should be in C1 and the
note expected in C2. (No, Minitab can't figure out what
note you expect -- you have to tell it.) The macro will
note destroy anything stored in c3-c5 and k1-k4.
noecho
let c3=c1-c2
let c4=c3*c3
let c5=c4/c2
name c1 'Observed' c2 'Expected' c3 'Residual' c4 'ResidSqr'
name c5 'ResSq/Ex'
print c1-c5
note Calculated chi-squared statistic =
sum c5
let k1=n(c1)-1
note Degrees of freedom =
print k1
let k2=sum(c5)
cdf k2 in k3;
chisquare k1.
let k4=1-k3
note p-value
print k4
echo
end



_
| | Robert W. Hayden
| | Department of Mathematics
/ | Plymouth State College MSC#29
| | Plymouth, New Hampshire 03264 USA
| * | Rural Route 1, Box 10
/ | Ashland, NH 03217-9702
| ) (603) 968-9914 (home)
L_____/ hayden@oz.plymouth.edu
fax (603) 535-2943 (work)





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.