PC Review


Reply
Thread Tools Rate Thread

Cumulated Standard Normal Distribution in Access

 
 
=?Utf-8?B?b2xpdmVyMTk3Ng==?=
Guest
Posts: n/a
 
      5th Jul 2004
Hi all,

is there a function for the cumulated standard normal distribution in Access, like the NormSDist in Excel? Or is there a way to use the excel function in access, e.g. by referencing the excel object library?

Thanks a lot for your help!

oliver
 
Reply With Quote
 
 
 
 
Tim Ferguson
Guest
Posts: n/a
 
      5th Jul 2004
"=?Utf-8?B?b2xpdmVyMTk3Ng==?=" <(E-Mail Removed)>
wrote in news:0CE55CC9-E76B-4E95-B4D0-(E-Mail Removed):

> is there a function for the cumulated standard normal distribution in
> Access, like the NormSDist in Excel?




'Option Explicit

'***********************************************************************
'* Cumulative Standard Normal Distribution *
'* (this function provides similar result as NORMSDIST( ) on Excel) *
'* Source: http://www.geocities.com/WallStreet/9245/vba6.htm *
'***********************************************************************
Public Function SNorm2(z As Double) As Double

Const c1 = 2.506628
Const c2 = 0.3193815
Const c3 = -0.3565638
Const c4 = 1.7814779
Const c5 = -1.821256
Const c6 = 1.3302744
Dim w As Double, x As Double, y As Double

If z > 0 Or z = 0 Then
w = 1
Else
w = -1
End If

y = 1 / (1 + 0.231649 * w * z)

x = c6
x = y * x + c5
x = y * x + c4
x = y * x + c3
x = y * x + c2
SNorm2 = 0.5 + w * (0.5 - (Exp(-z * z / 2) / c1) * y * x)

' The one line version is too complex for most basic interpreters:
' SNorm = 0.5 + w * (0.5 - (Exp(-z * z / 2) / c1) * (y * (c2 + y * _
(c3 + y * (c4 + y * (c5 + y * c6))))))

End Function




// Hope that helps


Tim F

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
normal distribution and/or standard deviation colettey29 Microsoft Excel Charting 5 29th Jun 2008 02:27 AM
chart normal distribution/standard deviation colettey29 Microsoft Excel Worksheet Functions 2 17th Mar 2008 06:25 PM
Creating a Child Process with access to Standard Out, Standard In, and Standard Error patrick.ohara@cognex.com Microsoft Dot NET Compact Framework 3 15th Jun 2007 09:34 PM
RE: Normal S Distribution Function in Access 2002 SP3 =?Utf-8?B?WmFj?= Microsoft Access VBA Modules 1 26th Mar 2004 06:41 PM
how do you create a standard normal distribution chart? =?Utf-8?B?Z2xkdGtuNzdnYXJ5?= Microsoft Excel Charting 5 10th Dec 2003 05:42 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:58 AM.