<p>I'm writing an app to help facilitate some research, and part of this involves doing some statistical calculations. Right now, the researchers are using a program called <a href="http://en.wikipedia.org/wiki/Spss" rel="noreferrer">SPSS</a>. Part of the output that they care about looks like this:</p>

<p><img src="https://i.stack.imgur.com/m0swl.png" alt="[Part of the SPSS output"></p>

<p>They're really only concerned about the <code>F</code> and <code>Sig.</code> values. My problem is that I have no background in statistics, and I can't figure out what the tests are called, or how to calculate them.</p>

<p>I thought the <code>F</code> value might be the result of the <a href="http://en.wikipedia.org/wiki/F-test#Table_on_F-test" rel="noreferrer">F-test</a>, but after following the steps given on Wikipedia, I got a result that was different from what <code>SPSS</code> gives.</p>

[{'answer_id': 1704, 'author': 'saint_groceon', 'author_id': 59, 'author_profile': 'https://Stackoverflow.com/users/59', 'pm_score': 3, 'selected': True, 'text': '<p><a href="http://people.richland.edu/james/lecture/m170/ch13-2wy.html" rel="nofollow noreferrer">This website</a> might help you out a bit more.  Also <a href="http://www.unesco.org/webworld/idams/advguide/Chapt4_3.htm" rel="nofollow noreferrer">this one</a>.</p>\n\n<p>I\'m working from a fairly rusty memory of a statistics course, but here goes nothing:</p>\n\n<p>When you\'re doing analysis of variance (ANOVA), you actually calculate the F statistic as the ratio from the mean-square variances "between the groups" and the mean-square variances "within the groups".  The second link above seems pretty good for this calculation.</p>\n\n<p>This makes the F statistic measure exactly how powerful your model is, because the "between the groups" variance is explanatory power, and "within the groups" variance is random error.  High F implies a highly significant model.</p>\n\n<p>As in many statistical operations, you back-determine Sig. using the F statistic.  Here\'s where your Wikipedia information comes in slightly handy.  What you want to do is - using the degrees of freedom given to you by SPSS - find the proper P value at which an <a href="http://www.ento.vt.edu/~sharov/PopEcol/tables/f005.html" rel="nofollow noreferrer">F table</a> will give you the F statistic you calculated.  The P value where this happens [F(table) = F(calculated)] is the significance.</p>\n\n<p>Conceptually, a lower significance value shows a very strong ability to reject the null hypothesis (which for these purposes means to determine your model has explanatory power).</p>\n\n<p>Sorry to any math folks if any of this is wrong.  I\'ll be checking back to make edits!!!</p>\n\n<p>Good luck to you.  Stats is fun, just maybe not this part.  =)</p>\n'}, {'answer_id': 14234, 'author': 'Grey Panther', 'author_id': 1265, 'author_profile': 'https://Stackoverflow.com/users/1265', 'pm_score': 2, 'selected': False, 'text': '<p>Statistics is hard :-). After a year of reading and re-reading books and papers and can only say with confidence that I understand the very basics of it.</p>\n\n<p>You might wish to investigate ready-made libraries for whichever programming language you are using, because they are many gotcha\'s in math in general and statistics in particular (rounding errors being an obvious example).</p>\n\n<p>As an example you could take a look at <a href="http://www.r-project.org/" rel="nofollow noreferrer">the R project</a>, which is both an interactive environment and a library which you can use from your C++ code, distributed under the GPL (ie if you are using it only internally and publishing only the results, you don\'t need to open your code).</p>\n'}, {'answer_id': 78279, 'author': 'leif', 'author_id': 14257, 'author_profile': 'https://Stackoverflow.com/users/14257', 'pm_score': 2, 'selected': False, 'text': '<p>In short: don\'t do this by hand, link/use existing software.  And sain_grocen\'s answer is incorrect.  :(</p>\n\n<p>These are all tests for significance of parameter estimates that are typically used in Multivariate response Multiple Regressions.  These would not be simple things to do outside of a statistical programming environment.  I would suggest either getting the output from a pre-existing statistical program, or using one that you can link to and use that code.</p>\n\n<p>I\'m afraid that the first answer (sain_grocen\'s) will lead you down the wrong path.  His explanation is likely of a special case of what you are actually dealing with.  The anova explained in his links is for a single variate response, in a balanced design.  These aren\'t the F statistics you are seeing.  The names in your output (Pillai\'s Trace, Hotelling\'s Trace,...) are some of the available multivariate versions.  They have F distributions under certain assumptions.  I can\'t explain a text books worth of material here, I would advise you to start by looking at \n"Applied Multivariate Statistical Analysis" by Johnson and Wichern</p>\n'}, {'answer_id': 83413, 'author': 'Gregg Lind', 'author_id': 15842, 'author_profile': 'https://Stackoverflow.com/users/15842', 'pm_score': 0, 'selected': False, 'text': '<p>Can you explain more why SPSS itself isn\'t a fine solution to the problem?  Is it that it generates pivot tables as output that are hard to manipulate?  Is it the cost of the program?  </p>\n\n<p>F-statistics can arise from any number of particular tests.  The F is just a distribution (loosely:  a description of the "frequencies" of groups of values), like a Normal (Gaussian), or Uniform.  In general they arise from ratios of variances.  Opinion: many statisticians (myself included), find F-based tests to be unstable (jargon:  non-<em>robust</em>).</p>\n\n<p>The particular output statistics (Pillai\'s trace, etc.) suggest that the original analysis is a MANOVA example, which as other posters describe is a complicated, and hard to get right procedure.</p>\n\n<p>I\'m guess also that, based on the MANOVA, and the use of SPSS, this is a psychology or sociology project... if not please enlighten.  It might be that other, simpler models might actually be easier to understand and more repeatable.  Consult your local university statistical consulting group, if you have one.  </p>\n\n<p>Good luck!  </p>\n'}, {'answer_id': 113042, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': "<p>I assume from your question that your research colleagues want to automate the process by which certain statistical analyses are performed (i.e., they want to batch process data sets).  You have two options:</p>\n\n<p>1) SPSS is now scriptable through python (as of version 15) - go to spss.com and search for python.  You can write python scripts to automate data analyses and extract key values from pivot tables, and then process the answers any way you like.  This has the virtue of allowing an exact comparison between the results from your python script and the hand-calculated efforts in SPSS of your collaborators.  Thus you won't have to really know any statistics to do this work (which is a key advantage)</p>\n\n<p>2) You could do this in R, a free statistics environment, which could probably be scripted.  This has the disadvantage that you will have to learn statistics to ensure that you are doing it correctly.</p>\n"}, {'answer_id': 1943777, 'author': 'Barry DeCicco', 'author_id': 233984, 'author_profile': 'https://Stackoverflow.com/users/233984', 'pm_score': 0, 'selected': False, 'text': '<p>Here\'s an explanation of MANOVA ouptput, from a very good site on statistics and on SPSS:</p>\n\n<p>Output with explanation:\n<a href="http://faculty.chass.ncsu.edu/garson/PA765/manospss.htm" rel="nofollow noreferrer">http://faculty.chass.ncsu.edu/garson/PA765/manospss.htm</a></p>\n\n<p>How and why to do MANOVA or multivariate GLM:\n(same path as above, but terminating in \'/manova.htm\')</p>\n\n<p>Writing software from scratch to calculate these outputs would be both lengthy and difficult;\nthere\'s lots of numerical problems and matrix inversions to do.</p>\n\n<p>As Henry said, use Python scripts, or R.  I\'d suggest working with somebody who knows SPSS if scripting.\nIn addition, SPSS itself is capable of exporting the output tables to files using something called OMS.\nA script within SPSS can do this.</p>\n\n<p>Find out who in your research group knows SPSS and work with them.</p>\n'}]
['https://Stackoverflow.com/questions/1679', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/55/']