## Question 371:

1## Answer:

No answer provided yet.There is no one formula to calculate sample size. I wish it were that easy. Instead, the formula you use is based on the type of data (continuous or discrete) and what you are trying to sample for, as well as what you know or don't know about what you are sampling.

- Continuous/Discrete: Is your data measuring things like time, weight, temperature in units that can be divided to smaller and smaller units?
- What are you trying to sample for?
- Comparing the means from two groups? (e.g. Proportion of voters likely to vote for candidate A versus candidate B)
- Comparing the means for more than two-groups? (e.g What dose of Anti-biotic has the highest reduction of tumors in lab-mice: 10mg, 15mg, 20mg)
- Estimating a single mean of a population (e.g What is the average IQ of 9th grade students)

The first two approaches involve comparing means and testing a hypothesis (there is a difference between groups or not a difference between groups) and require an estimate of the sample size and usually how large a difference (called effect size) you're interested in detecting. In general, the smaller the difference between groups, the larger the sample size you will need.

The 3rd approach involves estimating just one mean. Usually your sample size is based on an ideal margin of error (+/-3% etc). If your data is discrete-binary (e.g agree/disagree) you don't need an estimate of the standard deviation and can estimate the margin of error based on the sample size. For examples of these approaches see for example: See also question 369