I'm a programmer who's in the process of converting a tool built in Excel into a C# program. I've managed to port everything except for the NORMDIST() function, which is scaring the hell out of me.
I need to work out the cumulative normal distribution given x, the mean and the standard deviation. I posed this question in one of the C# question areas and got what I thought was an answer to my question:
But it turned out not to work, for instance:
x = 2.01490302054226
mean = 3.24088418968677
std dev = 0.427899387582919
E) Excel gives me: 0.00208435088016279
The C# function gives me: 556735840.808829
Sometimes the C# function is spot on, sometimes it's way off like above.
I don't need anyone to write the C# function for me (although it would be nice if you did), I just need it explaining in english how I go about calculating it using basic maths.
If anyone can help, or point me in the right direction?