Professional Documents
Culture Documents
Dr B M Parker
Term 2 2021/2022
Logistics
Assessment
Resources
Recommended textbooks for the course are available via the Talis Reading
list linked from blackboard.
Each week I will provide some questions to allow you to practice the
material in the course; solutions will be given in lectures where there is
time and/or on the course blackboard.
It is important you devote some time to work through these examples; the
only way to improve at mathematics is to practice it. However, this work
is not assessed, although I am happy to talk about individual answers in
office hours.
From Santiago, Celine B., Jing-Yao Guo, and Matthew S. Sigman. ”Predictive and mechanistic
multivariate linear regression models for reaction development.” Chemical science 9.9 (2018):
Dr B M Parker (Brunel)
2398-2412. CL2603 12
Further motivation
Our data may come from physical experiments which can often be
expensive, difficult, or dangerous...
... so we will often use numerical experiments or simulation (which Dr
Shaw will talk about next week)
However we generate the data it’s very
unlikely that we can see every possible
chemical reaction that may occur, so we
assume that we see some randomly
chosen sample of all the data we could
have seen. We form our view about the
world based on this data, and in this
section of the course we’ll quantify how
much we can say about the world based
on this data.
We call the set of all possible experiment results we could have seen
the Sample Space
We call the set of results we did actually see the data.
Example: Accelerator mass spectrometry detector measures the number of
Carbon-14 ions in five sample ice cores chosen at random locations in
Antarctica.
The sample space is Ω = {0, 1, 2, 3, ...}
Our data might be 1, 2, 12, 0, 5
Based on our data, is there anything we can say about the amount of
Carbon-14 in Antarctica?
the top point is the maximum, the bottom the minimum; the upper and
lower quartiles are the edges of the rectangle, and the median the line in
the middle of the rectangle. Note that R decides that the the three lower
points are sufficiently different from the rest of the data to be outliers, and
draws these as circles.
s (the square root of the variance) is then the sample standard deviation.
Note this is defined a little differently for the standard deviation of a
population or distribution we defined in chapter 1.
Variance is just a way of quantifying the spread of the data. Smaller
variance mean we know more about where the data lies, higher variances
mean we know less.
1 Random Variables
Selected Discrete distributions
Expectation and variance
Let’s suppose for each element in our sample space we assign a number;
usually this will be some meaningful statistic based on that outcome.
For example, let us suppose we toss a fair coin twice and record the
output. Our sample space Ω = {HH, HT , TH, TT }. We could invent a
random variable X, which might be the number of heads in two tosses so
X (HH) = 2
X (HT ) = X (TH) = 1
X (TT ) = 0
If our variable takes only discrete values (e.g 0,1,2,. . . ) then it is a discrete
random variable otherwise it is a continuous random variable.
Coins again
We can write out the cumulative distribution for the coin example as
follows
1 1 3
F (1) = P(X ≤ 1) = P(X = 0) + P(X = 1) = + =
4 2 4
F (1.5) = P(X ≤ 1.5) = F (1) here
F (−17) = P(X < −17) = 0
P(X ≤ 4) = F (4)
λ0 e −λ 1 × e −5
P(X = 0) = = = e −5 = 0.007
0! 1
λ1 e −λ 5 × e −5
P(X = 1) = = = 5e −5 = 0.033
1! 1
...
λ4 e −λ 625 × e −5
P(X = 4) = = = 0.175
4! 24
0.15
0.10
f(x)
0.05
0.00
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
0.15
0.15
0.10
0.10
f(x)
f(x)
0.05
0.05
0.00
0.00
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
X X
0.05
0.00
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
The probability density function (pdf) can then be found as the derivative
of the cumulative distribution function,
d
f (x) = F (x)
dx
For the pdf to be valid, we must have that
f (x) ≥ 0 for all x.
R∞
−∞ f (u)du = 1.
PDF:
Value greater than or equal to
zero.
Must integrate to 1.
To go from PDF→ CDF we
integrate under the curve.
CDF:
Function ranges from zero to 1
(F (−∞) = 0, F (∞) = 1)
Never decreases.
To go from CDF → PDF we
differentiate the function.
Figure: CDF
Dr B M Parker(left) and PDF(right) for CL2603
(Brunel) normal distribution for varying39values of
The Standard Normal Distribution
The normal distribution with mean 0 and standard deviation 1, N(0, 1), is
called the standard normal distribution.
For the standard normal distribution, tables are available in all published
books of statistical tables (For example, table 4 of ‘New Cambridge
Statistical Tables’, 2nd Edition, by D. V. Lindley and W. F. Scott.) giving
the probability of the distribution in selected regions.
Most tables give areas under the curve to the left of a specified value,
i.e. the probability of observing a standard normal value less than or equal
to a specified value, P(Z ≤ z).
0.3 0.3
0.2
= 0.2
0.1 0.1
0.0 0.0
−z z
−4 −2 0 2 4 −4 −2 0 2 4
0.4
0.3
= 1 - 0.2
0.1
0.0
z
−4 −2 0 2 4
0.2
= 0.2
- 0.2
0.04
0.02
0.0
10 20 30 40
=
0.4
0.3
0.2
0.1
0.0
−4 −2 0 2 4
Definition
The expectation of a discrete random variable is
X
E (X ) = xf (x)
x∈Ω
1+2+3+4+5+6 21 1
= = =3
6 6 2
E (cX ) = cE (X )
E (X + Y ) = E (X ) + E (Y )
Moreover, if X and Y are independent, then E (XY ) = E (X )E (Y ). Note
that the converse is not true.
Example (Hint:)
It’s often easier to know that the variance can be defined by
Var(X ) = E (X 2 ) − [E (X )]2
Binomial(n,p) np np(1 − p)
1−p 1−p
Geometric(p) p p2
Poisson(λ) λ λ