News for hackers. Stuff that matters.
Re:p-Hacking and False Discovery in A/B Testing by boron1006 on Sunday July 22, 2018 @12:54AM (#17585347)
I would be shocked if it were as low as 57%. As an intern, I found that the analysts in charge of A/B tests often didn't have a background in science or running experiments, and didn't really care. There were a couple of data analytics teams in the company, and I think a lot of the developers didn't like my team because we were seen as "fussier" than the other one. We required people to preregister hypotheses, and run experiments for predetermined amounts of time.

I don't think the tech environment is very conducive to running experiments. Everything moves too fast, by the time you figure out the results someone gives you are bs, they've already got promoted 3 times and work as a director at a different company.

I work in science now, and although people still p-hack like hell, there's at least some sort of shame about it. There's a long term cost too, I've met a couple researchers who have spent years trying to replicate some finding they got early in their career through suspicious means.

Re:p-Hacking and False Discovery in A/B Testing by pimmen on Sunday July 22, 2018 @03:47AM (#17585718)
I've seen that culture too. I don't want to throw my colleagues under the bus but the other teams at my company that have done A/B testing to compare design choices don't perform proper controls or pre-register hypothesis. Eg. when they want to divide the two groups, they often divide them based on some classification (gender, age, geography etc.) rather than dividing them up completely randomly.

In my team we try to be methodical. I'm just a lowly engineer but one of my team mates is a statistician and another is a PhD student. We know we need to pre-register the hypothesis and at what significance we're testing for first, divide the groups randomly and run the experiment for a set time period.

We've gotten a lot more negative results and been proven wrong in our guesses than the other teams. For some reason I take pride in that.

Re:p-Hacking and False Discovery in A/B Testing by thomasfedb on Sunday July 22, 2018 @08:17AM (#17586372)
It's no fun being labelled as 'fussy'. As a researcher I often work with doctors who ask for analysis with p-values on all sorts of inappropriate data sets, pushing back and telling them "you cannot draw any valid inference from this" can be quite hard.
Re:p-Hacking and False Discovery in A/B Testing by tedsanders on Sunday July 22, 2018 @04:02AM (#17585764)
Running experiments for preset lengths is a mistake. If an effect is strong, it will show up earlier. If this is the case, you want to be able to switch earlier. If you are running a drug trial of drug A vs a control, and drug A kills 100% of the first 100 patients who take it while the control kills 0, you end the trial immediately. You don’t continue to give it to 900 patients just because you pre-registered to treat 1,000 patients, thinking that the effect would be small. This is one reason I think Bayesian approaches are better than frequentist approaches for A/B testing.
Re:p-Hacking and False Discovery in A/B Testing by yichijin on Sunday July 22, 2018 @12:19PM (#17587471)
Hey all, statistician from Optimizely chiming in here. Just wanted to point out that this is exactly the right point.

I wanted to add one detail--there actually are ways to do early stopping while staying within a frequentist approach. For example, most clinical trials methods are not Bayesian but rather are just fixed-horizon tests that have the allowable amount of Type 1 error "spread out" amongst the multiple looks that are planned in advance.

At Optimizely we essentially have a continuous version of this that does in fact allow for multiple looks with rigorous control of Type 1 error. As tedsanders mentions, the key upside is that if you start an experiment with a larger-than-expected lift, you can terminate it early. Then over many repeated experiments, you gain a lot in terms of average time to significance.

The dissonance in this discussion mostly stems from the fact that this paper (which we actually collaborated on!) uses data from 2014, before we rolled out this new Stats Engine.

For more, I would encourage a look at our paper: http://www.kdd.org/kdd2017/papers/view/peeking-at-ab-tests-w...

Re:p-Hacking and False Discovery in A/B Testing by smallnamespace on Sunday July 22, 2018 @01:28PM (#17587805)
What's the tradeoff vs. just taking a direct Bayesian approach?

In fact, why use an inferential framework at all (estimating some sort of probability and using it to guide action), rather than directly using a policy learning framework, e.g. modeling this as Q-learning or multi-armed bandit problem?

If at the end of the day you have some objective function (e.g. 'making money'), some known space of actions (e.g. move this widget up the page, change the color, engage with user this way), and a reasonable way to associate those two, then isn't the company literally doing reinforcement learning over time?

It seems one benefit of a reinforcement learning framework is it maintains a set of actions that will still be explored in the future without forcing you to prematurely 'choose' whether A or B is actually better—if A is better in reality, then it will be explored more and more often and B will progressively become downweighted over time.

Re:p-Hacking and False Discovery in A/B Testing by srean on Monday July 23, 2018 @05:37AM (#17591587)
> If at the end of the day you have some objective function

That "If" often evaluates to false.

There are tough judgement calls involved in selecting what is that metric that the org wants to optimize. It is very rare that business management commits to a clear quantitative goal. Reasons are many -- weasel room is important politically, selecting a metric that captures short term and long term goals is difficult, there is a lot of uncertainty in the costs due to uncertainty on how overhead should be billed etc etc.

This is fairly common. Typically, in these situations its the PMs who make the final call. There the goal of the experiment is to glean as much knowledge as possible, and present it to the PM. If that comes at the cost of exposing some customers to bad choices, so be it -- in other words, explore at the cost of losses in the opportunity to exploit.

Re:p-Hacking and False Discovery in A/B Testing by dmichulke on Sunday July 22, 2018 @03:23PM (#17588375)
> why use an inferential framework at all

Probably because of the maintenance cost of the code that was only explored but never exploited.

Re:p-Hacking and False Discovery in A/B Testing by alexgmcm on Monday July 23, 2018 @03:35AM (#17591114)
A policy learning approach is better imho - but getting people to switch to using a multi-armed bandit when they are used to AB testing can be difficult.

People don't seem to trust the system to make the right decisions even though you can do simulations and have the mathematics to show it is correct.

Re:p-Hacking and False Discovery in A/B Testing by boron1006 on Sunday July 22, 2018 @05:07AM (#17585939)
Agree that bayesian approaches would be better here, but disagree that running experiments for preset lengths is a mistake.

In a realistic scenario for us, bayesian and frequentist approaches will probably converge to a point that's close enough for a company that runs a website (i.e., we weren't killing anyone by leaving our experiment running). We also weren't getting massive fluctuations in effect size.

The cost of the Bayesian approach, in terms of learning a new system of statistics, programming everything up from scratch, and interpreting results, probably wouldn't be worth the efficiency gains. If we were creating an AB testing program, then I would probably do so.

Re:p-Hacking and False Discovery in A/B Testing by gbrown on Monday July 23, 2018 @08:43AM (#17592305)
Adaptive designs and early stopping rules are really good when:

1. Data collection is expensive (time or money)

2. Keeping with the status quo in the presence of new evidence is problematic (withholding a promising new drug)

3. Continuing with the experiment in the presence of new evidence is problematic (the new drug is hurting people)

Absent one of those features, it's probably not worth the added complexity.

Re:p-Hacking and False Discovery in A/B Testing by aalleavitch on Sunday July 22, 2018 @04:12AM (#17585801)
Re:p-Hacking and False Discovery in A/B Testing by tedsanders on Sunday July 22, 2018 @04:19AM (#17585817)
>With Bayesian experiment design you can stop your experiment at any time and make perfectly valid inferences. Given the real-time nature of web experiments, Bayesian design seems like the way forward.

Completely agree with Evan Miller here, thank you for sharing the link.

Re:p-Hacking and False Discovery in A/B Testing by rpier001 on Monday July 23, 2018 @05:11AM (#17591494)
Except that the quote reflects a common misunderstanding. The problem of optimal stopping is mostly a function of decision making over multiple looks. A Bayesian approach that makes decisions over multiple looks has similar issues. This can be mitigated by strong priors, but typically to an unknown degree and at some cost to 'power'. How/why does this claim arise? It is because a 'true' Bayesian approach makes no decisions/inferences - it just describes the current state of knowledge. If describing the distribution of the posterior, then 'stop at any time and be valid' else 'you got your Neyman-Pearson in my Bayesian analysis'.
Re:p-Hacking and False Discovery in A/B Testing by stochastic_monk on Sunday July 22, 2018 @04:59AM (#17585914)
Except for your example of patients being catastrophically harmed. In that case, false negatives and false positives are not equally undesirable.
Re:p-Hacking and False Discovery in A/B Testing by tedsanders on Sunday July 22, 2018 @11:59AM (#17587341)
Even in web testing there isn't an equality between false positives and false negatives.

Suppose you're Facebook and you decide to test a new landing page on 1 million users. You roll out the test and notice that after 10,000 users, the new page is killing engagement. Whoops, turns out it had a bug and isn't even loading. Even though no medical patients are dying, this is still a very negative outcome for Facebook. Obviously they shouldn't test on 990,000 more users before fixing the bug, but that's what slavish adherence to pre-registered trial lengths would tell you to do, because it's 'cheating' to notice that there's a problem after the first 10,000 tests.

Some of you might say, sure, for extenuating circumstances like a bug you can break procedure. But in that case I think the logic slides down a slippery slope. What if in the example above instead of a bug we just had a feature performing terribly? In either case, the right move is to end the test early, since you don't need all the data points to measure a strong signal.

Re:p-Hacking and False Discovery in A/B Testing by tomrod on Sunday July 22, 2018 @09:46AM (#17586706)
Yes, and that use case/failure mode should be remembered if the product being pushed overlaps that domain. Is that a large market outside of medical?
Re:p-Hacking and False Discovery in A/B Testing by stochastic_monk on Sunday July 22, 2018 @10:48AM (#17587018)
A lot of real world cases have imbalanced reward functions. Autonomous vehicles are another example. I don’t doubt regulation systems on spacecraft are similar.
Re:p-Hacking and False Discovery in A/B Testing by tomrod on Tuesday July 24, 2018 @07:30AM (#17600014)
Great examples.
Re:p-Hacking and False Discovery in A/B Testing by webmaven on Sunday July 22, 2018 @12:28PM (#17587527)
Consider Facebook's news feed experiment on user's emotions:

https://www.nytimes.com/2014/06/30/technology/facebook-tinke...

Re:p-Hacking and False Discovery in A/B Testing by YeGoblynQueenne on Monday July 23, 2018 @05:31AM (#17591568)
>> If an effect is strong, it will show up earlier.

But if an effect shows up earlier, it is not necessarily strong. I think that's the point with running an experiment for a predeterimned length- so you know you didn't get un/lucky and hit a clump of results at the start of the experiments that will sort of average out later on.

Obviously, if a trial drug is killing your patients at a surprising rate, you need to stop the experiment. In fact, I believe experiments are sometimes stopped on ethical grounds when a drugs is found to heal the experiment group at a high rate, also, either so that the control group can also benefit, or just because it is hard to justify giving only half of your patients a life-saving drug and a placebo to the rest.

But those are ethical considerations - not practical ones. Such experiments are cut short without complete confidence to the results, when there is the merest hint of ethical issues down the line. At least that's my understanding.

Re:p-Hacking and False Discovery in A/B Testing by paulddraper on Sunday July 22, 2018 @09:01PM (#17589773)
Agreed. The point of most A/B testing is not to find the best approach per se, but have the greatest number of successes.

If failures essential don't matter (e.g. number of bacteria killed in a petri dish), sure use frequentist p-value.

If failure do matter (e.g. number of patients killed), use Bayesian multi-armed bandit.

Wrote a blog post on it: https://www.lucidchart.com/blog/the-fatal-flaw-of-ab-tests-p...

Re:p-Hacking and False Discovery in A/B Testing by gbrown on Monday July 23, 2018 @08:39AM (#17592281)
Adaptive designs are great, but especially in low risk areas like business A/B testing, I'll settle for more people understanding that statistical models are not magic black box truth detectors, and that p-values lose their interpretation in the presence of exploratory practices.

The world would probably be a better place if we taught introductory statistics from a Bayesian perspective, but people get pretty set on their ways.

Re:p-Hacking and False Discovery in A/B Testing by baybal2 on Sunday July 22, 2018 @09:19AM (#17586590)
Well, think of value of any analytics in eCommerce setting:

1. you see a random SKU spiking for n month in a row - good, keep stocking it, maybe even spend few adwords vouchers on it. BUT the fact that nobody in the company readily knows the nature of such spike is already an indication that the business fails at understanding its market.

2. Never in my career, I saw any of "coffee divination" level ideas coming from analysts ever being "life changing" for a company. I been through a number companies spending money on "algorithmic optimisation service" for banner ads of their clients. Yes, the "optimised" banners did score progressively more clicks with time, yet a single full time designer who was hired alongside the "optimiser" company could be scoring more clicks and purchases - without any input from any kind of data analysis

Re:p-Hacking and False Discovery in A/B Testing by tomrod on Sunday July 22, 2018 @09:45AM (#17586703)
[1] is what I do a lot of discovery on in my own work. The complexity of the digital domain to the sales funnel, as well as the increased reach to new populations, makes simple A/B testing inadequate for accurate causal analysis. I think BigCorp has beneficial scale benefits here.

[2] I've only seen massive product movement when the analysts and idea folks work together. I've never seen an idea wonk hit the bullseye contrary to simple economic theory/reasoning on their customer target.