Hacker News new | ask | show | jobs
by jessicaraygun 4468 days ago
Thanks for the feedback!

Confidence.js comes from how we operate on A/B tests at sendwithus - we think of them as variants associated with results. While the code could definitely boil down to a few simple math functions, we find objects to be a good way to organize our data models.

1 comments

Also, "getRequiredSampleSize" is called twice for each variant - in the "getResult"'s loop and then inside "hasEnoughData". Same thing for "getVariant". Would you welcome a pull request?

Your project is great, I'd totally use at work. Also, it was to learn the math behind that. Thanks!

Glad you like it, happy to have you contribute :)