Equivalence Test in Multi-dimensional Space with Applications in A/B Testing

09/24/2018 ∙ by Jing Miao, et al. ∙ adobe Stanford University 0

In this paper, we provide a statistical testing framework to check whether a random sample splitting in a multi-dimensional space is carried out in a valid way, which could be directly applied to A/B testing and multivariate testing to ensure the online traffic split is truly random with respect to the covariates. We believe this is an important step of quality control that is missing in many real world online experiments. Here, we propose a randomized chi-square test method, compared with propensity score and distance components (DISCO) test methods, to test the hypothesis that the post-split categorical data sets have the same multi-dimensional distribution. The methods can be easily generalized to continuous data. We also propose a resampling procedure to adjust for multiplicity which in practice often has higher power than some existing method such as Holm's procedure. We try the three methods on both simulated and real data sets from Adobe Experience Cloud and show that each method has its own advantage while all of them establish promising power. To our knowledge, we are among the first ones to formulate the validity of A/B testing into a post-experiments statistical testing problem. Our methodology is non-parametric and requires minimum assumption on the data, so it can also have a wide range of application in other areas such as clinical trials, medicine, and recommendation system where random data splitting is needed.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1. Introduction

A/B testing (also known as split testing or bucket testing) is a method of comparing two versions of a webpage or app against each other to determine which one performs better. It is essentially a special case of multiple variants of a page which are shown to users at random, and statistical analysis is used to determine which variation performs better for a given key performance indicator (KPI). Sometimes, the results from A/B testing are used as a baseline to be compared with other digital marketing services, e.g. personalization. Thus, it is important that A/B testing or multi-variate testing results are truly valid so that we make the correct inference. One important aspect is to get rid of any confounding. In other words, we want to make sure that the randomly assigned groups have the same profile distributions. In this way any difference in the KPI actually results from the testing objects, instead of from some characteristics of the users such as age or gender. Despite the large volume of literature on A/B testing design, to our knowledge, there has not been any papers which aims to validate the balance of population distribution of different groups. We want to point out that our distribution testing methods are non-parametric by design and can have much more general applications beyond A/B testing, such as in randomized medical clinical trials, in design of experiments in manufacturing fault detection, and in bandits problem in personalized medicine, basically anywhere when uniformly random data splitting is required in a multi-dimensional space.

The rest of this paper has the following structure: Section 2 discusses past literature on theory and application of randomized controlled trials (RCT) and observational studies. Section 3 introduces some statistical tools, i.e., distance-covariance analysis, propensity score method, randomized chi-square test, and a resampling technique, to test equivalence of multi-dimensional categorical distribution. Section 4 compares and analyzes the above methods on simulated data. Section 5 applies our methods on real traffic data of online marketing from Adobe Experience Cloud. Section 6 discusses further generalization and implementations of our methodology.

2. Past Work

Randomized controlled trials are the simplest method to yield unbiased estimates of the treatment effects under a minimal set of assumptions. Researchers have been developing new methodology that boosts the efficiency of randomized trials when sample size is small. Sample size may not be a problem in some e-commerce settings as the number of online visitors can easily build up to hundreds of thousands. However, in other settings such as clinical trials, the number of samples (patients) is often small

(bhat2017, ). (bhat2017, ) formulates online/offline A-B testing as a (computationally challenging) dynamic optimization problem and develops approximation and exact algorithms. In particular, the paper assumes that response is linear in the treatment and covariates: , where or according to whether subject is assigned to treatment or control group, and denotes covariates of subject

. The objective is to maximize overall precision, which is the inverse of the standard error of

. In online setting, is measurable. It can also incorporates other goals such as controlled selection bias and endogenous stopping. Despite clean theoretical guarantees and relatively easy implementation of this algorithm, the linear model is not applicable in many real cases, for example, if is 0 or 1 denoting whether a user convert or not. In this case, a generalized linear model makes more sense but we are unclear about any theoretical results in this scenario. Also the theory requires to have elliptical distribution, which is not the case in many real applications, though one real experiment with categorical data in the paper still performs well. More importantly, the number of covariates may not be clear at the beginning of A/B testing as online user profile may not be available at the time of experiments. Since the current paper is concerned with experiments in e-commerce, the sample size does not pause a big issue.

There are numerous works on the implementation, validity, and efficiency of A/B testing. (kohavi2009, )

gives a detailed summary of the things data scientists need to pay attention to when carrying out A/B testing, and in general multivariate testing, such as determining the right sample size before testing and stopping the experiments when buggy or unintentionally poor results come up. When there are more than one variant to test, such as the choice of the picture or the color of the text on a website, online experimenters can either do multiple pairwise comparison of each individual variant, and apply methods of multiple testing adjustments, such as Bonferroni adjustment, if the number of variants is small, or do a multivariate test altogether. This paper mentions some possibilities that A/B testing split might not be truly random. One of the most common in practice is the effect of robots. Robots can introduce significant skew into estimates, enough to render the split invalid, and cause many metrics to be significant when they should not have been. For some websites robots are thought to provide up to half the pageviews on the site

(kohavi2004, ). However, it is difficult to clearly delineate between the human users and robots (tan2002, ). Despite mentioning possible confounding factors in online experiments, this paper does not go into details on how to get rid of them, and how to test whether the splitting of traffic is truly random.

When randomized trials are not possible, techniques in observational studies are needed to get valid inference. (gordon2016, )

focuses on the evidence of advertising measurements from big field experiments in Facebook. It uses the advertising effects measured from RCTs as benchmark, and compares the causal effects measured from observational studies to the benchmark. Two methods proposed by the paper to get rid of confounding in non randomized experiments are matching and regression adjustments. Exact matching and propensity matching are two common ways in practice for the former. Inverse-probability-weighed regression adjustment (IPWRA)

(wooldridge2007, ) incorporates propensity information into regression adjustments to provide more robust results. This paper also mentions checking the equivalence of distribution in A/B split so as to create valid benchmark. Yet it simply checks each covariate independently without adjusting for multiplicity. This can incur false positives when the number of covariates is large and cannot detect difference in covariance structure. A/B testing is a design experiment so we do not need to use the methodology of observational studies in our paper.

There are also papers on the continuous monitoring of A/B testing and how to effectively run a large number of A/B testing. If we plot online experiments results continuously and declare significance the first time p-value is smaller than a pre-defined threshold, we will find that the actual type I error can be much larger than the threshold.

(johari2015, ) introduces methods to continuously monitoring A/B while still controlling type I error or the false discovery rate. (tang2010, ) describes overlapping experiments infrastructure that helps run experiments faster and produce better decisions. (zhang2017, ) describes an adaptive sample size modification for cold start of A/B testing. Network effect can also come into play, especially for experiments conducted in companies like Facebook or LinkedIn. (gui2015, ) proposes an A/B testing effect analysis by taking into account network effect into a linear model.

All these works contribute to the validity or efficiency of online experiments. We emphasize that our ”randomness check” has a very general application, regardless of how traffic is split, the distribution of the covariates, or whether the experiments are done offline or monitored continuously.

3. Methodology

To formulate the problem mathematically, assume the distributor has assigned incoming users to

groups. Each user is represented by a row vector of length

, with each entry representing certain profile information, such as age, area, gender, or number of times of past visit. Hence, we have data sets, each of dimension . Our goal is to infer whether the split achieves desired randomness by testing whether the -dimensional data have the same distribution. Throughout our analysis, we assume each column is categorical and each row (user) is independent. These are reasonable assumptions because many important profile informations, such as gender, age, region, are categorical. We assume the number of user in each group is large, and the network effect is negligible compared to the scale of user numbers.

In the following subsections, we first state the method that is used currently by online experimenters to do the A/B split validity check (gordon2016, ) as baseline. Then we describe a method proposed by (rizzo2010, )

, called distance components (DISCO), of measuring the total dispersion of the samples, which admits a partition of the total dispersion into components analogous to the variance components in ANOVA. We will also apply propensity method and introduce a randomized chi-square test. Each of these distribution test method has its own advantage as we show in Section

4. Finally, we propose a resampling technique that controls family-wise error rate (FWER) under any condition while still maintaining high power compared to some other multiplicity adjustment methods, as again shown in Section 4. Our contribution is to apply and modify existing testing methods to the ubiquitous A/B-multi testing validity check.

3.1. Baseline

(gordon2016, ) and some other papers apply F-test 111see https://en.wikipedia.org/wiki/F-test for an introduction of F-test. to each of the column (covariate) or some key columns of the split data sets, and claim the split is truly random if none of the p-value is smaller than 0.05. This is perhaps the most straightforward and simple way of approaching the randomization check problem, but with some potential issues. First, F-test can only test difference in mean, but cannot detect other distributional differences, such as variance (we will see in the next subsection DISCO provides a solution to this). Second, even if each column has the same distribution among the data sets, the interaction among the columns can be different for each data set, which also contribution to multi-dimensional distribution heterogeneity. Third, multiplicity adjustment is needed if the dimension is large, which is often the case for online marketing data. Otherwise, even an A/A test can have very high false positive rate.

To address the third issue, we apply a resampling technique (introduced later) to adjust for multiplicity. It has the advantage of controlling FWER under any dependence structure of p-values, while maintaining high power compared to other p-value adjustment methods, such as Bonferroni or Holmes method.

3.2. DISCO one-step test

(rizzo2010, ) propose a new method, called distance components (DISCO), of measuring the total dispersion of the samples in multi-dimensions, which admits a partition of the total dispersion into components analogous to the variance components in ANOVA. They introduce a measure of dispersion based on Euclidean distances between all pairs of sample elements, for any power , which is called the index, of distances such that . The method is based on the following key definitions and theorem.

Suppose that and are independent and identically distributed (i.i.d.), and and are i.i.d., independent of . If is a constant such that and , define the -distance (energy distance) between the distributions of and as

(1)

Then we have the following theorem.

Theorem 3.1 ().

Suppose that are i.i.d. with distribution , are i.i.d. with distribution , and is independent of . If is a constant such tha and , then the following statements hold:
(i)
(ii) If , then if and only if .
(iii) If , then if and only if .

The proof of Theorem 3.1 can be read in (rizzo2010, ). Based on this theorem, DISCO statistics, which can be thought of as a variation of the ANOVA statistics, can be developed. Define the empirical distance between distributions as follows. For two -dimensional samples and , the -distance between and is defined as

(2)

where

(3)

Note that is within-sample dispersion and is between-sample dispersion. Similar to ANOVA analysis, we can also write total dispersion as summation of between-sample and within-sample dispersion here. Let be -dimensional samples with sizes . The -sample -distance statistic that takes the role of ANOVA sum of squares for treatments is the weighted sum of dispersion statistics:

(4)

Similarly, the total dispersion of the observed response is

(5)

where is the pooled sample, and the within-sample dispersion is

(6)

Note that we have , and when , the decomposition is exactly the ANOVA decomposition of the total squared error: . Hence, ANOVA is a special case of DISCO method.

Based on the decomposition, the final statistics for testing equality of distribution is

(7)

with (if , the above statistics can only test equality of mean). The distribution of is complicated so (rizzo2010, ) uses permutation, which is a simplified version of our resampling technique, to obtain rejection thresholds. As we will see in Section 4

, DISCO one-step test, though simple to implement, does not provide information about which dimensions are problematic when the null hypothesis of equal distribution is rejected.

3.3. Propensity score method

Propensity score comparison 222see https://en.wikipedia.org/wiki/Propensity_score_matching tests whether the -dimensional data sets have the same distribution by fitting a model to the data to obtain the likelihood of a data point being assigned to a particular data set. To be specific, combine the data sets to be one big data set , which is also the -dimensional covariate space. The response is a length- vector with each entry being the class label (1,2,…,or

) of each data point. We can then fit logistic regression, tree-based model, support vector machine, or any class prediction model to the data to obtain a predicted label for each data point. Here we use multiple logistic regression. If the

original data sets truly have the same distribution, the predicted labels should have about uniform distribution on

. We use chi-square test 333see https://en.wikipedia.org/wiki/Chi-squared_test on a contingency table to test the uniformity of distribution. However, we can show, for logistic regression, that only when the data sets are exactly the same is the distribution of the predicted labels truly uniform. Otherwise, the predicted label will tend to be the same as the actual label due to overfitting. To resolve this, we can randomly choose a proportion of rows in each data set to be training data, and the rest are test data. But this reduces the effective test sample size in the stage of chi-square test. For example, if we choose , then only 1/5 of the data are used to chi-square test. This can shrink power when the total number of data points are not too large. Here, like in DISCO one-step test introduced in the previous subsection, we use permutation method to get the rejection threshold for the p-value obtained from the chi-square test.

The propensity score method, in some sense, takes into account both marginal distributions and interactions because all the covariates appear together on the right hand side of the link function. Interaction terms can also be added, but it is unclear how many of the interaction terms are enough since adding all the interactions are quite unfeasible when the number of covariates is large. However, as we will show in the simulation section, the propensity score method is not very sensitive to non-mean difference (such as variance difference) in distribution. Next, we will give a more direct approach to testing marginal and interaction homogeneity.

3.4. Randomized chi-square test

Since the data are categorical, the distribution is determined by the multinomial distribution parameters , where each denotes the probability of seeing a particular combination of categories from the columns, with , where is the total number of categories. With columns in total, the total number of categories can be huge ( is most likely a lower bound). Theoretically, we can create a contingency table and apply chi-square test to test whether the multinomial distribution is independent of data sets (equivalent to the data sets having the same distribution). Yet this is not feasible under computation time constraints. Nor can we reduce the dimensions of the table without losing information. For example, two distributions can have the same two-way interaction but different three-way interaction. However, if we have further information about the number of categories of each column, we can reduce accordingly. A simple example is that all columns are binary (two categories). The distribution in this case is determined by marginal distribution and two-way interaction. Without further information, we compromise by introducing randomization: choosing a small subset of columns each time, say columns, to do chi-square test, and then repeat the process times. The argument is that even if the non-null columns are sparse, by repeatedly choosing times for relatively large , the non-null columns still have large probability of being picked at least once. Assume there are columns in total, the probability that one single column is not picked even once is , which is approximately when is small. Thus, and have equal impacts on the selection probability. In practice, increasing costs less computation than increasing .

Note that randomized chi-square only applies to categorical data among the three methods we introduce. In practice, we can “categorize” continuous data into buckets, which sometimes gives us higher heterogeneous distribution detection power than applying the other methods directly on the continuous data.

3.5. A resampling technique

Resampling 444see https://en.wikipedia.org/wiki/Resampling_(statistics)

is often used when the distribution of the test statistics is not known or hard to derive. In our randomized chi-square test, for example, the distribution of P-values depends on the unknown distribution of the original data sets. Thus, we can use resampling to set the threshold of rejection. If we are in single hypothesis testing scenario (one-step DISCO and propensity score methods), our proposed resampling technique is equivalent to permutation test (see Algorithm 1)

555In all the algorithms here, without loss of generality we assume the computed statistics are P-values..

1:Get original statistics (e.g. from propensity score method).
2:Randomly permute rows (users) among the data sets, and calculate the P-value from the permuted data.
3:Repeat step 2 times, and we obtain P-values from resampling, denoted by a vector .
4:Choose the threshold as the (5) percentile of , and reject the null hypothesis if .
Algorithm 1 resampling for single hypothesis

It is easy to see that Algorithm 1 controls FWER exactly, because all permutations have equal probability under the null. Under multiple hypotheses testing scenario, we modify Algorithm 1 a little (see Algorithm 2).

1:Assume there are hypotheses. Get the original vector of statistics, denoted .
2:Randomly permute rows (users) among the data sets, and calculate the vector of P-values from the permuted data, denoted by . Let .
3:Repeat step 2 times, and we obtain minimum P-values from permuted data, denoted by a vector .
4:Choose the threshold as the (5) percentile of , and reject the null hypothesis i if .
Algorithm 2 resampling for multiple hypotheses

We claim that Algorithm 2 controls FWER under any hypotheses configuration.

Theorem 3.2 ().

Assume P-values are marginally Uniform(0,1). Under any covariance structure, Algorithm 2 controls FWER, so it controls FDR as well.

Proof.

The proof is conceptually simple. Assume there are non-null and null hypotheses among the hypotheses. Then the probability of making at least one false rejection is the probability that the minimum of a subset of null P-values is less than the th percentile of the distribution of the minimum of total null P-values, which is less than . ∎

In practice, resampling can also be applied after hypotheses selection (see Algorithm 3).

1:Assume there are hypotheses. A selection rule selects hypotheses with statistics .
2:Randomly permute rows (users) among the data sets, and apply selection rule S, and denote selected P-values by . Let .
3:Repeat step 2 times, and we obtain minimum selected P-values from permuted data, denoted by a vector .
4:Choose the threshold as the (5) percentile of , and reject the null hypothesis i in the originally selected P-values if .
Algorithm 3 resampling after hypotheses selection

Empirical results show that Algorithm 3 also controls FWER, thus FDR, when the selection rule satisfies certain properties. That is, when non-null hypotheses are more likely to be selected than null hypotheses. Intuitively, this controls FWER because the minimum of a subset of a total null P-values is stochastically larger than the minimum of all the null P-values.

We will compare this resampling technique to other multiplicity adjustment methods such as Holm’s procedure 666See https://en.wikipedia.org/wiki/Holm0-Bonferroni_method for Holm’s procedure., and the Benjamini-Yekutieli (BY) procedure proposed in (benjamini2001, ) in the next section.

4. Simulations and analysis

Since real data sets are huge and messy, we first use simulations to compare our methods introduced in the previous section. Heterogeneity in multi-dimensional distributions has two compositions: (a) heterogeneity in marginal distribution of one (or more) dimension(s); (b) heterogeneity in the covariance (interaction) structure among dimensions. In the following simulations, the data is generated with either (a) or (b), or both.

For randomized chi-square method, deciding the choices of the maximum number of columns to sample each time () and the number of times to sample () is tricky. When dimensions become large, we hope to increase to capture more complicated interaction structure. Yet the number in each cell of the table will decrease, which will diminish the power of chi-square test. Empirically, when the number of columns is not too large, and if the sum of each column of the table is greater than or equal to 5, we pick between and , where is the dimension of the data sets.

We do not do any feature selection to reduce dimension in our simulations, because in reality online marketing data has a great range of variety depending on the company, and each company has its own way of trimming data sets (either with general feature selection technique such as LASSO, or with domain knowledge). Thus, we do not apply Algorithm 3 in the previous section in this paper.

4.1. Detection of heterogeneity in marginal distribution or interaction structure

In this first simulation, we consider detection of marginal distribution difference and interaction structure difference separately. We simulate four data sets, each with 10 columns (dimensions) and 100 rows. Three of them have iid entry with multinomial distribution with probability vector (0.25,0.25,0.25,0.25) (so the number of categories of each column is also four).

In Scenario 1, the last data set has different marginal distribution than the other three data sets: for weak signal, the probability vector is (0.3,0.25,0.25,0.2); for medium signal, it is (0.4,0.25,0.2,0.15); for strong signal, it is (0.5,0.2,0.2,0.1). For each heterogeneity we also vary the number of columns (from 1 to 10) that have heterogeneous marginal distribution to test the sensitivity of each method.

In Scenario 2, the last data set has different interaction structure among columns keeping the marginal distribution the same as the other three sets (the other three have independent columns): first sort each column, and then for strong signal, each column is rotated by 10 (turning an array to . Here

denotes concatenation) from the previous column, so the columns are positively correlated; for medium signal, after rotation 40% of the data in each column is permuted to mitigate the correlation; for weak signal, after rotation 80% of each column is permuted randomly. Like in Scenario 1, we also vary the number of columns (from 2 to 10) with heterogeneous interaction structure. We compare four methods: baseline t-test, propensity score method with resampling, DISCO method, and randomized chi-square test with resampling.

Figure 1. All three plots are the results of detection of heterogeneity in marginal distribution, the top one for small difference, the middle one for medium difference, the bottom one for big difference
Figure 2. All three plots are the results of detection of heterogeneity in interaction structure, the top one for weak correlation, the middle one for medium correlation, the bottom one for strong correlation

From Figure 1 and 2 we see that baseline t-test has high power for detecting marginal heterogeneity, but not for detecting interaction heterogeneity. This agrees with our conjecture. Thus, in the following simulations, we will not test this method anymore. DISCO and propensity score methods have relatively higher power in detecting marginal difference, while randomized chi-square method has significant advantage in detecting interaction heterogeneity. Furthermore, while DISCO or propensity score methods can only tell whether the multi-dimensional distributions are the same, randomized chi-square test can also flag individual problematic columns when the distributions are imbalanced. The flagged columns may not be exhaustive due to randomness in column selection, but it definitely provides a starting point for the follow-up detail diagnosis procedure.

We also see from the power plots that interaction heterogeneity is in general harder to detect than marginal distribution heterogeneity since the former has convex power line (power only increase significantly when the number of heterogeneous columns is large) while the latter has concave power line.

4.2. Varying dimension

We next vary the dimension of data sets from 10 to 50 while holding the number of rows to be 100. We compare the three methods, propensity methods, DISCO, and randomized chi-square test, on weak heterogeneity (weak marginal heterogeneity + weak interaction heterogeneity as defined in the previous simulation), medium heterogeneity (weak marginal heterogeneity + medium interaction heterogeneity), and strong heterogeneity (medium marginal heterogeneity + medium interaction heterogeneity). In each of the three signal level the number of heterogeneous columns is 1/5 of the dimensions.

Figure 3. All three plots are the results of detection power of heterogeneity as dimension increases, the top one for weak heterogeneity, the middle one for medium heterogeneity, the bottom one for strong heterogeneity

From Figure 3 we see randomized chi-square behaves almost the same, or a little better, when the difference in distribution is not too large, while the other two methods, especially DISCO, behave significantly better when the dimension of data sets is relatively large. In other words, randomized chi-square test has higher power in detecting many small effects.

We also notice that compared to the other two methods, increasing the dimension of the data has little positive effect in power for randomized chi-square test. The reason is that since the portion of heterogeneous columns is unchanged as dimension increases, the probability of picking the ”problematic columns” is also relatively unchanged as dimension increases. For the other two methods, the power has an increasing trend as dimension increases.

We use resamling procedure to get threshold of rejection in all the four methods, so here we also compare the power of resampling procedure, and one popular multiplicity adjustment procedure, the Holm’s procedure 777See https://en.wikipedia.org/wiki/Holm%E2%80%93Bonferroni_method for an introduction of Holm’s procedure. Both resampling and Holm’s procedure can control type I error under any P-value structure.

Figure 4. Power comparison of resampling and Holm’s procedure for randomized chi-square method, the top one for weak heterogeneity, the middle one for medium heterogeneity, the bottom one for strong heterogeneity

Figure 4 plots the power comparison of applying randomized chi-square test + resampling and applying randomized chi-square test + Holm’s procedure. We see that for any heterogeneity level, resampling has higher power than Holm’s procedure, which justifies the use of resampling procedure in multiple hypotheses testing problems.

4.3. Simulated real-world scenario

Next, we simulate a California-local real online marketing A/B testing scenario. Assume the company is an online retailer for fashion, skin care, and cosmetics. The data is collected from a 24-hour window from 12AM February 21st to 12AM February 22nd. There are 8 columns representing area of living, browser type, gender, age, employment status, income, accumulated number of visits (in the past year), and converted or not before respectively. Table 1 below summarizes the encoding details of these 8 features.

Column names Encoding
Area of living 0: south Cal; 1: north Cal; 2: mid Cal
Browser type 0: Chrome; 1: Safari; 2: Firefox;
3: Internet Explorer; 4: others
Gender 0: male; 1: female
Age 0: ¡20; 1: 20-30; 2: 30-40;
3: 40-50; 4: ¿50
Employment status 0: student; 1: employed; 2: unemployed
Income 0: ¡50,000; 1: 50,000-100,000;
2: 100,000-200,000; 3: ¿200,000
Accumulated 0: ¡3; 1: 3-10; 2: 10-20; 3: ¿20
number of visits
Converted before 0: no; 1: yes
Table 1. Column names and encodings

The number of categories for each column ranges from 2 to 5. The real interaction structure among these 8 columns can be complicated. We simplify this relationship and summarize it in Figure 5 below. Area of living and Browser type are independent variables, while the other 6 variables have complicated correlations. It is by no means accurate. For example conditioning on employment status, age and gender may not be independent in reality. We consider the scenario where the data traffic is not randomly split for a period of time. For example, almost all traffic is assigned to set A for two hours in the morning, which results in set A has more data than set B. To balance the number of data points in the two sets, the experimenter assigns most of the traffic in the evening to set B. A direct result is that employment status has different distributions in set A and B — unemployed people take up much higher proportion in the morning time when employed people and students are busy working than they do in the evening time.

Employment status

Income

Gender

Age

Accumulated number of visits

Converted or not

Area of living

Browser type

1

4

2

4

3

4

5

5
Figure 5. Interaction structure among the 8 columns

Figure 5 also shows a way to generate our data. All marginal distributions are multinomial. Area of living and Browser type are independent which can be easily generated. Then we generate the Employment status with certain probability vector. Conditioning on Employment status, we generate age (the edge with 1), gender (the edge with 2), and income (the edge with 3). Then conditioning on income, gender, age, we generate Accumulated number of visits (the edges with 4). Finally we generate Converted or not conditioning on income and Accumulated number of visits (edges with 5). A detailed data generation procedure is summarized in the Appendix. In particular, the probability vector for Employment status is (0.3,0.3,0.4) in set A (more people in the morning) and (0.4,0.4,0.3) in set B (more people in the evening), which results in difference in marginal distribution and correlation structure in other dimensions. We control the number of data points to be 800 in either data sets.

The data is simulated 100 times. The power for the propensity method, DISCO method, and randomized chi-square test is 0.93, 0.91, and 0.87 respectively. All three methods can detect the multi-dimensional distribution heterogeneity with high power. Again there is a trade-off: randomized chi-square method has comparably lower power but can point out the most imbalanced columns.

Column names Number of times being rejected
Area of living 28
Browser type 23
Employment status 163
gender 43
age 85
income 44
Accumulated number of visits 50
Converted or not 43
Table 2. the number of time each column gets rejected in 100 simulations with 10 column sampling times per simulation

Table 2 displays the number of time each column gets rejected in 200 simulations with (sampling columns 10 times per simulation) and (sampling maximum 3 columns each time). We see Area of living and Browser type have significantly fewer times of being rejected because they are balanced and independent. Employment status has the largest number of sampling times since it is directly affected by the timing of the day, with the rest 5 columns having milder imbalance depending on its correlation with Employment status.

5. Anonymous real data

We also try our tests on some auto-personalization datasets provided by Adobe Digital Marketing Cloud. Auto-personalization is personalized recommendation to individual customers learned from past customer behavior in the database. Usually a random A/B splitting is needed to serve as baseline to evaluate any recommendation methodology. We obtain such a pair of randomly-split data sets, and test the propensity method, DISCO method, and randomized chi-square test on a data set from the online marketing section of a company. The data is split into set A and B, each of dimension , with 2 to 50 categories per column. For privacy concern, we do not get to know the encodings of the columns and the detailed data collecting procedure. However, propensity score with resampling, DISCO method, and randomized chi-square tests all reject the hypothesis that the two distributions are the same. Randomized chi-square also provides some combinations of columns that are the most imbalanced, one of which is columns 196, 57, 248, 260, 271, 342, 374, and 239. These 8 columns have 50 different combinations (for example if one column can take on 2 values, another 3 values, then the two columns together can take on at most values). Figure 6 shows a bar plot of the 15 combinations that have the most counts from both data sets, and a ratio of counts in set B to those in set A. We see the two categorical distributions do differ a great deal, with counts ratio being as high as 3. If we get more information on the these two sets we can do further analysis on these selected columns to identify the source of heterogeneity.

Figure 6. comparison of a subset of columns from two categorical data sets, the red bar representing counts from set A, the green bar from set B, purple line denoting ratio of counts in A to counts in B

6. Discussion

In summary, A/B testing has a wide range of application in online marketing and other areas, so making sure the test indeed provides valid results is crucial. This paper formulates the validity of A/B testing results as a hypothesis testing problem in multi-dimensional space. We propose three ways to test whether two or more data sets come from the same distribution and each has its own advantage. The propensity score and DISCO methods can both be generalized to continuous data, but randomized chi-square test is only applicable to categorical data. Of course, the simplest way is to categorize the continuous data. In fact, even when the data is one-dimensional normal with the same mean but difference variance, both propensity and DISCO methods have very low power, but categorize each data point to be the floor of and apply randomized chi-square test yields high power.

Besides testing equivalence of distribution after the experiments have been carried out, we also hope to make sure the online experiments are correctly carried out from the beginning. This is a meaningful and promising area of research that involves multivariate analysis, multiple testing, feature selection, observational data and sequential analysis. There has been active research going on in some parts of this big area, including the papers we mentioned in Section 2. We also need to work closely with data engineers to effectively implement these methodology.

Appendix

.1. Real-world simulation data generation process

  • Generate Area of living Multinomial ((0.33,0.33,0.34)).

  • Generate Browser type Multinomial ((0.3,0.3,0.2,0.15,0.05)).

  • For data set A, generate Employment status Multinomial ((0.3,0.3,0.4)); for data set B, generate Employment status Multinomial ((0.4,0.3,0.3)).

  • gender Employment status Multinomial ((0.5,0.5)); gender Employment status Multinomial ((0.6,0.4)); gender Employment status Multinomial ((0.3,0.7)).

  • age Employment status Multinomial ((0.7,0.2,0.05,0.03,0.02)); age Employment status Multinomial ((0.1,0.2,0.3,0.3,0.1)); age Employment status Multinomial ((0.1,0.02,0.04,0.04,0.8)).

  • income Employment status Multinomial ((0.7,0.2,0.1,0)); income Employment status Multinomial ((0.2,0.3,0.3,0.2)); income Employment status Multinomial ((0.8,0.15,0.05,0)).

  • ANOV (Accumulated number of visits) (income & age ) Multinomial ((0.7,0.15,0.1,0.05)); ANOV (income & gender & age ) Multinomial ((0.5,0.2,0.2,0.1)); ANOV (income & gender & age ) Multinomial ((0.15,0.2,0.25,0.4)); ANOV other combinations of age, gender and income Multinomial ((0.25,0.25,0.25,0.25)).

  • Conv (converted or not) (income & ANOV ) Multinomial ((0.9,0.1)); Conv (income & ANOV ) Multinomial ((0.85,0.15)); Conv (income & ANOV ) Multinomial ((0.65,0.35)); Conv (income & ANOV ) Multinomial ((0.8,0.2)).

References

  • (1) Yoav Benjamini and Daniel Yekutieli. 2000 The control of the false discovery in multiple testing under dependency. The Annals of Statistics, 29, 4, 1165-88.
  • (2) Nikhil Bhat, Vivek F. Farias, Ciamac C. Moallemi, and Deeksha Sinha. 2017. Near optimal A-B testing.
  • (3) Diane Tang, et al. 2010. Overlapping experiment infrastructure: more, better, faster experimentation. Proceedings 16th Conference on Knowledge Discovery and Data Mining, 17-26.
  • (4) Brett Gordon, Florian Zettelmeyer, Neha Bhargava, and Dan Chapsky. 2016. A Comparison of approaches to advertising measurement: evidence from big field experiments at Facebook. White paper.
  • (5) Huan Gui, Ya Xu, Anmol Bhasin, and Jiawei Han. 2015. Network A/B testing: from sampling to estimation. Proceedings of the 24th international conference on World Wide Web, New York: ACM, 399-409.
  • (6) Ramesh Johari, Leo Pekelis, and David Walsh. 2015. Always valid inference: Brining sequential analysis to A/B testing, arXiv preprint: 1512.04922.
  • (7) Ron Kohavi, Roger Longbotham, Dan Sommerfield, and Randal Henne. 2009. Controlled experiments on the Web: Survey and practical guide. Data Mining and Knowledge Discovery, 18, 140-81.
  • (8) Ron Kohavi, Llew Mason, Rajesh Parekh, and Zijian Zheng. 2004. Lessons and challenges from mining retail e-commerce data. Machine Learn, 57, (1-2), 83-113.
  • (9) Maria L. Rizzo and Gábor J. Székely. 2010. DISCO analysis: A nonparametric extension of analysis of variance. The Annals of Applied Statistics, 4, 2, 1034-55.
  • (10) Pang-Ning Tan and Vipin Kumar. 2002. Discovery of web robot sessions based on their navigational patterns. Data Mining and Knowledge Discovery, 6, 1, 9-35.
  • (11) Jeffrey M. Wooldridge. 2007. Inverse probability weighted estimation for general missing data problems. Journal of Econometrics, 141, 1281-1301.
  • (12) Bo Zhang and Liwei Wang. 2017. Cold-start solution to A/B testing using adaptive sample size modification.