
BernSim BernSim –Program that simulates a Bernoulli event in the population. Confidence limits of the proportion of an event in a population are determined by four different methods. Sample program calculates and graphically shows binomial distribution for a defined number of events.
Event with two outcomes are called Bernoulli event, and a random variable that describes them is called a Bernoulli random variable. Software BernSim consists of three independent parts. Simulator – for the given number of members (proportion) of the population given properties is assigned by the random selection of assigned given property (Y = 1). The sample of given size are randomly sampled from the members of population. It examines how many members has the required properties (Y = 1).
1. The number of members of the population. Assign exact proportion of properties that are present in the population. The sample size of population is determined for required properties (Y = 1or true). Sampling can be repeated several times (Number of samples). 2. List of results. It is written for the number of members of the sample which was found with default properties and proportions (%) in the sample. The results list with Copy / Paste (right click) can be transferred to a spreadsheet (Excel) or word processor (Word). 3. The level of statistical confidence limits that are obtained by multiple sampling. The results can be shown as a histogram of the frequency for properties found in the samples. Histogram is allowed when the number of sampling > 100. 4. The confidence limits for proportions of Bernoulli events for a given sample size of the population could be determined by the large number of repeated sampling. Binomial distribution – Numerically and graphically shows the probability density function of the binomial distribution B(n, p) given by sample size (n) and proportion (successful) event in the sample (p). Confidence interval  Confidence limits is determined by the proportions of the given level of statistical significance. You can use one of four methods. Let x be the number of successes in a random sample of size n. As success is observed if y_{i}, i = 1, 2, . . . , n, has a specific characteristic; a failure is observed if y_{i} does not have that characteristic. The proportion of successes in the sample is p^{~}=x/n, and the proportion in the population as p. In practice the value of the population parameter p is usually unknown and must be estimated from a sample of data. This sample estimate is obtained by counting the successes and dividing by the total number of trials. The value of p is fixed but unknown, and it is within the upper p_{U} and lower p_{L} confidence limits. Probability that p lies between these values is 1. Enter the sample size. 2. Record number of successful outcomes (required properties) in the sample. 3. Specifies a statistical confidence level of proportion. 4. Results of confidence limits for proportion of properties in the population. 5. Selection method for the determination of confidence limits. Four methods of confidence intervals can be distinguished: 1. Numerical method To obtain an exact confidence interval must be numerically solve the pair of equations for p_{L} and p_{U} must be numerically solved
This method works well for small and moderate sized values of n. 2. ClopperPearson interval For 0 < x < n, the solution for p_{L} and p_{U} is found via value for the Fdistribution
This method may encounter numerical difficulty with determining the F ratio percentiles for large degrees of freedom. 3. Wald interval The method is based on the normal approximation to the binomial distribution. Lower limit and upper limit are
where z_{y} is the z_{y}=1α/2 percentile of a standard normal distribution. The method is well for large value of n (sample size > 100). 4. Wilson score interval The lower and upper limit of the interval are defined as where z_{y is the }z_{y} =1α percentile of a standard normal distribution. The sample size should be large enough to approximate the binomial distribution B(n,p) with normal distribution N(np, np(1p))./2 Program (zip) You can download here. Author: dr.sc. Mladen Tudor 