1. Weighted Random Sampling with PostgreSQL

    You have a table like the following:

    CREATE TABLE weights (
    color varchar primary key,
    weight float
    INSERT INTO weights (color, weight)
    ('red', 8),
    ('blue', 3),
    ('green', 10),
    ('yellow', 10);

    The table lists the weights associated with certain colors. Imagine a weight representing how much you like that color.

    Now …

    read more
  2. Bayesian A/B Testing in Python

    Imagine you re-designing your e-commerce website. You have to decide whether the "Buy Item" button should be blue or green. You decide to setup an A/B test, so you build two versions of the item page:

    • Page A which has a blue button;
    • Page B which has a green …
    read more

« Page 3 / 3