Message Boards Message Boards

0
|
8957 Views
|
7 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Calculate a P-Square using the Chi-Square Test?

Posted 7 years ago

Hi, I have a data set that I would like to upload to use the Chi-Square Test in order to Calculate my P-Square. Can someone assist on how to go about this? Thanks! Chriss

Attachments:
POSTED BY: Christine Arce
7 Replies

I am not sure I understand the question, but if you are asking about how to compute a Chi Square statistic and its meaning when one confronts contingency tables, I have written a brief notebook for my class. I'm attaching it to this post.

Attachments:
POSTED BY: Seth Chandler

Dear Mr. Seth Chandler,

Thanks for your information, this is very useful !

Regards,.....Jos

POSTED BY: Jos Klaps

Hi Christine,

In further calculations shows the p-Value for the PearsonChiSquareTest : 0.0496.

\[ScriptCapitalH] = 
 PearsonChiSquareTest[data, Automatic, "HypothesisTestData"]
\[ScriptCapitalH]["PValueTable"]
p = PearsonChiSquareTest[data]

Good Luck,.......Jos

POSTED BY: Jos Klaps

Hi Christine,

Sorry, I don't have experience with Chi-Square Test, but maybe this could help !

data=Import["C:\\Users\\Jos\\Wolfram Mathematica\\.......\\Wolfram_ChiSquare Test.xlsx", "xlsx"]
data = Take[data[[All, 2]]]
maxdata = Max[data]
mindata = Min[data]
vardata = Variance[data]
meddata = Median[data]
meandata = Mean[data]
stddata = StandardDeviation[data]
Print[Style["Demand (X)", 14, Bold, Red]]
Print["Maximum:       ", maxdata]
Print["Minimum:       ", mindata]
Print["Variance:      ", vardata]
Print["Median:        ", meddata]
meandata = N[Mean[data]];
stddata = N[StandardDeviation[data]];
modedata = Commonest[data][[1]];
Grid[{
  {Labeled[meandata, "Mean:         ", Left]}
  , {Labeled[modedata, "Mode:         ", Left]}
  , {Labeled[stddata, "Standard Dev.:", Left]}
  }
 , Alignment -> Left]
d1 = NormalDistribution[modedata, stddata];
H = DistributionFitTest[data, d1, "HypothesisTestData"];
H["TestDataTable", All]

Good luck,.....Jos

POSTED BY: Jos Klaps

Try reading:

http://www.wolfram.com/language/fast-introduction-for-programmers/en/

or

https://www.wolfram.com/language/elementary-introduction/

those two will explain simple list-manipulation and import et cetera,

POSTED BY: Sander Huisman
Posted 7 years ago

Hi, Yes I did look at the references many times. I am now taking a class so I am unfamiliar with the concept. Also, I am a first time user to Wolfram. I have no idea how to use my data and follow the Reference Guide to input the data into the formula bar. So unfortunately, the link doesn't help me much because I don't know how to interpret it into Wolfram nor do I understand what I'm doing. Sorry for my lack of understanding but you'll have to go step by step with me on this because I'm completely clueless.

Thanks.

POSTED BY: Christine Arce

What did you try yourself? Have you looked for Chi square test? You would've found: http://reference.wolfram.com/language/ref/PearsonChiSquareTest.html

With a plethora of examples. Good luck!

POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract