Sample size is the number of observations taken from a population through which statistical inferences for the whole population are made.

**Formula to calculate sample size.**

- N = Population size.
- Z = Z value
- p = Sample proportion.
- e = Margin of error.

**Example:**

A website owner is interested to know how many of his customers bought an item from him after viewing his website on a certain day. Given that the website has on average 10,000 views per day, determine the sample size of the customers that he has to monitor at a 95% confidence level with a 2% margin of error.

Therefore,

N is 10,000.

The z value is 1.96.

The margin of error is 0.02

Since the current conversion rate is unknown, let us assume p = 0.5

Therefore, the sample size is 194.