Statistical analysis is one of the principal tools employed in epidemiology, which is primarily concerned with the study of health and disease in populations. Statistics is the science of collecting, analyzing, and interpreting data, and a good epidemiological study depends on statistical methods being employed correctly. At the same time, flaws in study design can affect statistics and lead to incorrect conclusions. Descriptive statistics measure, describe, and summarize features of a collection of data/sample without making inferences that go beyond the scope of that collection/sample. Common measures of descriptive statistics are those of central tendency and dispersion. Measures of central tendency describe the central distribution of data and include the mode, median, and mean. Measures of dispersion describe how data is distributed and include range, quartiles, variance, and deviation. The counterpart of descriptive statistics, inferential statistics, relies on data to make inferences that do go beyond the scope of the data collected and the sample from which it was obtained. Inferential statistics involves parameters such as sensitivity, specificity, positive/negative predictive values, confidence intervals, and hypothesis testing.
The values used to describe features of a sample or data set are called variables. Variables can be independent, in the sense that they are not dependent on other variables and can thus be manipulated by the researcher for the purpose of a study (e.g., administration of a certain drug), or dependent, in the sense that their value depends on another variable and, thus, cannot be manipulated by the researcher (e.g., a condition caused by a certain drug). Variables can furthermore be categorized qualitatively in categorical terms (e.g., eye color, sex, race) and quantitatively in numerical terms (e.g., age, weight, temperature).
The evaluation of diagnostic tests before approval for clinical practice is another important area of epidemiological study. It relies on inferential statistics to draw conclusions from sample groups that can be applied to the general population. See also .
- Analysis of a sample group conducted in order to measure, describe, and summarize the data collected, but not to make inferences that go beyond the scope of that sample group
- Employs measures of central tendency (mode, median, and mean) and measures of dispersion measures (range, quartiles, variance, and deviation)
- Inferential statistics: analysis of a sample group conducted in order to make inferences that go beyond the sample group.
Measures of central tendency and outliers
Measures of central tendency
- Definition: measures to describe a common, typical value of a data set (e.g., clustering of data at a specific value)
- Approach: The type of measure used depends on the sample size.
|Measures of central tendency|
|Mean (statistics)|| || |
|Median (statistics)|| |
|Mode (statistics)|| |
- Definition: a data point/observation that is distant from other data points/observations in a data set
- Using a trimmed mean: calculate the mean by discarding extreme values in a data set and using the remaining values
- Use the median or mode: useful for asymmetrical data; these measures are not affected by extreme values because they are based on ranks of data (median) or the most commonly occurring value (mode) rather than the average score of all values
- Removing outliers can also distort the interpretation of data. It should be done with caution and with a view to reflecting the respective data set.
- Definition: measures the extent to which the distribution is stretched out
|Measures of dispersion|
|Range (statistics)|| || |
|Interquartile range|| |
|Variance (statistics)|| |
|Standard deviation (SD)|| |
|Percentiles|| || |
|Standard error of the mean|
- Variables: measured values of population attributes or a value subject to change
- General population: the group from which the units of observation are drawn (e.g., all the patients in a hospital)
- Unit of observation: the individual who is the subject of the study (e.g, inhabitant of a region, a patient)
- Attribute: a character of the unit of observation (e.g., gender, patient satisfaction)
- Attribute value
- Variables can be qualitative (e.g., male/female) or quantitative (e.g., temperature: 10°C, 20°C) in nature
- Quantitative variables can be discrete or nondiscrete (continuous) variables (see “Probability” below).
Types of variables
- Independent variable: a variable that is not dependent on other variables and can thus be manipulated by the researcher for the purpose of a study
- Dependent variable: a variable with a value that depends on another variable and therefore cannot be manipulated by the researcher
Types of quantitative variables
- Discrete variable: variables that can only assume whole number values
- Continuous variable (nondiscrete variable): variables that can assume any real number value
- Categorical variable (nominal variable): variables that have a finite number of categories that may not have an intrinsic logical order
- Definition: types of measurement scales (categorized as and )
Categorical scale (qualitative)
- The distance (interval) between two categories is undefined.
- Includes the and
Metric scale (quantitative)
- The distance between two categories is defined and the data can be ranked .
- Includes the and
|Types of scales |
|Types||Characteristics||Measure of central tendency||Measure of dispersion||Statistical analysis||Data illustration|
|Nominal scale|| || || || |
|Ordinal scale|| || |
|Interval scale|| || |
|Ratio scale|| |
Normal distribution (Bell curve, Gaussian distribution) 
- Normal distributions differ according to their mean and variance, but share the following characteristics:
- The same basic shape
- The following assumptions about the data distribution can be made:
- Symmetry (i.e., a symmetrical bell curve)
- Total area under the curve = 1
- All measures of central tendency are equal (mean = median = mode)
- Standard normal distribution (Z distribution): a normal distribution with a mean of 0 and standard deviation of 1
|Types of nonnormal distributions|
|Bimodal distribution|| || |
Positively skewed distribution
Negatively skewed distribution
- Enables the comparison of populations with different means and standard deviations
- Standard normal value = (value - population mean) divided by standard deviation
- A means of expressing data scores (e.g., height in centimeters or meters) in the same metric (specifically, in terms of units of standard deviation for the population)
- Determines how many standard deviations an observation is above or below the mean
|Recommended measures according to distribution|
|Distribution||Measures of central tendency||Measure of spread|
|Skewed (asymmetrical)|| |
- Presents data values for each category in a table
- Illustrates which values in a data set appear frequently
- Describes the frequency of categories in a circular graph divided into slices, with each slice representing a categorical proportion
- Useful for depicting a small number of categories and large differences between them
- Bar graph
- A histogram is similar to a bar graph but displays data on a metric scale.
- The data is grouped into intervals that are plotted on the x-axis.
- Useful for depicting continuous data
- Similar to a bar chart, but differs in the following ways:
- Used for continuous data
- The bars can be shown touching each other to illustrate continuous data.
- Bars cannot be reordered.
- Quartiles and median are used to display numerical data in the form of a box.
- Useful for depicting continuous data
- Shows the following important characteristics of data:
- Easily shows measures of central tendency, range, symmetry, and outliers at a glance
- A graph used to display values for (typically) two variables of data, plotted on the horizontal (x-axis) and vertical (y-axis) axes using cartesian coordinates, which represent individual data values
- Helps to establish correlations between dependent and independent variables
- Helps to determine whether a relationship between data sets is linear or nonlinear
Hypothesis testing and probability
Types of hypothesis
- Null hypothesis (H0): The assumption that there is no relationship between two measured variables (e.g., the exposure and the outcome) or no significant difference between two studied populations. Statistical tests are used to either reject or accept this hypothesis.
- Alternative hypothesis (H1): : The assumption that there is a relationship between two measured variables (e.g., the exposure and the outcome) or a significant difference between two studied populations. This hypothesis is formulated as a counterpart to the null hypothesis. Statistical tests are used to either reject or accept this hypothesis.
- Correct result
Type 1 error
- The null hypothesis is rejected when it is actually true; and, consequently, the alternative hypothesis is accepted, although the observed effect is actually due to chance (false positive error).
- Significance level(type 1 error rate): the probability of a (denoted with “α”)
- Type 2 error
Statistical power: (1-β)
- The probability of correctly rejecting the null hypothesis, i.e., the ability to detect a difference between two groups when there truly is a difference
- Complementary to the type 2 error rate
- Positively correlates with the sample size and the magnitude of the association of interest (e.g., increasing the sample size of a study would increase its statistical power)
- Positively correlates with measurement accuracy
- By convention, most studies aim to achieve 80% statistical power.
P-value: the probability that a statistical test leads to the false conclusion that there is a relationship between two measured variables (e.g., the exposure and the outcome) or that there is a significant difference between two studied populations
- Calculated with statistical tests
- If the p-value is equal to or less than a predetermined significance level (usually set at 0.05), the association is considered statistically significant (i.e., the probability that the result was obtained by chance is < 5%).
- It is not possible to prove H1 is true, but having a p-value that is lower than the significance level indicates that it is very unlikely that the H0 is correct.
|Null hypothesis (H0) is true||Null hypothesis (H0) is false|
|Statistical test does not reject H0|| || |
|Statistical test rejects H0|| || |
“The Accusation is POSted But you NEGlect it!” (type I error (Alpha) is a false positive error and type II error (Beta) is false negative error)
Probability of an occurring event (P)
- Describes the degree of certainty that a particular event will take place
- P = number of favorable outcomes/total number of possible outcomes
Probability of an event not occurring (Q)
- The degree of certainty that a particular event will not take place
- Q = number of unfavourable outcomes/total number of possible outcomes OR 1 - P
- Probability of an occurring event (P)
- Probabilities can be combined for individual, unrelated events by multiplying them by one another.
- Probabilities can be combined for multiple, unrelated (i.e., exclusive) events by addition
- Probabilities can be combined for multiple events that are related (i.e., NOT exclusive) by adding the probability of each event and then subtracting the probability of the combined events 
The actual probability of an event is not the same as the observed frequency of an event!
- Probability of independent events: The probability of event A is not contingent upon the probability of event B and vice versa.
Conditional probability (P(A|B)): the probability of event A occurring given that event B has occurred: P(A|B)
P(A|B) = P(A and B) / P(B)
- P(B) = probability of event B
- P(A and B) = probability of events A and B occurring simultaneously
- E.g., the probability of lung cancer in a smoker (A → lung cancer; B → smoking)
- The underlying condition is that the individual is a smoker → P(B) = probability of being a smoker = number of smokers/total population
- P(A and B) = probability of simultaneously being a smoker and having lung cancer = number of smokers with lung cancer/total population
- Therefore, P(A|B) = the probability of lung cancer arising in a smoker = P(A and B)/P(B) = number of smokers with lung cancer/number of smokers
- P(A|B) = P(A and B) / P(B)
- P(A and B) = probability of events A and B occurring simultaneously
- The multiplication rule is obtained by rearranging the formula for conditional probability. P(A and B) = P(B) × P(A|B)
- The multiplication rule can be applied to a decision tree in order to calculate the probability of one of the branches (a particular outcome)
- E.g., pedigree charts for genetic analysis
- Bayes theorem
Mutually exclusive probability
- Definition: Events cannot both happen.
- Example: drawing an ace or a queen out of a deck with 52 cards (4/52 + 4/52 = 8/52 = 2/13)
Nonmutually exclusive probability
- Definition: Both events can happen.
- For probabilityof of the sum of two nonmutually exclusive events, add probabilities, then subtract the multiplied probabilities of events
- P(A or B) = P(A) + P(B) − P(A and B)
- 0.3 + 0.4 - (0.3 × 0.4) = 0.58 (probability to meet someone who has either CAD OR is obese is 58%)
- Chance of CAD: 30% (0.3), chance of obesity: 40% (0.4)
- Example: probability of meeting someone who has coronary artery disease (CAD) OR is obese
- Overview: Confidence intervals provide a way to determine a population measurement or a value that is subject to change from a sample measurement.
- Definition: the range of values that are highly likely to contain the true sample measurement
- Nonoverlapping confidence intervals between two groups signify that there is a statistically significant difference.
- Overlapping confidence intervals between two groups may indicate that there is no statistically significant difference.
- If the confidence interval includes the null hypothesis, the result is not significant and the cannot be rejected.
- A 95% confidence interval that does not include the null hypothesis corresponds to a p-value of 0.05
- A 99% confidence interval that does not include the null hypothesis corresponds to a p-value of 0.01
Statistical significance vs. clinical significance 
Significance (epidemiology): the statistical probability that a result did not occur by chance alone
- Statistical significance: describes a true statistical outcome (i.e., that is determined by statistical tests) that has not occurred by chance
- Clinical significance (epidemiology): describes an important change in a patient's clinical condition, which may or may not be due to an intervention introduced during a clinical study
- Statistical and clinical significance do not necessarily correlate.
Correlation and regression
- Definition: : a measure of the linear statistical correlation between continuous variables
Interpretation: A correlation coefficient measures the strength (i.e., the degree) and direction (i.e., a positive or negative relationship) of a linear relationship (does not require causality).
- Direction or relationship: can be positive; or negative (which are identified by a plus or minus, respectively)
- Strength of relationship
- See “.““ and “
- Definition: the process of developing a mathematical relationship between the dependent variable (the outcome; y) and one or more independent variables (the exposure; x)
Linear regression: a type of regression in which the dependent variable is continuous
- Simple linear regression
- 1 independent variable is analyzed
- If y has a linear relationship with an independent variable x, a graph plotting this relationship takes the form of a straight line (called regression line).
- In the case of simple linear regression, the equation of the regression line is: y = mx + b, with m representing the slope of the regression line, y the dependent variable, x the independent variable, and b the y-intercept (the value of y where the line crosses the y-axis)
- Multiple linear regression: > 1 independent variable is analyzed
- Simple linear regression
- Logistic regression: a type of regression in which the dependent variable is categorical
Pearson correlation coefficient (r)
- Compares interval level variables
- Calculates the estimated strength and direction of a relationship between two variables
- r is always a value between -1 and 1.
- A positive r-value = a positive correlation
- A negative r-value = negative correlation
- The closer the r-value is to 1, the stronger the correlation between the compared variables.
- The coefficient of determination = r2 (the coefficient may be affected by extreme values and indicates the proportion of a variable's variance that can be predicted by the variance of another variable)
- Calculates the difference between the means of two samples or between a sample and population or a value subject to change; especially when samples are small and/or the population or a value subject to change distribution is not known
- Used to determine the confidence intervals of a t-distribution (a collection of distributions in which the standard deviation is unknown and/or the sample size is small)
One sample t-test
- The t-value can be classified according a table that lists t-values and their corresponding quantiles based on the number of degrees of freedom (df) and the significance level (α value).
- Alternatively, one may calculate the confidence intervals of the sample observations and check if the population mean (μ0) falls within the range given by the confidence intervals.
- Formula: t-value = (sample mean - population mean)/standard deviation) * √(n)
- Prerequisite: normal distribution (the variance is known and depends on the degrees of freedom.)
- Calculates whether a sample mean differs from the population mean (μ0)
Two sample t-test
- Calculates whether the means of two groups differ from one another
- Formula: t-value = (mean difference between the two samples/standard deviation) * √(n)
- Interpretation: The t-value is compared with a table of t-values in order to determine whether the difference is statistically significant (similar to the one sample t-test described above).
- Unpaired t-test (independent samples t-test)
- Paired t-test (dependent samples t-test)
Analysis of variance (ANOVA)
- Calculates the statistically significant difference between ≥ 3 independent groups by comparing their means (an extension of the t-test)
- One-way analysis of variance
- Two-way analysis of variance: assesses 2 variables (e.g., the mean height of women and the mean height of men in clinics A, B, and C at a point in time, the variables are gender and height)
Spearman correlation coefficient
- Calculates the relationship between two variables according to their rank
- Compares ordinal level variables
- Extreme values have a minimal effect on Spearman coefficient.
- Not precise because not all information from the data set is used.
- See “ .”
Mann-Whitney U test
- Compares ordinal, interval, or ratio scales
- Calculates whether two independently chosen samples originate from the same population and have identical distributions and/or medians
Wilcoxon test (rank sum and signed rank)
- Rank sum test: compares the means between groups of different sizes
- Signed rank test: compares the means between pairs of scores that can be matched; substitute for the one-sample t-test when a pre-intervention measure is compared with a post-treatment measure and the null hypothesis is that the treatment has no effect
- Kruskal-Wallis H test
- Binomial test: examines whether the observed frequency of an event with binary outcomes (e.g., heads/tails, dead/alive) is statistically probable or not
Chi-square test (X2 test)
- Calculates the difference between the frequencies in a sample
- Aims to determine how likely outcomes are to occur due to chance (used in cross-sectional studies)
Fisher exact test
- Also calculates the difference between the frequencies in a sample but, unlike a Chi-square test, is used when the study sample is small
- Also aims to determine how likely it was the outcomes occurred due to chance
“Chi-tegorical:” Chi-square test is used for categorical variables.