Click here to Skip to main content
15,899,313 members
Home / Discussions / Algorithms
   

Algorithms

 
GeneralRe: How much different are they? Pin
Alan Balkany7-Aug-08 6:57
Alan Balkany7-Aug-08 6:57 
QuestionHow to calculate FDIST Pin
sumit703423-Jul-08 1:39
sumit703423-Jul-08 1:39 
AnswerRe: How to calculate FDIST Pin
cp987623-Jul-08 12:03
cp987623-Jul-08 12:03 
GeneralRe: How to calculate FDIST Pin
sumit703423-Jul-08 17:58
sumit703423-Jul-08 17:58 
GeneralRe: How to calculate FDIST Pin
sumit703429-Jul-08 18:46
sumit703429-Jul-08 18:46 
GeneralRe: How to calculate FDIST Pin
Kok Yuen Li8-Oct-13 22:15
Kok Yuen Li8-Oct-13 22:15 
AnswerRe: How to calculate FDIST Pin
Paul Conrad23-Jul-08 12:13
professionalPaul Conrad23-Jul-08 12:13 
GeneralRe: How to calculate FDIST Pin
sumit703423-Jul-08 18:38
sumit703423-Jul-08 18:38 
using formula in this link:
http://mathworld.wolfram.com/F-Distribution.html[^]

i have written a program in c#

public static double FDIST(double x, double m, double n)
{
double result = gamma((n + m) / 2.0) * Math.Pow(n, n / 2) * Math.Pow(m, m / 2) * Math.Pow(x, n / 2-1);
result = result / (gamma(n / 2) * gamma(m / 2)* Math.Pow(m+n*x,(n+m)/2));
return result;
}


private static double gamma(double data) {
if (data == 0.0) return 0;

double p0 = 1.000000000190015;
double []p ={76.18009172947146,
-86.50532032941677,
24.01409824083091,
-1.231739572450155,
1.208650973866179e-3,
-5.395239384953e-6
};

double y=data ; double x = data;
double tmp = x + 5.5;
tmp -= (x + 0.5) * Math.Log(tmp);

double summer = p0;
for (int j=0;j<6;++j) {
summer += (p[j] / ++y);
}
return Math.Exp(0 - tmp +Math.Log(2.5066282746310005 * summer / x));
}




But still i m not getting accurate answer as in ms excel.
please help
GeneralRe: How to calculate FDIST Pin
Paul Conrad23-Jul-08 18:47
professionalPaul Conrad23-Jul-08 18:47 
AnswerRe: How to calculate FDIST Pin
Paul Conrad26-Jul-08 11:49
professionalPaul Conrad26-Jul-08 11:49 
GeneralRe: How to calculate FDIST Pin
sumit703428-Jul-08 18:56
sumit703428-Jul-08 18:56 
GeneralRe: How to calculate FDIST Pin
Paul Conrad28-Jul-08 18:58
professionalPaul Conrad28-Jul-08 18:58 
GeneralRe: How to calculate FDIST Pin
sumit703429-Jul-08 18:00
sumit703429-Jul-08 18:00 
QuestionHow to find the values of x and y in a 90 degree sector Pin
pallaka22-Jul-08 20:53
pallaka22-Jul-08 20:53 
AnswerRe: How to find the values of x and y in a 90 degree sector Pin
dojohansen22-Jul-08 21:45
dojohansen22-Jul-08 21:45 
AnswerRe: How to find the values of x and y in a 90 degree sector Pin
Stephen Hewitt22-Jul-08 21:52
Stephen Hewitt22-Jul-08 21:52 
GeneralRe: How to find the values of x and y in a 90 degree sector Pin
pallaka22-Jul-08 22:27
pallaka22-Jul-08 22:27 
AnswerRe: How to find the values of x and y in a 90 degree sector Pin
CPallini22-Jul-08 22:05
mveCPallini22-Jul-08 22:05 
GeneralRe: How to find the values of x and y in a 90 degree sector Pin
pallaka22-Jul-08 22:28
pallaka22-Jul-08 22:28 
QuestionRe: How to find the values of x and y in a 90 degree sector Pin
CPallini22-Jul-08 22:40
mveCPallini22-Jul-08 22:40 
AnswerRe: How to find the values of x and y in a 90 degree sector Pin
pallaka22-Jul-08 22:44
pallaka22-Jul-08 22:44 
GeneralYou're welcome Pin
CPallini22-Jul-08 22:50
mveCPallini22-Jul-08 22:50 
GeneralRe: How to find the values of x and y in a 90 degree sector Pin
pallaka22-Jul-08 22:33
pallaka22-Jul-08 22:33 
QuestionUnicode to html Pin
michela21-Jul-08 0:36
michela21-Jul-08 0:36 
AnswerRe: Unicode to html Pin
Paul Conrad21-Jul-08 4:20
professionalPaul Conrad21-Jul-08 4:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.