This Shiny Application calculates statistical power based on a normal distribution function using pnorm and shows this graphically in the form of a plot of two normal densities.
Power is the probability of rejecting a null hypothesis when it is false.
We consider a theoretical example where our sample mean is normally distributed and the standard deviation of the population is known.
The null hypothesis H0: mu = mu0 versus the alternative hypothesis Ha: mu > mu0 (one sided test)
The application allows varying the parameters for calculating power:
mu0: sample mean under null; mua: sample mean under alternative; sigma: standard deviation; n: sample size; alpha: type I error rate. ## Code
## Installing package into '/home/asmae/R/x86_64-pc-linux-gnu-library/4.4' ## (as 'lib' is unspecified)