This article covers the technical implementation of ABSynthesis for developers. For information about the algorithms, see the methods section
All Scientific Microservices endpoints use an API key in combination with an email address for authentication. See Getting Started for more information including error handling and rate limits.
Use Cases
Overview
ABSynthesis provides a simple way to calculate the result of one or more AB experiments.
If you’re not familiar with the world of online science, it’s a powerful way of understanding and improving absolutely anything you can think of - you can see a great overview here.
But if you’ve done one experiment, the chances are you’ve done a lot of them. And when you look at all those results (especially if you pay for them yourself) you have probably thought about how to make sense of the whole collection of experiments you’ve run in the past.
Combining experiments is tricky, because some experiments are better than others. ABSynthesis tells you the overall uplift between two versions of something by correctly analysing the results of one or more experiments.
Endpoint URL
POST https://api.scientificmicroservices.com/absynthesis
Request Format
The request must be an HTTP POST request with a JSON body. The JSON data should be structured as an array of objects, where each object represents an experiment (representing a table of four columns with one row per experiment).
To understand how to set up your data, four definitions are required:
- base: The current or default version, e.g. the starting state of a website
- variant: The version that has been changed somehow, e.g. the same website, but with differently coloured buttons
- trials: The number of attempts in the experiment regardless of the outcome, e.g. website visitors
- successes: The number of times the desired action occurred e.g. a website visitor clicked a button
All these terms (or industry-specific equivalents) are used universally in the experimentation community. If you would like to deepen your understanding of these terms, see our use cases and methods sections.
In line with the above definitions, each object should include four named key-value pairs:
| Element | Description |
|---|---|
| trials_base |
The number of trials in the base version of the experiment. |
| successes_base |
The number of successes in the base version of the experiment. |
| trials_variant |
The number of trials in the variant (new) version of the experiment. |
| successes_variant |
The number of successes in the variant (new) version of the experiment. |
Example request
Response Format
The endpoint responds with a JSON object containing 2 values called 'uplift' and 'p_value'.
Example response
> {"uplift":[0.3779],"p_value":[0.0031]}
| uplift | The uplift value indicates how many more successes the variant would see compared to the base as a percentage (e.g. if a variant saw double the number of successes, uplift =1). |
| p_value | How much the uplift calculation can be trusted. A small number is better. |
We provide the p-value to give you a choice in how strong you need your result to be to call it 'true'. Generally people will trust any uplift that has an accompanying p value lower than 0.05.
If you are willing to be more ‘risky’ in your decision, you may want to set a more lenient threshold, such as 0.1 .
The impact of different p-value choices on your overall product journey is an unsettled and fascinating subject. Read our methods section to learn more.
Notes for Data Scientists
- We focus on the case where multiple experiments are to be combined. If only one experiment is provided, we use Student's t-test formula for binomial experiments, which should match other online experimentation platforms.
- The endpoint can be used progressively to track the performance of experimental programs as each experiment concludes. This enables program-level stopping rules that prevent your teams following dead end hypotheses.
- The algorithm we use depends on the data representing a trials/successes (i.e. binomial) type of experiment.
Notes for Developers
- Unlike other Scientific Microservices endpoints, ABSynthesis requires a specific structure of data with specific column names. Ensure you have all the right columns and their names are spelled correctly
- Implement proper error logging and monitoring to catch and resolve any server-side issues.
- Consider adding authentication and rate limiting to secure and manage the API.