News for hackers. Stuff that matters.
Re:Whom the Gods Would Destroy, They First Give Real-time An... by btilly on Wednesday January 09, 2013 @02:15PM (#5032876)
Gah, yet another article that links to Evan Miller's article on how to not run an A/B test. I really need to finish writing my article that explains why it is wrong, and how you can do better without such artificial restrictions.

His math is right, but the logic misses a basic fact. In A/B testing nobody cares if you draw a conclusion when there is really no difference, because that is a bad decision that costs no money. What people properly should care about is drawing the wrong conclusion when there is a real difference. But if there is a significant difference, only for small samples sizes is there a realistic chance of drawing a wrong conclusion, and after that the only question is whether the bias has been strong enough to make the statistical conclusion right.

He also is using 95% confidence as a cut-off. Don't do that. You don't need much more data to massively increase the confidence level, and so if the cost of collecting it is not prohibitive you absolutely should go ahead and do that. Particularly if you're tracking multiple statistics. If you test regularly those 5% chances of error add up fast.

Re:Whom the Gods Would Destroy, They First Give Real-time An... by ISL on Wednesday January 09, 2013 @03:17PM (#5033238)
He also is using 95% confidence as a cut-off. Don't do that. You don't need much more data to massively increase the confidence level, and so if the cost of collecting it is not prohibitive you absolutely should go ahead and do that.

Statistical significance grows roughly like the square root of the number of samples. Moving from 2-sigma (95%) to the physics gold-standard of 5-sigma requires drastically more data in almost all cases.

Selecting a measurement's uncertainty is something which should be carefully considered. Sometimes you only care about something to 10%, sometimes a 1-in-a-million part failure kills someone's Mom.

If you're doing lots of A/B testing, where trials penalties add up, it might be worth looking into the way that LIGO handles False Alarm Rates. They have to contend with a lot of non-Gaussian noise/glitches.

Re:Whom the Gods Would Destroy, They First Give Real-time An... by btilly on Wednesday January 09, 2013 @05:52PM (#5034066)
Statistical significance grows roughly like the square root of the number of samples.

No, no, no. You are confusing the growth of the standard deviation (which does grow like the square root of the number of samples) with the increase in certainty as you add standard deviations. That falls off like e^(-O(t^2)) where t is the number of samples. This literally falls off faster than exponential.

What does this mean in the real world? In a standard 2-tailed test you get to 95% confidence at 1.96 standard deviations, 99% confidence at 2.58 standard deviations, and 99.9% confidence at 3.29 standard deviations. These numbers are all a long ways away from 5 standard deviations.

Let's flip that around and take 95% confidence as your base. If you are measuring a real difference, then on average 99% confidence requires a test to get 32% more data, and 99.9% confidence requires a test to get 68% more data. Depending on your business, the number of samples that you get are often proportional to the time it takes to run the test. If making errors with x% of your company involves significant dollar figures, the cost of running all of your tests to higher confidence tends to be much, much less than the cost of one mistake.

That is why I say that if the cost of collecting more data is not prohibitive, you shouldn't be satisfied with 95% confidence.

Re:Whom the Gods Would Destroy, They First Give Real-time An... by ISL on Thursday January 10, 2013 @10:27PM (#5041188)
Assume a random variable is barely resolved at 1-sigma off zero with N samples. If I wish to increase my confidence that it really is off zero (and the mean with N samples is actually the mean of the distribution), then I'll need 4N samples to halve my uncertainty and double the significance of the observation (as measured in sigma-units). It is in that sense that the significance of a measurement increases like \sqrt(N).

Viewed from my perspective, if you'd like to go from 2-sigma (95%) to 3.29-sigma, you'd need (3.29^2)/(2^2)=2.7 times the amount of data used to get the 2-sigma result, or 170% more samples.

It looks like you've reached your conclusion that I'd need 68% more data to reach 99.9% by taking 3.29/1.95=1.68. I believe that this is in error. Uncertainty (in standard deviation) decreases like 1/\sqrt(N), not 1/N.

\sqrt(N) has driven me to depression more than once.

Re:Whom the Gods Would Destroy, They First Give Real-time An... by btilly on Friday January 11, 2013 @12:20AM (#5041453)
You are right that I used linear where I should have used quadratic.

However consider this. To go from 95% to 99% confidence takes 73% more data collection. So for 73% more data, you get 5x fewer mistakes.

To go from 95% to 99.9% confidence takes 182% more data. So for less than 3x the data, you get 50 times the confidence.

My point remains. Confidence improves very, very rapidly.

Re:Whom the Gods Would Destroy, They First Give Real-time An... by ISL on Friday January 11, 2013 @01:09AM (#5041581)
Neat to see a different side of a coin. In our lab, individual measurements can take as long as a year. \sqrt(N), when constrained by human realities, presents a wall beyond which we cannot pass without experimental innovation.

As the derivative of \sqrt(N) is 1/2*1/\sqrt(N), your first measurement teaches you the most. Every measurement teaches you less than the last. In general, we measure as much as we must, double the size of the dataset as a consistency check, and move on. The allocation of time is one of the most important decisions of an experimenter.

Re:Whom the Gods Would Destroy, They First Give Real-time An... by btilly on Friday January 11, 2013 @01:52AM (#5041681)
Ah. Well I talk about the cost of data acquisition for a reason.

I've seen a number of businesses who have a current body of active users, and this does not change that fast. So when they run an A/B test, before long their active users are all in it, and before too much longer those of their active users who would have done X will have done X, and data stops piling up. In that case there is a natural amount of data to collect, and you've got to stop at that point and do the best you can.

Businesses are as alike as snowflakes - I am happy to talk about generalities but in the end you have to know what your business looks like and customize to that.

Re:Whom the Gods Would Destroy, They First Give Real-time An... by cftm on Wednesday January 09, 2013 @05:53PM (#5034074)
If memory serves though, the further out you push your sigma's the greater the likelihood of introducing a type-2 error.

There is no easy answer in statistics!

Re:Whom the Gods Would Destroy, They First Give Real-time An... by RyanZAG on Wednesday January 09, 2013 @02:59PM (#5033153)
No analysis of AB testing should ever miss this incredibly important fact about statistics.

http://xkcd.com/882/

When you make confidence tests on a continuous process, you will hit this 1 day in 100 on average for 100 days of testing at 99%. If you're doing multiple AB tests per day, well...

EDIT: And another important issue: if you are testing on Valentines day and the pink color/A test is beating out the orange color/B test, then this result may only happen on that one day per year. This applies to hot news topics and numerous other fads as well.

Also make sure your tests really are independent - if you do A/B testing off of fixed IP address hashing and have a small user base, by random chance you may have your top customer always being in 'group A' and giving group A a higher than expected base average - an extra bonus click for every group A test may skew your statistical tests as they assume independence.

Re:Whom the Gods Would Destroy, They First Give Real-time An... by thenomad on Wednesday January 09, 2013 @06:31PM (#5034244)
Counter point to your first - do I, as the Practical A/B testing Guy, really care if I get one in 100 tests wrong?

If I'm running 100 A/B tests a year, 50% of which produce a 5% improvement in my conversion rate, who cares if I get one of them wrong and drop 5% instead? I'll still have improved my conversions by 1100% over the course of the year.

(Obviously, I'm not taking into account local maxima here - but any statistical misstep will only temporarily roll your testing down the hill, and subsequent tests will push back up to the local maximum anyway.)

Re:Whom the Gods Would Destroy, They First Give Real-time An... by btilly on Wednesday January 09, 2013 @06:48PM (#5034318)
In reality no, because nobody will notice that the company is about 10% smaller than it could have been, and you're doing good stuff. However the cost of that 10% change in your company probably exceeds the cost of running 100 tests.

Note that in the real world, after a while you exhaust the easy 5% wins. Then you wind up chasing a lot of 1% and 2% marginal wins, and those tests take a lot longer to run. But even so, if your company is pulling down, say a million per month, a 2% drop in business from getting a 1% test wrong probably exceeds the costs of all of the tests you run per year. So unless extending tests is prohibitively expensive, or there are significant opportunity tests from not being able to run the tests you want, you should go to higher confidence.

Re:Whom the Gods Would Destroy, They First Give Real-time An... by thenomad on Thursday January 10, 2013 @04:11AM (#5036116)
Sorry, I'm not quite following you here.

In my experience, the primary limiter of how many A/B tests you can run is available traffic.

Let's assume that I'm running the 2% tests you mention. I can either run 60 2% tests at 95% confidence, or (approximately) 30 2% tests at 99.9% confidence, if the math posted elsewhere in this thread is right, over a year, say - that's how much traffic I have. Let's once again assume a third of those pan out.

I'm still not seeing why I'd prefer 10 2% wins (from the 99.9% approach) to 20 2% wins plus 3 2% losses (from the 95% approach). Yes, there are more errors, but overall I end up with a 40% improvement as opposed to a 24% improvement.

Can you explain?

Re:Whom the Gods Would Destroy, They First Give Real-time An... by btilly on Thursday January 10, 2013 @10:19AM (#5037277)
You can run multiple A/B tests in parallel, as long as the tests themselves do not interact.

And coming up with and implementing likely ideas is a challenge.

Now do you understand?

Re:Whom the Gods Would Destroy, They First Give Real-time An... by thenomad on Thursday January 10, 2013 @11:26AM (#5037808)
On the first point - I may be being dense here. Do you mean a) segmenting traffic, and running A vs B on one segment, and A vs C on another, b) A/B testing, say, headline and CTA on the same page at the same time, or c) testing different parts of the funnel at the same time?

On the second point - this may be an industry difference, but I've never really had any problem coming up with things to A/B test on a landing page, for example. Just off the top of my head, you could test:

- Headlines - at least 5 of them.

- Headline and subhead vs no subhead.

- Font face.

- Color scheme (overall)

- Images - probably want to test 6-10 of them.

- Call To Action (CTA) text.

- Call To Action button vs link

- CTA placement

- Multiple vs single CTAs.

- Long copy vs short.

- Layout. Image on left, right or top? More than one image? Etc. On the average LP I could come up with 10 possible layouts before pausing for breath.

- Testimonials. PLacement, which ones, how long, picture vs audio vs video vs text.

- Video vs image-and-text.

- Ugly vs good-looking.

- Text highlighting, bolding etc - yellow highlighter style vs bold and italic vs nothing.

- Other social proofing elements - which media icons to use, where to place them, etc.

That's at least 50 A/B tests right there, on a single LP. And all of those elements have been shown in one test or another to affect conversion rates.

Re:Whom the Gods Would Destroy, They First Give Real-time An... by btilly on Thursday January 10, 2013 @06:48PM (#5040496)
I mean that you can take the same traffic, using random assignment, and assign it into multiple A/B tests at once. Sure, there may be interaction effects, but they are random and statistically your evaluation of each test is unaffected by the others.

You need to be careful if you believe that there is reason to believe that tests will interact. For instance if you're testing different font colors, and different background colors, the possibility of red text on a red background would be unfair to both tests. But in general if you avoid the obvious stuff, you can do things in parallel. (If you have enough traffic you can analyze for interaction effects, but don't plan on doing that unless you know that you have enough traffic to actually follow the plan.)

Re:Whom the Gods Would Destroy, They First Give Real-time An... by btilly on Friday January 11, 2013 @01:49AM (#5041672)
Re-reading, I realize that I was as clear as mud here about interaction vs interaction.

The first paragraph is talking about random interaction. So, for instance, version A of test 1 was really good, and version B of test 2 got more A's from test 1 than version A of test 2 did. This gives version B a random boost. As long as things are random, it is OK to completely ignore this type of random interaction from the fact that you are running multiple tests on the same traffic.

The second paragraph is talking about non-random interactions. People who are in version A of test 1 and also in version B of test 2 get a horrible interaction that hurts both of those. If you have reason to believe that you have causal interactions like this, you can't ignore it but have to think things through carefully.

Re:Whom the Gods Would Destroy, They First Give Real-time An... by thenomad on Friday January 11, 2013 @08:32PM (#5046081)
Hmm, thank you - that's really very interesting indeed. I'd not thought of doing A/B tests like that. Thank you very much!
Re:Whom the Gods Would Destroy, They First Give Real-time An... by tel on Wednesday January 09, 2013 @03:46PM (#5033407)
Thus why 95% alpha is really important to notice since you should probably be applying Bonferroni corrections (at least).
Re:Whom the Gods Would Destroy, They First Give Real-time An... by mcfunley on Wednesday January 09, 2013 @04:16PM (#5033561)
You raise a bunch of good and valid points. Please do finish your article. I don't view "how not to run an A/B test" as the final authority on this without qualifications, either.
Re:Whom the Gods Would Destroy, They First Give Real-time An... by btilly on Wednesday January 09, 2013 @05:57PM (#5034094)
I keep on meaning to, but the article turned out to be more complicated than I initially expected. I will get around to it one of these days though.
Re:Whom the Gods Would Destroy, They First Give Real-time An... by joshuacc on Wednesday January 09, 2013 @02:32PM (#5032982)
I would love to read your article when you finish the writing. It sounds very interesting!