Macro - Sample Precision
Macro - Sample Precision Benford's Law Fraud detectionDownloads First digits lawSite Map
Home Page | Population | Sampling | Fraud | Other | Tutorial | Macros
Macro - Sample Precision
Sub RunPrec()
'
' compute sample precision achieved
'
' RequiredConfidence - the confidence level as a percentage
' this will range from .10 - .99999, often .95
' PopulationSize - size of the population if known, otherwise 0
' ActualErrors - number of errors found
' SampleSize - the size of the sample tested
Dim oEZ As New cEZ
Dim dPrecision As Double

oEZ.Prec _
RequiredConfidence:=0.95, _
PopulationSize:=10000, _
ActualErrors:=3, _
SampleSize:=67

' in order to obtain the precision within Excel,
' call the function as follows
dPrecision = oEZ.Prec(0.95, 10000, 67, 3)

'MsgBox "precision achieved is " & Format(dPrecision, "#.###0")
Set oEZ = Nothing

End Sub

 

 

 

 

Main Page

Complete Auditor resources
Links | Privacy Policy | FAQ | Downloads | Trademarks
Web Page last updated on 04-20-2008
© EZ-R Stats, LLC 2005-2007