lecture 11
1. Introduction to regression and statistical modeling
This topic covers foundational concepts in statistical modeling, specifically multivariate linear regression, its implementation using standard libraries, issues like collinearity, and an introduction to unsupervised learning techniques through hierarchical and K-means clustering.
1.1 Multivariate linear regression and loss functions
Multivariate linear regression extends simple two-dimensional linear regression, which minimizes the sum of squares (SOS), to models with more than one independent variable. When dealing with multiple predictors, parameter fitting often involves iterative methods like gradient descent . A significant advantage of using the Sum of Squares (SOS) loss function is its convexity, which guarantees that gradient descent, a greedy algorithm, will converge to the global minimum 2.
In the context of regression, the Ordinary Least Squares (OLS) method seeks to minimize this loss function. Practical implementation in Python can utilize libraries like statsmodels or scikit-learn. When using statsmodels, it is crucial to explicitly add a constant term using sm.add_constant() to the independent variables matrix (X) to correctly model the intercept, preventing its confounding influence on the regressor weights 3.
A standard OLS summary provides several key statistics for model assessment ]:
- R-squared (R2): Represents the proportion of variance in the dependent variable (Y) explained by the model. A value near 1.0 suggests a very strong fit .
- F-statistic and its p-value: These assess the overall significance of the correlation explained by the entire set of regressors .
- Coefficients (coef), standard errors (std err), and t-statistics/p-values (P>∣t∣): These detail the estimated slope (weight) for each individual regressor 4.

The scikit-learn implementation of LinearRegression directly fits the model to find the coefficients and intercept, which can be accessed via .coef_ and .intercept_ respectively . While linear regression is an example of supervised machine learning, capable of predicting unseen data points, proper separation of training and validation sets is necessary for robust extrapolation . Furthermore, many machine learning algorithms, including deep neural networks, share the paradigm of defining a loss function and fitting all parameters simultaneously via gradient descent 5 6.
1.2 Collinearity in regression models
Collinearity, or multicollinearity, occurs when two or more independent variables in a model are highly correlated, making one effectively redundant . When collinearity is present, the specific weights assigned to the highly correlated variables become arbitrary ("a matter of luck") and should not be interpreted as indicating a differential predictive potential between them . However, collinearity does not typically invalidate the overall model significance or affect the interpretation of weights for variables that are weakly correlated or uncorrelated with the others . A common diagnostic step to identify this issue is calculating all pairwise correlations among predictors (e.g., using df.corr(axis=0)) 7.
1.3 Unsupervised learning: Clustering basics
Clustering is a core technique in unsupervised machine learning, as it seeks to discover inherent structure by identifying similar subgroups (of rows or columns) without relying on external labels or ground truth . The two primary types introduced are hierarchical clustering and K-means clustering 8.
1.3.1 Hierarchical clustering and distance metrics
Hierarchical clustering builds a nested sequence of partitions, represented by a tree-like structure called a dendrogram, without requiring prior knowledge of the number of clusters (K) . This method is particularly suitable for data exhibiting processes that are naturally hierarchical, such as evolutionary sequences (e.g., organisms or product iterations) . The algorithm iteratively merges the closest pair of elements or clusters based on a chosen distance metric until all elements form a single group 9.
The fundamental building block is the distance metric, such as Euclidean distance, which calculates the shortest path in multi-dimensional space, equivalent to the hypotenuse of a right triangle formed by the differences in coordinates . For two points p1=(x1,y1) and p2=(x2,y2), the distance d is calculated as: d=(x1−x2)2+(y1−y2)2+… 16.
The hierarchical clustering process involves these steps :
- Identify and group the closest pair based on the distance metric.
- Treat the newly formed group as a single entity and update the distances between it and all other elements/groups.
- Repeat steps 1 and 2 until all elements are merged into one structure 15.
A key method used in this process is Ward's method, which specifically merges the pair that minimizes the increase in the within-group sum of squares (variance) 10.

The power of this technique is demonstrated in biology, where it significantly aided the reconstruction of the tree of life, and in cancer research, where clustering gene expression profiles accurately identified cancer subtypes . However, hierarchical clustering has limitations; it works best for data related by a strict tree structure. It struggles with processes involving horizontal transfer or complex non-tree relationships, as every node in the dendrogram can only be connected directly to one parent group 17 18.
1.3.2 Heatmaps and clustergrams
Hierarchical clustering results are often visualized using heatmaps or clustergrams, which can visualize correlations or data values in one or two dimensions , . A correlation matrix heatmap uses color intensity to show the relationship between pairs of variables; for instance, darker blue often indicates a stronger positive correlation 11 12.

A clustermap in libraries like Seaborn integrates hierarchical clustering directly into the heatmap visualization, applying clustering on both the rows and columns simultaneously and displaying the corresponding dendrograms . This allows users to see which rows (samples) and which columns (features) group together based on their similarity in the underlying data matrix 13.

Clustergrams are highly effective in fields like bioinformatics for grouping related proteins or compounds based on experimental scores, revealing functional complexes 14.

1.4 K-means clustering
K-means clustering aims to partition data points into a predefined number of clusters, K . While algorithmically simple, its primary challenge lies in accurately determining the optimal value of K .
The K-means algorithm proceeds as follows :
- Define K initial centroids (means).
- Calculate the distance of every point to each of the K centroids.
- Assign each point to the cluster whose centroid is closest.
- Recalculate the centroids as the mean of all points assigned to that cluster.
- Repeat steps 2 through 4 until the cluster assignments no longer change (convergence) 20.
Before applying K-means, especially when features have different scales, it is beneficial to preprocess the data by whitening. Whitening involves re-scaling the data by its standard deviation, effectively making the variance of each dimension approximately equal, resembling white noise 21.
Tip: K-means is appropriate when one suspects data naturally divides into non-hierarchical groups and has an estimate for the number of resulting clusters (K) 22.

Several methods exist for empirically determining the optimal K ]:
- Elbow Method: Plotting K against the explained variance (or distortion) and selecting the value of K where the rate of improvement significantly drops (the "elbow") .
- Silhouette Analysis: Measures how well each point fits within its assigned cluster relative to other clusters .
- Gap Statistic: Compares the within-cluster variance to that expected under a null reference distribution derived from simulations 24.
1.5 Clustering applications
Clustering techniques have broad utility across various scientific and business domains ]:
- Biological sciences: Clustering genes by expression profiles or classifying patients and single-cell data .
- Business: Customer segmentation for targeted marketing .
- Data processing: Document classification and image compression by grouping similar pixels based on color or position 23.
2. Combining p-values and meta-analysis foundations
This section details statistical techniques for synthesizing evidence across multiple independent studies, covering p-value combination methods, the foundational structure of meta-analysis models, and critical procedures for detecting and adjusting for publication bias.
2.1 Methods for Combining p-values
Combining p-values allows researchers to synthesize evidence from separate tests to derive a single, overall measure of significance when individual patient data is unavailable or when studies report distinct outcomes.
Fisher’s Method
Fisher's method is a standard technique for combining k independent test statistics (p-values). It relies on transforming the p-values and then comparing the resulting statistic to a χ2 distribution.
The core formula involves calculating a test statistic, X2, often expressed as: X2=−2∑i=1kln(pi) where pi is the p-value from study i, and k is the number of studies. This statistic is then compared to a chi-squared distribution with 2k degrees of freedom to obtain the combined p-value 26.
Stouffer’s Z Method
Stouffer's method converts each p-value into its corresponding Z-score using the probit function (the inverse cumulative distribution function, or quantile function, of the standard normal distribution).
The process involves:
- Converting each pi to a Z-score, Zi.
- Averaging these Z-scores (or calculating a weighted average) to obtain a combined Z-score, Zcombined. The standard deviation is often re-scaled according to the Central Limit Theorem.
- Converting Zcombined back into a final combined p-value using the standard normal distribution.
Tip: The p-value is the quantile because it is assumed to be uniformly distributed (flat) under the null hypothesis. The probit function maps this quantile (p-value) to the corresponding Z-score 29.
The relationship between the p-value (quantile) and the Z-score visualized by the probit function shows an increasing, S-shaped curve 27.

For example, using Python's scipy.stats.combine_pvalues:
- Fisher's method is the default. For p-values {0.06,0.07}, the resulting statistic is approximately 10.95 and the combined p-value is about 0.027.
- Stouffer's method, when applied with equal weights, yields a combined Z-score of approximately 2.14 and a p-value of about 0.016.
Example: In the Stouffer's method, weights can be optionally added to reflect the relative importance or sample size of each study in the final Z-score calculation 28.
2.2 Foundations of Meta-Analysis
Meta-analysis involves statistically combining results from multiple independent studies to derive more precise estimates of effect sizes, construct new confidence intervals, and test new hypotheses, such as subgroup effects 30.
Preparation and Data Handling
To ensure a robust and reproducible meta-analysis, rigorous preparatory steps are necessary:
- Literature Search Strategy: This must be clearly defined beforehand, specifying databases (e.g., PubMed), keywords, and search parameters.
- Inclusion Criteria: Explicitly define criteria for study inclusion, such as:
- Study design (e.g., Randomized Clinical Trials).
- Specific patient populations (age, sex).
- Assessment of the probability of bias.
- Requirement for specific metrics or availability of per-patient data 31.
Modeling Approaches
The choice of analytical method depends on the data available across the pooled studies:
- Individual Patient Data (IPD) Analysis: If IPD is accessible, the most powerful approach is to model all studies together, explicitly accounting for heterogeneity factors (like dose, duration, or baseline values) to estimate the overall mean effect size and confidence intervals.
- Aggregate Data Analysis: When only summary statistics (like group averages and standard deviations) are available for each study, simpler, standard meta-analytic approaches must be employed 32.
Fixed-Effects vs. Random-Effects Models
The primary distinction between meta-analysis models lies in their assumptions about the underlying true effect size across studies.
Fixed-Effects Model
This is the simplest approach. It assumes that a single, true effect size, θ, is common to all studies. The observed effect size in study i, denoted θ^i, is modeled as: θ^i=θ+ϵi where ϵi is the error term, assumed to be normally distributed with a standard deviation equal to the standard error of the study estimate.
Weighting in the fixed-effects model is inversely proportional to the standard error of the estimate, which is largely determined by the study's sample size. This method closely resembles the weighted Stouffer’s Z approach 33.
Random-Effects Model
The random-effects model acknowledges that the true effect size may vary between studies (heterogeneity). It assumes that the observed effect sizes are normally distributed around an overall mean effect size, μ.
The DerSimonian-Laird method is the standard approach within this framework. However, critics note that this standard method can sometimes lead to the over-weighting of smaller studies 34.
The visual difference in pooled results between these models is often demonstrated in a Forest Plot, showing individual study estimates (horizontal lines with 95% CIs) and the overall pooled estimate (diamond) under both modeling assumptions (#page=035_01) 35.

2.3 Publication Bias and Small-Study Effects
A critical threat to the validity of meta-analyses is publication bias, the tendency for studies showing statistically significant or directionally desirable results to be published more frequently than those showing null or undesirable results. This leads to an overestimation of the true effect size and significance.
Publication bias is often closely linked to the small-study effect, where smaller studies are thought to be the primary source of this bias due to greater variation in findings or selective reporting based on significance.
Detecting Bias: The Funnel Plot
The funnel plot is a primary visual tool for assessing publication bias. It plots the effect size on the x-axis against a measure of study precision (e.g., standard error (σ), variance (σ2), or sample size n) on the y-axis.
- Symmetry: If no publication bias exists, the points should form a symmetrical inverted funnel shape around the pooled estimate.
- Asymmetry: Asymmetry in the distribution indicates potential publication bias, often appearing as a greater number of studies clustered on one side, typically the side corresponding to the significant effect 37.

Specific examples using funnel plots clearly show how asymmetry in the standard error distribution suggests potential issues, especially if the largest effect sizes are disproportionately found only in the smallest studies (#page=039_01) 39.

Detecting Bias: Egger’s Test
Egger’s test provides a formal statistical assessment of funnel plot asymmetry. This test examines the linear correlation between the effect size and the inverse of the standard error (precision) using regression analysis. If the regression intercept is significantly different from zero, it provides statistical evidence suggesting publication bias 38.
Addressing Publication Bias
Several strategies can be employed to manage or correct for detected publication bias:
- Exclusion: Small studies, or those suspected of bias, can be systematically excluded from the analysis 36.
- Trim and Fill Method: This technique first estimates the effect size by trimming (excluding) the potentially biased small studies. Then, it re-includes these studies along with synthesized "missing" studies imputed symmetrically on the opposite side of the expected mean effect. This allows the analysis to incorporate more data than strict exclusion while attempting to correct for the bias. This correction method can lead to using more studies overall compared to systematic exclusion 40 41.

2.4 Evolution and Scope of Meta-Analysis Research
Meta-analysis has become an increasingly prevalent research method across academic fields, particularly in medicine. Data shows an exponential growth in the number of meta-analysis studies published annually, rising sharply after the year 2000 and peaking around 25,000 studies in 2021 (#page=042_01) 42.

The distribution of research areas covered by meta-analyses has also shifted over time. For instance, between the 1986–2009 period and the later 2010–2014 period, Oncology increased its share of published meta-analyses, while Internal Medicine saw a decrease (#page=043_01) 43.

Furthermore, the top journals publishing this research have changed, though certain influential journals remain consistently ranked highly across different time frames (#page=044_01) 44.

3. Critique and societal impact of meta-analyses
Meta-analyses, while powerful tools for synthesizing evidence, face significant critiques regarding their susceptibility to methodological manipulation, industry influence, and their subsequent impact on public scientific literacy and consensus.
3.1 Benefits and societal influence of meta-analyses
Meta-analyses offer several advantages in scientific evaluation, primarily revolving around efficiency and the establishment of consensus. They are relatively inexpensive to execute compared to primary research. Furthermore, they serve a vital function in aggregating data to generate a robust scientific consensus on a specific issue or intervention. However, this established consensus can be wielded to influence public perception, particularly when the lay press chooses to heavily feature the findings of a specific meta-analysis.
The rapid increase in the use of this methodology is evident in publication trends.
This exponential growth in publications necessitates critical evaluation, as the ease of performance combined with the potential for arbitrary methodological choices opens the door to manipulation.
Shifts in research focus over time also influence the landscape of published meta-analyses. For instance, between the periods 1986–2009 and 2010–2014, the proportion of meta-analyses concerning Internal Medicine decreased, while those in Oncology saw a notable increase.
The platforms publishing these studies also reflect evolving trends, showing a dynamic environment for where meta-analytic evidence is disseminated.
3.2 Industry influence and methodological manipulation
The relative low cost and flexibility of meta-analyses make them attractive tools for industry-commissioned laboratories and think tanks aiming to support a specific product or, conversely, to introduce doubt regarding negative scientific findings. The key vulnerability lies in the arbitrary methodological choices that can be easily justified post-hoc to skew the results toward a desired conclusion 45.
Tip: Be highly skeptical of meta-analyses published by groups with clear financial interests, as the methodology is often engineered to achieve pre-determined results.
Specific tactics used to manipulate outcomes in meta-analyses include:
- Selective Inclusion of Study Types: Restricting the analysis exclusively to randomized double-blinded placebo-controlled trials (RCTs) for interventions like foods. This often artificially narrows the scope to include only a few studies that utilized dosages small enough to be encapsulated (and thus administered easily in a trial setting), ignoring broader ecological or observational evidence.
- Inappropriate Confounding Corrections: Applying statistical adjustments that mask the true effect. For example, correcting for Body Mass Index (BMI) when the primary assessment concerns the impact of a specific food component on heart disease, where BMI might be an intervening variable rather than a necessary adjustment for baseline health status.
- Ignoring Systemic Biases: Purposely overlooking known confounding variables that correlate with the outcome. A classic example involves ignoring the correlation between wealth (which leads to higher meat consumption) and greater life expectancy when analyzing the effect of meat intake.
- P-Hacking/Post-Hoc Justification: Manipulating inclusion criteria and analysis parameters until a statistically significant or favorable outcome is achieved, followed by an attempt—often weak or non-existent—to justify these choices after the fact 46.
3.3 Societal impact and the need for statistical literacy
Misinformation stemming from biased meta-analyses, often amplified by corporate media coverage, contributes to a public perception that scientific experts are far more divided on critical issues than is accurate. While simply asserting that "experts agree" may not effectively shift public opinion against prevailing misinformation, a deeper public understanding of science is necessary for a functional society.
The fundamental concepts underpinning democracy and practices like informed consent rely heavily on the populace's ability to process scientific information critically. Therefore, mastering statistics is paramount for citizens to effectively combat misleading narratives derived from flawed or biased scientific synthesis 47.
Example: If a meta-analysis, funded by a pharmaceutical company, exclusively includes studies using only ten percent of the standard therapeutic dose and concludes the drug is ineffective, the public, lacking statistical literacy, might accept this conclusion over the broader consensus derived from higher-dose studies.
Common mistakes to avoid
- Review all topics thoroughly before exams
- Pay attention to formulas and key definitions
- Practice with examples provided in each section
- Don't memorize without understanding the underlying concepts
© 2026 Maeve. All rights reserved. This content is protected by copyright.