Calculate the test power basted on the sample size and draw a power analysis chart.
The following R code should produce the same results