# Variation Distribution Principle

## Bucketing

Bucketing is the process of assigning users to test groups in an A/B Test. This document explains how bucketing works.

{% hint style="info" %}
Bucketing is deterministic.

As long as the A/B Test conditions have not changed, a user is always assigned to the same test group.
{% endhint %}

An A/B Test has a seed used to randomly shuffle users and 10,000 slots for bucketing.

The A/B Test seed and user identifier are hashed through the [MurmurHash](https://en.wikipedia.org/wiki/MurmurHash) function into an integer mapped to the slot range. Since MurmurHash is deterministic, the same user always maps to the same integer as long as the seed has not changed. As long as the user identifier is shared consistently across systems, the same result will be produced regardless of which SDK is used.

![3096](/files/S7EcywZ6iDbC4w3hd8jo)

## Traffic Allocation

![1 Slot = 0.01%](/files/3isLL9RCnj3sEQ3HkuoU)

The 10,000 slots correspond to the traffic allocation percentage. Slot 0 corresponds to 0%, and slot 9999 corresponds to 100%. That is, 1 slot represents 0.01% of allocation.

![Traffic allocation 0%](/files/eDZ2djoNnXrCvByjDLlp)

When traffic allocation is 0%, no users are assigned to the A/B Test.

![Traffic allocation 40%](/files/IFerrpU0MVXxfmdfUdaJ)

When traffic allocation is set to 40%, users mapped to slots 0–3999, which correspond to 40%, are assigned to the A/B Test and exposed.

## Variation Distribution

![Traffic allocation 40% / Group distribution A(50) : B(50)](/files/jverWYARumvQVXhfg9ct)

An A/B Test with 40% allocation has two groups, A and B, with a 50:50 distribution ratio — the 4,000 allocated slots are distributed according to the group distribution ratio.

Users mapped to slots 0–1999 are assigned to Group A, and users mapped to slots 2000–3999 are assigned to Group B.

![Traffic allocation 60% / Group distribution A(50) : B(50)](/files/okHGYS5q4CqISxxT7gSk)

When traffic is increased to 60%, an additional 20% worth of slots need to be allocated. The remaining 2,000 slots (20%) are distributed and allocated according to the group distribution ratio.


---

# Agent Instructions: 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:

```
GET https://docs.hackle.io/en/ab-test/group-distribution/ab-bucketing.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
