> For the complete documentation index, see [llms.txt](https://docs.auditboardanalytics.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.auditboardanalytics.com/introductions/start-from-a-template/automated-sampling.md).

# Automated Sampling

Provides the building blocks for automated sampling. It takes a sample data set and determines the correct sample size using three different approaches: statistical methods, sampling guidelines, or a static sample size.

{% embed url="<https://auditboard-education-services.wistia.com/medias/w30uhrtn0v>" %}

### Input Requirements

* Any data file you wish to gather a sample from.
* Z-Score table: Currently setup with a standard Z-score associated with most all confidence levels.
* [Parameters](/workflows/parameters.md)
  1. Sample % of Population: Percent total of population you wish to sample.
  2. Minimum Sample Size: Minimum amount the sample size must be.
  3. Target Sample Size: The target sample amount you are aiming to achieve.&#x20;
  4. Confidence Level: Confidence interval used for Z-Score.&#x20;
  5. Tolerable Error Rate: Your tolerable error rate used for statistical sample size calculation.
  6. Expected Error Rate: Your expected error rate used for statistical sample size calculation.

### Output Expectations

* A percent total of your population as a true random sample.
* A true random sample with the size dictated as the lesser of your target or sample percent of population, but not less than your minimum sample size.&#x20;
* A true random sample with the size dictated by a statistical calculation.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.auditboardanalytics.com/introductions/start-from-a-template/automated-sampling.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
