1. Home
  2. Explore
  3. Statistics
  4. Biomedical Data Modeling

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Biomedical Data Modeling

Statistical Inference, Data Exploration, and Modeling in High-Throughput Biology

Inference from samples

Statistical inference uses sample data to draw conclusions about a larger population. In biological studies, researchers usually cannot measure every individual or biological specimen of interest, so they use a sample to estimate population properties and assess how uncertain those estimates are.

A sample difference alone does not establish that the populations differ. The observed difference may reflect a real population-level effect, or it may arise because a different sample would have produced different measurements.

Sampling variability

Suppose researchers compare the average heights of two populations. They take a sample of ten people from each group and observe a difference of three inches. To interpret that result, they need to consider how much the sample averages would vary if they repeated the sampling.

  • Each new sample can produce a different sample mean.

  • Repeated samples produce a sampling distribution: the distribution of a statistic, such as the sample mean, across repeated samples.

  • The spread of this distribution indicates how uncertain the sample-based estimate is.

  • Increasing the sample size generally makes the sampling distribution narrower, because the sample mean becomes more stable.

For a population with standard deviation σ\sigmaσ, the standard error of the sample mean is approximately:

σn\frac{\sigma}{\sqrt{n}}n​σ​

where nnn is the sample size. Under suitable conditions, the sampling distribution of the mean is approximately normal, centered on the population mean.

A standard error describes uncertainty in an estimate due to sampling. It is different from the standard deviation of individual observations: the standard deviation describes variation among individuals, while the standard error describes variation among sample estimates.

Tests, ppp-values, and confidence intervals

Researchers can compare an observed difference with the amount of variation expected under a statistical model. A ttt-statistic, for example, expresses an estimated difference relative to its estimated standard error. The model then indicates how unusual a statistic of that size would be if the null hypothesis were true.

  • A ppp-value measures how incompatible the observed data are with a specified null hypothesis, under the assumptions of the statistical model.

  • A confidence interval gives a range of values compatible with the data and the model at a chosen confidence level.

  • These quantities depend on the study design, sample size, variability, and assumptions used in the analysis.

The population and sampling variability are essential parts of inference. A small ppp-value from a particular sample does not, by itself, guarantee that a result will be reproduced in a new experiment.


Biological and technical replication

In gene-expression studies, researchers may measure thousands of genes across biological samples, such as mice from two different strains. The goal might be to identify genes whose expression differs between the strains.

A central distinction is the difference between biological replicates and technical replicates:

  • Biological replicates are independently sampled biological units, such as different mice. They reveal variability among individuals.

  • Technical replicates are repeated measurements of the same biological material. They mainly reveal variation in the measurement process.

Why pooling can undermine inference

Suppose researchers collect material from twelve mice, pool the material, and then make four repeated measurements of that pool. Those four measurements can reveal some technical variation, but they do not reveal how much expression varies from mouse to mouse.

The design is analogous to measuring the heights of ten people, averaging those heights, and then measuring that average four times. The repeated measurements would not show that the population contains both taller and shorter individuals. Treating them as independent people would give a misleading picture of the population’s variability.

This matters because inference about biological differences requires information about biological variability. If that variation is hidden, statistical tests may report extremely small ppp-values even though it is unclear whether a new experiment using different individuals would reproduce the result.

In an example comparing two genes, measurements from pooled samples made both genes appear highly significant. When the original measurements across individual mice were examined, one gene showed substantial biological variability and was no longer statistically significant; the other remained more consistent and was more likely to be reproducible with adequate power.

Replicates must match the question being asked. Technical repeats help characterize measurement precision; biological repeats help characterize variation among biological units.


Multiple comparisons

High-throughput technologies can test thousands of hypotheses at once. For example, researchers may test whether each of thousands of genes is differentially expressed between two groups. Testing many hypotheses creates a multiple-comparison problem: even if every null hypothesis is true, some tests will appear significant by chance.

If 10,00010{,}00010,000 hypotheses are tested at a nominal significance threshold of 0.050.050.05, and all null hypotheses are true, the expected number of false significant results is:

10,000×0.05=50010{,}000 \times 0.05 = 50010,000×0.05=500

More generally, if m0m_0m0​ of the tested hypotheses are true null hypotheses and each is tested at level α\alphaα, the expected number of false positives is approximately:

m0αm_0\alpham0​α

Thus, applying an unadjusted 0.050.050.05 threshold to thousands of genes can produce many false discoveries. Researchers need to use an appropriate method for controlling errors across the family of tests, such as a family-wise error correction or a false-discovery-rate approach. The choice depends on the scientific goal and the consequences of false positives.


Data exploration and the limits of fixed workflows

A data-analysis workflow is often presented as a sequence of steps that transforms raw data into a scientific conclusion. Such workflows can be useful, but they are not automatically reliable. Each step embeds assumptions, and a standard procedure can give misleading results if those assumptions do not fit the data.

Exploratory data analysis (EDA) examines data using summaries and visualizations before, during, and after formal modeling. It can reveal unexpected structure, measurement problems, outliers, and patterns that a routine pipeline might miss.

EDA serves two complementary purposes:

  • It can help prevent false discoveries by exposing artifacts or violations of assumptions.

  • It can support new discoveries by making genuine patterns easier to see.

Data scientists therefore do more than apply statistical tests. They help make measurements interpretable by examining how the data were generated, visualizing important features, and choosing models that reflect the measurement process.


Principal components and high-dimensional data

Gene-expression data can contain thousands of measurements per sample. A sample might be represented by a vector with one expression value for each of roughly 12,00012{,}00012,000 genes. A collection of samples therefore forms a high-dimensional data matrix that cannot be directly visualized in its entirety.

Principal component analysis (PCA) summarizes major patterns of variation in a high-dimensional dataset. It creates new, ordered axes called principal components:

  • The first principal component captures the direction of greatest variation in the data.

  • The second captures the greatest remaining variation while being uncorrelated with the first.

  • Plotting samples using the first two components provides a low-dimensional view of some of the dataset’s structure.

A PCA plot can help reveal clusters or gradients among samples. However, reducing thousands of dimensions to two necessarily discards information. Apparent distances or clusters in the plot are informative summaries, not complete representations of every relationship in the original data.

Tissue-expression example

In one analysis, expression profiles from several tissues were projected onto the first two principal components. If the measurements were consistent, samples from the same tissue would be expected to resemble one another because tissues have distinct expression patterns.

Instead, some samples from different tissues appeared close together, while samples from the same tissue appeared far apart. This unexpected pattern suggested that the data might be affected by noise or another source of variation. Simply running a clustering algorithm could have produced an incorrect biological interpretation.


Modeling background noise in measurement technologies

Measurement technologies may record both the biological signal of interest and unwanted background. In an early microarray model, an observed measurement was treated conceptually as the sum of:

  • Signal, representing gene expression.

  • Background, representing nonspecific measurement.

If a particular probe or measurement unit had its own background level, a simplified model might be written as:

Y=β+αY = \beta + \alphaY=β+α

where β\betaβ is the signal and α\alphaα is the background. In reality, both components can vary, and different measurement units may have different background behavior.

Why direct background subtraction can fail

A tempting approach is to measure background separately, subtract it from the observed signal, and treat the remainder as the estimated expression. But separate measurements of background are themselves noisy. Even when two measurements are strongly correlated, they may differ substantially.

When the signal is weak, uncertainty in the background estimate can become especially important. The resulting measurement error can vary with the signal level. In the example discussed, the variance of the log expression ratio was shown to be proportional to the reciprocal of the signal squared:

Var⁡(log ratio)∝1β2\operatorname{Var}(\text{log ratio}) \propto \frac{1}{\beta^2}Var(log ratio)∝β21​

This relationship arises from the statistical properties of the measurement and correction procedure; it is not necessarily evidence that the underlying biology is intrinsically more variable for low-expression genes.

Improving the model

A more realistic statistical model represents background measurements as noisy and potentially correlated quantities, rather than treating background as a perfectly known constant. Once the source of the variance is modeled, the data can be processed to reduce excessive variability.

One strategy is to accept a small amount of bias in exchange for a substantial reduction in variance. In statistical learning, this general strategy is associated with shrinkage or regularization. A suitable variance-reducing transformation can make true signal easier to distinguish from noise without collecting new experimental data.

In the example, reprocessing the same measurements with a model that better represented the background reduced the apparent noise. Known differences between samples became easier to identify, and tissue-specific expression patterns became clearer.


Batch effects

A batch effect is systematic variation associated with how or when measurements were processed, rather than with the biological property being studied. Potential sources include processing date, laboratory, instrument, reagent lot, or other technical conditions.

Batch effects are common in measurements collected over time. They are especially visible in high-throughput data because many variables can be examined together. Their visibility in high-throughput measurements does not mean they are unique to those technologies; lower-throughput experiments may also contain batch effects that are simply harder to detect.

How batch effects can create false conclusions

Consider a study comparing two biological groups. A simple model for an observation in group ggg might be:

Ygi=α+βI(g=2)+ϵgiY_{gi} = \alpha + \beta I(g=2) + \epsilon_{gi}Ygi​=α+βI(g=2)+ϵgi​

Here, α\alphaα is a baseline level, β\betaβ is the group difference of interest, I(g=2)I(g=2)I(g=2) indicates membership in group two, and ϵgi\epsilon_{gi}ϵgi​ represents individual-level variation.

If the two groups are processed in different batches, a batch term must also be considered:

Ygi=α+βI(g=2)+Wb(g,i)+ϵgiY_{gi} = \alpha + \beta I(g=2) + W_{b(g,i)} + \epsilon_{gi}Ygi​=α+βI(g=2)+Wb(g,i)​+ϵgi​

where Wb(g,i)W_{b(g,i)}Wb(g,i)​ represents the effect of the batch used for that observation.

When group membership and batch are completely confounded—for example, when every sample in group one is processed in one batch and every sample in group two in another—the observed difference combines the biological effect and the batch effect. In a comparison of group means, it includes both:

Observed difference=biological difference+batch difference\text{Observed difference} = \text{biological difference} + \text{batch difference}Observed difference=biological difference+batch difference

The data alone cannot determine how much of the observed difference comes from biology and how much from the batch. If a study reports a difference of five units, it cannot distinguish, for example, a biological difference of two units plus a batch difference of three from other possible combinations.

This is a problem of confounding. If group and batch are perfectly confounded, statistical adjustment cannot reliably separate their effects without additional information or a better-designed experiment. If the confounding is incomplete, a model may be able to estimate and adjust for batch effects, provided the design contains enough overlap to distinguish batch from biology.

Batch effects and underestimated uncertainty

If batch variation is ignored, the variance used in a test may represent only within-batch or measurement variation. It can omit the additional variability introduced by differences between batches. The standard error is then underestimated, test statistics become too large, and too many results may appear statistically significant.

A 10,000-gene expression study illustrates the danger. A standard analysis, including conservative correction for multiple comparisons, reported that more than a thousand genes differed between two ethnic groups. A PCA plot showed a strong separation between the groups, seemingly supporting the result.

Further exploration revealed additional clusters within the data. The samples had been processed across several years, and the clusters aligned with processing dates and months. Because processing date was associated with group membership, the apparent biological separation could have been driven by technical variation. A statistical significance correction cannot fix a confounded study design or a misspecified model.

Batch effects in laboratory comparisons

Batch-like variation can occur outside genomics. Historical measurements of the astronomical unit from different laboratories produced estimates that varied more than the confidence intervals from individual laboratories suggested. Each laboratory’s own measurements could be internally consistent while differing systematically from measurements made elsewhere.

The within-laboratory confidence intervals reflected measurement uncertainty inside each laboratory. They did not fully capture between-laboratory variation. Looking across laboratories revealed a larger source of uncertainty that would have been missed by assessing each experiment in isolation.


Latent-factor modeling for complex batch structure

Batch effects are not always captured by one simple label, such as year or laboratory. Correlation plots may show several layers of structure: broad groups, smaller subgroups, and patterns that do not align neatly with a single known variable.

Factor analysis and related latent-factor methods model shared patterns of variation using hidden or estimated components. They can help describe technical structure when the sources of that structure are not fully known.

A successful analysis must distinguish variation that matters biologically from unwanted technical variation:

  • The effect of interest, such as a difference between sexes, should be modeled explicitly.

  • Additional latent factors can represent other structured variation, including batch effects.

  • The residual variation represents differences not explained by the modeled biological effect or latent factors.

It is important not to remove variation blindly. If a biological effect is placed into a technical factor and then removed, genuine biology may be lost. The model therefore needs to preserve the scientific effect of interest while accounting for unwanted structure.

Example: sex differences and processing dates

In an experiment with twelve male and twelve female samples, more male samples were measured in June and more female samples in October. This imbalance made date partially confounded with sex.

Genes on the Y chromosome were expected to differ between males and females, providing a clear biological signal. Other genes showed patterns associated with the processing dates. If researchers performed a ttt-test by sex without accounting for date, some date-related differences could be mistaken for sex-related differences, producing many apparently significant genes.

A factor model can separate the variation into components associated with:

  • The biological difference between males and females.

  • Latent structure associated with processing batches.

  • Remaining measurement and individual variation.

In the example, modeling the latent structure reduced many apparent discoveries that were more plausibly explained by batch effects. The approach requires care: when batch and biology are completely confounded, no model can identify their separate contributions from those data alone.


Balancing discovery with confirmation

Exploratory analysis can reveal patterns and uncover flaws in standard workflows, but an exploratory result should not automatically be treated as established knowledge. Strong scientific interpretation requires attention to biological context and independent confirmation.

A sound approach combines:

  1. Exploration: Visualize and inspect the data to identify patterns, unexpected structure, and potential artifacts.

  2. Modeling: Use methods that reflect the study design, measurement process, variability, and possible batch effects.

  3. Subject-matter interpretation: Work with experts who can assess whether findings make sense in light of existing biological knowledge.

  4. Confirmation and replication: Test important discoveries in confirmatory analyses, new experiments, or independent datasets when possible.

  5. Accumulation of evidence: Evaluate findings in the context of the wider body of research rather than relying on one paper or one analysis.

Data exploration can produce both discoveries and corrections: it may expose a genuine pattern, or show that a published conclusion depends on technical artifacts or a flawed assumption. Careful exploration and appropriate modeling strengthen the evidence while reducing false positives and making real signals easier to detect.

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent