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 1


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.

  • $\begingroup$ 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? $\endgroup$
    – Reza
    Commented Nov 11, 2017 at 0:53
  • $\begingroup$ @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) $\endgroup$
    – Andi F
    Commented Nov 11, 2017 at 1:03
  • 1
    $\begingroup$ @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. $\endgroup$
    – Taylor
    Commented Nov 11, 2017 at 1:23
  • $\begingroup$ 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. $\endgroup$ Commented Nov 13, 2017 at 15:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.