# Questions? We have answers.

## Summary

You can use **risk-stratified** and **random** sampling methods to have MindBridge generate samples for you. These samples will be added to the [_Audit Plan_](https://support.mindbridge.ai/hc/en-us/articles/360056330814) as tasks.

- **Risk-stratified**: Uses risk scores to stratify the data currently displayed in the data table (i.e., entries or transactions, and any applied filters). This method is unique to MindBridge and favors **high-risk** and **medium-risk** entries/transactions when creating the sample.
- **Random**: Creates a truly random sample from the data currently displayed in the data table (i.e., entries or transactions, and any applied filters). Each entry/transaction has an **equal chance of being selected**, regardless of risk level.

Learn about [risk-stratified sampling](https://support.mindbridge.ai/hc/en-us/articles/360056060214-How-MindBridge-generates-samples#01FVFNFX2R8KEBE16CCX2P6KWA) and [random sampling](https://support.mindbridge.ai/hc/en-us/articles/360056060214-How-MindBridge-generates-samples#01FVFNFX2RRXEQDYGEXZ0YV3AT) in MindBridge below, and learn how to [create a sample](https://support.mindbridge.ai/hc/en-us/articles/360056334874).

**Note:** Any entries or transactions that have been added to the audit plan will be excluded automatically from sampling.

* * *

## Risk stratification and the 60/40 split

When you create a **risk-stratified sample**, MindBridge selects **all high-risk scores available** to be sampled (within the scope of the filters applied to the dashboard), and the rest of the sample is split to contain **60% medium-risk** transactions and **40% low-risk**.

For example, **100 transactions** were selected for the sample size. The financial data table contains:

- **6 high-risk** transactions
- **56 medium-risk** transactions
- **38 low-risk** transactions

* * *

## Random sampling

When you create a **random sample**, the items currently displayed in the data table (i.e.; entries or transactions that have not yet been added to the audit plan, and any applied filters) are shuffled, assigned a number by a pseudo-random number generator ([PRNG](https://support.mindbridge.ai/hc/en-us/articles/360056060214-How-MindBridge-generates-samples#01FVFNFX2REZK8S6S5NER1F590)), and then selected based on that randomized number.

You can choose whether the random sample pulls from:

- The **full filtered list** of items on the data table, **including previously sampled** entries or transactions, or
- A list that **excludes previously sampled** items

For example, if the sample size is set to 100, the resulting sample may contain any combination of **high-**, **medium-**, or **low-risk** transactions, depending on the data table contents and selected sampling option.

* * *

## Technical details

1. The PRNG is configured with a random seed based on system time and other variables;
2. A random number is generated for each item using the PRNG;
3. The items are sorted by their generated numbers.
4. The lowest "n" (sample size) items are returned as the sample.

For **risk-stratified sampling**, the above process runs 3 times, for high, medium, and low risk transactions.

For **random sampling**, the above process runs once across the whole population.

* * *
