# Help Anova

#### 02020954

##### New Member
hi everyone,
I currently try to find an open source C/C++statistical library. Basically, I want to calculate the p and F value from oneway (or N way anova). Does anyone know where downloadable ( free) c/c++ statiscal library ?

Thank you very much

#### JohnM

##### TS Contributor
Google has links to many of them I'm sure.....try typing in things like C++ and library and ANOVA in the search box.

#### 02020954

##### New Member
i did not find any statistical libraries for c/c++ without paying money. Do have any free libararies ?
thanks

#### quark

##### Admin
Hi,

The Numerical Algorithms Group makes a popular statistical library for c/c++ called NAG C Library. You can also search for anova in c if you are only interested in the anova table.

#### 02020954

##### New Member
thank you!
but this library has only 30 days trails :shakehead
Anyone knows other c/c++/C# statistical libraries for Anova ?
Thanks

#### JohnM

##### TS Contributor
I've done a little bit of programming in C, but mostly in VB - if you can't find an ANOVA library, it shouldn't be that big of a deal to create your own 1-way ANOVA function....right? I've done similar types of things, and once you do it, it comes in very handy....

#### 02020954

##### New Member
thank a lot guys,
I did write a program to do one way anova . The big deal in here is that I could not find how to calculate the p value from the f value. :shakehead
You guys have any ideas about how to calculate p value from f value in anova function? such as some formulars ???

I found in Mathlab the functions call
Pvalue = 1 - fcdf (Fvalue, degree_freedom(1), degree_freedom(2));

however, it is too hard to write a function fcdf because inside this function has a nested other functions that is impossible to implement in C++.

any helps ?
Thank you

#### JohnM

##### TS Contributor
Not sure if this will help you, but:

The following page shows how to generate various probability distributions from the uniform random number generator available with any software, including VB or C:

http://members.aol.com/johnp71/course/course04.html

Follow the chain from Uniform --> Normal --> Chi-Square --> F

I used some of this logic to help me generate skewed (i.e., chi-square) distributions and distributions with kurtosis (i.e, t-distribution) in my thesis.

Instead of going from uniform --> normal the way it is described above (kinda slow), it may go faster if you use the Box-Muller method described here:

http://www.taygeta.com/random/gaussian.html

#### 02020954

##### New Member
thanks for the Java page source. I don't know how to see the code behind the page ? Can someone tell me how to see the source code of that page ?
Thanks