Recursos · 26
Execute um teste A/B que suporte uma decisão sólida.
Especifique a hipótese, a atribuição, a métrica principal e as diretrizes antes de comparar variantes.
Atualizado · 6 min
O que este guia ajuda a alcançar
- Pré-registrar o protocolo
- Verificar a atribuição
- Observar as salvaguardas
- Decidir com incerteza
Verificação rápida
- Qual hipótese precisa poderia ser refutada?
- Qual unidade receberá a variante?
- A alocação observada corresponde ao plano?
- Qual dano justifica uma pausa?
- A duração e os segmentos foram definidos antes da visualização dos resultados?
Método passo a passo
- 1
Declare a mudança proposta
Descreva o mecanismo esperado, a população-alvo e o efeito em uma métrica principal. Descreva os possíveis riscos de acessibilidade e serviço.
Entregável: hipótese datada e critérios de sucesso.
- 2
Definir a atribuição
Escolher a unidade de randomização e manter a atribuição estável entre as visitas. Excluir bots e especificar segmentos fora do escopo antes do lançamento.
Entregável: protocolo de atribuição e exclusões.
- 3
Instrumento e teste
Verificar eventos de exposição, conversão e salvaguarda para ambas as variantes. Testar estados de dispositivo móvel, recusa de consentimento e erro.
Entregável: Registro de controle de qualidade de ambas as jornadas.
- 4
Verificar a proporção da amostra
Comparar as alocações observadas e esperadas antes de ler o efeito do tratamento. Uma discrepância pode expor defeitos de atribuição, medição ou direcionamento.
Entregável: verificação da proporção e diagnóstico de discrepâncias.
- 5
Analisar no momento planejado
Respeitar a janela escolhida e relatar incerteza, métrica primária, danos e análise do segmento planejado. Inspecionar surpresas sem selecionar apenas o número favorável posteriormente.
Entregável: análise com limitações e incertezas.
- 6
Decidir e acompanhar
Atribuir um responsável pela implementação, abandono ou outro teste. Após a implementação, verificar se o efeito e as salvaguardas permanecem consistentes.
Entregável: decisão arquivada e verificação pós-implementação.
Indicadores de gestão
| Indicador | O que mede | Primeira ação |
|---|---|---|
| Atribuição | Proporção de amostra esperada versus observada | Diagnóstico antes da análise |
| Exposição | Usuários elegíveis realmente expostos | Direcionamento de reparos |
| Efeito | Mudança e incerteza da métrica primária | Aplicar regra de decisão planejada |
| Salvaguardas | Erros, latência e abandono por variante | Pausar tratamento prejudicial |
Erros comuns
- Parar quando um número parecer favorável pela primeira vez
- Coletar muitas métricas sem uma primária
- Ignorar discrepância na proporção da amostra
- Tratar um pequeno segmento como prova geral
Perguntas frequentes
A proporção da amostra é uma mera formalidade?
Não. Uma discrepância inexplicável pode tornar a comparação não confiável.
A conversão deve ser verificada diariamente?
O monitoramento operacional ajuda, mas alterar a duração ou a regra de decisão em resposta aos resultados prejudica a interpretação planejada.
E se o resultado for incerto?
Relate a incerteza e o tamanho do efeito plausível e, em seguida, decida se outro experimento tem valor real.
Distribuição A/B: dados e SRM
As notas detalhadas desta edição estão disponíveis em inglês.
A conversion difference becomes difficult to interpret when compared groups no longer match the assignment plan. Sample Ratio Mismatch (SRM) is a data quality signal: investigate allocation before evaluating the product change. This dossier connects calculation, instrumentation and decisions without treating a p-value as overall validation of an experiment.
In 2020 Microsoft Research describes four stages where SRM can arise and an ExP reference threshold p < 0.0005 using a chi-squared test. The educational CIE reader below uses a two-sided exact binomial test for two 50/50 groups. It does not reproduce ExP’s algorithm; the historical threshold is illustrative, not a universal standard.
Microsoft Research · Diagnosing Sample Ratio Mismatch · Published 2020-09-14 · consulted 2026-10-23
Four places to investigate a counting discrepancy
| Stage documented by ExP | CIE review question | Original practical investigation |
|---|---|---|
| Assignment | Check the unit and rule that assign each participant. | Replay the same identity across visits; compare configuration versions and change times. A reassigned unit no longer represents two independent observations. |
| Execution | Compare what each variant actually allows to execute. | Reproduce redirects, incomplete loading, errors and cancellation. Record when exposure is logged and whether the variant changes that moment. |
| Log processing | Reconcile inputs, exclusions and joins. | Count units before and after each transformation. Check missing keys, duplicates, bot filters and telemetry loss by group. |
| Analysis | Examine the population retained for comparison. | Compare the assigned population with the analysed subset. A filter triggered by an action available only in B selects a population affected by treatment. |
Define what the two counts represent
| Reader assumption | Consequence for interpretation |
|---|---|
| Two mutually exclusive variants | Count each unit once, in A or B. Repeated page views or events are not distinct participants. |
| Fixed 50/50 allocation | Every unit has the same probability of assignment to A and B. A 90/10 allocation, changing ratio or enforced quota needs a different model. |
| Independent trials | Units linked through an organisation, household or reassignment can violate the binomial model. Choose the unit in the protocol. |
| Fixed window and filters | Compare the same interval and deduplication and eligibility rules. Do not adapt exclusions to obtain a desired result. |
| Bounded aggregate counts | Accept 0 to 5,000 units per arm, at most 10,000 overall. This is an interface limit, not a minimum statistical power requirement. |
| Quality check only | The reader computes neither effect, conversion, power nor required sample size. A result without an SRM signal does not establish causality. |
NIST/SEMATECH · Binomial distribution · e-Handbook §1.3.6.6.18 · consulted 2026-10-23
Leitor de distribuição 50/50
Enter the two observed counts or load a fictional example. This checks allocation, not conversion counts. Calculation stays in the browser, without transmission, storage, import or export.
Under H₀, X follows Binomial(N, 0.5), with N = A + B and k = min(A, B). The reader computes p = min(1, 2 × Σᵢ₌₀ᵏ C(N,i) / 2ᴺ). This doubles the smaller tail, valid here by 50/50 symmetry. Sums are evaluated in logarithms to retain very small probabilities; displayed values are rounded.
A p-value describes how this allocation compares with the assumed model; it is not the probability that the experiment is valid or that a bug exists. A small value does not locate the cause. A large value does not establish error-free data. Repeated checks and multiple segments change false-alert control: define a suitable monitoring rule before operational use.
Two integers from 0 to 5,000; intended allocation must be 50/50.
Resultado
Eight educational examples readable without JavaScript
R01 · Two balanced groups
| Count A | Count B | Expected reading |
|---|---|---|
| 50 | 50 | p = 1 under the model. This checks neither instrumentation, conversion nor causality. |
R02 · 60/40 across ten units
| Count A | Count B | Expected reading |
|---|---|---|
| 6 | 4 | p = 0.75390625. A visibly different ratio alone does not establish a signal at this small sample size. |
R03 · Same ratio, hundredfold sample
| Count A | Count B | Expected reading |
|---|---|---|
| 600 | 400 | The ratio remains 60/40, but the p-value becomes very small. Sample size changes statistical interpretation. |
R04 · One empty arm, ten units
| Count A | Count B | Expected reading |
|---|---|---|
| 0 | 10 | p = 0.001953125 remains above the illustrative 0.0005 threshold. No alert at this threshold does not certify both arms are working. |
R05 · One empty arm, twenty units
| Count A | Count B | Expected reading |
|---|---|---|
| 0 | 20 | p = 0.0000019073486328125: a signal under the reference threshold. Investigate before interpreting an effect. |
R06 · No observed units
| Count A | Count B | Expected reading |
|---|---|---|
| 0 | 0 | No p-value: no observations. Show unavailable data rather than a reassuring result. |
R07 · Extremely small probability
| Count A | Count B | Expected reading |
|---|---|---|
| 5000 | 1 | Displaying log₁₀(p) avoids presenting numerical rounding to zero as a mathematical impossibility. |
R08 · Leading space is not repaired
| Count A | Count B | Expected reading |
|---|---|---|
| 50 | 50 | Input rejected. The reader accepts only ASCII integers from 0 to 5,000, without spaces, signs, separators or redundant leading zeros. |
Before resuming effect analysis
| Suggested check | Record or result to retain |
|---|---|
| Timeline | Discrepancy onset, assignment versions, deployments and collection changes. |
| Stage counts | Assigned, exposed and analysed counts; differences explained using the same unit. |
| Identities | Evidence of unit stability and explicit treatment of duplicates, session changes and sign-ins. |
| Telemetry | Comparable events, delivery errors and losses by variant, device and version. |
| Filtering | Eligibility and exclusion rules, with their position before or after treatment. |
| Decision | Supported cause, fix, still-usable period or new experiment, owner and review date. |
Avoid artificially balancing groups by deleting observations to remove an alert. Reconstruct the data path first. An effect metric, guardrails and uncertainty remain necessary after repairing counts. In the final brief, separate the statistical signal, demonstrated cause and product decision.
Sources, editions and credits
Sources: Microsoft Research, article dated 14 September 2020; NIST/SEMATECH, binomial distribution §1.3.6.6.18. Questions, recipes and eight cases are CIE educational material, not results from real experiments. No institutional chart, logo or visual is reproduced.
Microsoft Research · Diagnosing Sample Ratio Mismatch · Published 2020-09-14 · consulted 2026-10-23
SHA-256 : d28a6a66b3f1d014f3aafce6c0239b6a6477049b2d4582f06f4d6aaae651ee75
NIST/SEMATECH · Binomial distribution · e-Handbook §1.3.6.6.18 · consulted 2026-10-23
SHA-256 : d899609cde11a15ebd745f6313931da10e9511a0dff64f39b027e5b9ad103ad8
Referências oficiais
As referências apoiam o método. Adapte as verificações ao seu contexto; elas não são uma certificação. Os títulos das referências originais e os documentos de origem podem estar em outro idioma.
Referências consultadas em .
