I am looking for a way to calculate the observed power of an AB test, in javascript but can't figure out the formula.
Here is a live example : https://abtestguide.com/calc/
screenshot : observed power on abtestguide calc
I managed to reproduce all the field calculations except the observed power.
My research led me to a few articles that share the formula in R, but I have no idea how to interpret that in JS.
I expect the output of the formula to be the same as the one obtained on abtestguide's calculator.
Thank you very much in advance to anyone that will help, it's appreciated.
PS : Here is an example I found of the formula in R, if it helps : http://daniellakens.blogspot.com/2014/12/observed-power-and-what-to-do-if-your.html