Bayesian Compendium Direct eBook Download
Bayesian Compendium Direct eBook Download
Visit the link below to download the full version of this book:
https://medipdf.com/product/bayesian-compendium/
Bayesian Compendium
123
Marcel van Oijen
Edinburgh, UK
This Springer imprint is published by the registered company Springer Nature Switzerland AG
The registered company address is: Gewerbestrasse 11, 6330 Cham, Switzerland
Preface
The recurring topic during my 35 years in science has been a struggle with
uncertainties. My primary field is agricultural, environmental and ecological sci-
ence using both process-based and statistical models. And in each of my studies,
uncertainties in data and models have kept cropping up. I found that the literature
contains many ways for classifying and analysing these uncertainties, but they
mostly seem based on arbitrary criteria: a confusing menagerie of methods.
My encounters with probability theory, and with Bayesian methods in particular,
showed that there is no need for confusion; there is a general perspective that can be
applied in every case. The online papers by Edwin Jaynes, and his posthumously
published book (2003), followed by the more practice-oriented small book by Sivia
(2006) did much to clarify matters. Very striking was Jaynes’ explanation of the
Cox postulates, which proved that consistent rational thinking requires the use
of the rules of probability theory. Jaynes and Sivia took many of their examples
from physics, but it was clear that Bayesian probabilistic methods are completely
generic and can be applied in any field. It also became clear that the methods do
come with some practical problems. They require researchers to think carefully
about their prior knowledge before embarking on an analysis. And the Bayesian
analysis itself tends to be computationally demanding. Much research effort has
gone into resolving these issues, and good methods are available.
So I have happily employed Bayesian methods during the past two decades.
However, when teaching the approach to others, I found that there was no short yet
comprehensive introductory text for scientists who do not have much statistical
background. Especially amongst dynamic modellers, the study of statistical meth-
ods is not given high priority. But this book is intended to provide a quick and easy
entry into Bayesian methods to all modellers, irrespective of the types of models
and data that they work with.
v
vi Preface
This book is primarily for scientists who are newcomers to Bayesian methods, and
who want to use data to parameterise and compare their models while accounting
for uncertainties in data, model parameters and model structure. There are of course
excellent books on Bayesian methods for beginners, but they tend to be very long
texts that neglect the dynamic modeller. There is a need for short and easily
digestible descriptions of Bayesian methods that cover the wide range of
process-based and empirical models that are in common use. All chapters in this
book are short, so it is more a compendium than a detailed manual.
The book is for every scientist who works with models and data, irrespective
of the type of model or data. Although aimed at beginners, I hope that more advanced
users of Bayesian methods will also find material of interest in this book. They may
be unfamiliar with some of the more specialized topics, or find the book useful for
teaching. They may also be interested in the way this book tries to clarify the
terminological confusion that reigns in scientific modelling and in applied statistics.
The book begins with a gentle introduction to Bayesian thinking. Once the basic
ideas are in place, it provides explanations of a very wide range of modelling
methods in three languages: English, mathematics and R. I believe that a mixture
of the three languages, complemented with figures, is the best way to teach
quantitative science. You may find English too woolly, mathematics too compact or
R-code too problem-specific. But together they may provide clear, reasonably short
and practical explanations. Some exercises are provided as well.
The code examples in this book are all short, and they mostly use basic R that
can easily be understood even if you are used to programming in a different
computer language. R does come with a wealth of optional add-ons, called
R-packages, but those will be used only occasionally. All essential code is in the
book itself, and the complete code is available online (https://www.springer.com/
de/book/9783030558963).
Almost every example will make use of very simple artificial data sets. I mostly
leave out the messiness of real data sets because they are distracting and obscure the
view of how the methods work. Likewise, I focus on brevity and simplicity of code,
rather than on speed of execution. The aim is to explain the diversity of Bayesian
computational techniques that you can find in the literature. The algorithms that we
show, such as MCMC, can be used with any kind of model and data. In fact, one
of the main advantages of Bayesian statistical modelling is that all idiosyncrasies of
data, such as missing data, can be easily handled.
Preface vii
Outline of Chapters
Acknowledgements
Science is a highly collaborative affair, and over the years I have discussed
Bayesian methods with a great number of people. I believe that most of them know
how grateful I am to them, so I will do some cluster analysis and thank people by
group—mentioning just a few names explicitly. I thank many statisticians in the
Netherlands and the UK, who taught me over the years, including Ron Smith and
Jonathan Rougier who were co-authors on my first Bayesian paper. To the present
viii Preface
ix
x Contents
In recent years, there has been a trend toward basing scientific research under con-
ditions of incomplete information, i.e. most of science, on probability theory (e.g.
Hartig et al. 2012; Jaynes 2003; Ogle and Barber 2008; Sivia and Skilling 2006;
Van Oijen et al. 2011). This is the approach that we take in this book too. We
aim to show how defining all uncertainties in modelling as probability distributions
allows for rigorous reduction of those uncertainties when new data become available.
The approach that we are presenting is known in the literature under many differ-
ent names, including Bayesian calibration, data assimilation, model-data fusion
and inverse modelling. Whilst the different names refer to different applications of
modelling, they all share the idea of specifying probability distributions which are
modified according to the rules of probability theory (in particular, Bayes’ Theorem)
when new data come in. It is this idea that facilitates the comprehensive analysis of
errors and uncertainties.
Lindley (1991) stated the importance of probability theory as follows: “Probabil-
ity, it has been said, is merely common sense reduced to calculation. It is the basic
tool for appreciating uncertainty, and uncertainty cannot be adequately handled with-
out a knowledge of probability.” And it is possible to show formally that rational,
coherent thinking implies using the rules of probability theory Jaynes (2003).
The basics of Bayesian thinking are simple. There are just three elements, connected
by probability theory. The elements are: (1) your prior belief about a quantity or
proposition, (2) new information, (3) your posterior belief. Probability theory pro-
vides the logical connection from the first two elements to the last. So all we need
to learn is how to express beliefs and new information in the form of probability
distributions, and then we can simply follow the rules of probability theory. That is
all!
While the simplicity of Bayesian thinking is a given, that does not mean it is
necessarily easy to learn. Consistently thinking in terms of probability theory is not
second nature to everyone. And there is no unique simplest way to teach Bayesian
thinking to you. It all depends on your background, and your favourite mode of
rational thinking. Do you prefer to begin with abstract concepts, then mathematical
equations, then examples? Or do you wish to begin with puzzles or anecdotes, and
learn how they can all be approached in the same way? Perhaps you like to start
from your knowledge of classical statistics and learn how its methods can always be
interpreted, and often improved, in a Bayesian way? But here we begin with a short
detective story …
You are called to a country house: the owner has been found murdered in the library.
The three possible suspects are his wife, his son, and the butler. Before reading on,
who do you believe committed the crime? And do not say: “I can’t answer that, I
have not inspected the evidence yet.” You are a Bayesian detective, so you can state
your prior probabilities.
Your assistant says “I bet it’s the wife”, but you find that silly bias. You see the
butler as the prime suspect, and would give odds of 4:1 that he is the culprit. You
find the wife just as improbable as the son. So your prior probability distribution
for butler-wife-son is 80–10–10%. Of course, you would not really bet money on
the outcome of the case—you’re a professional—but you decide to investigate the
butler first. To your surprise, you find that the butler has a perfect alibi. What is your
probability distribution now? The answer is that the alibi of the butler has no bearing
on the wife or son, so they remain equally likely candidates, and your probability
distribution becomes 0–50–50%.
Next you inspect the library, and find that the murder was committed with a blunt
instrument. How does that change your probabilities? You assess the likelihood of
such a murder weapon being chosen by a man to be twice as high as by a woman.
So that changes your probabilities to 0–33–67%.
I leave you to finish the story to a logical conclusion where sufficient evidence
has been processed such that the murderer is identified beyond reasonable doubt. But
what does this murder mystery teach us? Well, our story is fiction, but it contains
the three steps of any Bayesian analysis: assigning a prior probability distribution,
acquiring new information, updating your probability distribution following the rules
of probability theory. Everything in this book, and in Bayesian statistics generally,
is about one or more of these three steps. So if you found the detective’s reasoning
plausible, then you are already a Bayesian! In fact, there is a rich literature in the field
of psychology that shows that human beings at least to some extent make decisions
in a Bayesian way.