Posts

Showing posts from September, 2026

Statistical inference and data science

Statistical inference focuses on quantifying uncertainty. It is primarily used to generalise information from samples by estimating unobservable parameters and testing hypotheses about the properties of a population that cannot be observed in its entirety. Data science, which many statisticians consider to be part of statistical science (machine learning), is mainly about exploring patterns in data and developing predictions. For example, to answer the question, "How well will this treatment work for the next patient?" a machine learning approach may be useful, and the answer should include the risk of an erroneous classification. If the question is instead, "What is the average effect of this treatment?" statistical inference is necessary, and the answer should include an assessment of the uncertainty of the presented treatment effect estimate. The two approaches often use the same statistical methods, such as logistic regression analysis, but the methods are typic...

Propensity scores

As treatment is not assigned randomly in observational studies, patients receiving a particular exposure (or treatment) may differ systematically from patients receiving other exposures or no exposure at all. Consequentially, when investigating the effects of an exposure, the effect of the systematic differences (confounders) needs to be taken into account, preferably be adjusted away in the statistical analysis. Traditionally, this has been made by stratifying on the confounders or including them in a regression model. More recently, adjustment using propensity scores has become increasingly popular (1). A propensity score is a subject’s estimated probability of receiving a particular exposure or treatment, given their observed baseline characteristics. The propensity score thus condenses several measured baseline covariates into a single score. The purpose of this score is to balance the groups receiving different exposures or treatments. Given the score, the covariates included in t...

Confounders, mediators, and colliders

  Confounding is a distortion of the estimated effect of an exposure on an outcome. The distortion is caused by a confounder that impacts both exposure and outcome. Exposure <- Confounder -> Outcome An observed exposure effect may then reflect the effect of the confounder rather than exposure. For example, when studying the effect of alcohol consumption on cardiovascular disease risk, prior health status, is a confounder if it affects both alcohol consumption and the risk of a cardiovascular event. Confounding can be dealt with in two ways. The first is to perform an experiment with randomised assignment of subjects to exposure and a control group. The advantage with this strategy is that it prevents against confounding from all confounders, known as well as unknown. However, the disadvantage is that it cannot be used to investigate effects of harmful exposures as that would be unethical and in many cases practically impossible. Other disadvantages are that trials are expensi...

Immortal time bias

  To produce valid results, both observational studies and randomised trials depend on correct classifications of exposure (or treatment) and follow-up. Immortal time bias is a time-related misclassification that can seriously bias the outcome of an investigation. The phenomenon occurs when either the exposed group is assigned a follow-up period that could not have included the events under study (like time on a treatment waiting list). Or when exposed subjects with early events are excluded from the evaluation, ensuring corresponding survival among the remaining. For example, it was reported (1) from a randomised trial of the effect of a radiation sensitiser on the survival of inoperable lung cancer patients, that the subgroup of patients (36%) who completed the course of radiation therapy augmented by the sensitiser survived a median of 22 months, twice as long as the patients in the control group. However, the median survival for the entire treatment group was only 13 ...

Correlation

  One of the terms most frequently misused in medical publications is ‘correlation’. It is often used to describe any kind of relationship or interaction between variables. However, the term is very specific and using it arbitrarily may be misleading. Apart from non-parametric alternatives and minor variants, two major types of correlation coefficients have been developed: Pearson's correlation coefficient and the intraclass correlation coefficient. The first one measures the linear association between two variables, the second one the resemblance of measurements made within the same unit (repeated measurements) or cluster. Pearson's correlation coefficient Pearson's correlation coefficient ( ρ ) for the two variables X and Y is the covariance of the two variables divided by the product of their standard deviations: ρ  = cov(X,Y)/(σ X σ Y ) Pearson's correlation coefficient ranges from −1 to 1. The value 1 implies that a linear equation describes the relationship bet...

Pretesting normality

One common misunderstanding demonstrated in medical publications is the testing of normal distribution as part of a decision process: If Shapiro-Wilk Test or Kolmogorov-Smirnov Test indicates that a variable has a statistically significant departure from normal distribution, group mean differences are tested using the Mann-Whitney Test instead of Student's t-test. This decision rule may sound rock solid, but it may be a serious mistake. First, the practice treats absence of evidence as evidence of absence. A statistically nonsignificant normality test is simply not evidence of a normal distribution. Second, for a two-sample t-test or a linear statistical model, the relevant distributional issue concerns the difference or model residual conditional on covariates, not whether each observed treatment group's raw outcome values are exactly normal. Third, with small sample sizes, where the normality assumption may be important, the normality test has low power to detect non-normalit...

Randomisation and alternation in clinical trials

  In early clinical trials patients were allocated to treatment and control groups by alternation, i.e. patients were assigned to the treatment group and control group in a strict order. The advantage with this method was that it produced groups with equal size. The two groups would also be fairly compared if the order of the patients included in the trial was random. However, the group allocation for a patient was predictable, which could potentially introduce selection bias into the trial's outcome through differential invitations to participate. The only way to avoid this issue was, of course, to make the group assignment concealed, which necessitated a non-systematic group assignment sequence. D'Arcy Hart (1) describes the development with two trials from the 1940s. The first one investigating the effects of patulin (a mycotoxin) on the common cold in 1943-1944 with strict alternation. The second one, having a randomised group assignment, investigating the effects of strept...

The ICMJE recommendations

The most important guideline for writing a manuscript to be submitted to a medical scientific journal is the Manuscript Preparation and Submission recommendations from the International Committee of Medical Journal Editors (ICMJE). It can be found here (1). From a statistical viewpoint, two of the recommendations are exceptionally useful. The first is: "Describe statistical methods with enough detail to enable a knowledgeable reader with access to the original data to judge its appropriateness for the study and to verify the reported results." To be able to judge appropriateness and verify reported results is not only about naming the methods that have been used, it is also about why a particular method has been used, the investigators' intention. It may therefore be necessary to motivate the method choice by explaining the analysis strategy. Vague or otherwise unclear statements such as "independent samples t-test" and "as appropriate" should be avoi...

Conditional and marginal models

  Statistical analyses of related data need to take the relations into account to avoid misleading results. Two main types of statistical models are used, conditional and marginal models (1). A conditional model can be fitted within the framework of generalized linear mixed models (GLMM) and a marginal model using generalized estimating equations (GEE). Analyses based on conditional and marginal models give answers to different questions. While a conditional model can be used to estimate the outcome within a subject or cluster after conditioning on covariates, a marginal model can estimate the average outcome for the population accounting group-specific effects. For example, in a longitudinal study comparing patients receiving diet recommendations (treated) with patients receiving exercise recommendations (controls), uncontrolled blood pressure at repeated visits can be modelled using both a conditional and marginal model. Neither of these two models is automatically more correct ...

Degrees of freedom

  In statistical inference, degrees of freedom is a measure of the available amount of independent information. For example, when estimating a mean value of a population, the degrees of freedom, df , are the same as the number of observations, n . When estimating the variance of the same population, one degree of freedom is first lost when estimating the mean value because variance is defined relative to the mean value. The population variance is thus estimated with n - 1 degrees of freedom. More generally, with independent observations the degrees of freedom can be calculated as the number of observations minus the number of estimated parameters, df = n - p , where p is the number of estimated parameters. However, with repeated measurements, things become more complicated because observations from the same person are correlated and do not provide as much independent information as the same number of measurements from different people. Ignoring this problem is a common mistake, wh...

Fixed effects, random effects, and mixed models

  While classical statistical methods are based on an assumption of independent observations, many currently used statistical models include observations that are related instead of independent, such as repeated measurements from the same patient and patients randomised at the same centre. Fixed effects models, random effects models, and mixed models provide different ways to deal with independent and related, and a mix of independent and related observations (1). Fixed effects estimate a population-average association or a specific comparison that is central to the research question. For example, in a clinical study, treatment group, follow-up time, baseline age, and sex may be modelled as fixed effects. The estimated treatment effect then represents the expected difference between treatment groups, conditional on the other predictors. Random effects represent the variation among units drawn from a wider population. Instead of estimating a separate, unrelated parameter for each ho...

Efficacy, effectiveness, and efficiency

  The concepts of efficacy, effectiveness, and efficiency are frequently misunderstood. They all pertain to the outcome of a medical intervention, but it is crucial to comprehend their differences accurately. Efficacy refers to whether an intervention produces more benefit than harm when tested under tightly controlled, ideal circumstances, such as strict inclusion/exclusion criteria, close monitoring, and high adherence to the treatment protocol. This effect is typically investigated in a classical randomised trial designed for high internal validity, an explanatory trial (1). Effectiveness refers to how well an intervention works in everyday clinical practice with a more diverse patient population including comorbidities, inconsistent adherence, and varying follow-up care. This effect is often investigated in a pragmatic trial, prioritizing external validity (representativity) instead of internal validity. The distinction between efficacy and effectiveness is important because an...

Blinding the statistician?

  Blinding randomised patients and doctors by masking treatment, where this is possible, is an established approach in clinical trials, aiming to prevent bias. It is not uncommon that published trial reports state that the statistician was also blinded, not only during the planning of the final analysis, which has been routine for a long time, but also during the analysis. Professional clinical trials units seem to have variable approaches to the blinding of trial statisticians (1). You might argue that knowing which arm is which affects the outcome of the statistical analysis, and that blinding the statistician results in a more objective result. However, this misses the fact that statistical comparisons of treatment groups, masked or not, in itself are likely to unblind the data. For example, adverse-event profiles typically show side effect patterns that reveal the identity of treatment and placebo groups. A reasonable explanation for the statisticians' influence on the analysis...

Frequentists and Bayesians

Followers of today's two main traditions of statistical inference are known as frequentist and Bayesian. Ronald Fisher attempted during the 1930s to develop a third school called fiducial inference (1), but this was broadly considered controversial and do not play a major role today. The fundamental difference between frequentists and Bayesians is that they define probability in different ways. For a frequentist, a probability is an objective measure, a long-run relative frequency. For example, a fair coin has probability 0.5 of heads because, across a very large number of comparable tosses, half are heads, and a drug lowering blood pressure has an objectively measurable average effect among the patients taking the drug. The central limit theorem, which states that as the sample size increases, the distribution of sample means tends to approximate a normal distribution, is essential in frequentist inference. A Bayesian, on the other hand, sees probability as a subjective measure, a...

Parameters and estimands

A search in PubMed shows that the use of the statistical term estimand has increased markedly during the past ten years. Yet, the term remains unfamiliar to many readers. In statistics, a parameter is a numerical characteristic of a population, probability distribution, or statistical model. Examples include a mean, proportion, variance, regression coefficient, hazard ratio, or risk. Because the population is rarely observed in its entirety, such quantities are usually inferred from sample data, for example, from participants in a clinical trial. As sampling uncertainty affects the resulting estimates and should be quantified, statistical inference is necessary. An estimand is different. It is a precise statement of the quantity that a study is intended to estimate in order to answer its scientific or clinical question. It should be defined before selecting a statistical model or analysis method. This distinction matters because different analyses can answer different questions. For ex...