nAuditAttr: Sample sizes for an attribute sample in an audit

View source: R/nAuditAttr.R

nAuditAttrR Documentation

Sample sizes for an attribute sample in an audit


Compute a sample size for an audit where the goal is to control the probability of observing only a small number of errors given an underlying error rate in the population. Auditors refer to this as an attribute sample.


nAuditAttr(TolRate=0.05, AccDev, CL, N=5000)



Proportion of units in the population with an attribute, e.g., errors in an audit. Auditors term this the 'tolerable rate of deviation' in the population to be tested.


Acceptable deviation, which is the number of units with the attribute (i.e., the number of errors) that would be acceptable in the sample. The largest proportion of errors that would be deemed to be acceptable in an audit would be AccDev/N.


Probability that the sample will contain an acceptable number of errors. Auditors refer to this as 'confidence level'. The probability that the sample will contain AccDev errors or fewer is 1-CL.


Size of the population of records to be audited.


nAuditAttr computes the minimum sample size required so that the probability, 1-CL of detecting less than or equal to a specified number of errors in the sample, is controlled. The sample is assumed to be selected with equal probabilities. AccDev is the largest number of errors in the sample that will be considered as meeting the audit standards. TolRate is the underlying population error rate, which is typically set to be larger than AccDev/N. The sample size is computed in two ways: (1) using the hypergeometric distribution, which accounts for the size of the population and (2) with the binomial distribution, which will be appropriate if the population is very large. When N is large and the sampling fraction is small, both sample sizes will be approximately the same.


List object with values:


population size


proportion of records with errors in population


largest number of errors, found in the sample, that will meet audit standards


minimum sample size needed to detect AccDev errors in the sample computed via the hypergeometric distribution


minimum sample size needed to detect AccDev errors in the sample computed via the binomial distribution


George Zipf, Richard Valliant


GAO (2020). Financial Audit Manual, Volume 1, section 450.08. Washington DC;

Stewart, Trevor R. (2012). Technical Notes on the AICPA Audit Guide: Audit Sampling. American Institute of Certified Public Accountants, Inc. New York, NY 10036-8775;


# Examples from the US GAO Financial Audit Manual (2020), Figure 450.1, Table 1
nAuditAttr(AccDev = 0, CL = .90)
nAuditAttr(AccDev = 1, CL = .90)
nAuditAttr(AccDev = 2, CL = .90)
nAuditAttr(AccDev = 3, CL = .90)
nAuditAttr(AccDev = 4, CL = .90)

PracTools documentation built on May 29, 2024, 12:07 p.m.