Auditing is based on random sampling from the records of a company. This paper considers a Bayesian model for determining the sample sizes by finding a balance between the cost of sampling and the risk of leaving major faults undiscovered. It leads to a dynamic programming problem which involves substantial computations, but a slightly different approach in which discrete sampling is replaced by a continuous search for faults produces more explicit solutions.