Professional Documents
Culture Documents
1 Statistical inference
This course is about statistical inference in physics. Consider this diagram of the scienti ic
method:
Deductive
inference
Experiment or
Hypothesis/theory Predictions
Observation
Constrain
and
validate
Statistical inference
All science involves some interplay between theory and experiment. Theories make predic‑
tions that can be tested by experiment, but experiments can also inform theory. There are two
kinds of inference that are needed in the scienti ic method:
• Deductive inference: reasoning from one proposition to another using strong syllogisms
of logic (for example, “if A, then B”)
• Statistical inference: reasoning from data to make conclusions about the plausibility of
a theory/model/hypothesis
Deductive inference is the core of most physics classes, which start from fundamental laws
(such as Maxwell’s equations) and proceed to speci ic predictions. It is essential for all physi‑
cists, but particularly theorists, to master.
Statistical inference is not taught as widely within the physics curriculum, but it is just as im‑
portant to the scienti ic method. It is how we test and validate (or reject) theories and discover
new laws of nature. It is essential for all physicists, but particularly for experimentalists.
1.2 What we will not cover: data science and data exploration
We will not cover data science or machine learning, which focus on constructing predictive
models directly from data. In data science, the theory or model that the machine igures out is
used only for prediction. But in science we are concerned with theories that not only predict,
but also explain, in some mechanistic sense. For example, Newton’s laws explain and predict the
motion of projectiles in terms of force, a fundamental physical concept. If we were to measure a
bunch of projectile trajectories and train a machine to predict the motion, it would likely come
up with a model far more mathematically complex than Newton’s laws. That model might do a
very good job of predicting the motion of a projectile, but its parameters wouldn’t necessarily
correspond to familiar concepts like force.
Another way of looking at machine learning is that it “short‑circuits” the usual scienti ic
method, since the focus is on going directly from data to predictions:
Deductive
inference
Experiment or
Hypothesis/theory Predictions
Observation
Constrain
and
validate Machine learning
(not our focus)
Statistical inference
That doesn’t mean data science and machine learning have no role in physics; they’re just not
the focus of this course.
Note: For the irst part of the course, I will use the terms “theory” and “model”
interchangeably. As the course progresses, we’ll start to use the term “model” to
mean the combination of a physical theory and a statistical model for the results of
an experiment.
Similarly, we will not cover data exploration, which is where you poke, prod, process, and
plot data in various ways until it tells you how you should be modeling it. Data exploration
is focused on iguring out a hypothesis based on the data. It’s also important, but it’s not the
subject of this class. I don’t know of any systematic processes for data exploration—it’s mostly
a bunch of ad hoc techniques.
The reason we avoid these topics is that in the physical sciences, we do measurements to un‑
derstand something about the physical world. And by “understand” I mean understand quanti‑
tatively—that is, through models that predict and explain. For example, we measure the mass
of the Higgs boson not for its own sake, but so that we can validate or reject models of fun‑
damental physics that go beyond the Standard Model. We measure the properties of complex
luids not so that we can put those properties in a handbook, but so that we can compare to
the predictions of models that explain these properties at a microscopic level. In other words,
a model or theory is central to everything we do as experimentalists. So our goal in this course
is to understand how to do model‑based inference.
Note: We also won’t have much to say about design of experiments, which is an
entire subject in its own right. But the course will give you some basic principles
that are useful in design.
Note: I’ll try to use the word “uncertainty” rather than “error”. Error implies that
we did something wrong, but you can do a measurement completely correctly, and
you should still end up with an uncertainty.
The second example might result in a it with 𝜔 = 1.1 ± 0.1 and 𝜙 = 0.05 ± 0.01. Below I show
an example of the best‑ it curve and the data, with uncertainties.
E H V W I L W
G D W D
t
Sidenote: More formally, we would write 𝑝(𝑎) = 𝑝{𝐴 = 𝑎}, meaning the probabil‑
ity that the random variable 𝐴 (which can take on any value) takes on the speci ic
value 𝑎.
1.5.3 Comparison
From the frequentist point of view, it makes no sense to discuss the probability of a hypothesis,
since a hypothesis is not a random variable—it doesn’t change from run to run of our experi‑
ment. But from the Bayesian point of view, we can talk about the probability of a hypothesis
being true, because 𝑝(𝐴 ∣ 𝐵) is a measure of our “degree of belief” in 𝐴, given our state of
knowledge 𝐵. So the two frameworks differ fundamentally in their assumptions.
Does this mean the Bayesian approach is somehow “subjective”? E.T. Jaynes, a physicist who
did important work in the ield of Bayesian inference, put it this way: “The only thing objectivity
requires of a scienti ic approach is that experimenters with the same state of knowledge reach
the same conclusions.”
Sidenote: There have been lots of arguments between proponents of both ap‑
proaches. I suggest staying away from these arguments. Throughout the course,
I’ll try to use the terms “frequentist” and “Bayesian” as labels for approaches, not
people. You don’t have to choose between being one or the other any more than
you have to choose between being a “Newtonist” or a “relativist.” Choose the best
tool for the problem—be pragmatic rather than dogmatic.
For historical reasons, the frequentist approach is more common. It is used in particle physics,
for example, but also in biology and the life sciences. Anytime you see p‑values or 𝑛‑sigma
values for signi icance (for example, “5‑sigma signi icance”), you’re dealing with a frequentist
analysis. The Bayesian approach is more widely used in astrophysics and biophysics. It’s im‑
portant to be familiar with both frameworks. We’ll cover both.
However, the course will be biased toward Bayesian methods, because they are much easier
to teach and understand. Frequentist inference is a huge collection of statistics and tests. But
a central focus of the course will be on developing statistical models that can be used for ei‑
ther approach, and learning that approach (called generative modeling) is just as important as
learning the frameworks.
Sidenote: For what it’s worth: when lives or money are at stake (war, gambling,
disease), Bayesian approaches are the norm. Alan Turing famously used Bayesian
methods to crack the Enigma, for example.
3 Recap
• The goal of statistical inference is to accurately quantify how much to trust a parameter
in a model or a model itself, based on measurements (and uncertainties in those mea‑
surements). In the irst case, called parameter estimation, we will likely want to use the
parameter to test or validate another model, so it is essential to quantify the uncertainty
in the parameter as well as its best‑ it value.
• There are two frameworks for statistical inference: Bayesian and frequentist. In the
Bayesian approach, the argument of a probability can be any logical proposition. In the
frequentist approach, it must be a random variable.