The number of participants or samples in a study, determining its ability to detect real effects.The sample size is the number of individual observations, participants, or data points included in a study. It is a fundamental parameter in statistics because it directly influences the precision of estimates and the power of hypothesis tests. A larger sample size generally reduces sampling error, making results more reliable and more likely to reflect the true population effect, while a smaller sample size increases the risk of missing real effects or producing spurious ones.
The formal concept of sample size and its role in inference developed in the early 20th century, notably through the work of Ronald Fisher in the 1920s and 1930s, who established the framework for experimental design and hypothesis testing.
Statistical inference relies on the idea that a sample approximates the population from which it is drawn. The standard error of an estimate decreases as the square root of the sample size increases, so doubling the sample size roughly halves the margin of error. Power analysis, which determines the minimum sample size needed to detect an effect of a given size, balances the desired significance level, effect size, and statistical power.
Sample size calculations are routine in clinical trials, social science surveys, and quality control to ensure studies are neither underpowered nor wastefully large.
In some fields, the 'p-hacking' problem—where researchers collect data until results become significant—exploits the fact that increasing sample size can turn a non-significant result into a significant one, even when the true effect is zero.
| B | variable | Bayes factor — bayes factor |
| D_k | variable | k-th data point — data |
| H_1 | variable | alternative hypothesis — hypothesis |
| H_0 | variable | null hypothesis — hypothesis |
| N | variable | number of data points — sample size |
| ∏ | operator | multiplication of terms for k=1 to N — product operator |
| MAE | variable | Mean absolute error — mean absolute error same as dependent variable |
| n | variable | Number of observations — sample size |
| y_i | variable | True value for observation i — true value same as dependent variable |
| \hat{y}_i | variable | Predicted value for observation i — predicted value same as dependent variable |
| \sum_{i=1}^n | operator | Sum over all observations from 1 to n — summation |
| |\cdot| | operator | Takes the absolute value of the difference — absolute value |
| MSE | variable | Mean squared error — mean squared error |
| n | variable | Number of observations — sample size |
| y_i | variable | Actual value for observation i — actual value |
| \hat{y}_i | variable | Predicted value for observation i — predicted value |
| \sum_{i=1}^{n} | operator | Sum over all observations from 1 to n — summation |









