Join our Newsletter — 33% off our NHI Course
Home› Guides› IT Audit Sampling: Choosing Sample Sizes and Methods…
Guide Audit, Assurance & Compliance

IT Audit Sampling: Choosing Sample Sizes and Methods for Control Testing

PDF for newsletter subscribers · free to read online

← All guides
By NHI Mgmt Group, under the editorial direction of Lalit Choda Updated 28 November 2026 17 min read
On this page

Most IT control testing rests on a sample, and a badly sized or badly selected sample gives a conclusion that will not survive an external auditor's review. This guide explains how to choose sample sizes and selection methods when testing IT general controls and security controls for SOC 2, SOX (internal control over financial reporting) and internal audit work. It covers the statistics behind attribute sampling, the frequency-based tables practitioners use, how automated controls change the approach, and how to handle deviations. It is written for internal auditors, control owners, GRC teams and security engineers who prepare evidence for testing. For the plan that wraps around these choices, see the Security Control Testing Plan Template.

Key takeaways

  • Three inputs drive sample size. PCAOB AS 2315 says sample size for tests of controls depends on the tolerable deviation rate, the expected deviation rate and the allowable risk of assessing control risk too low.
  • Selection matters as much as size. Every item in the population should have a chance of selection, across the whole period under review, and the control owner should never pick the sample.
  • Automated controls are tested differently. An automated control backed by effective IT general controls is usually tested with one instance per configuration, then benchmarked, rather than sampled like a manual control.
  • The population comes first. A sample drawn from an incomplete population proves nothing, so reconcile the population to an independent source before you select.
  • A deviation is a finding, not a nuisance. Plan in advance what happens when you find one; expanding a sample after the fact without a plan is not good practice.

What audit sampling is, and what it is not

PCAOB AS 1105 lists three ways to select items for testing: selecting all items, selecting specific items, and audit sampling. Audit sampling is applying a procedure to less than 100 percent of a population in order to evaluate a characteristic of the whole population. Testing specific items (for example every privileged account, or every change marked emergency) is a valid targeted test, but AS 1105 is explicit that its results cannot be projected to the entire population.

For control testing, the characteristic being measured is a rate: how often the control did not operate as designed. That is attribute sampling, where each item either passes or fails a defined attribute (approval present before deployment, access removed within the agreed period, review signed off with evidence). It differs from variables sampling, which estimates a monetary amount and belongs to substantive financial testing rather than control testing.

  • Population: every occurrence of the control in the period, such as all production changes, all leavers, all quarterly access reviews.
  • Sampling unit: one occurrence, for example one change ticket or one leaver record.
  • Attribute: the measurable pass condition, written before testing starts.
  • Deviation: an item that fails the attribute. AS 2315 notes that when a planned procedure cannot be applied to a selected item and there is no suitable alternative, the item is generally treated as a deviation, so missing evidence counts against the control.

The statistics behind the sample size

AS 2315 identifies two sampling risks in tests of controls. The risk of assessing control risk too low (concluding a control works when it does not) affects effectiveness: it is the dangerous one. The risk of assessing control risk too high affects only efficiency, since it leads to extra testing. Sample size grows as you demand more confidence, accept a lower tolerable rate, or expect more deviations.

  • Confidence level: one minus the allowable risk of assessing control risk too low. 90 percent and 95 percent are the common choices.
  • Tolerable deviation rate: the highest failure rate you would accept and still rely on the control. AS 2315 links a lower tolerable rate to lower planned control risk and higher desired assurance.
  • Expected deviation rate: what you expect to find, from prior years or walkthroughs. A higher expected rate needs a larger sample to conclude the same thing.

The table below gives sample sizes from the binomial distribution: the smallest sample for which finding the stated number of deviations still supports the conclusion at that confidence level. These are calculated values, shown for illustration. The US Government Accountability Office Financial Audit Manual (FAM 450) publishes a comparable table at 90 percent confidence and 5 percent tolerable rate that starts at 45 items with zero deviations.

ConfidenceTolerable rateSample if 0 deviations allowedSample if 1 deviation allowedSample if 2 deviations allowed
90%10%223852
90%5%4577105
95%10%294661
95%5%5993124

Two points follow from the table. First, an allowance of one deviation roughly doubles the sample, so testers who expect a clean control plan for zero deviations and accept that one failure will mean the control cannot be relied on at that confidence. Second, AS 2315 gives its own illustration: zero deviations in 60 items may support an acceptably low sampling risk, while two or more deviations may not. That is consistent with the 95 percent, 5 percent row.

Frequency-based sample sizes for manual controls

Most audit firms and internal audit functions turn the statistics into a table keyed to how often a control operates. These tables are methodology, not standards: neither the PCAOB nor the SEC prescribes them, and the SEC's 2007 interpretive guidance for management (Release 33-8810) deliberately declined to set sample sizes. Your external auditor's table is the one that matters if you want them to rely on your testing, so obtain it and align to it. The ranges below are typical of what practitioners encounter and should be read as a starting point for that conversation.

Control frequencyTypical occurrences per yearTypical sample range (lower risk to higher risk)IT and security examples
Annual11Annual policy review, disaster recovery test, annual risk assessment
Quarterly42Quarterly user access review, firewall rule review
Monthly122 to 5Monthly vulnerability scan review, privileged account reconciliation
Weekly525 to 15Weekly backup success review, patch compliance report review
Dailyabout 250 to 36520 to 40Daily batch job failure review, SIEM alert triage sign-off
Many times a day (transactional)more than 36525 to 60Change approvals, joiner and leaver tickets, firewall change requests

Higher-risk placement within a range follows the risk factors in PCAOB AS 2201 paragraph .47: the nature and materiality of what the control prevents, history of errors, changes in volume or personnel, complexity and judgement, and how much the control depends on other controls such as IT general controls. A control that failed last year, changed owner, or depends on manual judgement sits at the top of the range.

Selecting the sample

AS 2315 paragraph .39 says every item in the population should have an opportunity to be selected so the sample is representative, and ideally the method covers the entire period. Its footnote lists random-based methods: simple random, stratified random, probability proportional to size, and systematic selection with one or more random starts.

MethodHow it worksWhen to use itWatch out for
Simple randomGenerate random numbers against a numbered populationDefault for transactional IT controlsRecord the seed or the generated list as evidence so the selection can be reperformed
Systematic with random startPick every nth item from a random starting pointLong, ordered populations such as daily logsPatterns in the population (for example every seventh day is a Sunday) can bias the sample
Stratified randomSplit the population into strata, sample eachPopulations mixing very different items, such as standard and emergency changes, or several business unitsEach stratum needs its own sample size logic; do not average away a high-risk stratum
HaphazardTester selects without conscious biasSmall, low-risk judgemental samples onlyNot random-based, so it cannot support a statistical conclusion; people unconsciously avoid awkward items
Targeted (specific items)Test every item with a given characteristicAll emergency changes, all privileged grants, all service account creationsNot sampling: AS 1105 says results cannot be projected to the rest of the population

Combine methods where it helps: test all emergency changes as a targeted test, then take a random sample of standard changes. For interim testing (for example testing nine months, then the final quarter), AS 2201 paragraphs .55 and .56 require evidence for the remaining period, scaled to the control's risk, the strength of the interim evidence and the length of the remaining period.

Population completeness and reliable reports

The sample is only as good as the list it came from. PCAOB AS 1105 paragraph .10 requires that when information produced by the company is used as evidence, its accuracy and completeness are tested, or the controls over it are tested. In IT audit practice this is called IPE (information produced by the entity) testing.

  • Reconcile to an independent source: reconcile the change ticket list to the deployment pipeline history, the leaver list to the HR system, the privileged user list to the directory.
  • Capture the query: record the system, the query or report parameters, the run date, the person who ran it and the row count, so the population can be regenerated.
  • Check the date boundaries: the first and last items should fall at the start and end of the period; a population that starts three weeks late has a gap.
  • Look for out-of-process items: changes deployed without a ticket and accounts created outside the joiner process never appear in the ticketing population. Finding them needs a reverse test from the system side, which is often where the most significant findings come from.

Non-human identities are a frequent gap here. Service accounts, API keys and workload identities are often created outside the joiner, mover and leaver process, so a sample drawn from HR-driven tickets will not include them. Build a separate population from the directory and cloud platforms. See the Service Account Inventory Template.

Automated controls, benchmarking and full-population tests

AS 2201 paragraph .47 states that an automated control would generally be expected to be lower risk if relevant IT general controls are effective. Appendix B paragraph .B28 explains why: entirely automated application controls are generally not subject to breakdowns due to human failure. In practice this produces a "test of one" approach: test the configured control once per relevant configuration (for example each branch protection rule, each password policy, each automated deprovisioning workflow), and rely on IT general controls over change and access to show it stayed the same through the period.

  • Benchmarking: AS 2201 .B29 allows the auditor to conclude an automated control remains effective without repeating prior-year tests, provided general controls over program changes, access and computer operations are effective and the control has not changed since the baseline. .B33 requires the baseline to be re-established periodically.
  • Dependencies: .B30 notes that automated controls depend on related files, tables and parameters. A security example is an access control that depends on a group mapping table: test the table, not only the logic.
  • Configurable SaaS settings: a setting an administrator can switch off at any time behaves more like a manual control if change and access controls over the tenant are weak. Test the change history of the setting across the period, not only its current value.
  • Full-population testing: where a control's evidence is machine-readable (pipeline logs, identity provider events, ticket fields), a script can test every item. That removes sampling risk entirely, but the script becomes the control test: document its logic, test it against known good and bad cases, and test the completeness of the data it reads.

Choosing an approach: decision guidance

SituationRecommended approachReason
Manual, high-volume control, external auditor will rely on your workUse the external auditor's frequency table and selection methodReliance depends on their methodology being met; agree it before fieldwork
Manual control with fewer than about 12 occurrencesTest all occurrences, or the table minimum where testing all is impracticalStatistical sampling does not apply to tiny populations
Automated control, effective ITGCsTest of one per configuration, plus change historyAS 2201 treats automated controls as lower risk when ITGCs are effective
Automated control, weak or untested ITGCsSample occurrences as for a manual control, or test the full populationWithout change control evidence, no assurance it worked all period
Machine-readable evidence, large populationFull-population test with a validated scriptRemoves sampling risk and usually costs less after the first year
Known high-risk subset (emergency changes, privileged grants)Targeted test of all items in the subset, plus a random sample of the restConcentrates effort where failure matters; do not project the targeted result
Internal audit or management self-testing, no external relianceLower end of the range or 90 percent confidence where risk is lowSEC Release 33-8810 lets evidence scale with risk; record the rationale

Statistical or non-statistical: AS 2315 says both can give sufficient evidence when properly applied. Statistical sampling quantifies sampling risk and helps design efficient samples, but adds cost in training and design. AS 2315 also notes that a properly applied non-statistical sample is ordinarily comparable to or larger than an efficient statistical sample, so non-statistical does not mean smaller.

Small organisations: preparing for a first SOC 2 Type 2 or a smaller SOX programme, the main lever is automation. Moving approvals into tools that record them (pull request approvals, identity provider workflows) turns manual sampled controls into automated or fully testable ones. Large organisations: the issue is usually consistency across locations and teams. FAM 450 notes that multiple locations may be treated as one population or separate populations, depending on how uniform the controls are and how centrally they are overseen.

Evaluating results and handling deviations

AS 2315 paragraph .41 treats the sample deviation rate as the best estimate of the population rate, to be compared with the tolerable rate with sampling risk in mind. Paragraph .42 requires qualitative consideration too: the nature and cause of each deviation, and whether it suggests a deliberate act, which calls for broader consideration than an error.

  1. Confirm the deviation: share it with the control owner and give a short, fixed window for alternative evidence. Evidence created after the test is not evidence that the control operated at the time.
  2. Find the cause: one-off human error, a systemic process gap, a tooling change, or an out-of-process item. The cause decides the response more than the count.
  3. Decide against the plan: if the deviations exceed what the sample size allowed, the control is not operating effectively at that confidence level. FAM 450 advises against expanding an attribute sample unless the expansion was planned in advance, so define any expansion rule in the test plan, not after a failure.
  4. Look for compensating controls: a detective control that would have caught the failure may reduce severity. Test it separately; do not assume it worked.
  5. Classify and report: grade the deviation as an exception, deficiency, significant deficiency or material weakness under your framework. See Audit Exception vs Control Deficiency.
  6. Track remediation and retest: a remediated control needs a fresh period of operation before it can be retested, sized to its frequency. See the Audit Finding Remediation Guide.

In SOC 2 Type 2 reports, deviations appear in the service auditor's tests of controls and results. A reader who sees "no exceptions noted" against a sample of 25 has evidence of a different strength from one who sees a full-population test. See the How to Read a SOC 2 Report Guide.

Implementing a sampling methodology

  1. Write the methodology down: confidence levels, tolerable rates, the frequency table, selection methods, small population rules, and the deviation and expansion rules. One page is enough.
  2. Align with the external auditor: walk them through it before fieldwork and record their agreement, so your testing can be relied on and does not have to be redone.
  3. Classify every control: manual or automated, frequency, risk rating and ITGC dependency. This classification sets the sample size, so review it each year.
  4. Pilot on three or four controls: include one automated, one transactional and one quarterly control. Check that populations can be produced and reconciled, and that selections can be reperformed from the stored seed.
  5. Automate population extraction: scripted, repeatable queries with logged run details replace screenshots and ad hoc exports.
  6. Move suitable controls to full-population tests: start with high-volume controls whose evidence is already in logs.
  7. Roll back where needed: if a full-population script is found to be unreliable, revert that control to sampled testing for the period, document why, and fix the script before the next cycle.

Measuring whether testing works

  • Reperformance rate: percentage of samples an independent reviewer can regenerate from the stored seed and population.
  • Population reconciliation rate: percentage of tested controls with a documented completeness check.
  • External reliance rate: percentage of internally tested controls the external auditor relies on without retesting.
  • Full-population coverage: share of key controls tested in full rather than sampled, tracked year on year.
  • Late deviations: number of deviations first found by the external auditor rather than internal testing; a high count suggests samples are too small or selection is biased.

Framework mapping

FrameworkReferenceRelevance to sampling
PCAOB auditing standardsAS 2315 Audit Sampling; AS 2201 .44 to .47, .55 to .56, Appendix B .B28 to .B33; AS 1105 .10, .22 to .28Sample size inputs, selection, evaluation, automated control benchmarking, IPE, means of selecting items
SECRelease 33-8810 (management's ICFR evaluation)Evidence scales with ICFR risk; no prescribed sample sizes
AICPA2017 Trust Services Criteria (revised points of focus 2022)Criteria against which SOC 2 controls are tested
NIST SP 800-53 Rev 5CA-2 Control Assessments; CA-2(1) Independent Assessors; CA-7 Continuous MonitoringAssessment of controls, assessor independence, continuous testing
NIST CSF 2.0GV.OV-03; ID.IM-02Evaluating risk management performance; improvements from tests
ISO/IEC 27001:2022Clause 9.2 Internal audit; Annex A 5.35 Independent review of information security; 5.36 Compliance with policies, rules and standardsInternal audit programme and control compliance review

Common failure patterns

  • Owner-selected samples: the control owner sends "a few examples", which are the clean ones. Selection must be done by the tester from the full population.
  • Unreconciled populations: testing from a ticket export without checking it against the system of record misses out-of-process changes and accounts, which are usually the riskiest items.
  • Front-loaded samples: all items picked from the first months because evidence is easier to find, leaving the rest of the period untested.
  • Test of one without ITGC support: relying on a single test of an automated control when change management over the system was never tested or failed.
  • Sample expansion after failure: adding items until the deviation rate looks acceptable, without a pre-defined rule, which undermines the statistical basis.

Practitioner checklist

  • Document confidence levels, tolerable rates, frequency table and deviation rules in one methodology.
  • Agree the methodology with the external auditor before testing starts.
  • Classify each control as manual or automated, with frequency, risk and ITGC dependency.
  • Reconcile every population to an independent source and record the query, date and row count.
  • Build separate populations for service accounts and other non-human identities.
  • Select randomly across the whole period, store the seed, and never let the owner choose.
  • Test automated controls once per configuration, with change history for the period.
  • Define sample expansion and deviation handling in advance.
  • Move high-volume, log-evidenced controls to full-population tests and validate the scripts.

Standards and references

Related NHI Mgmt Group resources: Security Control Testing Plan Template · Audit Evidence and Continuous Controls Monitoring Guide · AI Agents and SOX Controls · SOC 1 vs SOC 2 vs SOC 3 · Audit, Assurance and Compliance Guide

PDF for subscribers

Take this guide with you

Every section, table and checklist in one PDF, with links to the sources and related guides. Subscribe to our weekly NHI & AI Identity Journal and we’ll email you a download link.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

PDF Downloads for Newsletter Subscribers

Get the guide

Enter your details and we’ll email you a download link.

The full guide is free to read online. The PDF is a thank you for subscribing.

Fill in all fields marked * and tick both boxes to continue.