Statistics Toolbox    
binofit

Parameter estimates and confidence intervals for binomial data

Syntax

Description

phat = binofit(x,n) returns a maximum likelihood estimate of the probability of success in a given binomial trial based on the number of successes, x, observed in n independent trials. A scalar value for x or n is expanded to the same size as the other input.

[phat,pci] = binofit(x,n) returns the probability estimate, phat, and the 95% confidence intervals, pci.

[phat,pci] = binofit(x,n,alpha) returns the 100(1-alpha)% confidence intervals. For example, alpha = 0.01 yields 99% confidence intervals.

Example

First we generate a binomial sample of 100 elements, where the probability of success in a given trial is 0.6. Then, we estimate this probability from the outcomes in the sample.

The 95% confidence interval, pci, contains the true value, 0.6.

Reference

[1]  Johnson, N. L., S. Kotz, and A.W. Kemp, "Univariate Discrete Distributions, Second Edition," Wiley 1992. pp. 124-130.

See Also
binocdf, binoinv, binopdf, binornd, binostat, mle


  binocdf binoinv