---
title: "Estimation of the probability p after having observed s successes in n trials"
canonical: "https://modelassist.epixanalytics.com/space/EA/26574975/Estimation%20of%20the%20probability%20p%20after%20having%20observed%20s%20successes%20in%20n%20trials"
format: markdown
---
####  

#### The idea

The results for the [Binomial](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26574973/) and [Negative Binomial](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26574974/Distribution+of+the+number+of+trials+n+needed+to+obtain+s+successes+each+with+probability+p) distributions are both modeling *randomness*: that is to say that they are returning probability distributions of possible future outcomes. At times, however, we are looking back at the results of a binomial process and wish to determine one of the parameters. For example, we may have observed *n* trials of which *s* were successes and from that information would like to estimate *p*. This binomial probability is a fundamental property of the stochastic system and can never be observed, but we can become progressively more certain about its true value by collecting data.

  


#### modeling the uncertainty about p

##### Bayesian statistics

If we have observed s successes in n random trials, a [Bayesian analysis](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575368/) gives the conveniently simple result:

  


p=Beta(s+a, n-s+b, 1)

  


where a Beta(a,b,1) prior is assumed.

  


The Beta(1,1,1) is a Uniform(0,1) distribution - often considered appropriate as an [uninformed prior](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575372/), in which case we have:

  


p=Beta(s+1, n-s+1,1)

  


The Beta distribution can be used this way because it is a [conjugate distribution](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575373/) to the binomial likelihood function.

  


##### Classical statistics

Three methods for the estimation of p are discussed [here](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26574972/).

  


##### Comparison between estimation methods

A comparison of the classical and Bayesian methods of estimating p is provided [here](https://epixanalytics.atlassian.net/wiki/spaces/EA/pages/26575422/).

  


  


  


  


  


  


---