Calculating the sample size

The links below lead to a set of pages with javascript that calculate the required sample size needed to obtain a specified precision of an estimate.

Suppose you wish to estimate the number of people in city A who prefer Heineken over any other brand of beer. With 95% confidence you wish to state that in city B this number 25% with a margin of error of 5%. This means that with 95% confidence the percentage of Heineken lovers is between 20% and 25%. In the form, you will have to specify the percentage as a proportion, the level of confidence, the margin of error and the population size. The size of the population is not required, but if known gives a smaller sample size. In case you don't know the proportion, .50 is a good estimate for sample size calculations because it gives a smaller margin of error with other percentages. Estimating a proportion can be done in two ways, with an absolute margin of error (+/- 5%) regardless the value found in the study or with a relative margin of error (+/- 5% of 50% = 2.5%), (+/- 5% of 40% = 2%). The page for continuous data requires some knowledge of the sample mean and standard deviation.

Sample size required for estimating a proportion with absolute margin of error
Sample size required for estimating a proportion with relative margin of error
Sample size required for estimating a mean or total
A Java web application for statistical computing