Normsdist in VB5 
Author Message
 Normsdist in VB5

I am trying to program a function in VB5 that duplicated the NORMSDIST
function in Excel,
NORMSDIST Returns the standard normal cumulative distribution. The
distribution has a mean of 0 (zero) and a standard deviation of one.

NORMSDIST(Z) where Z   is the value for which you want the distribution.

Excel gives the example NORMSDIST(1.333333) equals 0.908789
_______________________________________________________

PI =  3.14159265358979
The formula I am using  is X =  ( 1/SQR(2 * PI) ) *  EXP(- (Z ^ 2 / 2) )

well it doesn't work, I don't mean I get a syntax error, I just get wrong
numbers returned.

Does anybody know the formula to use ??.

Thank you,

Neil.




Mon, 26 Mar 2001 03:00:00 GMT  
 Normsdist in VB5

Quote:

>I am trying to program a function in VB5 that duplicated the NORMSDIST
>function in Excel,
>NORMSDIST Returns the standard normal cumulative distribution. The
>distribution has a mean of 0 (zero) and a standard deviation of one.

>NORMSDIST(Z) where Z   is the value for which you want the distribution.

>Excel gives the example NORMSDIST(1.333333) equals 0.908789
>_______________________________________________________

>PI =  3.14159265358979
>The formula I am using  is X =  ( 1/SQR(2 * PI) ) *  EXP(- (Z ^ 2 / 2) )

>well it doesn't work, I don't mean I get a syntax error, I just get wrong
>numbers returned.

The formula you are using is the probability density function, i.e. it
returns the *height* of the curve at point Z, not the area under the curve
to the left of Z. To calculate the area, you need to take the *integral* of
your equation from negative infinity to Z.

I would look around for some statistics packages for VB -- commercial or
otherwise. I have Crescent Software's QuickPak Scientific for DOS Basic,
but its function is accurate to only 4 significant digits. In comparing the
results with those from Excel's function, there are differences in the 6th
decimal place.



Tue, 27 Mar 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Help, I Need the EXCEL NORMSDIST function in VB5

2. Help, I Need the EXCEL NORMSDIST function in VB5

3. Excel normsdist

4. Normsdist

5. Need formula for normsdist

6. ? Application.NormSDist ??? am I missing a reference?

7. VB5: Build *.EXE from command line with vb5 /make x.vbp

8. VB5/Access97 - Password Protected DB with VB5 DataControl

9. Help Pls, VB5 on VB6 Computer, Need VB5 Ocx

10. Need vb5.hlp file - not included with VB5 CCE

11. IE5 turns VB5 Pro into VB5 Learning Edition

12. VB5: Build *.EXE from command line with vb5 /make x.vbp

 

 
Powered by phpBB® Forum Software