Giter Club home page Giter Club logo

lukasvermeer / srm Goto Github PK

View Code? Open in Web Editor NEW
18.0 4.0 10.0 1.68 MB

This Chrome Extension automatically performs SRM checks and flags potential data quality issues on supported experimentation platforms.

Home Page: https://lukasvermeer.nl/srm/

License: MIT License

JavaScript 97.63% HTML 2.00% Ruby 0.37%
chrome-extension google-optimize sample-ratio-mismatch srm statistics statistical-analysis data-quality ab-testing experimentation vwo

srm's People

Contributors

afabijan avatar dependabot[bot] avatar fooku18 avatar geoprofi avatar heinrich333 avatar kingo55 avatar lukasvermeer avatar pauldria avatar stevencasey avatar vijaye-statsig avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

srm's Issues

Create logo

Needs to work for

  • Extension thumbnail in header
  • Website favicon
  • Website artwork (optional)

Cater to edge case where people set winning variant to 100%

@geoprofi points out a common edge case scenario which will lead to false SRM warnings:

A significant issue I see is that many people would just leave an Optimize experiment running with 100% of traffic going to the winning variant while the data continues to gather. This will, naturally, very quickly lead to SRM warnings for these tests.

The extension should simply refuse to do the check if this is the case.

Add "deep dive" feature to help users identify likely root cause

I've been reluctant to let go of identifying problematic variants for too long. @geoprofi has convinced me. We should just check for SRM overall (see #16).

However, in addition, we could still try to provide an "auto deep dive" feature which tries to find likely causes (we could base it on the taxonomy maybe), but that would be a different thing from the simple check functionality.

Adding tools with unknown domain / url format

Hello,

Great extension! I would like to add SiteSpect to the list of tools, but I'm running into an issue with the configuration.
Currently, the tools are recognized by their domain names.

But for SiteSpect, many customers run on-premise, with custom (sub)domains.

Would it be possible to add a feature like this:
When clicking on the extension icon, in the dropdown we could create a way to 'force' an SRM check of a specific tool, on the current page.

In this case, it won't do it automatically, but there is a possibility to verify the SRM. Also after manually triggering, for that user we could store the current domain as being that "tool" so it could automatically try to do it in the future.

Would like to hear your thoughts about this.

Kind regards,
Jonas

Unit tests for stats

@geoprofi suggested:

This tool made by me has been fairly rigorously tested and so any input there should return the correct output:ย https://www.gigacalculator.com/calculators/chi-square-calculator.php and so tables can be built around it. Similarly the chisq.test() function in R can be used, needs just to inputs, e.g. x <- c(1000,950,1050,1000); probs <- c(0.25,0.25,0.25,0.25); then chisq.test(x=x,p=probs);

https://www.gigacalculator.com/calculators/chi-square-calculator.php?test=goodnessoffit&data=1000+0.25%0D%0A950+0.25%0D%0A1050+0.25%0D%0A1000+0.25

x <- c(1000,950,1050,1000); probs <- c(0.25,0.25,0.25,0.25); chisq <- chisq.test(x=x,p=probs); chisq;

We should do some SEO

Obviously we should be the go-to resource for anyone searching for "SRM" or "Sample Ratio Mismatch". Seems Google doesn't realise that yet. We should help them.

Use a one-proportion z-test instead of a chi-square

@keesmulder suggested we should use a one-proportion z-test instead of a chi-square.

For example:

from scipy import stats
from statsmodels.stats.proportion import proportions_ztest

stats.chisquare([502,498],[500,500])[1]
proportions_ztest(count=502, nobs=1000, value=0.5)[1]
stats.chisquare([502,498],[500,500])[1] - proportions_ztest(count=502, nobs=1000, value=0.5)[1]

stats.chisquare([600,400],[500,500])[1]
proportions_ztest(count=400, nobs=1000, value=0.5)[1]
stats.chisquare([600,400],[500,500])[1] -proportions_ztest(count=400, nobs=1000, value=0.5)[1]

Which yields:

python
Python 2.7.16 (default, Oct 10 2019, 22:02:15) 
[GCC 8.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from scipy import stats
>>> from statsmodels.stats.proportion import proportions_ztest
>>> 
>>> stats.chisquare([502,498],[500,500])[1]
0.8993431885613663
>>> proportions_ztest(count=502, nobs=1000, value=0.5)[1]
0.8993423875828498
>>> stats.chisquare([502,498],[500,500])[1] - proportions_ztest(count=502, nobs=1000, value=0.5)[1]
8.009785165130623e-07
>>> 
>>> stats.chisquare([600,400],[500,500])[1]
2.5396285894708634e-10
>>> proportions_ztest(count=400, nobs=1000, value=0.5)[1]
1.082387390934913e-10
>>> stats.chisquare([600,400],[500,500])[1] -proportions_ztest(count=400, nobs=1000, value=0.5)[1]
1.4572411985359504e-10

At first glance, this seems to be more sensitive.

Maybe @geoprofi has an opinion here too?

Is doing pairwise SRM tests ok?

Hello @lukasvermeer, first of all, thank you so much for your work on this! I have a quick question that pertains to calculating SRM. Would it be valid to look at control-variant pairs on top of the standard 'global' SRM test?

For example, if we had 4 variants including control, we would have 3 pairs:

  • SRM global - control - variant 1 - variant 2 - variant 3 (standard way)
  • SRM test, control - variant 1
  • SRM test, control - variant 2
  • SRM test, control - variant 3

Of course in the case that the control itself has a problem, all secondary tests would trigger, but if any of variants 1, 2, or 3 have a problem, this would enable us to know exactly which one.

From a naive analysis of the chi-square goodness of fit test, it would work out on the math level. But would it really be valid statistically speaking? ๐Ÿ™

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.