Opened 7 years ago

Closed 6 years ago

## #843 closed request (wontfix)

# Binomial Confidence Interval

Reported by: | Peter | Owned by: | Peter |
---|---|---|---|

Priority: | minor | Milestone: | |

Component: | statistics | Version: | |

Keywords: | Cc: |

### Description

Given n trials and k successes what is the confidence interval of the success rate, r?

For large n and k is not close to 0 or n, a gaussian approximation can be used.

Otherwise use the Clopper-Pearson method which says the CI is

`gsl_cdf_beta_Pinv (alpha/2, n-k, n)`

: `gsl_cdf_beta_Pinv (1-alpha/2, k+1, n)`

In terms of interface, either functions taking k and n, or a class like the averager which one can add data to. In the latter case the estimated success rate (k/n) should be part of the interface as it is highly expected.

### Change History (3)

### comment:1 Changed 6 years ago by

### comment:2 Changed 6 years ago by

Status: | new → assigned |
---|

### comment:3 Changed 6 years ago by

Milestone: | yat 0.14 |
---|---|

Resolution: | → wontfix |

Status: | assigned → closed |

This functionality already exists in boost

**Note:**See TracTickets for help on using tickets.

According to this site the modified Walt method is more accurate [than Clopper-Pearson] in most cases, so we'll go with that. It looks extremely easy to implement too.