Ib Mathai HL+
Ib Mathai HL+
M AT H A I HL
www.ib.academy
Mathematics Applications and Interpretations HL
Study Guide
Available on www.ib.academy
Design Typesetting
TEX Academy
This work may not used for commercial purposes other than by IB Academy, or
parties directly licenced by IB Academy. If you acquired this guide by paying for
it, or if you have received this guide as part of a paid service or product, directly
or indirectly, we kindly ask that you contact us immediately.
Our Study Guides are put together by our teachers who worked tirelessly with students
and schools. The idea is to compile revision material that would be easy-to-follow for
IB students worldwide and for school teachers to utilise them for their classrooms.
Our approach is straightforward: by adopting a step-by-step perspective, students can
easily absorb dense information in a quick and efficient manner. With this format,
students will be able to tackle every question swiftly and without any difficulties.
For this guide, we supplement the new topics with relevant sections from our previous
Math Studies, SL and HL study resources, and with insights from our years of experience
teaching these courses. We illustrate theoretical concepts by working through IB-style
questions and break things down using a step-by-step approach. We also include detailed
instructions on how to use the TI-Nspire™ to solve problems; most of this is also quite
easily transferable to other GDC models.
The best way to apply what you have learned from the guides is with a study partner.
We suggest revising with a friend or with a group in order to immediately test the
information you gathered from our guides. This will help you not only process the
information, but also help you formulate your answers for the exams. Practice makes
better and what better way to do it than with your friends!
In order to maintain our Study Guides and to put forth the best possible material, we are
in constant collaboration with students and teachers alike. To help us, we ask that you
provide feedback and suggestions so that we can modify the contents to be relevant for
IB studies. We appreciate any comments and hope that our Study Guides will help you
with your revision or in your lessons. For more information on our material or courses,
be sure to check our site at www.ib.academy.
IB.Academy Team
If you would like to consider supporting our materials and be recognised for it,
send us an email to contact@ib.academy.
ALGEBRA 1
Table of contents & cheatsheet
1.7. Matrices 18
A matrix is a rectangular array of elements. They can be multiplied together.
ae + b h af + bi ag + b j
Below is a 2 × 3 matrix. a b e f g
=
c d h i j ce + d h c f + di cg +dj
(A × B) × C = A × (B × C)
A × (B + C) = A × B + A × C
A × B 6= B × A
5
ALGEBRA Sequences and series
Arithmetic sequence the next term is the previous number + the common
difference (d ).
Use the following equations to calculate the n th term or the sum of n terms.
n
DB 1.2 un = u1 + (n − 1)d Sn = 2u1 + (n − 1)d
2
with u1 = a = 1st term d = common difference
Often the IB requires you to first find the 1st term and/or common difference.
Finding the first term u1 and the common difference d from other
terms
In an arithmetic sequence u10 = 37 and u22 = 1. Find the common difference and the
first term.
6
ALGEBRA Finance 1
Geometric sequence the next term is the previous number multiplied by the
common ratio (r ).
To find the common ratio, divide any term of an arithmetic sequence by the
second term (u2 )
term that precedes it, i.e.
first term (u1 )
Use the following equations to calculate the n th term, the sum of n terms or the sum to
infinity when −1 < r < 1. DB 1.3 & 1.8
again with
Similar to questions on Arithmetic sequences, you are often required to find the 1st term
and/or common ratio first.
1.2 Finance
I =P ×r ×n
This works like an arithmetic sequence; for each year that interest is counted over a
principle sum, a fixed interest rate is charged. This yearly interest is simply a percentage
of the principal sum.
.
$1500 is invested at 5.25% simple interest per year. How much interest would be
Example
I = 1500 × 0.0525 × 6
= $472.50
7
ALGEBRA Finance
$1500 is invested at 5.25% per annum. The interest is compounded twice per year. How
much will it be worth after 6 years?
So FV = $2793.62
8
ALGEBRA Finance 1
Jerome would like to save $300,000 to buy an apartment in 15 years’ time. If he can invest
at an 8% interest rate per year, how much money would he need to invest at the end of each
year to reach his goal?
9
ALGEBRA Estimations
1.3 Estimations
VA − VE
approximate value − exact value
Percentage error × 100
exact value
V − V
A E
× 100
VE
DB 1.6
.
John estimates a 119.423 cm piece of plywood to be 100 cm. What is the error?
Example
Error = VA − VE
= 100 − 119.423
= −19.423 ≈ −19.4
In algebraic problems where you have two unknown variables, for example x and y, and
two equations, you can solve for x and y simultaneously.
10
ALGEBRA Using technology to solve linear equations and polynomial equations 1
The easiest way is to use the Simultaneous Equation Solver on your GDC.
y = 3x + 1 (1) and 2y = x − 1 (2); find the values of x and y You will be expected to
solve systems of up to
3 linear equations with
IB ACADEMY IB ACADEMY IB ACADEMY
this method.
3 4
So x =− and y =−
5 5
In case you prefer to solve a pair of simultaneous equations by hand, there are two
methods you can use.
.
Elimination Substitution
Example
11
ALGEBRA Exponents and logarithms
Exponents always follow certain rules. If you are multiplying or dividing, use the
following rules to determine what happens with the powers.
.
Example
x1 = x 61 = 6
x0 = 1 70 = 1
x m · x n = x m+n 45 · 46 = 411
xm 35
= x m−n = 35−4 = 31 = 3
x n 34
2
(x m )n = x m·n 10 = 1010
5
When doing mathematical operations (+, −, × or ÷) with fractions in the exponent you
will need the following rules. These are often helpful when writing your answers in
simplest terms.
p p
.
1 1
Example
x2 = x 22 = 2
p p p p
x· x=x 3· 3=3
p p p p p p p p
xy = x · y 12 = 4 · 3 = 4 · 3 = 2 · 3
1 p 1 p
3
xn = n x 53 = 5
m p
n 2 1
x n = xm 3− 5 = p
5
32
12
ALGEBRA Exponents and logarithms 1
Logarithms are the inverse mathematical operation of exponents, like division is the
inverse mathematical operation of multiplication. The logarithm is often used to find the
variable in an exponent. DB 1.5
a x = b ⇔ x = loga b
Since loga a x = x, so then x = loga b .
This formula shows that the variable x in the power of the exponent becomes the subject
of your log equation, while the number a becomes the base of your logarithm.
Logarithms with bases of 10 and e have special notations in which their base is not
explicitly noted. Remember that e is just
the irrational number
Laws of logarithms
DB 1.7
I: log A + log B = log(A · B) loga (x y) = loga x + loga y
A x
II: log A − log B = log loga = loga x − loga y
B y
III: n log A = log(An ) loga (x m ) = m loga x
Next to these rules, there are a few handy things to keep in mind when working with
logarithms.
Solve 2 x = 13
1. Take the log on both sides. log 2 x = log 13
2. Use rule III to take x outside. x log 2 = log 13
3. Solve. log 13
x=
log 2
13
ALGEBRA Complex numbers
Argument ϑ the angle between the x-axis and the line connecting the origin
and the point.
Complex numbers in Argand diagrams, like the axes above, can also be written as
vectors. The top number in the vector refers to the real part of the complex number, and
the bottom number to the imaginary part.
1
z=
2
14
ALGEBRA Complex numbers 1
Adding and subtracting complex numbers in Cartesian form is fairly straight forward.
Add real and imaginary parts to each other:
(3 − 2i)(4 + 3i) = 3 × 4 − 2i × 4 + 3 × 3i − 2i × 3i
= 12 − 8i + 9i − 6i2
= 12 + 6 + i
= 18 + i
ℑ
2
We can also think about adding complex
numbers in the form of vectors. 1
3 2 5 0
+ = 1 2 3 4 5 6 ℜ
−1 1 0 −1
−2
Division, however, is slightly more complex. Conjugates play a big role here, since a
complex number multiplied by its conjugate is always equal to a real number.
2 + 6i
Rewrite in a + b i form.
1 − 2i
1. Convert the denominator into a real (2 + 6i)(1 + 2i)
number by multiplying it with its (1 − 2i)(1 + 2i)
conjugate.
15
ALGEBRA Complex numbers
Polar form allows us to do some operations quicker and more efficient, such as
multiplication and division of complex numbers.
The formulas can be shown for the
following two complex numbers z1 = r1 cis ϑ1 and z2 = r2 cis ϑ2 . Note:
cis x = cos x + i sin x.
.
Multiplication: z1 × z2 = r1 × r2 cis ϑ1 + ϑ2
Example
z1 r
= 1 cis ϑ1 − ϑ2
Division:
z2 r2
ℑ
8
7
Multiplying two complex numbers 6
together can be visualised as a 5
rotation and a stretch in an Argand
4
diagram.
3
2 cis (45°) × 5 cis (90°) = 10 cis (135°) 90°
45°
−8 −7 −6 −5 −4 −3 −2 −1 0 1 2 ℜ
Complex numbers can be useful in adding together two sinusoidal functions with the
same frequency. A cosine function can be thought of as the real part of a complex
number, and a sine function as the imaginary part.
cos (3x) = ℜ cos (3x) + i sin (3x) = ℜ e3xi
sin (3x) = ℑ cos (3x) + i sin (3x) = ℑ e3xi
16
ALGEBRA Complex numbers 1
1. Write the functions as real/imaginary f1 = ℜ 10e40t i
parts of a complex number.
f2 = ℜ 20e(40t +10)i = ℜ 20e40t i e10i
2. Add these new expressions together and f1 + f2 = ℜ 10e40t i + ℜ 20e40t i e10i
take out a factor.
= ℜ 10e40t i + 20e40t i e10i
= ℜ 10e40t i 1 + 2e10i
4. Use the simplified complex number to
f1 + f2 = ℜ 10e40t i 1.282e−2.128i
simplify the entire expression to one
complex number. = ℜ 12.82e−2.128i+40t i
= ℜ 12.82ei(−2.128+40t )
5. Find the real part of this complex number. f1 + f2 = 12.82 cos (40t − 2.128)
17
ALGEBRA Matrices
These two theorems state the relationship between the trigonometric functions and the
complex exponential function. This allows us to convert between Cartesian and Polar
forms.
n
z n = r (cos x + i sin x) = r n cos(n x) + i sin(n x)
De Moivre’s theorem
1.7 Matrices
1.7.1 Introduction
Below is a 2 × 3 matrix.
row 3 1 −3 row
6 3 7 element
column
Matrices can be added together or subtracted from one another as long as they have the
same dimensions (same number of rows and columns). This is done by adding or
subtracting the corresponding elements from each matrix.
3 6 −5 2 7 4 1 −1 −9
− =
4 2 5 −3 −1 0 7 3 5
Matrices can also be multiplied by a scalar by multiplying each element by the scalar.
−2 20 16 −14 140 112
7 =
3 −7 8 21 −49 56
18
ALGEBRA Matrices 1
To find the elements in the resulting matrix the dot product can be used. The dot
product will also be used in the vectors topic. To take the dot product of two sets of
numbers the first terms in each set are multiplied together, and then the second terms,
and the third terms and so on. These are all added together to give the dot product.
.
1 2 3 · 4 5 6 = 1 × 4 + 2 × 5 + 3 × 6 = 4 + 10 + 18 = 32
To multiply two matrices together the dot product is used. To calculate the element in
the first row and first column of the resultant matrix, take the dot product between the
first row of the first matrix and the first column of the second matrix. Only rows from
the first matrix are used and only columns from the second matrix. You can think of it as
multiplying along the first matrix and down the second matrix.
ae + b h a f + b i ag + b j
a b e f g
=
c d h i j ce + d h c f + di cg +dj
19
ALGEBRA Matrices
Matrix multiplication
1. Check the The first matrix has two columns, and the second matrix has
dimensions of the two rows, so we can multiply them together.
matrices.
3×3+2×4 ? ?
3. Multiply the first row 3 2 3 4 −1 17 ? ?
= =
of the first matrix by 4 6 4 0 3 ? ? ? ? ? ?
the first column of
the second matrix.
17 3 × 4 + 2 × 0 ?
4. Repeat this for the 3 2 3 4 −1 17 12 ?
= =
first row and second 4 6 4 0 3 ? ? ? ? ? ?
column.
5. Continue to repeat
3 2 3 4 −1
this for all elements =
4 6 4 0 3
in the resultant
3 × −1 + 2 × 3
17 12
matrix. = =
4 × 3 + 6 × 4 4 × 4 + 6 × 0 4 × −1 + 6 × 3
17 12 3
=
36 16 14
20
ALGEBRA Matrices 1
Matrix multiplication
9 11
12 4 24
Let A = −2 7
and B = . Find AB.
1 −7 8
0 1
1. Check dimensions of the matrices. The first matrix has two columns and the
second matrix has two rows, so we can
multiply them together.
IB ACADEMY IB ACADEMY
IB ACADEMY IB ACADEMY
00
00 ≈
× Press enter
Press
Enter second matrix repeating
above steps
119 −41 304
AB = −17 −57 8
1 −7 8
21
ALGEBRA Matrices
Properties
Matrix multiplication has some properties which are listed below, where A, B, and C are
all matrices.
(A × B) × C = A × (B × C)
A × (B + C) = A × B + A × C
A × B 6= B × A
.
Example
3 6 2 3
A= B=
4 −1 −2 8
−6 57 18 9
A×B= B×A=
10 4 26 −20
1.7.3 Definitions
A zero matrix is one with zeros in every place. These can be of any size and are written
as 0n×m where n and m are the dimensions of the matrix.
0 0 0
0 0 0
0 0
02×2 = 05×3 = 0 0 0
0 0
0 0 0
0 0 0
An identity matrix is a square matrix (it has the same number of rows as columns) with
zeros in every entry apart from the main diagonal, which has 1 as each entry. It is
written as In where n is the size of the matrix. If we multiply a matrix by an identity
matrix (of the same dimensions) our matrix will remain the same. It is the equivalent of
multiplying a number by the number 1.
1 0 0 0
1 0 0
1 0 0 1 0 0
I2 = I3 = 0 1 0 I4 =
0 1 0 0 1 0
0 0 1
0 0 0 1
The determinant of a matrix, A, is written as det A or |A| and is calculated using the
following formula. The determinant tells us something about the transformations which
22
ALGEBRA Matrices 1
The inverse of a matrix A is written as A−1 . When a matrix is multiplied by its inverse
it gives the identity matrix. This is how the inverse matrix is defined. The following
formula shows how to calculate the inverse of a matrix.
a b
A= DB 1.14
c d
−1 1 d −b
A =
det A −c a
The determinant and inverse of matrices larger than 2 × 2 can be calculated using your
calculator. The IB only expects you to calculate inverses and determinants of 2 × 2
matrices by hand.
Inverse of matrix
1. First we calculate the determinant. 2 −3
A=
4 9
det A = |A| = 2 × 9 − 4 × −3 = 18 + 12 = 30
2. Filling this into the formula for our inverse 1 d −b 1 9 3
−1
A = =
matrix. det A −c a 30 −4 2
23
ALGEBRA Matrices
Inverse matrices
1 4 −3
Let A = 3 0 1 . Find A−1 .
7 2 2
1 7 −1
8 8 4
−1
−1 −23 5
A = 16
16 8
−3 −13 3
8 8 4
24
ALGEBRA Matrices 1
The inverse of matrices are useful in solving equations of the form Ax = b. This is just
another way to write simultaneous equations. A is an m × n matrix, x is an n × 1 matrix,
or vector, and b is an m × 1 matrix, or vector.
In order to solve these equations we must use the inverse of matrix A to rearrange them.
The goal is to end up with only x on one side and only numbers on the other side. Since
we are unable to divide by a matrix, we multiply both sides by the inverse to get rid of
matrix A on the left side of the equation. Multiplying A−1 by A gives the identity
matrix, I, which is equivalent to the number 1.
Ax = b
A Ax = A−1 b
−1
Ix = A−1 b
x = A−1 b
Now we have an equation which has x on one side and numbers on the other side.
25
ALGEBRA Matrices
1. Calculate the inverse of the matrix 4 −8
with known values. det = 12 − (−16) = 28
2 3
3 2
−1 1 3 8 28 7
A = =
28 −2 4 1 1
−
14 7
2. Multiply both sides of the equation 3 2 3 2
by the inverse to cancel out the 4 −8 x
28 7 28 7 5
1 =
matrices on the left hand side. x2
1 1 2 3 1 1 7
− −
14 7 14 7
3 2
x1 28 7 5
=
x2 1 1 7
−
14 7
3. Find the unknown values by the 71
multiplying the matrices on the
x1 28
right hand side. =
x2 9
14
26
ALGEBRA Matrices 1
An eigenvector is a vector which, when multiplied by a matrix gives the same vector
multiplied by a factor known as an eigenvalue. Eigenvalues are scalars, they are just a
number. Eigenvectors are often written as v and their corresponding eigenvalues as λ.
Eigenvectors are always specific to a matrix and always have a corresponding eigenvalue.
The IB only expects you to calculate eigenvalue and eigenvectors of 2 × 2 matrices.
Av = λv
For example the following vector, v, is an eigenvector with eigenvalue λ = −1, of the
matrix A.
0 1 1
A= v=
−2 −3 −1
We can multiply this matrix by its eigenvector, and the matrix it gives us is the
eigenvector multiplied by its eigenvalue.
0 × 1 + 1 × −1
0 1 1 −1 1
= = = −1
−2 −3 −1 −2 × 1 + −3 × −1 1 −1
To find the eigenvalues of a matrix we can use something know as the characteristic
equation. The previous equation can be rewritten.
Av − λv = 0
A − λI v = 0
In order for this equation to have solutions the following must be true. The matrix I
refers to the identity matrix which is the same size as the matrix A.
det A − λI = 0
This equation is used to calculate the eigenvalues. Once the eigenvalues are known the
eigenvectors can be calculated.
27
ALGEBRA Matrices
det A − λI = 0.
2. Enter the matrices into the characteristic Characteristic equation
equation and simplify.
0 1 1 0
det −λ =0
−2 −3 0 1
λ 0
0 1
det − =0
−2 −3 0 λ
−λ 1
det =0
−2 −3 − λ
3. Calculate the determinate using the −λ × −3 − λ − (1 × −2) = 0
formula.
3λ + λ2 + 2 = 0
28
ALGEBRA Matrices 1
5. Use the eigenvalues to find their We will begin with the first eigenvalue
corresponding eigenvectors. λ1 = −1. Substitute it, along with the
matrices,into the formula
A − λ1 I v1 = 0. The eigenvector is
written out in terms of its components
v1,1 and v1,2 .
A − λ1 I v1 = 0
λ1 0
0 1 v1,1
− =0
−2 −3 0 λ1 v1,2
0 1 −1 0 v1,1
− =0
−2 −3 0 −1 v1,2
1 1 v1,1
=0
−2 −2 v1,2
v1,1 + v1,2
=0
−2v1,1 − 2v1,2
6. Simplify the equations given. This gives v1,1 + v1,2 = 0
us two equations which link together the
−2v1,1 − 2v1,2 = 0
components of the eigenvector. Find the
equation which they both reduce to. Both of these reduce to the equation
v1,1 = −v1,2 .
7. Every eigenvalue will have multiple Set v1,1 = 1. Then work out v1,2 .
eigenvectors associated with it, so we
v1,2 = −v1,1 = −1
can not solve for a specific vector.
Instead, give a value to one component
of the vector and work out the other
component using the equations above.
8. Fill in the values of the vector’s This is your first eigenvector, v1 and its
components into the vector. eigenvalue is λ1 = −1
1
v1 =
−1
9. Repeat steps 5. to 8. for the second
eigenvalue.
29
ALGEBRA Matrices
Eigenvalues and eigenvectors allow us to easily raise any square matrix to high powers.
A matrix, M, can be written using the following equation, where the matrices D and P
make use of the eigenvalues and eigenvectors of the matrix.
The IB only expects you to work with this equation for 2 × 2 matrices. The eigenvalues
of a matrix, M, can be used to create the diagonalised matrix, D. This matrix has zeros
everywhere apart from on the main diagonal, on which are the eigenvalues of the
matrix M.
λ1 0
D=
0 λ2
The other matrix is known as an invertible matrix, P. This matrix has the eigenvectors
of matrix M vertically as its entries.
v1,1 v2,1
P=
v1,2 v2,2
The matrix D only has non-zero entries on its main diagonal, and we can apply the
following formula. In order to raise it to a power we can raise each entry in the matrix to
the same power. This works only because it is a diagonalised matrix.
n
n λ1 0
D = n
0 λ2
30
ALGEBRA Matrices 1
th
Raise the following matrix to the 5 power, by finding the matrices D and P and using
n n −1
the equation M = PD P .
0 1
M=
−2 −3
1. Find the eigenvalues and eigenvectors of This was done in a previous example.
the matrix.
λ1 = −1 λ2 = −2
1 −1
v1 = v2 =
−1 2
2. Fill in the eigenvalues into the matrix. −1 0
D=
0 −2
3. Fill in the eigenvectors vertically into the 1 −1
P=
matrix. −1 2
4. Find the inverse matrix of the matrix. P−1 of matrix P.
det (P) = (1 × 2) − (−1 × −1) = 2 − 1 = 1
−1 2 1
P =
1 1
5. Fill all these matrices into the equation. M = PDP−1 .
1 −1 −1 0 2 1
M=
−1 2 0 −2 1 1
6.
5
Raise to the required power using the 1 −1 −1 0 2 1
5
equation. M =
−1 2 0 −2 1 1
1 −1 (−1)5
5 0 2 1
M =
−1 2 0 (−2)5 1 1
5 1 −1 −1 0 2 1
M =
−1 2 0 −32 1 1
7. Multiply out the matrices to give your Here, we begin with the first two
answer in a single matrix. matrices, then multiply the answer by the
third matrix. Recall that matrix
multiplication is associative – it does not
matter in which order we multiply them.
1 −1 −1 0 −1 32
=
−1 2 0 −32 1 −64
−1 32 2 1 30 31
=
1 −64 1 1 −62 −63
5 30 31
M =
−62 −63
31
ALGEBRA Matrices
32
FUNCTIONS 2
Table of contents & cheatsheet
Definitions
Function a mathematical relationship where each input has a single output. It is often written as f (x) where x is the input
Domain all possible x values, the input. (the domain of investigation)
Range possible y values, the output. (the range of outcomes)
Coordinates uniquely determines the position of a point, given by (x, y)
Quadratic functions y = ax 2 + b x + c = 0
−b
Axis of symmetry: x-coordinate of the vertex: x =
2a
Factorized form: y = (x + p)(x + q)
a>0 a<0
y y
33
FUNCTIONS Basic concepts
Note that some Domain all possible x-values that a function can have. You can also think of
questions will specify this as the ‘input’ into a mathematical model.
the domain (often even
though the function as
such could theoretically Range all possible y-values that a function can give you. You can also think
have many other of this as the ‘output’ of a mathematical model.
x -value inputs). Make
sure that your answers
are within any given Coordinates uniquely determine the position of a point, given by (x, y).
domain; for example,
only sketch the graph
for the x -values
included in the domain
if you are asked to
.
draw it. 1
Example
Domain: x 6= 0
(all real numbers except 0)
Range: y 6= 0
(all real numbers except 0)
Domain: x ∈R
(all real numbers)
Range: y ∈ R+
(all positive real numbers)
34
FUNCTIONS Basic concepts 2
When sketching graphs, make sure your drawing is to scale and within the required
domain and range.
Even though the IB does not not expect your sketches to be completely precise, it is
important that key features are in the right place. These include:
• x- and y-intercepts
• intersection points
• turning points
• axes of symmetry
• horizontal and vertical asymptotes
As well as sketching these features, you will need to know how to identify them on given
graphs and on your GDC.
x
1
f (x) = − 2 and g (x) = −x 2 + 4. Find the coordinates where f (x) = g (x).
2
The intersection points are (−1.68, 1.19) and (2.41, −1.81). If you are sketching functions
f (x) and g (x), be sure to mark and label these points on your sketch.
35
FUNCTIONS Linear models
Linear functions make straight line graphs. Two elements you need to know to describe
a linear function are its slope/gradient (how steeply it is rising or decreasing) and its
y-intercept (the y-value when the function crosses the y-axis, so when x = 0).
y =m x + c y-intercept = (0, c)
with x
m = gradient (slope)
c = y-intercept
This is useful, because this way you can read the gradient (m) and y-intercept (c) directly
from the equation (or formulate a straight line equation yourself, if you know the value
of the gradient and y-intercept.)
You may also see a straight line equation written in two other forms:
ax + b y + d = 0 general form
y − y1 = m(x − x1 ) point-slope form
In these cases, it is best to rearrange the equation into the y = m x + c form discussed
above. You can do this by using the rules of algebra to make y the subject of the equation.
When you are not given the value of the gradient in a question, you can find it if you
Make sure you know two points that should lie on your straight line. The gradient (m) can be calculated
substitute the y and by substituting your two known coordinates (x1 , y1 ) and (x2 , y2 ) into the following
x -coordinates in the equation:
correct order!
rise y2 − y1
DB 2.1 m= =
run x2 − x1
36
FUNCTIONS Linear models 2
Line L1 has a gradient of 5 and intersects line L2 at point A(1, 0). Find the equation of
L1
1. Find slope. Slope given, m=5
2. Fill in one point to find c . L1 passes through (1, 0)
⇒ 0 = 5(1) + c
c = −5
⇒ y = 5x − 5
37
FUNCTIONS Linear models
When you know the equation of one straight line, you can use the value of its gradient,
m, to find equations of other straight lines that are parallel or perpendicular to it.
−1
Perpendicular lines meet at a 90° angle m2 =
m1
LineL1 has a gradient of 5 and intersects line L2 at point A(1, 0). Line L2 is
perpendicular to L1 . Find the equation of L2
38
FUNCTIONS Quadratic models 2
y = a x2 + b x + c = 0
The equation for the axis of symmetry can be found using the equation below where a, b
and c are the corresponding numbers from your quadratic equation written in the form
y = ax 2 + b x + c.
−b
Axis of symmetry x= = x-coordinate of vertex DB 2.5
2a
Given that f (x) = x 2 − 2x − 15, find the coordinates of the vertex of f (x).
1. Use axis of symmetry formula to find −b −(−2)
x -coordinate of the vertex. x= =
2a 2·1
⇒x =1
39
FUNCTIONS Quadratic models
To ‘solve’ a quadratic function, you need to find its x-intercepts. You find these by setting
your quadratic equation equal to 0. When a x 2 + b x + c = 0 you can solve for x to find the
x-intercepts (or ‘roots’, or ‘solutions’ as they are also called interchangeably). Given that
quadratic equations have the shape of a parabola, they can have up to two x-intercepts; as
you can see when a quadratic equation is plotted, it often crosses the x-axis twice.
Quadratic functions can have either two real roots, one repeated real root or two
complex roots. Something called the discriminant (∆) can help us tell which roots the
function has.
∆ = b 2 − 4ac
If the discriminant is positive, the function has two real roots, if it is zero the function
has one repeated root and if it is negative the function has two complex roots.
x x x
40
FUNCTIONS Quadratic models 2
Press menu
3: Algebra
3: Polynomial Tools
1: Find Roots of Polynomial
Select Complex roots and enter the
coefficients of your equation.
There are several methods to find the x-intercepts. In your exam you will primarily use
your GDC. Here we work through an example of factorisation.
Factorisation
41
FUNCTIONS Polynomials
2.4 Polynomials
f (x) = a x n
.
Example
1
y = x3 y = 2x 2 − x 5
2
y y
x x
You can use the Polyrootfinder on your GDC to find roots of any polynomials.
Solve 3x 2 − 4x − 2 = 0
type of polynomial.
IB ACADEMY
so x = 1.72 or x = −0.387
42
FUNCTIONS Exponential models 2
with
horizontal asymptote at y = c (0, k + c)
•
y=c
m = y-intercept at (0, k + c)
x
y = 2x y = 3 · (2 x ) y = 2−x − 3 y = −2−x + 1
y y y y
3
x x
1
−2
x x
A population of rabbits is modelled by the function P (t ) = 24e0.19t , t ¾ 0, where P is Remember that e is just
a number (2.71828. . . ),
the population of rabbits and t is the time in months. After how many months does the
so treat it like any other
population reach 1 million?
number.
1. Set up an equation you are looking to 1000000 = 24e0.19t You get points on your
IB exam for writing out
solve.
an equation like this!
2. Plot both sides of the equation as y1 = 1000000
separate functions on your GDC. y2 = 24e0.19t
3. Find the x -coordinate of the intersection x = 55.987
point. ⇒ 56 months
43
FUNCTIONS Composite and inverse functions
( f ◦ g )(x) means f of g of x
To find the composite function above substitute the function of g (x) into the x of f (x).
.
Remember
f ◦ g (x) 6= g ◦ f (x)
( f ◦ g )(x): replace x in the f (x) function with the entire g (x) function
(2 g (x)) + 3 = 2x 2 + 3
(g ◦ f )(x): replace x in the g (x) function with the entire f (x) function
2
f (x) = (2x + 3)2
44
FUNCTIONS Graph transformations 2
For an inverse function, f −1 (x), to exist the function f (x) must be a one-to-one function;
each input has a unique output. A function is one-to-one if horizontal lines drawn across
it pass through the function only once. Sometimes to make an inverse function, the
domain of a function needs to be restricted so that it is a one-to-one function.
many-to-one one-to-one
45
FUNCTIONS Graph transformations
46
FUNCTIONS Modelling 2
2.8 Modelling
Trigonometric functions, sine and cosine, make sinusoidal shapes when graphed.
As with other functions, the height, width and position on the axes of a trigonometric
function is determined by its parameters. For sinusoidal models we describe these
parameters with special names; the vertical stretch is determined by the amplitude, the
horizontal stretch by the period, the horizontal shift by the phase shift, and an
upward/downward shift by the position of the principle axis. When working with
sinusoidal models assume that they are in radians, unless the question states otherwise.
y = asin b (x − c) + d
y period
amplitude of a
a
principle axis at y = d
360° 2π y=d
period of =
b b
phase shift of c x
.
Transformations of y = cos x.
Example
y
2 y = 2 cos x
amplitude = 2
1
0 principle axis at y = 0
x
−1 360◦
period = = 360◦
−2 1
90° 180° 270° 360°
y
1 y = cos(4x) − 1 amplitude = 1
0 x
−1 principle axis at y = −1
−2 360◦
period = = 90◦
−3 4
90° 180° 270° 360°
47
FUNCTIONS Modelling
Logistic models are used in situations where there is a restriction on growth. For
example, the maximum height a person can grow to or the maximum population size an
animal population can reach. A horizontal asymptote occurs at f (x) = L. This value, L,
is known as the carrying capacity. The parameter k measures how fast the model is
growing.
y
L
L
f (x) = , L, C , k > 0
1 + C e−k x
horizontal asymptote at y = L L
L
y-intercept at y = 1+C
1+C
x
Twenty birds are introduced to an empty island. The island’s carrying capacity is 10 000.
After 3 years there are 35 birds. Determine the logistic model and use it to estimate the
bird population after 5 years.
48
FUNCTIONS Modelling 2
Sometimes data does not follow one of the previously mentioned models perfectly. In
these cases a piecewise model may be used in order to fit the data to a model. Piecewise
models are made up of multiple functions which are restricted to certain domains to
create a connected function.
5
(
x +3 0<x ≤2
f (x) =
(x − 3)2 + 4 2<x <6
x
2
Find the value of a such that the following piecewise function is continuous.
(
1+ x 0≤x <2
f (x) = 2
ax + x x ≥ 2
49
FUNCTIONS Scaling graphs
Logarithms allow us to display data which has a large range of values in a more compact
way. On a linear number line, moving a step to the right means adding a number, but on
a logarithmic scale moving a step to the right means multiplying by a number. Taking
the logarithm of a log scale gives a linear scale.
linear scale
−20 −10 0 10 20
logarithmic scale
1 1 1 10 100
100 10
1 1
log = −2 log = −1 log (1) = 0 log (10) = 1 log (100) = 2
100 10
Taking the log of data set y makes the values a similar scale to those of the data set x. The
data sets x and y have an exponential relationship, so the data sets x and log(y) have a
linear relationship. To find the values of the y data points from the log(y) graph, first
read off their value on the log(y) graph. Then raise 10, or the base of the log, to the
power of this value. This reverses the log(y) since it is a log of base 10.
4000
x y
1 3 3000
2 9
4 23
5 103 2000
7 208
8 789
10 3840 1000
0 x
0 1 2 3 4 5 6 7 8 9 10
50
FUNCTIONS Scaling graphs 2
log(y)
4
x log(y)
1 0.477 3
2 0.954
4 1.362
5 2.013 2
7 2.318
8 2.897
10 3.584 1
0 x
0 1 2 3 4 5 6 7 8 9 10
When we take the log of one axes the graph is called a semi-log graph, when we take the
log of both axes the graph is called a log-log graph. The IB expects you to interpret
log-log and semi-log graphs, but not draw them yourself.
51
FUNCTIONS Scaling graphs
52
TRIGONOMETRY 3
Table of contents & cheatsheet
Three-figure bearings
Direction given as an angle of a full circle. North is 0° and the angle is expressed in the clockwise direction from North.
So East is 90°, South is 180° and West 270°.
cos = −1 cos = 1
x
0° 90° 180° 270° 360°
cos = 0
sin = 0 sin = 0 x
0° 90° 180° 270° 360°
sin = −1
53
TRIGONOMETRY Basic fundamentals
3.1.1 Radians π
2π 2 π
3 3
3π 90° π
4 120° 60° 4
5π 135° 45° π
6 6
150° 30°
π
radians = × degrees
180° 0° 0
π 180°
360° 2π
180°
degrees = × radians
π
270°
3π
2
Degrees 0° 30° 45° 60° 90° 120° 135° 180° 270° 360°
π π π π 2π 3π 3π
Radians 0 π 2π
6 4 3 2 3 4 2
a2 = b 2 + c 2 Pythagoras
opposite
e
sin ϑ = SOH
us
opposite
en
hypotenuse
p ot
adjacent
hy
cos ϑ = CAH
hypotenuse θ
opposite
tan ϑ = TOA adjacent
adjacent
The following two right angle triangles with whole numbers for all the sides come up
often in past exam questions.
5
3 13
5
4 12
54
TRIGONOMETRY Basic fundamentals 3
DB 3.2
a b c
Sine rule: = =
sin A sin B sin C
Use this rule when you know:
a
c C
b
b
a
1
Area of a triangle: Area = a b sin C
2
Use this rule when you know:
a
C
b
55
TRIGONOMETRY Basic fundamentals
Find ∠C
∠C = 180° − 40° − 73° = 67°
Find b
a b
=
sin A sin B
27 b
=
sin 40° sin 73°
27
b= · sin 73° = 40.169 ≈ 40.2 cm
sin 40°
Find c
c a
=
sin C sin A
27
c= × sin 67° = 38.7 cm
sin 40°
Find the area
1
Area = · 27 · 40 · 2 · sin 67°
2
= 499.59 ≈ 500 cm2
.
Example
m z
6k
35° x
10 km
Find z
z 2 = 62 + 102 − 2 · 6 · 10 · cos 35°
z 2 = 37.70
z = 6.14 km
Find ∠x
6 6.14
=
sin x sin 35°
sin x = 0.56
x = sin−1 (0.56) = 55.91°
56
TRIGONOMETRY Basic fundamentals 3
Ambiguous case, also known as an angle-side-side case, is when the triangle is not unique
from the given information. It happens when you are given two sides and an angle not
between those sides in a triangle.
You have to use a sine rule to solve a problem in this case. However, one needs to
remember that sin x = sin(180° − x), meaning that your answer for an angle is not just x,
but also 180° − x.
In other words, we might get two different possible angles as an answer and thus two
different possible triangles that satisfy the information given.
However, that is not always the case, if the sum of the two known angles becomes bigger
than 180°. So if you are required to calculate the third angle or total area of a triangle, you
might have to do the calculations for two different triangles using both of your angles.
Find ∠A.
a b
=
sin A sin B
14 23
=
sin 33° sin A
∠A1 = 63.5°
∠A2 = 180° − 63.5° = 117°
∠A2 + 33° < 180° thus also a possible angle
A
14
14
33° 33°
23 B 23 C
B C
57
TRIGONOMETRY Circular functions
The unit circle is a a tool that you can use when solving problems involving circular
functions. You can use it to find all the solutions to a trigonometric equation within a
certain domain.
As you can see from their graphs, functions with sin x, cos x or tan x repeat themselves
every given period; this is why they are also called circular functions. As a result, for each
y-value there is an infinite amount of x-values that could give you the same output. This
is why questions will give you a set domain that limits the x-values you should consider
in your calculations or represent on your sketch (e.g. 0° ≤ x ≤ 360°).
The unit circle can be used to construct the graphs of sin x and cos x. This is done by
selecting a few angles on the unit circle and reading off the corresponding values of cos or
sin of these angles. Then these points are plotted on a graph and can be connected.
y
cos = 0
cos = −1 cos = 1 x
0° 90° 180° 270° 360°
cos = 0
y
sin = 1
sin = 0 sin = 0 x
0° 90° 180° 270° 360°
sin = −1
58
TRIGONOMETRY Trigonometric relations 3
In order to solve trigonometric equations, you will sometimes need to use identities.
Identities allow you to rewrite your equation in a way that will make it easier to solve
algebraically. DB 3.8
sin θ
tan θ =
cos θ
sin2 θ + cos2 θ = 1
Solve the equation cos2 (x) + 4 sin(4x) = 1 for π < x < 2π.
1. Rearrange the equation so that it equals cos2 (x) + 4 sin(4x) − 1 = 0
zero.
3. Change your v-window to show only the In this case we only look at x values
x values which the question asks for. between π and 2π.
4. Find the roots of the function. x = 3.142, 3.898, 4.775, 5.464, 6.283
5. Check that all solutions are within the 3.142 = π, 6.283 = 2π, so we do not
interval given. x must be
include these solutions, since
larger than π and smaller than 2π.
6. Write out all solutions within the interval. x = 3.898, 4.775, 5.464
59
TRIGONOMETRY Trigonometric relations
Matrices can be used to transform a point, when the point is written as a vector. The
matrix multiplies the vector to give a new point. These matrices are known as
transformation matrices and are used to perform various transformations. These
transformations include reflections, horizontal and vertical stretches, enlargements,
translations, and rotations. Transformation matrices can also be combined to perform
multiple transformations.
.
Matrix transformation
Example
y
6
2
P= 5
4
3 0 4
M=
0 1 P P0
0
3
MP = P
2
3 0 2 6 1
=
0 1 4 4
0
x
0 1 2 3 4 5 6 7 8
There are many standard matrices for performing different types of transformations.
These are given to you in your data booklet.
y
stretch parallel to the x-axis
k 0 (P1 ) 5
0 1 with a scale factor of k k =2
4
P2 P3
stretch parallel to the y-axis 3
1 0 (P2 )
0 k with a scale factor of k 2 P P1
1
enlargement with a scale
k 0 (P3 )
0 k factor of k centered at (0, 0) 0
x
0 1 2 3 4 5
y = tan θ x
y
cos θ sin θ clockwise rotation of angle θ
(P4 ) 5
− sin θ cos θ about the origin, θ > 0 θ = 45°
4
P6
cos θ − sin θ
counter-clockwise rotation of 3 P5
(P5 ) P
sin θ cos θ angle θ about the origin, θ > 0
2
1
cos 2θ sin 2θ reflection in the line
(P6 ) P4
sin 2θ − cos 2θ y = tan θ x 0
x
0 1 2 3 4 5
60
TRIGONOMETRY Circles 3
Transformation matrices can be applied to shapes and vectors as well as points. When
transforming a shape with a transformation matrix, the determinant of the matrix can
tell us about the area of the transformed shape. The transformed shape is sometimes
called the image.
3 0
A=
0 3
3.4 Circles
ϑ in degree ϑ in radians
ϑ
Arc length = × 2πr ϑ×r
360 sector
ϑ 1
Area of a sector = × πr 2 ×ϑ × r2 arc
360 2
61
TRIGONOMETRY Voronoi diagrams
With a Voronoi diagram you can divide a plane into regions based on a set of sites in it.
The partitioning is made based minimal distance to the sites.
Cell a region containing all the points for which the enclosed site is the
closest one. Each cell encloses a single site
62
TRIGONOMETRY Voronoi diagrams 3
To construct a Voronoi diagram based on a set of sites, you need to find the boundaries
between the cells that will enclose each of them. These edges lie along the perpendicular
bisectors between neighbouring sites. Finding these perpendicular bisectors is referred to
as a form of nearest neighbour interpolation.
Perpendicular bisector the line passing through the midpoint between two
points and at a 90°angle to the line segment that connects them
Nearest neighbour interpolation finding the site closest to any given point
Voronoi diagrams
Points A(2, 8), B(7, 6), C (11, 10), D(6, 1) and E(10, 6) represent restaurants of a pizza
chain in a city.
y
B E
D
x
(b) Hence, find the equation of the perpendicular bisector of points B and D.
To optimise delivery, pizza orders are always distributed to the closest restaurant.
(d) Sam lives at point S(11, 2). Which pizza place will prepare Sam’s pizza?
63
TRIGONOMETRY Voronoi diagrams
5. Sketch. y
B E
S
×
D
x
6. Use Voronoi diagram to determine which The pizza place closest to Sam is E,
cell a given point falls into. therefore Sam’s order would be prepared
at and delivered from E.
64
VECTORS AND GRAPH 4
THEORY
Table of contents & cheatsheet
Definitions
Vector a geometric object with magnitude (length) and 1 0 0
direction, represented by an arrow. Base vector i~ = 0, ~j = 1, k~ = 0.
Collinear points points that lie on the same line 0 0 1
Unit vector vector with magnitude 1
65
VECTORS AND GRAPH THEORY Vector fundamentals
Vectors are a geometric object with a magnitude (length) and direction. They are
represented by an arrow, where the arrow shows the direction and the length represents
the magnitude.
v~ = P~S
S M R
with the arrow over the top showing the
direction.
You can use vectors as a geometric algebra, expressing other vectors in terms of u~ and v.
~
For example
P~R = u~ + v~ Q~S = − u~ + v~ ~ = 1 − u~ + v~
QN
2
1
P u~ Q P − u~ Q P − 2 u~ Q
1
2v~
v~ v~
N N N
S M R S M R S M R
This may seem slightly counter-intuitive at first. But if we add in some possible figures
you can see how it works. If u~ moves 5 units to the left and v~ moves 1 unit to the right
(−left) and 3 units down.
Then P~R = u~ + v~ = 5 units to the left −1 unit to the right and 3 units down = 4 units to
the left and 3 units down.
66
VECTORS AND GRAPH THEORY Vector fundamentals 4
Formally the value of a vector is defined by its direction and magnitude within a 2D or
3D space. You can think of this as the steps it has to take to go from its starting point to
its end, moving only in the x, y and z axis.
y
Vector from point O to point A: 4
~ 3 3
OA = a~ =
2
A
2
Vector from point O to point B:
B a~
1
~ ~ −1
OB = b =
1 b~
−1 1 2 3 4 x
Note: unless told
otherwise, answer
Vectors can be written in two ways:
questions in the form
used in the question.
3
3
1. a~ = 2 = , where the top value is movement in the x-axis. Then the next is
2
0
movement in the y and finally in the z. Here the vector is in 2D space as there is
no value for the z-axis.
Here i~ is moving 1 unit in the x-axis, ~j 1 unit in the y-axis and k~ 1 unit in the z-axis.
a~ = 3i + 2 j + 0k = 3i + 2 j
When we work with vectors we carry out the mathematical operation in each axis
separately. So x-values with x-values and so on.
67
VECTORS AND GRAPH THEORY Vector fundamentals
However it must be remembered that vector notation does not give us the actual length
(magnitude) of the vector. To find this we use something familiar.
Length of a~:
a~ y
p
a| =
|~ x2 + y2
p p
x = 32 + 22 = 13
Sometimes you will be asked to work with unit vectors. These are vectors with a
magnitude of 1. We can convert all vectors to unit vectors.
a~
3 ~ 2 ~ 1 3
ab = =p i+p j=p
|~
a| 13 13 13 2
You need to know how to re-scale vectors. Re-scaling refers to changing a vector’s
magnitude without changing its direction. Turning a vector into a unit vector is an
example of re-scaling a vector. The concept of velocity might come up in these questions.
The velocity of an object refers to its speed and direction. It is described by a vector with
magnitude equal to the object’s speed and which points in the direction of the velocity of
the object.
Re-scaling vectors
−1
Find the velocity of a particle with speed 7 m s in the direction 3i + 4j.
1.
p p
Calculate the magnitude of the direction magnitude = 32 + 42 = 25 = 5
vector.
68
VECTORS AND GRAPH THEORY Vector fundamentals 4
Note the position vector can go to any where on the line. So in this example we could
also use (−3, 0) or (1, 4). Equally the direction vector can be scaled. So we could use
(2, 2), (30, 30), . . .
Because of this parallel lines will have direction vectors with the same ratio but not
necessarily in exact numbers.
Parallel lines: direction vector of L1 = direction vector of L2 × constant
Questions often deal with points and or multiple lines. It is worth making a sketch to
help understand the question.
69
VECTORS AND GRAPH THEORY Vector fundamentals
If one considers two lines in a three-dimensional graph, then there are three ways in
which they can interact:
x x x
z z z
If direction vectors defining a line aren’t multiples of one another, then the lines can
either be intersecting or skew. One can find out if the lines intersect by equating the
vector equations and attempting to solve the set of equations (remember: one needs as
many equations as variables to solve).
70
VECTORS AND GRAPH THEORY Vector fundamentals 4
If one can’t find a point of intersection, then the lines are skew.
2 − 3s = −1 + 3t
1. Equate
write simultaneous equations. 1+ s =3
2. Solve. s = 2, t = −1
Substitute back into r1 or r2 .
3. 2 − 3(2) −4
1+2 = 3
4(2) 8
4.1.3 Kinematics
Vectors can be used to describe the motion of objects. The relative position of object B
from object A is the vector AB. ~ An objects position, r, can be described using its initial
position, r0 , its velocity vector v, and the time since its initial position, t .
r = r0 + vt
.
A particle begins at the position r0 , and its velocity can be described by the vector v.
Example
An object can change velocity over time and vectors can be used to show this. A vector
can have an additional variable, such as the time t , which allows the vector to change
direction and magnitude over time. Filling in different values of t gives different vectors.
3+ t
vx
vt = =
vy 1 + 2t
71
VECTORS AND GRAPH THEORY Multiplying vectors
y
10
9
v4
8
7
v3
6
Variable vectors 5
v2
4
3
v1
2
1
0
x
0 1 2 3 4 5 6 7 8
The dot product of two vectors c~ · d~ can be used to find the angle between them.
DB 4.2
c d
1 1 c~ · d~ = |~
c ||d~| cos ϑ
c~ = c2 d~ = d2
c3 d3 c~ · d~ = c1 d1 + c2 d2 + c3 d3
Often these two vectors
are perpendicular.
c~ · d~ = 2 × 8 + 3 × 1 + (−1) × 3 = 16
1. Find the dot product in terms of
components.
c~ · d~ = 22 + 32 + (−1)2 × 82 + 12 + 32 ×
2.
p p
Find the dot product in terms of
magnitudes. p p
cos ϑ = 14 74 cos ϑ
3. Equate and solve for ϑ. p p 16
16 = 14 74 cos ϑ ⇒ cos ϑ = p p
14 74
⇒ ϑ = 60.2°
72
VECTORS AND GRAPH THEORY Multiplying vectors 4
The cross product of two vectors produces a third vector which is perpendicular to both
of the two vectors. As the result is a vector, it is also called the vector product.
c1 = a2 b3 − a3 b2 ϑ
c2 = a3 b1 − a1 b3
a
c3 = a1 b2 − a2 b1
.
c1 = 3 × 7 − 4 × 6 = −3
c2 = 4 × 5 − 2 × 7 = 6
c3 = 2 × 6 − 3 × 5 = −3
⇒ a × b = (−3, 6, −3)
You can check the direction of c with the right hand rule:
c =a×b
73
VECTORS AND GRAPH THEORY Multiplying vectors
The length of the cross product can be found by either of the two methods:
1. | u~ × v|
~ = | u~||v|
~ sin(ϑ) where ϑ is the angle between vectors u~ and v.
~
2. By calculating the vector with use of cross product formula and then finding the
length of that vector.
a×b
The volume of parallelepiped
spanned with use of vectors a~,
ϑ
b~ and c~ is:
|c| cos ϑ c
~
a × b ) · c~
(~
b
Find the area of triangle with sides a~ = (1, 3, 5) and ~b = (−1, 2, 3).
.
Example
c1 = 3 × 3 − 5 × 2 = −1
c2 = 5 × −1 − 1 × 3 = −8
c3 = 1 × 2 − 3 × −1 = 5
a~ × b~ = (−1, −8, 5)
p p
a × b~ | = |(−1, −8, 5)| =
|~ 1 + 64 + 25 = 3 10
p
Thus the area of triangle is: 1.5 10
74
VECTORS AND GRAPH THEORY Multiplying vectors 4
75
VECTORS AND GRAPH THEORY Graph theory
4.3.1 Introduction
Graphs, sometimes called networks, are used to show the connections between different
objects. They may show, for example, the roads between different towns, or the
relationships between a group of people. Graphs are comprised of vertices and edges.
A B vertex
edge
E
D
Adjacent vertices two vertices that have an edge directly connecting them.
76
VECTORS AND GRAPH THEORY Graph theory 4
A B
A simple graph is one which contains only one edge
between any two vertices, and no loops. E
D
C
loop
A B
A complete graph is one in which every pair of
vertices is connected with one edge.
D
C
subgraph
A B
A subgraph is a graph which is contained within
another graph.
E
D
C
Out degree of a vertex the number of outgoing edges from the vertex.
77
VECTORS AND GRAPH THEORY Graph theory
4.3.3 Routes
Routes are ways in which we can walk around a graph. There are different types of
routes. You need to be aware of these. A walk is any route taken though the graph. A
walk begins at a vertex and follows edges to other vertices. It ends at a vertex and the
length of a walk is equal to the number of edges it moves along. Vertices and edges can be
repeated in walks.
Trail
from B to A to B to E
A B
A trail is a walk with no repeated edge.
E
D
C
Path
from C to D to E to B to A
A B
A path is a walk with no repeated vertex.
E
D
C
Circuit
from B to A to B to E to C to A
Cycle
from D to E to C to D
A B
A cycle is a circuit which has no repeated vertices,
apart from the beginning/end vertex. E
D
C
A B
A tree is an undirected graph in which any two
vertices are connected by exactly one path. E
Trees contain no cycles. D
C
78
VECTORS AND GRAPH THEORY Graph theory 4
Adjacency matrices, A, can be used to describe graphs. They store information about the
edges and paths between different vertices of a graph. An adjacency matrix is always a
square matrix with the same number of rows/columns as vertices in the graph it
represents. The rows and columns of adjacency matrices represent the vertices in the
graph. An entry in the 4th row and 5th column of an adjacency matrix tells us something
about the vertex between the 4th and 5th vertex.
For unweighted graphs we fill in a 0 into the adjacency matrix to show there are no edges
connecting the two vertices. We fill in a 1 if an edge connects the two vertices.
0 1 0 0 1 1 2
1 0 0 0 1
A = 0 0 0 1 1
5
0 0 1 0 0 4
1 1 1 0 0
3
The (i, j )th entry of Ak gives the number of k-length walks between vertex i
and vertex j .
Find the number of walks which are of length 3 or less between vertex 2 and vertex 3 in
the graph described by matrix A.
0 1 1 0
1 0 1 1
A=
1 1 0 0
0 1 0 0
2. Raise the matrix to the power of the In this case we want to know the number
length of walks you are looking for. of 3-length, 2-length and 1-length walks.
2 1 1 1 2 4 3 1
1 3 1 0 4 2 4 3
2 3
A = A =
1 1 2 1 3 4 2 1
1 0 1 1 1 3 1 0
79
VECTORS AND GRAPH THEORY Graph theory
3. Look for the entry in your matrix or In our case we are looking at entry a3,2 or
matrices which correspond to the a2,3 .
mentioned vertices.
A: a3,2 = 1
A2 : a3,2 = 1
A3 : a3,2 = 4
This tells us that between vertices 2
and 3 there are: 4 walks of length 3,
1 walk of length 2, and 1 walk of length 1.
In total this is 6 walks of length 3 or less.
Adjacency matrices can also be created for weighted and directed graphs. Instead of
inputting 1s and 0s into the matrix, for weighted graphs we instead enter the weights of
the edges. If there is no edge we input a zero. For directed graphs the rows represent the
starting vertex and the columns the end vertex. When we input the (i, j )th element we
are looking at edges from vertex i to vertex j .
1 10 2
0 0 0 0 8 6
0 0 0 6 10 8
5
A = 0 0 0 7 0 9 4
0 6 7 0 9
3
8 10 0 9 0 7
to
1 2
0 1 0 0 0
0 0 0 1 1
A= 1
0 0 1 0
5
from
0
0 0 0 0
4
0 1 0 0 0 3
80
VECTORS AND GRAPH THEORY Graph theory 4
1 2
5
4
3
To find the transition matrix of this graph, we first write down the out-degrees of
each vertex, di .
d1 = 1 d2 = 2 d3 = 2 d4 = 1 d5 = 0
⇓ ⇓ ⇓ ⇓ ⇓
1 1 1 1 1 1 1
=1 = = =1 =0
d1 d2 2 d3 2 d4 d5
The we begin to fill in the transition matrix, beginning with the first column. This
represents the edges running from vertex 1 to all the other vertices. There is only one
edge leaving vertex 1. It goes to vertex 2. The (2, 1)th entry in our matrix will
1
therefore be = 1. All other (i, 1)th entries are zero as no other edges leave vertex 1.
d1
Each column in a transition matrix adds up to 1.
1
0 0 0 0
2
1 0 0 1 0
0 0 0 0 0
T=
0 1
0 0 0
2
1 1
0 0 0
2 2
Transition matrices represent the probability of moving to each vertex, given the vertex
you are currently on. The (i, j )th entry tells you the probability of moving to vertex i
given you are in vertex j . We can use something called a column state matrix, or vector,
sn , to show the probability of being in each vertex after n transitions, or moves between
vertices. The initial probability of being in each of the vertices is given by s0 . The
probability of being in each of the vertices after n transitions is given by the following.
sn = Tn s0
81
VECTORS AND GRAPH THEORY Graph theory
Markov chains are directed, weighted graphs in which the weights of the edges represent
the probability of traversing that edge. Transition matrices can be used to represent
them. Remember transition matrices work from the column to the row, unlike
adjacency matrices.
0.1
0.9
1 2
0 0.1 0.3 1
T = 0 0.9 0.7
1 0 0
0.3 0.7
3
.
To find the probability of being in each vertex after 10 transitions, given we started in
Example
s0 .
vertex 1, we need to set up an initial state matrix,
1
s0 = 0
0
Now we can use the following formula along with our transition matrix to give the
probabilities of being in each vertex after 10 transitions. Your calculator can work
this out for you.
sn = Tn s0
s10 = T10 s0
10
0 0.1 0.3 1 0.112
s10 = 0 0.9 0.7 0 = 0.778
1 0 0 0 0.110
Now we have a column state matrix, s10 which tells us the probability of being in
each vertex after 10 transitions given we started in vertex 1.
When working with transition matrices, after many transitions, the probability that
we are in each vertex will become stable and constant. This is known as the steady
state. One way the steady state can be found is by looking at the column state matrix
after many transitions. For this the initial state does not matter, as so many
transitions are applied to it.
100
0 0.1 0.3 1 0.111
s100 = 0 0.9 0.7 0 = 0.777
1 0 0 0 0.111
The column state matrix reaches a point at which it stops changing after being put
through the transition matrix. This is the steady state vector. The steady state
vector’s components always add to 1. Another way to find the the steady state is by
using the eigenvectors and eigenvalues of the transition matrix.
82
VECTORS AND GRAPH THEORY Graph theory 4
The steady state vector is equal to the eigenvector of the transition matrix with
an eigenvalue of 1.
1.
λ 0
Find the eigenvalues first, using the 0.5 0.2
det − =0
characteristic equation. 0.5 0.8 0 λ
0.5 − λ 0.2
det =0
0.5 0.8 − λ
(0.5 − λ) × (0.8 − λ) − (0.2 × 0.5) = 0
0.4 − 1.3λ + λ2 − 0.1 = 0
λ2 − 1.3λ + 0.3 = 0
λ1 = 1
λ2 = 0.3
2.
λ1 0
Use the eigenvalue equal to 1 to find its 0.5 0.2 v1,1
− =0
corresponding eigenvector. 0.5 0.8 0 λ1 v1,2
−0.5 0.2 v1,1
=0
0.5 −0.2 v1,2
−0.5v1,1 + 0.2v1,2 = 0
0.5v1,1 − 0.2v1,2 = 0
0.4
v1 =
1
3. Scale the vector so that its components We can do this by dividing each
sum to 1. component by the sum of all
components.
0.4
0.4 + 1 0.286
v1 = 1 =
0.714
0.4 + 1
83
VECTORS AND GRAPH THEORY Algorithms
4.4 Algorithms
Eulerian circuit
from A to E to C
A trail or circuit is Eulerian if it crosses each edge to D to B to E to A
only once, and ends up in the same vertex that it
began in. A B
A graph has an Eulerian circuit if and only if every
vertex has an even degree. E
A graph has an Eulerian trail if and only if there are D
at most two vertices with an odd degree. C
Hamiltonian circuit
from A to B to E to D to C to A
A B
A path or cycle is Hamiltonian if it reaches each
vertex only once, and ends up in the same vertex it E
began in.
D
C
There are two algorithms for finding the MST which you need to know: Kruskal’s and
Prim’s.
84
VECTORS AND GRAPH THEORY Algorithms 4
Prim’s algorithm
1. Begin the tree with a vertex in the graph. This can be any vertex.
2. Look for edges which connect the tree to vertices which are not yet in the tree.
Choose the smallest weighted edge of these to add to the tree.
3. Repeat step 2 until all vertices are in the tree.
.
Prim’s algorithm
Example
Step 4: We pick the edge between A and C . Now we can choose between any edge
connecting A or B or C or E to the remaining vertex D. We must make sure to pick
an edge in the 4th row/column, which corresponds to vertex D.
85
VECTORS AND GRAPH THEORY Algorithms
.
Example
0 3 4 0 0
3
A 2 B
0 0 9 2
A= 4
0 0 12 6 4 10 9
6 E
0 9 12 0 10
C D
0 2 6 10 0
12
Step 5: We pick the vertex between B and D. Now every vertex in included in our
MST.
The edges highlighted with a rectangle are the edges which make up the tree.
3
0 3 4 0 0
3
A 2 B
0 0 9 2
A= 4
0 0 12 6 4 10 9
6 E
0 9 12 0 10
C D
0 2 6 10 0
12
Kruskal’s algorithm
2. Find the next smallest weighted edge in the graph, provided that it does not form a
cycle. This edge does not have to be adjacent to the existing tree edges.
Kruskal’s algorithm
Example
Step 1: Step 2:
1 1
A 9 B A 9 B
2 2
10 2 10
7 2 7
E E
C D C D
4 4
Step 3: Step 4:
1 1
A B A 9 B
2 9 2
2 10 2 10
7 E 7 E
C D C D
4 4
86
VECTORS AND GRAPH THEORY Algorithms 4
The Chinese postman problem is all about finding the shortest route around a weighted
graph which goes along each edge at least once, starting and finishing at the same vertex.
If the graph has an Eulerian circuit, then this is the solution to the Chinese postman
problem – every edge has been crossed exactly once. If the graph does not have an
Eulerian circuit then an algorithm must be applied.
1. Find all the odd vertices in the graph (vertices with an odd degree).
3. For each pair, write down the length of the shortest possible path between them.
Note which edges you take.
4. Determine the combination of pairings which has the shortest total length.
5. For this pairing of odd vertices, draw on extra edges to the graph alongside the edges
you took to connect the vertices in step 3.
6. Now find a route which crosses every edge with the shortest distance. The extra edges
you drew onto the graph must also be used.
.
Find the shortest route around the graph which begins and ends in vertex A.
3
B D
1 2
A 4 5 F
2 1
C E
3
3
B D
1 2
Step 1: Identify the odd vertices. They are B, C , D, A 4 5 F
and E. 2 1
C E
3
87
VECTORS AND GRAPH THEORY Algorithms
.
Example
B D
between each pair. 1 2
The shortest path between B and C is via A. It has
A 4 5 F
length 3.
BC = 3 and D E = 3 2 1
B D = 3 and C E = 3 C E
3
B E = 6 and DC = 6
3
Step 4: The set of pairs with the shortest total length is B D
1 2
either BC and D E or B D and C E. We can choose
either to continue. For this example we will choose A 4 5 F
BC and D E. Now we add extra edges to the graph 2 1
along the shortest route we took from B to C and from C E
D to E. 3
The travelling salesman problem is about finding a circuit of least weight in a weighted
graph. Each vertex must be visited at least once. There are no algorithms to find this
circuit, but there are algorithms to determine the upper and lower bounds for the length
of the circuit.
The upper bound uses the nearest neighbour algorithm. Starting from different vertices
may give different upper bounds.
2. Move to the closest neighbouring vertex, taking into account the weights of the edges.
4. Find the shortest route to move from this last vertex back to the vertex you began in
from step 1.
5. Add up the weights of the edges you have crossed. This is the upper bound for the
travelling salesman problem for your graph.
88
VECTORS AND GRAPH THEORY Algorithms 4
The lower bound uses the deleted vertex algorithm. Deleting different vertices may give
different lower bounds.
1. Choose a vertex to delete. Remove this vertex from the graph, along with any edges
connected to it.
2. Find the length of the MST for the remaining vertices. Use Prim’s or Kruskal’s
algorithm.
3. Return the deleted vertex to the graph. Connect it to the MST using the shortest two
edges.
4. Add the lengths of these edges to the length of the MST. This is your lower bound for
the travelling salesman problem for your graph.
.
Find an upper and lower bound to the travelling salesman problem for the following
graph..
10
A 7 B
3 4 E 1 6
C D
9
To find the upper bound we follow the nearest neighbour algorithm.
Step 1: Step 2:
10 10
A 7 B A 7 B
3 4 E 1 6 3 4 E 1 6
C D C D
9 9
Step 3: Step 4:
10 10
A 7 B A 7 B
1 6 3 4 E 1 6
3 4 E
D C D
C
9 9 = 24
89
VECTORS AND GRAPH THEORY Algorithms
Step 1:
.
Example
Step 2:
10
A
A 7 B
3 4 E 1
3 4 E 1 6
C D
C D
9 =8
9
Step 3 and 4:
10
A 7 B
3 4 E 1 6
C D
9
= 8 + 6 + 7 = 21
90
DIFFERENTIATION 5
Table of contents & cheatsheet
Sketching graphs
Gather information before sketching:
5.2.2. Applications 100
Intercepts x-intercept: f (x) = 0
y-intercept: f (0) Kinematics
Turning points minima: f 0 (x) = 0 and f 00 (x) < 0 Derivative represents the rate of change, integra-
maxima: f 0 (x) = 0 and f 00 (x) > 0 tion the reverse.
point of inflection: f 00 (x) = 0
ds dv
Asymptotes vertical: x-value when the function divides by 0 =v =a
dt dt
horizontal: y-value when x → ∞
s v a
Plug the found x-values into f (x) to determine the y-values. displacement velocity acceleration
91
DIFFERENTIATION Introduction
5.1 Introduction
As you have learnt in the unit on functions, a straight line graph has a gradient. This
gradient describes the rate at which the graph is changing and using it we can tell how
steep the line will be when plotted on a graph. In fact, gradients can be found for any
function; the special thing about linear functions is that their gradient is always the same
(given by m in y = m x + c).
5.1.1 Polynomials
As functions forming curved lines, the gradients of polynomials are changing at each
point. You can find the derivative function ( f 0 (x)) for any polynomial function ( f (x))
using the principles explained below.
dy
DB 5.3 Principles y = f (x) = a x n ⇒ = f 0 (x) = na x n−1
dx
the (original) function is described by y or f (x)
dy
the derivative (gradient) function is described by or f 0 (x)
dx
92
DIFFERENTIATION Introduction 5
When differentiating it is useful to first rewrite the polynomial function into a form that
is easy to differentiate. Practically this means that you may need to use the laws of
exponents before (or after) differentiation to simplify the function.
5
For example, y = seems difficult to differentiate, but using the laws of exponents we
x3
5
know that y = = 5x −3 . Having the equation in this form allows you to apply the
x3
same principles as you would use to differentiate any other polynomial.
.
f (x) f 0 (x)
Example
5 −→ 0
x2 −→ 2 · 1x 2−1 = 2x
4x 3 −→ 3 · 4x 3−1 = 12x 2
5.1.2 Rules
With more complicated functions, in which several functions are being multiplied or
divided by one another (rather than just added or subtracted), you will need to use the
product or quotient rules. DB 5.6
x2
Example
93
DIFFERENTIATION Introduction
Chain rule
A function inside When a function is inside another function: y = g (u) where u = f (x)
another function is a
dy dy du
composite function, then: = · .
f ◦ g (x), which we dx du dx
discussed in the
Functions chapter
Differentiating with the chain rule
2. Find u 0 and y 0 . du dy
u0 = = − sin x ; y0 = = 2u
dx du
3. Fill in chain rule formula. dy dy du
= ·
dx du dx
= 2u(− sin x)
= −2 sin x cos x
Tangent a straight line that touches a curve at one single point. At that
point, the gradient of the curve is equal to the gradient of the tangent.
−1
slope of normal =
slope of tangent
y
f (x)
tangent
normal
94
DIFFERENTIATION Introduction 5
95
DIFFERENTIATION Turning points
1. Local maxima
2. Local minima
3. Points of inflection
If you take the derivative of a derivative function (one you have already derived) you get
the second derivative. In mathematical notation, the second derivative is written as y 00 ,
d2 y
f 00 (x) or . We can use this to determine whether a point on a graph is a maximum, a
dx 2
minimum or a point of inflection as demonstrated in the following Figure 5.1.
96
DIFFERENTIATION Turning points 5
Figure 5.1: Graph that shows a local maximum, a local minimum and points of inflection
f 0 (x) y f 0 (x) = 0
f 0 (x) = 0
f 0 (x) = anything but
is a local max/min of
f 0 (x)
97
DIFFERENTIATION Turning points
98
DIFFERENTIATION Turning points 5
5.2.1 Optimisation
As we saw in the previous section, differentiation is useful for identifying maximum and
minimum points of different functions. We can apply this knowledge to many real life
problems in which we may seek to find maximum or minimum values; this is referred to
as optimisation.
The most important
thing to remember is
that at a maximum or
Determine the max/min value with certain constraints minimum point
f 0 (x) = 0. So often if a
The sum of the height h and base x of a triangle is 40 cm. Find an expression for the question asks you to
area in terms of x , hence find the maximum area of the triangle. find a maximum/
minimum value, just
1. First write expression(s) for constraints x + h = 40 writing down f 0 (x) = 0
can score you points.
followed by an expression for the actual h = 40 − x
calculation. Combine two expressions so
1
that you are left with one variable. A= xh
2
1
= x(40 − x)
2
1
= − x 2 + 20x
2
2. Differentiate the expression. dA
= −x + 20
dx
3. The derivative = 0, solve for x . −x + 20 = 0
x = 20
4. Plug the x value into the original 1
A = − (20)2 + 20(20)
function. 2
= −200 + 400
= 200 cm2
99
DIFFERENTIATION Turning points
5.2.2 Kinematics
Kinematics deals with the movement of bodies over time. When you are given one
function to calculate displacement, velocity or acceleration you can use differentiation or
integration to determine the functions for the other two.
Displacement, s Z
ds
v dt
dt ds
Velocity, v =
dt Z
dv
a dt
dt Acceleration,
dv d2 s
a= =
dt dt 2
The derivative represents the rate of change, i.e. the gradient of a graph. So, velocity is
the rate of change in displacement and acceleration is the rate of change in velocity.
In kinematics derivatives and second derivatives with respect to time, t , have a special
notation.
dx d2 x
= ẋ = ẍ
dt dt 2
A diver jumps from a platform at time t = 0 seconds. The distance of the diver above
water level at time t is given by s (t ) = −4.9t 2 + 4.9t + 10, where s is in metres.
Find when velocity equals zero. Hence find the maximum height of the diver.
100
INTEGRATION AND 6
DIFFERENTIAL EQUATIONS
Table of contents & cheatsheet
1
x n+1 Integrate normally and multiply by
Z
x n dx = +C n 6= −1 coefficient of x
n +1
Integration by substitution
Z
f g (x) · g 0 (x) dx
By determining a definite integral for a function, you can find Note: the area below the x-axis gives a negative value
the area beneath the curve that is between the two x-values for its area. You must take that value as a positive value
indicated as its limits. to determine the area between a curve and the x-axis.
y f (x) Sketching the graph will show what part of the function
Z b lies below the x-axis.
Acurve = f (x) dx
a a b x
Using definite integrals you can also find the areas enclosed With g (x) as the “top” function (furthest from the x-
between curves. axis). For the area between curves, it does not matter
y what is above/below the x-axis.
Zb f (x)
Abetween = g (x) − f (x) dx
a a x
b g (x)
Volume of revolution
101
INTEGRATION AND DIFFERENTIAL EQUATIONS Integration
6.1 Integration
x n+1
Z
DB 5.5 x n dx = +C, n 6= −1
n +1
As you can see, every time you integrate the power on your variable will increase by 1;
this is opposite of what happens with differentiation, when you subtract 1. Whenever
you integrate you also add +C to this function. This accounts for any constant that may
Whenever you have been lost while differentiating.
differentiate any
constants that were in
the original function, In order to determine the value of C , you need to fill in a point that lies on the curve to
f (x), become 0 in the set up an equation with which you can solve for C . This is called a boundary condition.
derivative function,
f 0 (x).
102
INTEGRATION AND DIFFERENTIAL EQUATIONS Definite integral 6
Integrate by substitution
Z
3
Find 3x 2 e x dx
u
Z
4. Substitute back to get a function with 3
x. eu + C = ex + C
This is done in the following way, where the values for a and b are substituted as x-values
into your indefinite integral:
Z b Z
f (x) dx = F (b ) − F (a) where F= f (x) dx
a
Be careful, the order you substitute a and b into the indefinite integral is relevant for
your answer:
Zb Za
f (x) dx = − f (x) dx
a b
F (b ) − F (a)
2. Fill in: = 4(7)3 − 2(7) − 4(3)3 − 2(3)
(integral x = b ) − (integral x = a).
= 1256
103
INTEGRATION AND DIFFERENTIAL EQUATIONS Definite integral
6.2.1 Area
y
DB 5.5 By determining a definite integral for a
function, you can find the area beneath
f (x)
the curve that is between the two
x-values indicated as its limits.
a b x
Z b
Acurve = f (x) dx
a
or
Z c
Acurve = f (x) dx
a
104
INTEGRATION AND DIFFERENTIAL EQUATIONS Definite integral 6
Let y = x 3 − 4x 2 + 3x
Find the area from x = 0 to x = 3.
1 2 3 x
−1
−2
Z 3
Right: x 3 − 4x 2 + 3x dx =
1
1 4 4 3 3 2 3
= x − x + x
4 3 2 1
1 4 4 3 3 2
= (3) − (3) + (3)
4 3 2
1 4 3
− (1)4 − (1)3 + (1)2
4 3 2
8
=−
3
105
INTEGRATION AND DIFFERENTIAL EQUATIONS Definite integral
Z 3
Calculate the area between x 3 − 4x 2 + 3x and the x -axis.
0
press ,
choose ‘abs(’
Besides finding areas under and between curves, integration can also be used to calculate
the volume of the solid that a curve would make if it were rotated 360° around its axis
DB 6.5 — this is called the volume of revolution.
Z b Z b
2
V =π y dx ≡ V= πy 2 dx
a a
y y
f (x)
a b x a b x
106
INTEGRATION AND DIFFERENTIAL EQUATIONS Definite integral 6
p
.
x.
Z 4p 4
2 3 2 3 2 3 14
A= x dx = x 2 = (4) − (1) =
2 2
1 3 1 3 3 3
This area is rotated 360° (= 2π) around the x-axis. Find the volume of the solid.
Z 4p Z 4 4
1 1 2 1 2 15π
2
V =π x dx = π x dx = π x 2 =π (4) − (1) =
1 1 2 1 2 2 2
It is also possible to find the volume of revolution around the y-axis. It requires some
additional steps, but in general it is not much different from the volume of revolution
around the x-axis.
To find volume of revolution between two graphs, use the following formula (works the
same way with dy):
Z b h 2 2 i
V= π Outer radius − Inner radius dx
a
107
INTEGRATION AND DIFFERENTIAL EQUATIONS Differential equations
Questions may ask you to set up a differential equation. This is all about linking the rate
dy
of change of a variable, , to the variable itself, y.
dt
p
.
Example
If no initial conditions are given then an ODE has infinite solutions. A general solution
can be found, with constants, to represent this.
108
INTEGRATION AND DIFFERENTIAL EQUATIONS Differential equations 6
dy
Solve = 2xy which satisfies the initial condition y(0) = 2.
dx
1. Identify that the ODE can be solved using dy
separation of variables and move all y = 2xy
dx
and x dependent terms to their dy
respective sides. = 2x dx
y
dy
Z Z
2. Integrate each side separately.
Remember to add a constant on the x = 2x dx
y
side. ln(y) = x 2 + C
2 +C 2
3. Solve for y. y = ex = ke x
This is the general solution.
The many solutions to ODEs can be displayed on a set of axes. Small lines are drawn for
many points on the axes to represent the gradient of the solution. Different solutions,
which correspond to different initial conditions, can be drawn following the curve of the
small lines.
dx
y =x
At the point (1, 2) the gradient is dy
dy 7
= x = 1. A short line of
dx 6
gradient 1 is drawn at that point. 5
4
At the point (5, 7) the gradient is
3
dy
= x = 5. A short line of 2
dx
gradient 5 is drawn at that point. 1
−7 −6 −5 −4 −3 −2 −1 1 2 3 4 5 6 7 x
A specific solution can be drawn −1
onto the slope field. Pick y(0) = 0 −2
as the initial condition and the −3
solution can be drawn as on the −4
slope field.
−5
109
INTEGRATION AND DIFFERENTIAL EQUATIONS Differential equations
There are a lot of differential equations that are hard or impossible to solve analytically.
Yet we still would like to know the value of a function given its initial conditions. Then
we have to use numerical methods to solve the differential equation. Euler’s method is a
simple method that allows to find a value of a function given its first derivative and initial
conditions. It is easy to derive the Euler’s method from the approximation of a derivative
at a point:
y(x + h) − y(x)
y 0 (x) =
h
Solving for y(x + h) gives us:
Where we can rename for recursive purposes y(x + h) = yn+1 , y(x) = yn and
y 0 (x) = f (xn , yn ), where f (xn , yn ) is our differential equation:
yn+1 = yn + h f (xn , yn )
Now knowing initial conditions and using a small step h, it is possible to find an
approximate value of y at required point x. The smaller step h, the more accurate is the
solution. But it also takes longer to calculate it. It is recommended to create a table with
all required variables to keep it clean and orderly.
.
Use Euler’s method with step size h = 0.1 to approximate the solution to the
Example
dy
initial value problem = sin(x + y), y(0) = 1 at y(0.5)
dx
n xn yn f (xn , yn )
0 0.0 1 0.8415 . . .
1 0.1 1.0000 + 0.1 × 0.8415 = 1.0842 0.9262 . . .
2 0.2 1.0842 + 0.1 × 0.9262 = 1.1768 0.9812 . . .
3 0.3 1.1768 + 0.1 × 0.9812 = 1.2749 1.0000 . . .
4 0.4 1.2749 + 0.1 × 1.0000 = 1.3749 0.9792 . . .
5 0.5 1.3749 + 0.1 × 0.9792 = 1.4728
Euler’s method can also be used to find a numerical solution for coupled systems. In
coupled systems, the rate of change of y and x both rely on functions of x, y, and time t .
dx dy
= f1 (x, y, t ) = f2 (x, y, t )
dt dt
110
INTEGRATION AND DIFFERENTIAL EQUATIONS Differential equations 6
xn+1 = xn + h × f1 (xn , yn , tn )
yn+1 = yn + h × f2 (xn , yn , tn )
tn+1 = tn + h
Use Euler’s method with step size h = 1 to approximate the solution to the coupled
dx dy
initial value problem = x2 + y3 + t , = 2x + 5y + t , y(2) = 0, x(2) = 0, at t = 4.
dt dt
A similar table can be set up. The variable tn only depends on the step size, so this is put
first. The first set of values is given by the initial condition. From them the values of
f1 = x 2 + y 3 + t and f2 = 2x + 5y + t can be calculated. Then we move onto the second
line, and use the equations in Euler’s method to calculate tn , xn , and yn . The process is
repeated until we reach t = 4.
n tn xn yn f1 (xn , yn , tn ) f2 (xn , yn , tn )
0 2 0 0 2 2
1 2.5 0 + 0.5 × 2 = 1 0 + 0.5 × 2 = 1 4.5 9.5
2 3 1 + 0.5 × 4.5 = 3.25 1 + 0.5 × 9.5 = 5.75 203.67 38.25
3 3.5 3.25 + 0.5 × 203.67 = 105.01 5.75 + 0.5 × 38.25 = 110.00 1342031 763.52
4 4 105.01 + 0.5 × 1342031 = 671121 110 + 0.5 × 763.52 = 491.76
Sometimes coupled systems are not in the form as seen here. In order to perform Euler’s
method on them they must be first rearranged, often by introducing a new variable.
d2 x dx
= f (x, , t)
dt 2 dt
dx d2 x dy
In this case we set = y, noticing that = . We then have the following two
dt dt 2 dt
coupled equations to use Euler’s method on.
dx dy
=y = f (x, y, t )
dt dt
.
Finding two coupled equations from the following second order (containing a second
Example
111
INTEGRATION AND DIFFERENTIAL EQUATIONS Differential equations
Coupled equations can also be solved by hand, instead of using Euler’s method. Coupled
differential equations can be represented using a system matrix.
dx dy
= ax + b y = cx + dy
dt dt
0
x a b x
=
y0 c d y
To solve the coupled differential equations, the eigenvalues and eigenvectors of the
system matrix are input into the following solution formula. The eigenvectors are
represented by p1 and p2 . A and B are constants to be determined by initial conditions.
x
= x = Aeλ1 t p1 + Beλ2 t p2
y
Solve the following coupled differential equations with initial conditions y(0) = 1 and
x(0) = 2.
dx dy
= −6x + 3y = 4x + 5y
dt dt
0
1. Rewrite the equations in matrix format. x −6 3 x
=
y0 4 5 y
2. Find the eigenvectors and eigenvalues of 1
λ1 = 6 v1 =
the system matrix using your calculator. 4
−3
λ2 = −7 v2 =
1
3. Fill in the eigenvectors and eigenvalues 6t 1 −7t −3
x = Ae + Be
into the exact solution formula. 4 1
4. Use the initial conditions to find out the x(0) 6(0) 1 −7(0) −3
A and B . = Ae + Be
constants y(0) 4 1
x(0) 2 A −3B
= = +
y(0) 1 4A B
2 = A − 3B & 1 = 4A + B
5 7
A= & B =−
13 13
A and B
5. Fill in these values of to give the 5 1 7 −3
x = e6t − e−7t
final solution. 13 4 13 1
112
INTEGRATION AND DIFFERENTIAL EQUATIONS Differential equations 6
The system matrix can be used to draw a phase portrait, which shows the many solutions
to the equations. Phase portraits are similar to slope fields, however they are constructed
in a different way, using the two eigenvalues and eigenvectors of the system matrix.
y λ1 = b i
λ2 = −b i
y λ1 > λ2
λ1 > 0
λ2 > 0
y λ1 = a + b i
λ2 = a − b i
a>0
Eigenvalues: both complex with a
positive real part
113
INTEGRATION AND DIFFERENTIAL EQUATIONS Differential equations
y λ1 > λ2
λ1 < 0
λ2 < 0
y λ1 = a + b i
λ2 = a − b i
a<0
Eigenvalues: both complex with a
negative real part
y λ1 > λ2
λ1 > 0
λ2 < 0
114
INTEGRATION AND DIFFERENTIAL EQUATIONS Differential equations 6
Draw the phase portrait for the following coupled differential equations.
dx dy
= −6x + 3y = 4x + 5y
dt dt
1. Construct the system matrix and find the We found these in the previous
example.
eigenvalues and eigenvectors. 1
λ1 = 6 v1 =
4
−3
λ2 = −7 v2 =
1
2. On a set of axes draw each eigenvector. Extend lines past the ends of the vectors.
y
10
5 v1
v2
−15 −10 −5 5 10 15 x
−5
−10
−15 −10 −5 5 10 15 x
−5
−10
115
INTEGRATION AND DIFFERENTIAL EQUATIONS Differential equations
5. Draw on the solutions, beginning parallel Follow the directions of the arrows.
to the eigenvector line with smallest y
eigenvalue and ending up parallel to the 10
eigenvector line with largest eigenvalue.
5
−15 −10 −5 5 10 15 x
−5
−10
116
PROBABILITY 7
Table of contents & cheatsheet
E(X ) = x P (X = x)
P
Expected value
On calculator:
Binomial distribution X ∼ B(n, p) used in situations with • Binompdf(n,p,r) P (X = r )
only 2 possible outcomes and lots of trials • Binomcdf(n,p,r) P (x ≤ r )
Mean = n p Variance = n pq
On calculator :
Poisson distribution X ∼ Po(m) used to show how many • Poissonpdf(m,r) P (X = r )
times an event is likely to occur in a time. • Poissoncdf(m,r) P (X ≤ r )
Mean = m Variance = m
On calculator:
• normcdf(lower bound, upper bound, = µ, σ )
• invnorm(area, = µ, σ )
mean St. dv. x
where µ = mean, σ = standard deviation
117
PROBABILITY Single events
As apples cannot be bananas this is mutually exclusive, therefore P (A∪ B) = P (A) + P (B)
and P (A ∩ B) = 0. It is also an exhaustive event as there is no other options apart from
apples and bananas. If I bought some oranges the same diagram would then be not
DB 4.6 exhaustive (oranges will lie in the sample space).
118
. PROBABILITY Single events 7
Yellow apples
A B
A: apples
B: yellow fruit
This is not mutually exclusive as both apples and bananas are yellow fruits. Here we are
interested in the intersect P (A ∩ B) of apples and yellow fruit, as a yellow apple is in both
sets P (A ∩ B) = P (A) + P (B) − P (A ∪ B).
.
A B
A: apples
B: yellow fruit
This is a union of two sets: apple and yellow fruit. When an event is
exhaustive the
probability of the union
The union of events A and B is: is 1.
• when A happens;
• when B happens;
• when both A and B happen P (A ∪ B) = P (A) + P (B) − P (A ∩ B). DB 3.7
.
A B
A: apples
B: yellow fruit
119
PROBABILITY Multiple events
.
What is the probability of picking an apple given I pick a yellow fruit?
Example
Yellow apples
A B
A: apples
B: yellow fruit
This is “conditional” probability in a single event. Do not use the formula in the
0.2 1
formula booklet. Here we are effectively narrowing the sample space = = .
(0.2 + 0.4) 3
You can think of it like removing the non yellow apples from the fruit bowl before
choosing.
P (A ∩ B)
Conditional probability P (A|B) = .
P (B)
Independent events two events are independent if the fact that A occurs
does not affect the probability of B occurring.
For independent events P (A ∩ B) = P (A) × P (B)
120
PROBABILITY Multiple events 7
Probabilities for successive events can be expressed through tree diagrams. In general, if
you are dealing with a question that asks for the probability of:
• one event and another, you multiply
• one event or another, you add
.
Two disks are randomly drawn without replacement from a stack of 4 red and 5
Example
What is the probability to draw one red and one blue disk?
P (one red and one blue)
P (R) and P (B) or P (B) and P (R)
What is the probability of picking a blue disc given that at least one red disk is
picked?
5
P (a blue disk) 9 10
P (blue disk | at least one red disk) = = =
P (at least one red disk) 13 13
18
121
PROBABILITY Probability distributions
Once tabulated we can use the probability distribution to find the expected value. It is
best to think of this as the average value you would get if you repeated the action many
times.
Probability distributions
A fair coin is tossed twice, X is the number of heads obtained. Find the expected
number of heads obtained on two throws of the coin.
P (X = x) always equals 1
The sum of
X : E(X ).
X
3. Find the expected value of E(X ) = xP (X = x)
1 1 1
=0· +1· +2· =1
4 2 4
So if you toss a coin twice, you expect to
get heads once.
122
PROBABILITY Probability distributions 7
The domain of X must be specified, as the sum of the probabilities must equal 1.
Binomial distribution is used in situations with only 2 possible outcomes (e.g. success or
failure) and lots of trials.
Using GDC
In your exam you will be expected to find probabilities from binomial distributions
using your GDC. There are two different functions that you can use for this. For both
you will need to know the number of trials (n), the probability of success ( p) and the
expected number of successes (r ).
Use Binompdf (n, p, r ) for questions asking for the probability of an exact outcome,
P (X = r ).
Use Binomcdf (n, p, r ) for questions asking for the probability of a range of consecutive
values, P (X ≤ r ).
Note that by default Binomcdf only calculates P (X ≤ r ) or in words “at most the value of
r ”. Therefore you must remember to transform the function depending on the wording
in the questions : On some of the newer
123
PROBABILITY Probability distributions
A fair coin is flipped 10 times. Find the probability of flipping less than 4 heads.
P (X < 4) = P (X ≤ 3)
Press enter
124
PROBABILITY Probability distributions 7
Mean Standard x
(µ) deviation
(σ)
We can use normal distributions to find the probability of obtaining a certain value or a
range of values. This can be found using the area under the curve; the area under the
bell-curve between two x-values always corresponds to the probability for getting an
x-value in this range. The total area under the normal distribution is always 1. This is
because the total probability of getting any x-value adds up to 1 (or, in other words, you
are 100% certain that your x-value will lie somewhere on the x-axis below the bell-curve).
Using GDC
Use your GDC to answer questions dealing with normal distributions. You will either
need to find probabilities for given x-values or x-values for given probabilities. In both
cases, you will need to know the mean (µ) and standard deviation (σ) for the given
example. These will be given in the question.
Most calculators assume that ρ is to the left of x. When the area/probability you
are given is to the right of x, subtract it from 1 to get the ρ to use in invnorm.
125
PROBABILITY Probability distributions
The weights of pears are normally distributed with mean = 110 g and
standard deviation = 8 g.
Find the percentage of pears that weigh between 100 g and 130 g
Sketch
Indicate:
mean = 110 g
lower bound = 100 g
upper bound = 130 g
126
PROBABILITY Probability distributions 7
The weights of pears are normally distributed with mean = 110 g and
standard deviation = 8 g. 8% of the pears weigh more than m grams. Find m.
Sketch
8% = 0.08
So m = 121, which means that 8% of the pears weigh more than 121 g.
127
PROBABILITY Poisson distribution
The weights of pears are normally distributed with µ = 110 g and σ = 8 g. 250 pears
are weighed. Find the expected number of pears that weigh less than 105 g.
Sometimes you are required to change the mean value, dependent on the problem. So if a
mean number of “successes” is λ in period a min, then in period c × a min, there will be
c × λ mean number of “successes”.
The sum of two independent Poisson distributions also follows a Poisson distribution.
128
PROBABILITY Poisson distribution 7
Poisson distribution
The number of received calls by a hotel, can be modelled by Poisson distribution with a
mean of 3.5 calls per minute.
a) Find probability that the hotel received at least 3 calls in each of the two
consecutive minutes.
b) Find a probability that the hotel received exactly 15 calls in a random 5 minute
interval.
1. Determine expression for the required P (at least 3 calls in one minute)
probability for a single occurrence. P (C > 2) = 1 − P (C ≤ 2)
2. Calculate probability using poissoncdf 1 − poissoncdf(3.5, 2) = 0.67915
on GDC .
3. Raise the probability to the power of the Since we have two consecutive minutes,
number of occurrences. we square the probability:
2
0.67915 = 0.461
4. Adjust the mean to describe alternative In part b) we are asked about a 5 minute
parameters. interval:
3.5 × 5 = 17.5
5. Calculate using poissonpdf on GDC . poissonpdf(17.5, 15) = 0.0849
129
PROBABILITY Poisson distribution
130
STATISTICS 8
Table of contents & cheatsheet
Population the entire group from which statistical data is Frequency the number of times an event occurs in an
drawn (and which the statistics obtained represent). experiment
Sample the observations actually selected from the popu- Cumulative frequency the sum of the frequency for a
lation for a statistical test. particular class and the frequencies for all the classes
Random Sample a sample that is selected from the below it
population with no bias or criteria; the observations Histogram Cumulative frequency
are made at random.
Discrete finite or countable number of possible values
(e.g. money, number of people)
Continuous infinite amount of increments
(e.g. time, weight)
Note: continuous data can be presented as discrete data,
e.g. if you round time to the nearest minute or weight to Q1 Q2 Q3 Q4
Box and whisker plot
the nearest kilogram.
131
STATISTICS Basic statistical concepts
Population the entire group from which statistical data is drawn (and which
the statistics obtained represent).
Sampling bias when not all members of a population have an equal chance
of being picked; can result in a sample not being representative of the
population (e.g. convenience samples are likely to be biased)
132
STATISTICS Descriptive statistics 8
x 3 6 7 13
Example data set: 6, 3, 6, 13, 7, 7 in a table:
frequency 1 2 2 1
P
fx
P
the sum of the data x
Mean the average value, x̄ = = = P DB 4.3
no. of data points n f
Median the middle value when the data set is ordered low to high. Even
number of values: the median is the average of the two middle values.
1
Find for larger values as n + .
2
Adding a constant to all the values in a data set or multiplying the entire data set by a
constant influences the mean and standard deviation values in the following way:
133
STATISTICS Descriptive statistics
8.2.1 Quartiles
Outlier any point lower than Q1 − 1.5 ×IQR and larger than Q3 + 1.5 ×IQR
.
30, 75, 125, 55, 60, 75, 65, 65, 45, 120, 70, 110.
Find the range, the median, the lower quartile, the upper quartile and the
interquartile range.
First always rearrange data into ascending order: 30, 45, 55, 60, 65, 65, 70, 75, 75, 110, 120, 125
1. The range:
125 − 30 = 95 cm
2. The median: there are 12 values so the median is between the 6th and 7th value.
65 + 70
= 67.5 cm
2
3. The lower quartile: there are 12 values so the lower quartile is between the 3rd
and 4th value.
55 + 60
= 57.5 cm
2
4. The upper quartile: there are 12 values so the lower quartile is between the 9th
and 10th value.
75 + 110
= 92.5 cm
2
5. The IQR
92.5 − 57.5 = 35 cm
134
STATISTICS Descriptive statistics 8
Cumulative frequency the sum of the frequency for a particular class and
the frequencies for all the classes below it
Age 17 18 19 20 21
No. of students 21 45 93 61 20 A cumulative frequency table summarises the
Cumulative freq. 21 66 159 220 240 cumulative frequencies for a data set.
135
STATISTICS Descriptive statistics
For your exam you will need to know how to find the value of Q1 , Q2 and Q3 using a
cumulative frequency graph. First, determine the percentage of the quartile in question.
Second, divide the total cumulative frequency of the graph (i.e. the total sample size) by
100 and multiply by the corresponding percentage. Then, you will have found the
frequency (y-value) at which 25% for Q1 / 50% for Q2 / 75% for Q3 of the sample is
represented. To find the x-value, find the corresponding x-value for the previously
identified y-value.
.
12
10
Length (cm)
20 40 60 80 100 120
Number of fish
Frequency of fish 20–30 30–40 40–50 50–60 60–70 70–80 80–90 90–100 100–110 110–120
Length of fish 2 3 5 7 11 5 6 9 1 1
Cumulative f. 2 5 10 17 28 33 39 48 49 50
136
STATISTICS Descriptive statistics 8
Plot on cumulative frequency chart. Remember to use the midpoint of the date, e.g.,
.
Example
25 for 20–30.
55
50
Cumulative frequency
45
40
35
30
25
20
15
10
5
0 25 35 45 55 65 75 85 95 105 115
Frequency of fish
55
50
Cumulative frequency
45
40
35
30 Q1 25% of 50 = 12.5 → 48
25 Q2 50% of 50 = 25 → 62
20
15 Q3 75% of 50 = 37.5 → 83
10
5
Q1 Q2 Q3
0 25 35 45 55 65 75 85 95 105 115
Frequency of fish
20 48 62 83 120
137
STATISTICS Descriptive statistics
off
on 1: One-Variable Statistics
Press , go to Press menu , choose
Lists and Spreadsheets. 4: Statistics
Enter x -values in L1 and, 1: Stat Calculations
if applicable, frequencies
in L2
138
STATISTICS Bivariate statistics 8
Bivariate statistics are about relationships between two different variables. You can plot
your individual pairs of measurements as (x, y) coordinates on a scatter diagram.
Analysing bivariate data allows you to assess the relationship between the two measured
variables; we describe this relationship as correlation.
Scatter diagrams
x x x
Through statistical methods, we can predict a mathematical model that would best
describe the relationship between the two measured variables; this is called regression.
For your exam you will only have to focus on linear relationships, so only straight line
graphs and equations. These so-called regression equations can be found using the GDC.
139
STATISTICS Bivariate statistics
Besides simply estimating the correlation between two variables from a scatter diagram,
you can calculate values that will describe it in standardised ways. One of these is
Pearson’s correlation coefficient (r ).
Pearson’s correlation coefficient used to assess the strength of a linear relationship between
two variables (−1 ≤ r ≤ 1)
r = 0 means no correlation.
r = ±1 means a perfect positive/negative correlation.
Interpretation of r -values:
r −value 0 < |r | ≤ 0.25 0.25 < |r | ≤ 0.50 0.50 < |r | ≤ 0.75 0.75 < |r | < 1
correlation very weak weak moderate strong
Remember that
correlation 6=
Calculate r while finding the regression equation on your GDC. Make sure that STAT
causation.
DIAGNOSTICS is turned ON (can be found in the MODE settings), otherwise the r -value will
not appear.
When asked to “comment on” an r -value make sure to include both, whether the
correlation is:
1. positive / negative
and
2. strong / moderate / weak / very weak
140
STATISTICS Bivariate statistics 8
mean point
The line of best fit
2. Use the mean point to draw a best fit line. 0 + 1 + 2 + ... + 8 should pass through
x̄ = = 3.56 the mean point.
9
23.5 + 25 + . . . + 37.5
ȳ = = 30
9
3. Find the equation of the regression line y = 1.83x + 22.7
using GDC.
off
on Enter
Press , got to Press menu
X list: A [];
“Lists and 4: Statistics
Y list: B[];
Spreadsheets” 1: Stat Calculations
1st Result Column: C[]
3: Linear Regression (mx+b)
Enter x -values in one
column (e.g A) and Press OK
IB ACADEMY
141
STATISTICS Bivariate statistics
Maths 81 75 30 18 55 70 93 89 89 75
Physics 53 70 24 23 32 38 88 96 71 42
1. Fill out a table of ranks for all the data. Maths 4 5.5 9 10 8 7 1 2.5 2.5 5.5
The ranks of tied values are the means of Physics 5 4 10 8 9 7 2 1 3 6
the ranks they would have had if they
were different.
On TI-84, Spearman’s
Rank Coefficient can IB ACADEMY IB ACADEMY IB ACADEMY
+page
Press OK
Press doc menu
Press
4: Insert 4: Stats
rs = 0.920749
6: Lists and Spreadsheets 1: So there is a strong
Stat Calculations
Enter table of ranks into positive relationship
2: Two-variable
two columns (e.g A and B) between students’ Maths
Statistics
and Physics grades.
Enter X and Y Lists
142
STATISTICS Chi-squared test 8
8.4.1 Independence
1. State the null and alternative hypotheses. H0 : gender and employment grade are
independent
H1 : gender and employment grade are
not independent
143
STATISTICS Chi-squared test
Enter data into GDC Enter dimensions of matrix Enter the data as a matrix
sto→
to fit your data. Be sure
menu press ctrl and var
Press you do not include the
7: Matrices & Vectors Give matrix a name by
totals, so in this case you
1: Create typing it after the arrow
have a 2 × 3 matrix
1: Matrix OK
(e.g. a)
Press ≈
press enter
6: Statistics
Matrix (in this case a) χ 2 = 180.03, and
7: Statistical Tests
Press OK p -value = 8.08 × 10−40
2
8: χ 2-way Test
144
STATISTICS Chi-squared test 8
County 1526
Lars 758
Swix 1780
Silkyway 847
Trickers 1089
Total 6000
1. State the null and alternative hypotheses. H0 : chocolate bar sales are uniformly
distributed
H1 : at least one of the chocolate bar
sales does not fit a uniform distribution
145
STATISTICS Chi-squared test
So Chi-square value
χ 2 = 645.808, and
p -value =
−16
4.440 89 × 10
146
STATISTICS T-test 8
8.5 T-test
The t -test is another type of statistical test that can be used to compare two groups. To
apply a t -test, the variables you are testing should be normally distributed. Generally
speaking, you can assume that this will be the case in exam questions that ask you to
conduct a t -test.
Although there are
several different t -tests
(and different names
for them!), we address
t -test tells you whether there is a significant difference between two groups only the type that you
by comparing their means will need for your
exam. This is also
referred to as an
One-tailed test statistical significance is assessed only in one direction from a Independent Samples
reference value (i.e. whether one mean is larger than the other or vice t -test, Student t -test or
versa) unpaired t -test.
Depending on what a question or task is asking of you, you will have to determine
whether to use a one- or two-tailed test.
A popcorn producer wants to compare the effect of two different fertilisers on the
number of usable corn kernels yielded. They measure the average number of usable
kernels per corncob in a random sample taken from two batches, each treated with a
different fertiliser.
Fertiliser A Fertiliser B
Use a t -test to determine whether the two fertilisers have a significantly different effect
on corn kernel yield.
1. State the null and alternative hypotheses. H0 : the means of kernels treated by
fertiliser A and fertiliser B are equal
(µ1 = µ2 )
H1 : the means of kernels treated by
fertiliser A and fertiliser B are not equal
(µ1 6= µ2 )
147
STATISTICS T-test
So t = 4.838, and
p -value < 0.00001
3. Comment on your result. p < 0.05
→ so we reject the null hypothesis; the
mean numbers of kernels yielded from
batches treated by the fertilisers A and B
are not equal.
In your exam you will Note that this two-tailed test does not tell
always be expected to
us which fertiliser has a higher yield, just
use the p -value to
that there is a difference.
compare the means of
populations and draw
conclusions from a
t -test
148
STATISTICS Non-linear regression 8
Data which does not follow a linear relationship can be fitted with a non-linear
regression curve. This is done using the method of least squares. The distance of each
data point to a regression curve is analysed in order to find the best curve. Non-linear
regression lines can be quadratic, cubic, exponential, power, or sine functions. Your
calculator can do all of this for you.
Once a regression has been calculated, the sum of square residuals (S Sres ) can tell us how
appropriate the curve is for our data. The larger the sum of square residuals, the less
accurate the curve. This can also be done on your calculator.
Another indicator of how accurate the regression curve is, is the coefficient of
determination (R2 or r 2 ). This tells us how well the curve based on modelled data can
replicate new observed data points. The higher the value of R2 , the better the curve is.
For linear regression, r 2 is equal to the square of Pearson’s correlation coefficient. Again,
your calculator can find this.
149
STATISTICS Non-linear regression
Find a quadratic and a cubic regression curve for the data shown. Determine which is a
better fit.
year $ spent
1983 61.8
1984 68.9
1985 74.6
1986 78.7
1987 81.5
1988 86.1
1989 91.3
Enter the data into your Make a scatter plot of it in a Plot the required regression
calculator in a table. new window. curves.
Press menu
4: Analyse
6: Regression
4: Quadratic. . .
6: Statistic
1: Stat Calculations
6: Quadratic Regression. . .
Look at the R2 values you obtained. The curve with the higher R2 value is the one you
should pick. The cubic curve is a better regression curve for this data.
150
STATISTICS Linear transformations of random variables 8
E(aX + b ) = a E(X ) + b
Var(aX + b ) = a 2 Var(X )
Independent random variables can also be added together to produce a new variable. The
following equations are used to find the new expected value and variance. DB 4.14
When taking data often only a smaller sample of a larger population is examined. From
this smaller sample the mean and variance of the entire population can be estimated. The
unbiased estimate of the mean is referred to as x and the unbiased estimate of the
2 . The actual mean of the entire population is µ and the
variance is referred to as sn−1
actual variance of the entire population is σ 2 .
The unbiased estimate of the mean is simply the mean of the sample.
n
X xi
x=
i =1
n
151
STATISTICS Combining normal variables
Unbiased estimators
IB ACADEMY IB ACADEMY
Open a new calculator page
and go to one-variable
statistics.
Press menu
6: Statistics
1: Stat Calculations
1: One-Variable Statistics
Select your data set and
Enter the data into a table Read off the values from the
press OK
on your calculator. table.
x = 10.8 is both the sample mean and the unbiased estimate for the population mean.
s x = sn−1 x = 1.549 is the unbiased estimate for the population standard deviation, and σ x
is the sample standard deviation.
Normal random variables can be added together to form a new variable. The new
variable will also be normally distributed.
A sample is taken from this population and the mean of it is calculated. This is repeated,
such that the sample means form a distribution themselves, X , as follows where n is the
number of samples. The sample means form a normal distribution because the
population follows a normal distribution.
σ2
X ∼ N µ,
n
152
STATISTICS Confidence intervals of means 8
The sample means of a normal distribution will form a normal distribution, regardless of
the number of samples.
The central limit theorem means that the population distribution does not need to be
known in order to perform tests on its mean – if enough samples are taken then we can
use the normal distribution.
The mean of a population can be estimated using a sample, as seen in the unbiased
estimators section. It is just the mean of the sample itself. However, this mean may not
be entirely accurate and it can be useful to obtain a margin of error around it. Instead of
claiming the mean to be 5, we can say the mean is 5 ± 0.2 with 95% confidence for
example. This means that 95% of intervals made around sample means will include the
population mean.
Confidence intervals can be calculated using two different distributions – the normal
distribution and the t -distribution. The t -distribution is used when the population
standard deviation, σ, is unknown – the sample standard deviation, sn is used instead.
The normal distribution (z-distribution) is used when the population standard deviation
is known.
153
STATISTICS Confidence intervals of means
IB ACADEMY IB ACADEMY
3. Write a sentence to explain the With 95% confidence, the average length
confidence interval. of goldfish in the goldfish population is
8.9 cm ± 0.37 cm (based on the sample
data).
154
STATISTICS Critical values and regions 8
The null hypothesis is rejected if the test statistic falls within the critical region.
The size of the critical region is equal to the significance level. The values at the
boundary of the critical region are known as the critical values.
The normal test, or z-test, and t -test, are used to assess whether a sample mean is close
enough to the supposed population mean. The z-test is used when the population
standard deviation, σ, is known. The t -test is used when only the sample standard
deviation, sn , is known.
155
STATISTICS More tests
IB ACADEMY
Press menu
6: Stats
7: Stat Tests
1: z Test
p -value = 0.000204
4. Accept the null hypothesis if the p -value 0.000204 < 0.05
is larger than the significance level. We reject the null hypothesis since our
p -value is smaller than our significance
level. The machine is not filling the bags
correctly.
σ2
5. Write down the distribution which the
sample mean follows. X ∼ N µ,
n
102
X ∼ N 500,
50
6. Determine where the critical region is. Let a be the critical value. The critical
region is where the null
hypothesis is
rejected, so P X > a = 0.05.
156
STATISTICS More tests 8
The binomial test is used to assess whether observed test results differ from the expected
results. For example, you expect 50% of people to like the colour blue and 10 people are
asked if they like the colour blue. This is the observation, and only 2 out of 10 say that
they like the colour blue. The binomial test assesses whether it is likely or not that 50%
of the entire population like blue.
Binomial test
Is a normal die fair when 1 six is thrown in 30 throws? Test this at a 5% significance
level. Rolling a six, X , follows a binomial distribution.
X ∼ Bi 30, p
1. Set up the null and alternative If the die is fair, then the probability of
hypotheses. 1
rolling a six is . If the die is not fair then
6
1
the probability is lower than , since less
6
sixes have been thrown than the
expected number.
1 1
H0 : p= H1 : p<
6 6
2. Calculate the probability of the scenario We want to find the probability of rolling
in the question occurring under the 1 or lesssixes.
1
assumption that H0 is true, using your X ∼ Bi 30, P (X ≤ 1) = 0.029489
calculator. 6
3. Accept the null hypothesis if this The probability of rolling 1 or less sixes is
probability is larger than the significance 2.95% so we reject the null hypothesis
level. under the 5% significance level. The die
is not fair.
157
STATISTICS More tests
A new model of machine in a factory is said to break down less than the previous model,
which broke down 3 times per year on average. A sample of 4 new machines are found to
break down in total 7 times across a year. The Poisson test assesses whether the new
machines break down less often than the previous model.
Poisson test
An existing model of car is known to break down 4 times per year on average. A new
model of car claims to break down less often.
20 randomly selected cars of the new model are found to break down a total of
56 times in a year. Test the claim at a 10% significance level.
The number of breakdowns per year for a car, X , follows a binomial distribution.
X ∼ Po(λ)
2. Find the expected mean for the sample The sample is of 20 cars, so the expected
size. number of breakdowns will be
4 × 20 = 80.
3. Calculate the probability of the scenario X ∼ Po(80) P (X ≤ 56) = 0.002933
in the question occuring, assuming H0 to
be true.
The correlation coefficient, r , can be calculated for sets of bivariate data, which are
samples from a larger population. The correlation coefficient for the entire population is
written as ρ. The test for product moment correlation coefficients, or linear regression t
test, tests the null hypothesis ρ = 0 against other alternative hypotheses ρ > 0, ρ < 0, or
ρ 6= 0.
158
STATISTICS More tests 8
Employees at a workplace were randomly selected to provide the following data about
the distance they live from their work and the number of times they arrived late in the
past 4 weeks.
Distance (km) Number of times late
5.3 3
1.4 4
2.4 2
8.9 5
2.6 3
1.3 1
0.7 3
5.8 6
8.7 8
10.2 6
Test at a 5% significance level whether there is a linear relationship between the two
variables.
6: Statistics
7: Stat Tests
Linear Reg t Test (A)
3. Reject the null hypothesis if the p -value The p -value is 0.006857, which is smaller
is smaller than the significance level. than the significance level, so we reject
the null hypothesis. There is a linear
relationship between the two variables.
159
STATISTICS Errors
8.12 Errors
When performing these statistical tests, errors are bound to happen. There are two types
of errors.
The probability of making a type I error is equal to the significance level that the test is
performed at.
Calculating the probability of making a type II error changes with different distributions.
You are performing a Poisson test. Your null hypothesis is λ = 5, your alternative
hypothesis is λ < 5.
If you observe a value of 6 or greater, you will reject your null hypothesis.
The actual λ is found to be equal to 4. What is the probability of making a type II
error?
P accepting H0 |H1 is true
We know λ = 4, and under this condition we need to see how likely it is that we
accept the null hypothesis.
We accept the null hypothesis if we observe a value of 6 or greater.
P (X ≥ 6|λ = 4)
X ∼ Po(4)
P (X ≥ 6) = 1 − P (X ≤ 5) = 0.21487
The probability of a type II error is 21.5%.
160
STATISTICS Errors 8
161