I'm supposed to be writing R functions to calculate the Wald CI, Wilson CI, and Agresti-Coull CI for binomial proportion, I have a source that provides the equations, but I am completely lost. I am looking at the equations, but have no clue where I am supposed to be getting all the values I need.
Ward CI = $p̂ ± k n^{-1/2} (p̂q̂)^{1/2}$
Wilson CI = $(X+k^2/2)/(n+k^2)±(kn^{1/2})/(n+k^2)((p̂q̂+k^2)/(4n))^{1/2}$
Agresti-Coull CI = $p̂ ± k(p̂q̂)^{1/2}n̂^{1/2}$
I'm pretty sure I have most of it, but I am can't figure out what the value of k is. n=40 p = 0.2 alpha=0.05 q=0.8 These formulas are from http://projecteuclid.org/download/pdf_1/euclid.ss/1009213286 I was wondering if anyone could break these down and explain them to me?