PQStat PQStat User Guide Polski pqstat.pl

There are several ways to approach determining the sample size. One possibility is to estimate how large a sample should be to reflect the population well. Another possibility is to estimate the sample size for the situation of using specific statistical tests – in that case, besides the required sample size, we may also be interested in the power of those tests. The first, and seemingly easier, approach is presented in the subsection Sample size determination, the second in the subsection Power and sample size for test.

Sample size determination

When to use:

Studying an entire population is usually neither practical nor possible, so a subset of it – a sample – is selected. The sample is of course smaller than the population, but it should reflect it well. One of the key aspects when planning a study, besides the randomness of the sample, is determining its size – so that inference about the population based on the sample is reliable.
If we are interested in ensuring that the proportion of a certain characteristic, or the mean value, calculated for a sample reflects the proportion or mean value in the population with as small an error as possible, we can, before starting the study, estimate how many people/observations are needed for this. In PQStat, the required sample size can be determined in this way both for estimating a proportion and for estimating a mean value in the population.

How to set up the analysis

The window with the Sample size determination settings is opened via the menu Advanced statistics\(\to\)Test power and sample size\(\to\)Sample size determination. Regardless of whether we are estimating the required sample size for a proportion or for a mean, we need to provide the assumed margin of error \(E\), i.e. the maximum deviation we are willing to accept between the result obtained from the sample and the true value in the population.

  • For a proportion we additionally provide the expected proportion of the characteristic in the population – if it is unknown, the program uses the most conservative value \(p=0.5\), for which the required sample size is the largest.
  • For a mean we additionally provide the standard deviation of the characteristic in the population, known e.g. from earlier studies.

If we know the size of the entire population (and, in particular, when it is relatively small compared to the calculated sample size), it is worthwhile to apply the so-called finite population correction (\(FPC\)) (Lenth (2001)[103], Armitage and Colton (2009)[12]) – the program allows this correction to be applied once the population size is provided.

Performing and interpreting the analysis

Example 1. Estimating a proportion

Population: People eligible to vote in the Polish presidential election.
We are interested in the support for individual candidates.
How many people should be selected so that the resulting percentage has an error of at most \(2\%\)?

Required sample size = 2401 people
With a sample of at least 2401 people, we will have 95% confidence that the error of the support for the selected presidential candidate does not exceed 2%.

This means that in 95% of experiments consisting of drawing a random 2401-element sample from the population, the error of the support estimate for a given candidate will not exceed 2%, but in 5% of such experiments it may be greater than 2%.
When choosing the size of the acceptable error, it is worth checking whether the election also includes candidates with low support (close to the assumed margin of error). If so, it is worth reducing the assumed error – the consequence of this will be an increase in the required sample size.

Example 2. Estimating a mean value

Population: People suffering from hypertension in Poland in 2005-2010, aged 20-40.
We are interested in the mean body weight of these people.
How many people should be selected so that the mean weight has an error of at most \(3kg\)? We know that the population standard deviation of body weight for these people is \(18kg\).

Required sample size = 139 people
To be 95% confident that the population mean lies within the margin of error (\(\pm3kg\)) built around the mean of our sample, we need to collect at least 139 people.
FOR THOSE INTERESTED

Sample size for estimating a population proportion
Formulas: assuming the possibility of an estimation error of size \(E\), we determine the required sample size \(n_0\) – for an unknown population size, or \(n_{FPC}\) – for a known population size.

\[ n_0=\frac{Z^2p(1-p)}{E^2} \]

where:

\(p\) – the expected proportion in the population, as specified by the researcher; if this quantity is unknown, the estimated required sample size will be increased so that it is sufficient for any possible proportion, i.e. the value \(p=0.5\) will be used.

When we know the population size (in particular – when it is relatively small compared to \(n_0\), i.e. when \(n_0/N>5\%\)), the so-called finite population correction (\(FPC\)) (Lenth (2001)[103], Armitage and Colton (2009)[12]) should be used, given by the formula:

\[ n_{FPC}=\frac{n_0N}{n_0+(N-1)} \]

Sample size for estimating a population mean
Formulas: assuming the possibility of an estimation error of size \(E\), we determine the required sample size \(n_0\) – for an unknown population size, or \(n_{FPC}\) – for a known population size.

\[ n_0=\frac{Z^2\sigma^2}{E^2} \]

where:

\(\sigma\) – the population standard deviation, known from earlier studies.

When we know the population size (in particular – when it is relatively small compared to \(n_0\), i.e. when \(n_0/N>5\%\)), the so-called finite population correction (\(FPC\)) should be used, given by the formula:

\[ n_{FPC}=\frac{n_0N}{n_0+(N-1)} \]