A JavaScript statistical analysis and optimization tool