A helper function to estimate the power using the generated test statistic, and estimated distribution of the test statistic.
Useful links