TExcelTAD
Home › Statistics › Study Types

Study Types

How data is produced decides what conclusions you are allowed to draw. The two big families of studies are observational studies and experiments.

Observational studies

In an observational study you measure things as they are, without influencing them. You might record how much coffee people drink and how well they sleep. Observational studies are often the only ethical or practical option, but they have a serious limitation:

Correlation is not causation. If coffee drinkers sleep worse, maybe coffee hurts sleep, or maybe people who sleep badly drink more coffee to stay awake, or maybe stressful jobs cause both.

A third variable that influences both the "cause" and the "effect" is called a confounding variable (confounder).

Types of observational study:

Type What it does Example
Cross-sectional measures many subjects at one point in time a survey of current screen time and grades
Cohort (prospective) follows a group forward in time tracking 5,000 adults' diets for 10 years
Case-control (retrospective) compares people with an outcome to people without and looks back patients with a disease vs. similar healthy people

Experiments

In an experiment the researcher assigns a treatment and observes what happens. In a randomised controlled trial (RCT):

  1. Subjects are randomly split into a treatment group and a control group.
  2. Only the treatment group receives the intervention; the control group receives nothing or a placebo.
  3. The outcomes of the groups are compared.

Random assignment is the key. It balances confounders, both the ones you know about and the ones you don't, between the groups on average. A difference in outcomes can then be attributed to the treatment. Blinding (subjects, and ideally researchers, don't know who got what) prevents expectations from affecting results.

Simulation: why randomisation matters

Imagine a study of whether a tutoring app improves exam scores. In our invented world, the app has no effect at all, but motivated students score higher and are more likely to choose the app. Watch what happens when students choose for themselves versus when a coin decides:

python · try it yourself
import numpy as np

rng = np.random.default_rng(42)
n = 2000
motivation = rng.normal(0, 1, n)                     # hidden confounder
score = 65 + 8 * motivation + rng.normal(0, 5, n)    # the app plays no role!

# Observational: motivated students are more likely to use the app
p_use = 1 / (1 + np.exp(-2 * motivation))
self_chosen = rng.random(n) < p_use
diff_obs = score[self_chosen].mean() - score[~self_chosen].mean()
print(f"observational difference: {diff_obs:+.2f} points")

# Experiment: a coin flip decides who gets the app
assigned = rng.random(n) < 0.5
diff_rct = score[assigned].mean() - score[~assigned].mean()
print(f"randomised difference:    {diff_rct:+.2f} points")
observational difference: +9.66 points
randomised difference:    +0.11 points

The observational comparison suggests a large "benefit" that is entirely caused by motivation. The randomised comparison correctly finds a difference close to zero.

Checking balance

After random assignment, the groups should look similar on every background variable. Checking this is routine in real trials:

python · try it yourself
import numpy as np

rng = np.random.default_rng(42)
n = 2000
motivation = rng.normal(0, 1, n)
age = rng.integers(16, 20, n)

assigned = rng.random(n) < 0.5
print("group sizes:", assigned.sum(), "treatment /", (~assigned).sum(), "control")
print(f"mean motivation: {motivation[assigned].mean():+.3f} vs {motivation[~assigned].mean():+.3f}")
print(f"mean age:        {age[assigned].mean():.2f} vs {age[~assigned].mean():.2f}")
group sizes: 1032 treatment / 968 control
mean motivation: -0.074 vs -0.035
mean age:        17.51 vs 17.47

The groups are almost identical, which is exactly what makes the later comparison fair.

Which study type should you use?

  • To show that X causes Y, run a randomised experiment if it is possible and ethical.
  • When experiments are impossible (you can't assign people to smoke), use careful observational studies, measure likely confounders and be cautious with causal language.
  • In product work, A/B tests are simply randomised experiments: users are randomly shown version A or B. You will analyse one in the Mini Project.

Test yourself

Researchers find that people who own a dog have lower blood pressure. The study only observed dog owners and non-owners. What can they conclude?

  1. Owning a dog lowers blood pressure
  2. There is an association, but confounders (e.g. activity level) could explain it
  3. Low blood pressure makes people buy dogs
  4. Nothing at all

What is the main purpose of *random assignment* in an experiment?

  1. To make the sample bigger
  2. To balance known and unknown confounders between groups
  3. To make the study cheaper
  4. To guarantee a significant result

A study follows 10,000 newborns for 20 years to see how early diet relates to adult health. What type is it?

  1. Randomised controlled trial
  2. Cohort (prospective) study
  3. Case-control study
  4. Census