1. akoha
  2. django-lean
  3. Issues
Issue #16 new

g_test formula is incorrect

goodwinb
created an issue

django-lean / django_lean / experiments / significance.py line 71 {{{

observed_test_statistic += ((observed_value - expected_value)**2) / expected_value

}}}

Would be better written as... {{{ observed_test_statistic += 2 * (observed_value*log(observed_value/expected_value)) }}}

For more on the formula see either Wikipedia (http://en.wikipedia.org/wiki/G-test) or the page source for by Ben Tilly at http://elem.com/~btilly/effective-ab-testing/g-test-calculator.html .

Comments (1)

  1. Log in to comment