# What to put for p in a binomial test to obtain a CI?

I have a simple binomial test in which $55$ successes out of $100$ trials have been found. In R, it is necessary to pick a p (probability of success) to run a binomial test and obtain a $Confidence ~Interval$.

In my case, I was wondering if I should put $.55$ ($55$ out of $100$) for that p?

binom.test(55, 100, p = .55)$conf.int  ## 1 Answer You can put in anything you want. binom.test 's p parameter is the null value of$p$for a null hypothesis for a hypothesis test. If you only want the confidence interval, this number is immaterial. Check for yourself: change the value and notice how nothing happens to the conf.int member. • So, by "binom.test 's p parameter is the null value of p for a null hypothesis for a hypothesis test" you mean by default p is considered .5? – Reza Nov 11 '17 at 0:53 • @Reza yes, check out the help page by typing ?binom.test. The default null hypothesis is that p = 0.5: binom.test(x, n, p = 0.5, alternative = c("two.sided", "less", "greater"), conf.level = 0.95) Nov 11 '17 at 1:03 • @Reza that number is for a hypothesis test, and has no bearing on your confidence interval. The default value for this is$.5\$, but I did not mention that in my answer. Nov 11 '17 at 1:23
• There are different methods to calculate a confidence interval for a binomial proportion. In R, in the DescTools package, there's a function BinomCI that has options for several methods. Also, there's a function in DescTools, MultinomCI, that produces confidence intervals for multinominal proportions. A few examples of these function are here. Nov 13 '17 at 15:57