0% found this document useful (0 votes)
260 views161 pages

Ib Mathai HL+

Uploaded by

jobyvallikunnel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
260 views161 pages

Ib Mathai HL+

Uploaded by

jobyvallikunnel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 161

STUDY GUIDE

M AT H A I HL
www.ib.academy
Mathematics Applications and Interpretations HL
Study Guide
Available on www.ib.academy

Author: Nikita Smolnikov, Summer Gadd


Contributing Authors: Alex Barancova

Design Typesetting

TEX Academy

Special thanks: Laurence Gibbons, Robert van den Heuvel

This work may be shared digitally and in printed form,


but it may not be changed and then redistributed in any form.

Copyright © 2021, IB Academy


Version: MathAIHL.2.0.210406

This work is published under the


Creative Commons BY-NC-ND 4.0 International License.
To view a copy of this license, visit
creativecommons.org/licenses/by-nc-nd/4.0

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.

Daltonlaan 400 www.ib.academy


3584 BK Utrecht contact@ib.academy
The Netherlands +31 (0) 30 4300 430
Welcome to the IB.Academy guide for
Mathematics Applications and Interpretations HL.

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.1. Sequences 6 1.5. Exponents and logarithms 12


Arithmetic: +/− common difference
Exponents
un = n th term = u1 + (n − 1)d
x1 = x x0 = 1
n
Sn = sum of n terms = 2u1 + (n − 1)d

2 xm
x m · x n = x m+n = x m−n
xn
with u1 = a = 1st term, d = common difference. n n
(x m ) = x m·n (x · y) = x n · y n
Geometric: ×/÷ common ratio 1 1
x −1 = x −n =
x xn
un = n th term = u1 · r n−1 1 p p p
x2 = x x· x=x
u1 (1 − r n ) p p p p
Sn = sum of n terms = xy = x · y
1
xn = n x
(1 − r )
u1 m p
n m 1
S∞ = sum to infinity = , when −1 < r < 1 x n = xm x− n = p n
1− r xm
with u1 = a = 1st term, r = common ratio. Logarithms

Sigma notation loga a x = x a loga b = b


A shorthand to show the sum of a number of terms in a
sequence.
Let a x = b , isolate x from the exponent: loga a x = x = loga b
Last value of n Let loga x = b , isolate x from the logarithm: a loga x = x = a b
10
X
3n − 1 Formula
n=1
Laws of logarithms
First value of n
I: logc a + logc b = logc (a · b )
e.g.
a
 ‹
10
II: logc a − logc b = logc
X b
3n − 1 = (3 · 1) − 1 + (3 · 2) − 1 + · · · + (3 · 10) − 1 = 155
III: n logc a = logc (a n )
n=1
| {z } | {z } | {z }
n=1 n=2 n=10

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

Rules of matrix multiplication.

(A × B) × C = A × (B × C)
A × (B + C) = A × B + A × C
A × B 6= B × A

5
ALGEBRA Sequences and series

1.1 Sequences and series

1.1.1 Arithmetic sequences

Arithmetic sequence the next term is the previous number + the common
difference (d ).

To find the common difference d , subtract two consecutive terms of an


arithmetic sequence from the term that follows it, i.e. d = u(n+1) − un .

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.

1. Put numbers into n th term formula. 37 = u1 + 9d


1 = u1 + 21d
2. Equate formulas to find d 21d − 1 = 9d − 37
(using substitution method to solve 12d = −36
simultaneous equations).
d = −3
3. Use d to find u1 . 1 − 21 · (−3) = u1
u1 = 64

6
ALGEBRA Finance 1

1.1.2 Geometric sequence

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

un = n th term Sn = sum of n terms S∞ = sum to infinity


u (1 − r n ) u
= u1 · r n−1 = 1 = 1
(1 − r ) 1− r

again with

u1 = a = 1st term r = common ratio

Similar to questions on Arithmetic sequences, you are often required to find the 1st term
and/or common ratio first.

1.2 Finance

1.2.1 Simple interest

Simple interest is given by the following formula.

I =P ×r ×n

where I = amount of interest, P = principal amount, r = interest rate per


annum (as decimal), n = no. years

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

earned after 6 years?

I = 1500 × 0.0525 × 6
= $472.50

7
ALGEBRA Finance

1.2.2 Compound interest

Compound interest refers to interest being added to an investment or principle sum


every compounding period (instead of e.g. being paid out each time). This means that
every time you calculate interest, you do so on a principle sum + previous interest. This
works like a geometric sequence.
where FV = future value,
‹kn PV = present value,
r

DB 1.4 FV = PV × 1 + n = no. years,
100k k = no. compounding periods per year,
r = % interest rate.

Besides using the equation Abbreviation Stands for


in your data booklet, you TVM Time Value of Money
can also use the N Number of payments
TVM Solver I% percentage Interest rate
PV Present Value - should be negative
(“Time Value of Money”)
PMT PayMenT
on your GDC to solve FV Future Value
compound interest P/Y Payments per Year
questions. C/Y Compounding periods per Year

Solving questions about compound interest

$1500 is invested at 5.25% per annum. The interest is compounded twice per year. How
much will it be worth after 6 years?

IB ACADEMY IB ACADEMY IB ACADEMY

Enter all known values Highlight cell of asked


Press menu , choose
For this example: value, in this case FV,
8: Finance ≈
N=12 (payments) enter
1: Finance Solver press
I=5.25 (interest rate)
PV=-1500 (present value)
negative because
investment represents cash
outflow;
PMT=0 FV=0 (future value)
P/Y=1 (payment/yr)
C/Y=2 (compound/yr)

So FV = $2793.62

8
ALGEBRA Finance 1

1.2.3 Annuities and amortization

Annuity a series of equal cash flows over equal periods in time

Amortization the process of spreading out a payment into a series of equal


instalments over time

Finding the payment amount of an annuity

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?

IB ACADEMY IB ACADEMY IB ACADEMY

Enter all known values Highlight cell of asked


Press menu , choose
For this example: value, in this case PMT,
8: Finance ≈
N=15 (payments) enter
1: Finance Solver press
I=8 (interest rate)
PV=0 (present value)
PMT=0
FV=300000 (future value)
P/Y=1 (payment/yr)
C/Y=1 (compound/yr)

PMT = −$11, 048.86, so he


would need to invest this
amount each year

9
ALGEBRA Estimations

1.3 Estimations

Error by how much an estimate differs from the actual value

This can be found by calculating the approximate value − exact value

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

What is the percentage error?


100 − 119.423

Percentage error = × 100
119.423
= |−0.1626| × 100
= 0.1626 × 100 ≈ 16.3%

1.4 Using technology to solve linear


equations and polynomial equations

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.

Solving systems of linear equations

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.

Number of equations = 2. Enter the two equations


Press menu , choose ≈
Press OK
3: Algebra press enter
2: Solve System of
Linear Equations

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

Multiply an equation and then Rearrange and then substitute one


subtract it from the other in order in to another.
to eliminate one of the unknowns. Substitute (1) into (2)
3 × (2) ⇒ (3) 6y = 3x − 3 2(3x + 1) = x − 1
(3) − (1) ⇒ 6y − y = 3x − 3x − 3 − 1 6x + 2 = x − 1
5y = −4 5x = −3
4 3
y =− x =−
5 5
Put y in (1) or (2) and solve for x Put x in (1) or (2) and ‹ for x
 solve
4 3
− = 3x + 1 y =3 − +1
5 5
9 4
3x = − y =−
5 5
9 3
x =− =−
15 5

11
ALGEBRA Exponents and logarithms

1.5 Exponents and logarithms

1.5.1 Laws of exponents

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

(x · y)n = x n · y n (2 · 4)3 = 23 · 43 and (3x)4 = 34 x 4


 ‹−1
1 1 3 4
x −1 = 5−1 = and =
x 5 4 3
1 1 1
x −n = 3−5 = =
xn 35 243

1.5.2 Fractional exponents

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

1.5.3 Laws of logarithms

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

log10 x = log x loge x = ln x 2.71828 . . . , so the


same laws apply to ln
as to other logarithms.
Below are the rules that you will need to use when performing calculations with
logarithms and when simplifying them. The sets of equations on the left and right are
the same; on the right we show the notation that the formula booklet uses while the
equations on the left are easier to understand.

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.

loga 0 = x is always undefined (because a x 6= 0)


x = loga a = 1, which also means that ln e = 1
eln a = a

Solve for x in the exponent using 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

1.6 Complex numbers

A complex number is defined as z = a + b i. Where a, b ∈ R, a is the real


part (ℜ) and b is the imaginary part (ℑ).
p
i = −1
i2 = −1

z = a + b i is the Cartesian form. z = r (cos ϑ + i sin ϑ) is the polar


form where r is the modulus and ϑ is the argument also sometimes
stated as z = r cis ϑ.

Modulus r the absolute distance from the origin to the point.

Argument ϑ the angle between the x-axis and the line connecting the origin
and the point.

ℑ Instead of working in (x, y) coordinates,


3 polar coordinates use the distance from the
origin to the point (r , modulus) and the
angle between the x-axis and the modulus
2
(argument). p p
p 2 = 1 + 2i ⇒ r = 12 + 22 = 5
1 5
and ϑ
p = arctan (2) = 63.43°
63.43° and
p 5 × sin (63.43) = 2,
5 × cos (63.43) = 1
1 2 3 ℜ

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

The conjugate of a complex number z or z ∗ , is defined as


z = a + bi ⇒ z = a − bi

14
ALGEBRA Complex numbers 1

1.6.1 Complex numbers in the Cartesian form

Adding and subtracting complex numbers in Cartesian form is fairly straight forward.
Add real and imaginary parts to each other:

(2 + 3i) + (4 + 9i) = 2 + 4 + 3i + 9i = 6 + 12i

Multiplying complex numbers is like multiplying two parentheses:

(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.

Rewriting of a fraction with complex numbers

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.

2. Expand the brackets and simplify, 2 + 6i + 4i + 12i2 −10 + 10i


2 =
remember that i = −1. 1 − 2i + 2i − 4i2 5
3. Write in a + b i form. −2 + 2i

15
ALGEBRA Complex numbers

1.6.2 Complex numbers in the polar form

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

Add cosine functions together

Add the following cosine functions together:


f1 = 10 cos (40t )
f2 = 20 cos (40t + 10)

€ Š
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

3. Simplify the complex number with no Your calculator should express it as a


variables (such as t ) using your single complex number. You may have to
calculator. change the document settings to express
it in polar form.
IB ACADEMY

 Š
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

Euler’s and De Moivre’s theorem

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.

Euler’s Theorem eix = cos x + i sin x

n
z n = r (cos x + i sin x) = r n cos(n x) + i sin(n x)

De Moivre’s theorem

De Moivre’s theorem can be derived from Euler’s through the


exponential law for integer powers. (eix )n = eixn = z n

1.7 Matrices

1.7.1 Introduction

A matrix is a rectangular array of elements, usually numbers. They consist of


rows (horizontal) and columns (vertical) of elements. An m by n, or m × n,
matrix is one which has m rows and n columns. Matrices can describe
transformations, and all vectors are a type of matrix.

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

1.7.2 Matrix multiplication

Matrices can be multiplied by matrices to give another matrix. When multiplying


matrices together the number of columns of the first matrix must be equal to the number
of rows of the second matrix. For example we can multiply a 3 × 4 matrix by a 4 × 5
matrix, but not by a 6 × 3 matrix. When multiplying an m × n matrix by an n × o
matrix the resulting matrix will have the dimensions m × o.

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.
.

Calculate the dot product between these two vectors.


Example

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

Multiply the following matrices together.


  
3 2 3 4 −1
4 6 4 0 3

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.

2. Find the dimensions We have a 2 × 2 matrix multiplying a 2 × 3 matrix, this gives


of the resultant a 2 × 3 matrix.
    
matrix. 3 2 3 4 −1 ? ? ?
=
4 6 4 0 3 ? ? ?

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.

2. Solve using GDC. Input the matrices into your calculator.

IB ACADEMY IB ACADEMY

Enter dimensions of matrix


Press menu , choose
Press OK
7: Matrix & vector
1: Create Enter all matrix values
1: Matrix

3. Solve using GDC. Multiply matrices together.

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.

Multiplying matrices is different to multiplying numbers, the matrices cannot switch


places and give the same resultant matrix.

(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 matrix represents.


 
a b
A= DB 1.14
c d
det A = |A| = ad − b c

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

Find the inverse of matrix A.

 
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

IB ACADEMY IB ACADEMY IB ACADEMY

Enter dimensions of matrix Raise the matrix to the


Press menu , choose
Press OK power of −1
7: Matrix & vector ≈

1: Create Enter all matrix values Press enter


1: Matrix

 
1 7 −1
 8 8 4 
 
 
−1
 −1 −23 5 
A = 16

 16 8 

 −3 −13 3 
 
8 8 4

24
ALGEBRA Matrices 1

1.7.4 Solving equations

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.

An example is given below.


 
  x1  
2 6 7   3
 x2  =
5 −3 −8 5
x3

Multiplying this out gives a more familiar looking equation.

2x1 + 6x2 + 7x3


   
3
=
5x1 − 3x2 − 8x3 5
2x1 + 6x2 + 7x3 = 3
5x1 − 3x2 − 8x3 = 5

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

Solving an equation using matrices

Solve the following equation.


    
4 −8 x1 5
=
2 3 x2 7

‚ Œ
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

1.7.5 Eigenvectors and eigenvalues

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

Eigenvectors and eigenvalues of a matrix

Find the eigenvalues and eigenvectors of the following matrix.




0 1
A=
−2 −3

1. Find I. In this case I will be a 2 × 2 matrix, the


same size as our matrix A.

1 0
I=
0 1

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

4. Solve the quadratic equation to find λ, This is known as the characteristic


the eigenvalues, using the quadratic polynomial – the polynomial whose roots
equation. are the eigenvalues of a matrix.
p
−3 ± 9 − 8 −3 ± 1
λ= =
2 2
λ1 = −1
λ2 = −2

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

1.7.6 Diagonalisation of 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.

DB 1.15 Mn = PDn P−1

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

Raise a matrix to a power

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)

2.1. Types of functions 34 2.6. Rearranging functions 44


m is the gradient, −1
(x) reflection of f (x) in y = x.
Linear functions y = mx + c Inverse function, f
c is the y intercept.
x + x2 y1 + y2
 ‹
Midpoint: 1 ,
2 2 y=x
Distance: (x2 − x1 ) + (y2 − y1 )2
p
2
(x2 , y2 )
(x1 , y1 ) f (x)
y − y1
Gradient: m = 2
x2 − x1
f −1 (x)
Parallel lines: m1 = m2 (same gradients)
Perpendicular lines: m1 m2 = −1

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

Composite function, (f ◦ g )(x) is the combined function


vertex f of g of x.
x x
When f (x) and g (x) are given, replace x in f (x) by g (x).
axis of symetry

If a = 1 use the factorization method (x + p) · (x + q) Transforming functions


If a 6= 1 use the quadratic formula
When asked explicitly complete the square Change to f (x) Effect

Vertex form: y = a(x − h)2 + k f (x) + a Move graph a units upwards


Vertex: (h, k)
f (x + a) Move graph a units to the left
Exponential Logarithmic
f (x) = a x + c g (x) = loga (x + b ) a · f (x) Vertical stretch by factor a
1
f (x) g (x) f (a · x) Horizontal stretch by factor
a
− f (x) Reflection in x-axis
c
−b
f (−x) Reflection in y-axis

33
FUNCTIONS Basic concepts

2.1 Basic concepts

2.1.1 Domain and range

A mathematical model transforms an input value into an output value. To describe a


mathematical model (or function) you therefore need to know the possible x and
y-values that it can have; these are called the domain and the range respectively.

Function a mathematical relationship where each input has a single output.


It is often written as y = f (x) where x is the input.

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

Find the domain and range for the function y =


x

Domain: x 6= 0
(all real numbers except 0)
Range: y 6= 0
(all real numbers except 0)

Find the domain and range for the function y = x 2

Domain: x ∈R
(all real numbers)
Range: y ∈ R+
(all positive real numbers)

34
FUNCTIONS Basic concepts 2

2.1.2 Sketching graphs

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.

Finding a point of intersection

 x
1
f (x) = − 2 and g (x) = −x 2 + 4. Find the coordinates where f (x) = g (x).
2

IB ACADEMY IB ACADEMY IB ACADEMY

Plot both functions Approach the intersection


Press menu
you are trying to find with
6: Analyse Graph
the cursor and click once
4: Intersection
you near it. Repeat for any
other intersections.

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

2.2 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).

Straight line equation is usually written in the following form:

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

Finding the equation of a line and its x -intercept


y
7
6
Find the equation of the straight line
N = (−3, 3.5) 5 M = (2, 6)
that passes through points M (2, 6) and 4
3
N (−3, 3.5). Then find the x -intercept. 2
1
x
-7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8

1. Take two points on the graph and y2 − y1


m=
substitute the values into the formula. x2 − x1
6 − 3.5
= = 0.5
2 − (−3)
2. Fill in one point to find c . 6 = 0.5(2) + c
6=1+c
c =5
3. Write down the equation y = mx + c y = 0.5x + 5
replacing m and c .
4. To find the x -intercept, solve by 0 = 0.5x + 5
isolating x. −5 = 0.5x
x = −10
x-intercept: (-10,0)

2.2.1 Intersection of lines

Finding a linear equation with a given gradient and intersection


point

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

2.2.2 Parallel and perpendicular lines

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.

Parallel lines have the same slope m1 = m2

−1
Perpendicular lines meet at a 90° angle m2 =
m1

Finding a linear equation of a perpendicular line

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

1. Find slope. L2 is perpendicular to L1 so


1
m=−
gradient
1
⇒m=−
5
2. Fill in one point to find c . 1
0 = − (1) + c
5
1
c=
5
1 1
⇒y =− x+
5 5

38
FUNCTIONS Quadratic models 2

2.3 Quadratic models

A quadratic function consist of an equation with a term raised to the power of 2.

y = a x2 + b x + c = 0

When plotted on a graph, a quadratic function makes an upward or downward facing


parabolic shape. A parabola always has a vertex (the maximum or minimum point) and
an axis of symmetry. If you know the x and y
coordinate of the
a>0 a<0 vertex, the equation for
y y the axis of symmetry
will always be x = [the
x -coordinate of the
vertex]. This also works
the other way around;
vertex the equation of the axis
x x of symmetry gives you
the x -coordinate of the
vertex.
axis of symmetry

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

Finding the vertex of a quadratic function

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

2. Use f (x) to find y -coordinate of the y = 12 − 2(1) − 15


vertex. ⇒ y = −16
vertex: (1, −16)

39
FUNCTIONS Quadratic models

2.3.1 Solving quadratic functions

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.

∆>0 ∆=0 ∆<0


y y y

x x x

40
FUNCTIONS Quadratic models 2

Solving for complex roots on GDC

Find the roots of the quadratic equation 4x 2 − 5x + 9.


1. Check whether the roots are complex or ∆ = b 2 − 4ac = (−5)2 − 4 × 4 × 9 = −119
real.
∆<0
2. To find the complex roots of a polynomial,
open a calculator page. IB ACADEMY

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

Using factorisation to find the roots of a quadratic function

Factorise f (x) = x 2 − 2x − 15. Hence find the roots of f (x) = 0.


1. Rearrange f (x) = 0 into the form Look for the pair of numbers that satisfy:
f (x) = (x + p)(x + q). p + q = −2 p = −5

pq = 15 q =3
so f (x) = (x − 5)(x + 3)
2. Solve x + p = 0 and x + q = 0 to find the x −5=0 roots: x =5
p and q ). ⇒
roots (i.e. change the signs on x +3=0 x = −3

41
FUNCTIONS Polynomials

2.4 Polynomials

A polynomial function is made up of one or more summed terms, each of which is


generally a variable (e.g. x) raised to a power and multiplied by a coefficient.

f (x) = a x n
.
Example

1
y = x3 y = 2x 2 − x 5
2
y y

x x

Use GDC to see what a


given polynomial looks
like.

You can use the Polyrootfinder on your GDC to find roots of any polynomials.

Solving polynomial equations on GDC

Solve 3x 2 − 4x − 2 = 0

Note that quadratic


functions are a special IB ACADEMY IB ACADEMY IB ACADEMY

type of polynomial.

Degree = 2, Roots = Real, Enter values a2, a1 and a0.


Press menu , choose
press OK Press OK
3: Algebra
3: Polynomial Tools
1: Find Roots of Polynomial

IB ACADEMY

so x = 1.72 or x = −0.387

42
FUNCTIONS Exponential models 2

2.5 Exponential models

Further, you need to be familiar with exponential functions. An exponential function is


one where the variable (e.g. x) is in the power itself.
In questions dealing with exponential functions, you will need to know how to describe
their asymptotes and y-intercepts. You can use the components of a function’s equation
to find these.
y
y =ka r x + c

with
horizontal asymptote at y = c (0, k + c)

y=c
m = y-intercept at (0, k + c)
x

Asymptote a line that a graph approaches but never quite touches.


Use GDC to sketch
more complicated
functions.
.
Example

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

Solving exponential functions

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

2.6 Composite and inverse functions

2.6.1 Composite functions

Composite functions are a combination of two 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).
.

Let f (x) = 2x + 3 and g (x) = x 2 . Find (f ◦ g )(x) and (g ◦ f )(x).


Example

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

2.6.2 Inverse functions, f −1(x)

Inverse functions are the reverse of a func-


y
tion. Finding the input x for the output y. f (x)
y=x
You can think of it as going backwards
through the number machine.
f −1 (x)
f −1 (x)

This is the same as reflecting a graph in the x


y = x axis.

44
FUNCTIONS Graph transformations 2

Finding the inverse function

f (x) = 2x 3 + 3, find f −1 (x)


1. Replace f (x) with y . y = 2x 3 + 3
2. Solve for x. y − 3 = 2x 3
y −3
⇒ = x3
s2
3 y −3
⇒ =x
2
3. f −1 (x) and y
s
Replace x with with x. 3 x −3
= f −1 (x)
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

2.7 Graph transformations


Exam hint: describe the
transformation with
Change to f (x) Effect words as well to
By adding and/or a · f (x) Vertical stretch by factor a guarantee marks.
multiplying by constants f (a · x) Horizontal stretch by factor 1/a
we can transform a − f (x) Reflection in x-axis
function into another f (−x) Reflection in y-axis
function. f (x) + a Move graph a units upwards Always do translations

f (x + a) Move graph a units to the left last

Some transformations should be completed before others. A horizontal shift comes


before a horizontal stretch, but a vertical stretch comes before a vertical shift.

45
FUNCTIONS Graph transformations

Transforming functions f (x) → a f (x + b)


1 5
Given f (x) = x 3 + x 2 − x , draw 3 f (x − 1).
4 4
1. Sketch f (x). y
f (x)
3
2
1
−3 −2 −1 1 2 3 x
−1
−2
−3

2. Stretch the graph by the factor of a . a=3 y 3 f (x)


f (x)
3
2
1
−3 −2 −1 1 2 3 x
−1
−2
−3

3. Move graph by −b . Move graph by 1 to the right


y
f (x) 3 f (x − 1)
3
2
1
−3 −2 −1 1 2 3 x
−1
−2
−3

46
FUNCTIONS Modelling 2

2.8 Modelling

2.8.1 Sinusoidal models

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

2.8.2 Logistic models

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

Solving logistic functions

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.

1. Find L. L is the carrying capacity of the island:


L = 10000
2. Use L to find C . L
The initial population is equal to
1+C
L
= 20
1+C
10000
= 20
1+C
10000
1+C =
20
C = 500 − 1 = 499
3. Fill the values of L and C into the logistic 10000
f (x) =
function. 1 + 499e−k x
4. Use known values given in the question In our model we know that f (3) = 35.
to find k. Solve using your calculator. We can plot this function to find k.
10000
f (3) = = 35
1 + 499e−3k
k = 0.187
5. Fill in the values for L, C , and k into the 10000
f (x) =
logistic growth function. 1 + 499e−0.187x
6. Plot the function and find its value at the The question asks to estimate the bird
specific x -value. population after 5 years, so x = 5:
f (5) = 50.79 ≈ 51

48
FUNCTIONS Modelling 2

2.8.3 Piecewise models

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

Making piecewise functions continuous

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

1. If a piecewise function is continuous, the The point occurs at x = 2.


value of each sub function is the same at
the point they meet. First, find this point.

2. Find the value of both functions at this f (2) = 1 + 2 = 3


point.
f (2) = a(2)2 + 2 = 4a + 2
3. Set these equal to one another and solve 3 = 4a + 2
for the missing value. 1
a=
4

49
FUNCTIONS Scaling graphs

2.9 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.

−10 −10 +10 +10

linear scale
−20 −10 0 10 20

÷10 ÷10 ×10 ×10

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

3.1. Basic trigonometry 54


π 180°
radians = × degrees degrees = × radians Non-right angle triangles
180° π
Before each question make sure calculator is in correct
setting: degrees or radians?
ϑ = angle, r = radius DB 3.4
ϑ in degree ϑ in radians
ϑ a b c
Arc length = × 2πr ϑ×r Sine rule: = =
360 sin A sin B sin C
ϑ 1 Use this rule when you know: 2 angles and a side (not
Area of a sector = × πr 2 ×ϑ × r2
360 2 between the angles) or 2 sides and an angle (not
between the sides).
Right-angle triangle (triangle with 90° angle)
Cosine rule: c 2 = a 2 + b 2 − 2 ab cos C
opposite Use this rule when you know: 3 sides or 2 sides and the
sin ϑ = SOH angle between them.
hypotenuse
1
adjacent Area of a triangle: Area = ab sin C
cos ϑ = CAH 2
hypotenuse
Use this rule when you know: 3 sides or 2 sides and the
opposite
tan ϑ = TOA angle between them.
adjacent

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°.

3.2. Circular functions 58


Cos graph from unit circle
y
cos = 0

cos = −1 cos = 1
x
0° 90° 180° 270° 360°
cos = 0

Sine graph from unit circle


y
sin = 1

sin = 0 sin = 0 x
0° 90° 180° 270° 360°
sin = −1

Trigonometric function y = a sin(b x + c) + d Trigonometric identities


Amplitude: a sin ϑ
360° 2π tan ϑ =
Period: or cos ϑ
b b sin2 ϑ + cos2 ϑ = 1
Horizontal shift: c
Vertical shift: d

53
TRIGONOMETRY Basic fundamentals

3.1 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°

2

Table 3.1: Common radians/degrees conversions

Degrees 0° 30° 45° 60° 90° 120° 135° 180° 270° 360°
π π π π 2π 3π 3π
Radians 0 π 2π
6 4 3 2 3 4 2

3.1.2 Right-angle triangles

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

Read the question:


does it specify if you
3.1.3 Non-right angle triangles are looking for an acute
(less than 90°) or
obtuse (more than 90°)
angle? If not there may
To find any missing angles or side lengths in
c b be 2 solutions. Exam
A non-right angle triangles, use the cosine and sine hint: Use sketches
B C rule. Remember that the angles in the triangle when working with
a add up to 180°! worded questions!

DB 3.2
a b c
Sine rule: = =
sin A sin B sin C
Use this rule when you know:

2 angles and a side or 2 sides and an angle


(not between the angles) (not between the sides)
a
B
B b
a
A

Cosine rule: c 2 = a 2 + b 2 − 2 a b cos C

Use this rule when you know:

3 sides or 2 sides and the angle between them

a
c C
b
b
a

1
Area of a triangle: Area = a b sin C
2
Use this rule when you know:

2 sides and the angle between them

a
C
b

55
TRIGONOMETRY Basic fundamentals

4ABC: A = 40°, B = 73°, a = 27 cm.


.
Example

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

3.1.4 Ambiguous case

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.

4ABC: B = 33°, a = 23 cm, b = 14 cm.


.
Example

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

Draw the two possible triangles.

A
14
14

33° 33°
23 B 23 C
B C

57
TRIGONOMETRY Circular functions

3.2 Circular functions

3.2.1 Unit circle


sine = 1 The unit circle is a circle with a
radius of 1 drawn from the origin
of a set of axes. The y-axis
α corresponds to sine and the x-axis
cosine = −1 cosine = 1
to cosine; so at the coordinate (0, 1)
it can be said that cosine = 0 and
sine = 1, just like in the sin x and
sine = −1 cos x graphs when plotted.

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.

Cos graph from unit circle

y
cos = 0

cos = −1 cos = 1 x
0° 90° 180° 270° 360°

cos = 0

Sine graph from unit circle

y
sin = 1

sin = 0 sin = 0 x
0° 90° 180° 270° 360°

sin = −1

58
TRIGONOMETRY Trigonometric relations 3

3.3 Trigonometric relations

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

Using GDC to solve trigonometric equations

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.

2. Plot the function on your calculator.


Check whether your calculator should be
in degrees or radians.

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

3.3.1 Geometric transformations

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

3.3.2 Determinant meaning

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.

area of image = |det (A)| × area of object


.

A triangle has area 45 cm2 . It is transformed  the matrix A.


 using
Example

3 0
A=
0 3

The determinant of matrix A is 3 × 3 − 0 × 0 = 9. The area of the transformed


triangle, or image is therefore 3 × 45 = 135 cm2 .

3.4 Circles

3.4.1 Circle formulas

ϑ = angle, r = radius DB 3.4

ϑ 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

3.5 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.

Site a point on a plane

Cell a region containing all the points for which the enclosed site is the
closest one. Each cell encloses a single site

Edge a boundary between two cells

Vertex a meeting point of two or more edges

62
TRIGONOMETRY Voronoi diagrams 3

3.5.1 Nearest neighbour interpolation

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

(a) Calculate the gradient of the line connecting points B and D.

(b) Hence, find the equation of the perpendicular bisector of points B and D.

(c) Sketch the completed Voronoi diagram.

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

1. Use gradient formula to find m. 6−1


m= =5
7−6
2. Find gradient of perpendicular line. −1 −1
m2 = ⇒y= x+c
5 5
3. Find one point that lies on the B and D :
Midpoint of
7+6 6+1
 ‹
A perpendicular perpendicular bisector.
bisector of two points , = (6.5, 3.5)
always passes through
2 2
their midpoint 4. Use point to find c. −1
3.5 = (6.5) + c −1
5 ⇒y= x + 4.8
c = 4.8 5

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

Working with vectors  


~ = a~ = 3
Vector from point O to point A: OA
2
 
~ = b~ = −1
Vector from point O to point B: OB
1 y
Canbe written in two ways: 4
3  
3
3
a~ = 2 =
 
2 A
0 2
a~ = 3i + 2 j + 0k = 3i + 2 j B a~
1
p p
Length of a~: |~
a| = x2 + y2 =
32 + 22 = 13 b~
p
          −1 1 2 3 4 x
3 −1 3 −2 1
Addition & multiplication: a~ + 2 b~ = +2 = + =
2 1 2 2 4
     
3 −1 4
Subtraction: a~ − b~ = − =
2 1 1

Equations of lines Dot product


y The dot product of two vectors c~ · d~ can be
Example of a line:
5 y = x +3 used to find
  the angle
 between
 them.
c d
   
0 1 4
r= +t  1  1
Let c~ = c2 , d~ = d2 :
 
3 1 1
3
 t 1 c3 d3
direction vector 2 0
1 3
parameter c~ · d~ = |~
c ||d~| cos ϑ
position vector
−3 −2 −1 1 2 3 x c~ · d~ = c1 d1 + c2 d2 + c3 d3

65
VECTORS AND GRAPH THEORY Vector fundamentals

4.1 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.

So looking at the diagram we can see that


vector u~ has a greater magnitude than v.
~
Vectors can also be described in terms of the P u~ Q
points they pass between. So
N
u~ = P~Q v~
(

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

4.1.1 Vectors with value

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.

2. as the sum of the three base vectors:


     
1 0 0
i~ = 0 , ~j = 
 1 , k~ = 0 .
    
0 0 1

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.

Addition & multiplication: y a~ + 2 b~


          4 b~
~ 3 −1 3 −2 1
a~+2 b = +2 = + = 3 b~
2 1 2 2 4
A
Subtraction:
2 − b~
B a~
      1 a~ − b~
~ 3 −1 4
a~ − b = − = b~
2 1 1 −1 1 2 3 4 x

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.

Determine the unit vector ab in the direction of any vector a~

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.

2. Divide the vector by its magnitude to find 3 4


i+ j
a unit vector. 5 5
3. Multiply the unit vector by the required Here, we multiply by the speed to find
scalar value. 3×7 4×7
the velocity:
v= i+ j
5 5
21 28
v= i+ j
5 5

68
VECTORS AND GRAPH THEORY Vector fundamentals 4

We can further divide vectors into two types:

position vectors vectors from the origin to a point,


 
~ −1
e.g. P = (−1, 3) ⇒ P = .
3
direction vectors vectors that define a direction.

Using both we can define lines in y


terms of vectors. 5 y = x +3
Example
  of a line:
 4
0 1
 
r= +t 1
3 1 3 t
  1
2 0
direction vector
1 3
parameter
position vector −3 −2 −1 1 2 3 x

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

4.1.2 Converting to the parametric form

Checking whether a point lies on a line

P Find the equation of the line pass-


ing through points P = (1, 3, 2) and
Direction vector
Q = (0, −1, 4). Does point R =
Q (−2, 9, 1) lie on the line?
Position vector

Position vector Note this can go either way from Q


to P of P to Q.
   
1. Write points as position vectors. 1 0
~ = −1
P~ = 3, Q
2 4
   
2. Set the direction vector equal to the 0−1 −1
vector between the points. −1 − 3 = −4
4−2 2
   
3. Choose either of the points as a position 1 −1
vector. Take P for example: r = 3 + t −4
  
2 2
     
4. Equate desired point with the line −2 1 −1
equation. If there is no contradiction, the R = r : 9 = 3 + t −4
    
point lies on the line. 1 2 2
⇒ −2 = 1 − t ⇒ t = 3
⇒ 9 = 3 − 4t ⇒ 9 6= 3 − 12
⇒ R does not lie on the line.

If one considers two lines in a three-dimensional graph, then there are three ways in
which they can interact:

Parallel Intersecting Skew


y y y

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.

Finding the intersection of two lines


       
2 −3 −1 3
Find the intersection for r1 = 1 + s
   1 and r2 = 3 + t 0 
   
0 4 7 −1

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

Find its position after 3 hours.


   
2 4
r0 = v= t
−3 2
We can find the position using
 theformula,  with t = 3.  
2+4×3

2 4 14
r= + 3= =
−3 2 −3 + 2 × 3 3

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

4.2 Multiplying vectors

4.2.1 Dot (scalar) product

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.

Finding the angle between two lines



  
2 8
Find the angle between  3 and 1.
 
−1 3

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°

When ϑ = 90° the vectors are perpendicular. As cos(90°) = 0 ⇒ c~ · d~ = 0 Learn to add


the following statement to questions asking “are they perpendicular?”.
c~ · d~ = 0 therefore cos x = 0, therefore x = 90°. Lines are perpendicular. Of course, when
lines are not perpendicular replace all = with 6=.

72
VECTORS AND GRAPH THEORY Multiplying vectors 4

4.2.2 Cross (vector) product

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.

There are two methods to find the cross product:


1. a × b = |a||b | sin ϑn c
where ϑ is the angle between a and b and n is a unit
vector in the direction of c.
b
2. x = a × b , where

c1 = a2 b3 − a3 b2 ϑ
c2 = a3 b1 − a1 b3
a
c3 = a1 b2 − a2 b1
.

Find the cross product of a × b.


Example

a = (2, 3, 4), b = (5, 6, 7).

c1 = 3 × 7 − 4 × 6 = −3
c2 = 4 × 5 − 2 × 7 = 6
c3 = 2 × 6 − 3 × 5 = −3
⇒ a × b = (−3, 6, −3)

Remember the cross product is not commutative, so a × b 6= b × a.

You can check the direction of c with the right hand rule:

c =a×b

73
VECTORS AND GRAPH THEORY Multiplying vectors

4.2.3 Geometric interpretation of vector product

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.

However, there are two main interpretations of


length of the vector product: v~
1. The length of the vector, that you get from
cross product of two vectors.
2. Area of a parallelogram made up from the two u~
vectors.
It also means, that half of the length of the cross product will be the area of triangle made
up from the two original vectors.
However, the vector product can also be used when finding the volume of parallelepiped,
that is made up from three vectors. Usually, to find its volume, we need base × height.
Base can be found with use of the vector product. Thus we get the following formula:

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

4.2.4 Vector components y


11
10
9
Vectors can be broken down into their 8 v
components. vy
7
6
For example, the vector v = 4i + 10j has a
5
component of size 4, v x , acting in the x
direction and a component of size 10, vy , 4
acting in the y direction. 3
2
1 vx
0
x
0 1 2 3 4 5

Components of vectors do not necessarily


have to be in the x, y, or z directions
though. We can work out the component of y
a vector a acting in the same direction as 8
another vector b. We can also work out the 7
component of a acting perpendicular to b, 6 a
in the plane formed by the two vectors. 5
4
component of vector a 3a
a·b perpendicular b
= |a| cos θ acting in the direction 2
|b| θ
of vector b 1 aparallel
0
component of vector a x
a×b −3 −2 −1 0 1 2 3 4 5 6 7 8
= |a| sin θ acting perpendicular to
|b| vector b

Finding vector components

Find the component of a which acts parallel to b.


  
3 −1
a= b=
7 4

1. Calculate the dot product between the a · b = 3 × (−1) + 7 × 4 = −3 + 28 = 25


two vectors.
p
2. b.
p
Calculate the magnitude of |b| = (−1)2 + 42 = 17
3. Fill these into the equation for the parallel a·b 25
component of the vector.
= p = 6.0633 . . .
|b| 17

75
VECTORS AND GRAPH THEORY Graph theory

4.3 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.

Adjacent edges two edges which have a vertex in common.

Degree of a vertex number of edges connected to it.


.

To find the adjacent vertices to vertex A we can follow all


Example

edges connected to A. The vertices they lead us to will be


adjacent to A. Vertices B and C are adjacent to A. To find A B
the adjacent edges to the edge connecting E and D (E D) we
can look at the edges which leave vertices E and D. E
D
Edges EB and DB are adjacent to edge E D. To find the
C
degree of vertex B we have to count all the edges connected
to it. The degree of vertex B is 3.

76
VECTORS AND GRAPH THEORY Graph theory 4

4.3.2 Types of graphs


10

Weighted graphs assign a value to each edge. A B


7
The weights assigned to each edge may represent the
8 E 2
time it takes to walk between two cities, distances,
D
or costs.
C
9

double edge not simple

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

In directed graphs each edge has a direction.


An edge from A to C is different to an edge from C A B
to A. The direction of the edges are shown using
arrows. Directed graphs can be used to show a E
network of social media accounts, for example. Then D
an arrow from one vertex to another would indicate C
that the first person is following the other person.

In degree of a vertex the number of incoming edges to the vertex.

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

A circuit is a closed trail. A B


No edges are repeated and the trail begins and ends at
the same vertex. E
D
C

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

4.3.4 Adjacency matrices

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 .

Using matrices to find walks in graphs

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

1. Input the adjacency matrix into your


calculator.

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

4.3.5 Transition matrices

A transition matrix looks similar to an adjacency matrix. If there is no edge from


vertex i to vertex j then a zero is entered for the (i, j )th entry. If there is an edge from
vertex j to vertex i then 1 divided by the (out) degree of vertex j is input into the matrix.
Note that in these matrices, we move from the column number vertex to the row
number vertex. These can be constructed for both directed and undirected graphs.
.
Example

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

4.3.6 Markov chains

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.

Finding the steady state vector

Find the steady state vector of the following transition matrix.


 
0.5 0.2
T=
0.5 0.8

‚ Œ
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

4.4.1 Eulerian trails and Hamiltonian paths

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

4.4.2 Minimum spanning trees

Minimum spanning trees


3
A minimum spanning tree (MST) is a subgraph A B
which connects all vertices in the main graph using 19
the minimum required edges. In weighted graphs the 17
6
MST has the smallest total edge weight whilst 5
D
connecting all vertices. C
10

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 1: We pick vertex B to begin in.


We must choose the smallest weighted edge connected to it.
The options are highlighted with a circle.
  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 

D
C

 
0 2 6 10 0
12

Step 2: We pick the edge between E and B, highlighted with a rectangle.


Now we can choose between any edge connecting E or B to the other vertices.
  3
0 3 4 0 0
  A 2 B
 3
 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 3: We pick the edge between A and B.


Now we can choose between any edge connecting A or B or E to the other vertices.
  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

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

1. Find the smallest weighted edge in the graph.

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.

3. Repeat step 2 until all vertices are included in the tree.


.

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

4.4.3 The Chinese postman problem

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).

2. Write down all possible pairings of these vertices.

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.
.

The Chinese postman problem


Example

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

Step 2: Write out all the possible pairing of these


vertices.
BC and D E
B D and C E
B E and DC

87
VECTORS AND GRAPH THEORY Algorithms

Step 3: Write down the lengths of the shortest paths 3

.
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

Step 5: We can now begin to search for the shortest


route using our new extra edges. We begin in A and
move to B then to D. We take D to F and then go back
to D using the extra edge. Now we go to E and now we
must go to F so that these edges are used. We move to
F and then back to E then to C and B and A. The final
edges are crossed by moving from A to C back to A.
The route is AB D F D E F EC BAC A.

4.4.4 The travelling salesman problem

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.

1. Choose a vertex to start in.

2. Move to the closest neighbouring vertex, taking into account the weights of the edges.

3. Repeat step 2 until you reach the last vertex.

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.
.

The travelling salesman problem


Example

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

To find the lower bound we use the deleted vertex algorithm.

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

The lower bound is 21 and the upper bound is 24.

90
DIFFERENTIATION 5
Table of contents & cheatsheet

Definitions 2.4. Polynomials 42


Differentiation is a way to find the gradient of a function at any Product y = uv, then: y 0 = uv 0 + u 0 v
dy
point, written as f 0 (x), y 0 and . u v u 0 − uv 0
dx Quotient , then: y 0 =
y=
v v2
Tangent line to a point on a curve is a linear line with the same Chain y = g (u) where u = f (x), then:
gradient as that point on the curve. dy dy d u
= ·
dx du dx

5.2. Turning points 96


f (x)
5.1.3. Tangent and normal 94 y
Local minumum
Local maximum
Tangent line with the same gradient as a point on a curve.
Point of inflection
−1
Normal perpendicular to the tangent m =
slope of tangent
x
Both are linear lines with general formula: y = m x + c.

1. Use derivative to find gradient of the tangent. For normal


1
then do − . f 0 (x) f 00 (x)
slope of tangent
2. Input the x-value of the point into f (x) to find y. Local minimum 0 +
3. Input y, m and the x-value into y = m x + c to find c. Local maximum 0 −
Points of inflection 0

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).

Non-linear functions however, will have changing


gradients. Their steepness will be different at Function Gradient Function
different x-values. This is where calculus comes in f (x) f 0 (x)
handy; we can use differentiation to derive a function dy
using which we can find the gradient for any value of y
dx
x. Two types of notation are used for calculus.

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.

Polynomial a function that contains one or more terms often raised to


different powers
2 1
e.g. y = 3x 2 , y = 121x 5 + 7x 3 + x or y = 4x 3 + 2x 3

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

Derivative of a constant (number) 0

e.g. for f (x) = 5, f 0 (x) = 0

Derivative of a sum sum of derivatives.


If a function you want to differentiate is made up of several
summed parts, find the derivatives for each part separately and
then add them together again.
e.g. f (x) = a x n and g (x) = b x m

f 0 (x) + g 0 (x) = na x n−1 + m b x m−1

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

3x 5 − 2x 2 −→ 5 · 3x 5−1 − 2 · 2x 2−1 = 15x 4 − 4x


2 −8
= 2x −4 −→ (−4) · 2x −4−1 = −8x −5 =
x 4 x5
2 6
3x 4 − +3 −→ 4 · 3x 4−1 − 3 · (−2)x −3−1 + 0 = 12x 3 +
x3 x4

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

Product rule Quotient rule


u
When functions are multiplied: y = u v When functions are divided: y =
v
v u0 − u v0
then: y0 = u v0 + u0v then: y0 =
v2
du dv
v −u
which is dy dv du which is dy dx dx
=u +v =
the same as dx dx dx the same as dx v 2
.

x2
Example

Let y = x 2 cos x, then Let y = , then


cos x
€ Š0
€ Š0
y 0 = x 2 (cos x)0 + x 2 cos x x 2 cos x − x 2 (cos x)0
y0 =
(cos x)2
= −x 2 sin x + 2x cos x 2x cos x + x 2 sin x
=
cos2 x

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

Let y = (cos x)2 , determine the derivative y 0


1. Determine what the inside ( u ) and Inside function:u = cos x
2
outside ( y ) functions are. Outside function: y = u

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

5.1.3 Tangent and normal equations

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.

Normal a straight line that is perpendicular to the tangent line:

−1
slope of normal =
slope of tangent

y
f (x)

tangent

normal

94
DIFFERENTIATION Introduction 5

Finding the linear function of the tangent

Let f (x) = x 3 . Find the equation of the tangent at x =2


1. Find the derivative and fill in value of x to f 0 (x) = 3x 2
determine slope of tangent. Steps 1, 2 and 4 are
f 0 (2) = 3 · 22 = 12 identical for the
equation of the tangent
2. Determine the y value. f (x) = 23 = 8 and normal

3. Plug the slope m and the y value in 8 = 12x + c


y = mx + c .
4. Fill in the value for x to find c . 8 = 12(2) + c
c = −16
eq. of tangent: y = 12x − 16

Finding the linear function of the normal

Let f (x) = x 3 . Find the equation of the normal at x =2


1. . f 0 (2) = 12
Steps 1, 2 and 4 are
2. . f (x) = 8 identical for the
equation of the tangent
3. −1 and normal
Determine the slope of the normal
m=
−1 12
m= and plug it and the
slope tangent 1
8=− x+c
y -value into y = mx + c . 12
4. Fill in the value for x to find c . 1
8=− (2) + c
12
49
c=
6
1 49
eq. of normal: y =− x+
12 6

95
DIFFERENTIATION Turning points

To find the gradient of a function for any value of x.

f (x) = 5x 3 − 2x 2 + x . Find the gradient of f (x) at x = 3.

IB ACADEMY IB ACADEMY IB ACADEMY

Enter the variable used in Type in your function


Press menu

your function (x) and the
4: Calculus press enter
value of x that you want to
1: Numerical Derivative
find. Keep the settings on
at a Point
1st Derivative
Press OK

In this case, f 0 (3) = 124

5.2 Turning points

There are three types of turning points:

1. Local maxima
2. Local minima
3. Points of inflection

We know that when f 0 (x) = 0 there will be a maximum or a minimum. Whether it is a


maximum or minimum should be evident from looking at the graph of the original
function. If a graph is not available, we can find out by plugging in a slightly smaller and
slightly larger value than the point in question into f 0 (x). If the smaller value is negative
and the larger value positive then it is a local minimum. If the smaller value is positive
and the larger value negative then it is a local maximum.

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 (x) y Local minimum Notice how the points


of inflection of f (x) are
Local maximum minima and maxima
Point of inflection in f 0 (x) and thus
equal 0 in f 00 (x)

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)

f 00 (x) y f 00 (x) > 0 positive


f 00 (x) < 0 negative
f 00 (x) = 0

97
DIFFERENTIATION Turning points

Finding turning points

2.5 The function f (x) = x 3 + x 2 − 5x − 5


is shown. Use the first and second
−5 −2.5 2.5 5 derivative to find its turning points: the
−2.5
minima, maxima and points of inflection
−5 (POI).
−7.5
1. Find the first and second derivative. f 0 (x) = 3x 2 + 2x − 5
f 00 (x) = 6x + 2
2. Find xmin and xmax by setting f 0 (x) = 0. 3x 2 + 2x − 5 = 0
5
GDC yields: x = 1 or x = −
3
3. Find y -coordinates by inserting the f (1) = (1)3 + (1)2 − 5(1) − 5 = −8,
x -value(s) into the original f (x). so xmin at (1, −8).
 ‹  ‹3  ‹2
5 5 5
f − = − + −
3 3 3
5
 ‹
−5 − − 5 = 1.48(3 s.f.),

5

so xmax at − , 1.48 .
3
4. Find POI by setting f 00 (x) = 0. 6x + 2 = 0
 ‹  ‹3  ‹2
5. Enter x -values into original function to 1 1 1 1
 ‹
find coordinates.
f − = − + − −5 − −5
3 3 3 3
y = −3.26 (3 s.f.)
1
 ‹
so POI at − , −3.26
3

Finding turning points (local maximum/minimum) of a function using


GDC

Find the coordinates of the local minimum for f (x) = 4x 2 − 5x + 3.


IB ACADEMY IB ACADEMY IB ACADEMY

Use the cursor to set the So the coordinates of the


Press menu
bounds (the min/max must minimum for f (x) are
6: Analyze graph
be between the bounds) (0.625, 1.44)
or 2: Minimum
or 3: Maximum

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

Answering kinematics questions

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.

1. Differentiate or integrate to find required v = s 0 , so we differentiate the equation


equation. for s (t ):
v(t ) = −9.8t + 4.9
2. Set equation equal to given value and v(t ) = 0
solve. − 9.8t + 4.9 = 0
t = 0.5
3. Plug solution back into the original s (0.5) = −4.9(0.5)2 + 4.9(0.5) + 10 =
function. 11.225 m

100
INTEGRATION AND 6

DIFFERENTIAL EQUATIONS
Table of contents & cheatsheet

6.1.1. Indefinite integral 102


Integration with an internal function
Z
f (ax + b ) dx

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


6.2. Definite integral 103


Be careful, the order you substitute a and b into the
Z b Z indefinite integral is relevant for your answer:
f (x) dx = F (b ) − F (a) where F= f (x) dx Z b Z a
a
f (x) dx = − f (x) dx
a b

Area between a curve and the x-axis

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

Area between two curves

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

Besides finding areas under and between curves, integra-


Z b Z b
2 2 tion can also be used to calculate the volume of the solid
V =π y dx = πy dx
a a
that a curve would make if it were rotated 360° around
its axis — this is called the volume of revolution.

101
INTEGRATION AND DIFFERENTIAL EQUATIONS Integration

6.1 Integration

6.1.1 Indefinite integrals and boundary conditions


Integration is essentially the opposite of differentiation; it can also be referred to as
anti-differentiation. The following equation shows how to integrate a polynomial
function:

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).

Finding indefinite integrals

Let f 0 (x) = 12x 2 − 2


Given that f (−1) = 1, find f (x).
Z Z Z
1. Separate summed parts 2 2
(optional).
12x − 2 dx = 12x dx + −2 dx
Z Z
2. Integrate. 2
f (x) = 12x dx + −2 dx =
12 3
x − 2x + C
3
Note that this is the 3. Fill in values of x and f (x) to find C . Since f (−1) = 1,
same thing you do
3
when finding the 4(−1) − 2(−1) + C = 1
y -intercept, c , for a C =3
linear function – see
Functions: Linear
So: f (x) = 4x 3 − 2x + 3
models.

6.1.2 Integration by substitution


Z
f g (x) · g 0 (x) dx


Integration by substitution questions are recognisable by a function and its derivative


inside the function. Learning to spot these quickly is a matter of practice. Once you have
identified the inside functions, the rest is fairly straight forward.

102
INTEGRATION AND DIFFERENTIAL EQUATIONS Definite integral 6

Integrate by substitution
Z
3
Find 3x 2 e x dx

1. Identify the inside function u , this is the g (x) = u = x 3


function whose derivative is also inside
f (x).
2. du du
Find the derivative u0 = . = 3x 2
dx dx
Z Z
3. du u du
Substitute u and into the integral e dx = e u du = e u + C
dx dx
(this way dx cancels out).

u
Z
4. Substitute back to get a function with 3
x. eu + C = ex + C

6.2 Definite integral


If there are limit values indicated on your integral, you are looking to find a definite
integral. This means that these values will be used to find a numeric answer rather than a
function.

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

Solving definite integrals


Z 7
Find 12x 2 − 2 dx , knowing that F (x) = 4x 3 − 2x
3
1. Find the indefinite integral
Z 7 ” —7
(without +C ). 12x 2 − 2 dx = 4x 3 − 2x
3
3

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

Area between a curve and the x -axis

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

The area below the x-axis gives a


negative value for its area. You must
y take that value as a positive value to
determine the area between a curve and
the x-axis. Sketching the graph will
f (x) show what part of the function lies
c below the x-axis. So
a b x Zb Z
c


Acurve = f (x) dx + f (x) dx

a b

or
Z c
Acurve = f (x) dx

a

Area between two curves

y Using definite integrals you can also


find the areas enclosed between curves:
f (x)
Zb
Abetween = g (x) − f (x) dx

a

With g (x) as the “top” function


a b x (furthest from the x-axis). For the area
between curves, it does not matter what
g (x) is above/below the x-axis.

104
INTEGRATION AND DIFFERENTIAL EQUATIONS Definite integral 6

Finding areas with definite integrals

Let y = x 3 − 4x 2 + 3x
Find the area from x = 0 to x = 3.

1. Find the x -intercepts: f (x) = 0. x 3 − 4x 2 + 3x = 0, using the GDC:


x = 0 or x = 1 or x = 3

2. If any of the x -intercepts lie within the y


range, sketch the function to see which
parts lie above and below the x -axis. 1

1 2 3 x
−1
−2

3. Setup integrals and integrate.


Z 1
Left: x 3 − 4x 2 + 3x dx =
0
˜1
1 4 3
•
= x4 − x3 + x2
4 3 2 0
1 4 3
 ‹
= − + − (0)
4 3 2
5
=
12

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

4. Add up the areas (and remember areas 5 8 37


+ =
are never negative!) 12 3 12

105
INTEGRATION AND DIFFERENTIAL EQUATIONS Definite integral

Alternatively, use the calculator to find areas

Z 3
Calculate the area between x 3 − 4x 2 + 3x and the x -axis.
0

IB ACADEMY IB ACADEMY IB ACADEMY

Enter the boundaries. Enter the function and place


Press menu
Before entering the the variable (usually x)
4: Calculus
function, after d
2: Numerical integral ∞β◦

press ,
choose ‘abs(’

In this case, the area is 3.083

6.2.2 Volume of revolution

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

rotate around x-axis

106
INTEGRATION AND DIFFERENTIAL EQUATIONS Definite integral 6

p
.

Find the area from x = 1 to x = 4 for the function y =


Example

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.

Find the volume of revolution

Find the volume of revolution of function y = x 2 from x = 1 to x = 3 around y -axis.


p
1. Rearrange the function to make x the y = x2 x= y
subject.

2. Convert x coordinates to y coordinates. y(1) = 12 = 1


y(3) = 32 = 9
Z9 Z9
3. Integrate the function with respect to dy . p 2
π y dy = π y dy
1 1
˜ 9
1 2
•
=π y
2
1
1 1
 ‹
=π × 81 − × 1 = 40π
2 2

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

6.3 Differential equations

An ordinary differential equation (ODE) is an equation that relates functions of an


independent variable and its derivatives. Differential equations are really important in
mathematics as they allow to solve a lot of real world and science problems. There are
several methods for solving the differential equations, including analytical approaches
and numerical methods.

6.3.1 Setting up 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

The growth of an algae, G, at time t , is proportional to G. Find a differential


equation to model this.
dG p
= G
dt
The rate of change of salt concentration S in a tank at time t is proportional to 4S t .
Find a differential equation to model this.
dS
= 4S t
dt

6.3.2 Separation of variables

One of the common approaches to solve an ODE is to use method of separation of


variables. It can be used when one is able to separate all y dependent terms to the left and
all x dependent terms to the right. Then it is possible to solve each side in relation to
their own variables.

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

Solving an ODE using separation of variables

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.

4. Plug in initial conditions to find the value y(0) = 2 = ke0 = k


of the constant. 2
y(x) = 2e x

6.3.3 Slope fields

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

6.3.4 Euler’s method

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:

y(x + h) = y(x) + y 0 (x)h

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

Thus y(0.5) ≈ 1.47. A computer gives numerical solution equal to


y(0.5) = 1.47825 . . . So we are about 0.01 off the actual answer. That is pretty good
for such a simple numerical method!

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

Euler’s method for these equations is similar to the previous method.

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

Thus we have x(4) = 671121 and y(4) = 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

derivative) differential equation by substituting.


d2 x dx
= x2 + 2 + 5t 3
dt 2 dt
dx
Let =y
dt
dx dy
=y = x 2 + 2y + 5t 3
dt dt

111
INTEGRATION AND DIFFERENTIAL EQUATIONS Differential equations

6.3.5 Coupled 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

Solving coupled differential equations

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.

Different eigenvalues correspond to the way in which the solutions move.

y λ1 = b i
λ2 = −b i

Eigenvalues: both imaginary

Solutions: form a circle or eclipse x

y λ1 > λ2

λ1 > 0

Eigenvalues: both real positive

Solutions: move away from the


x
origin

λ2 > 0

y λ1 = a + b i
λ2 = a − b i
a>0
Eigenvalues: both complex with a
positive real part

Solutions: move away from the x


origin in a spiral

113
INTEGRATION AND DIFFERENTIAL EQUATIONS Differential equations

y λ1 > λ2

λ1 < 0

Eigenvalues: both real negative

Solutions: move towards the origin x

λ2 < 0

y λ1 = a + b i
λ2 = a − b i
a<0
Eigenvalues: both complex with a
negative real part

Solutions: move towards the origin x


in a spiral

y λ1 > λ2

λ1 > 0

Eigenvalues: one positive real and one


negative real
x
Solutions: the origin is a saddle point

λ2 < 0

114
INTEGRATION AND DIFFERENTIAL EQUATIONS Differential equations 6

Drawing a phase portrait

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

3. Determine which direction the extended This depends on the eigenvalues


lines point. associated with them. A negative
eigenvalue indicates solutions moving
towards the origin and a positive one
indicates solutions moving away from the
origin.
y
10

−15 −10 −5 5 10 15 x
−5

−10

115
INTEGRATION AND DIFFERENTIAL EQUATIONS Differential equations

4. Determine which eigenvalue/eigenvector This is always the larger eigenvalue. In


will become more dominant as t this case λ1 > λ2 .
approaches infinity.

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

Definitions 7.1. Single events 118


Sample space the list of all possible outcomes. A B
Event the outcomes that meet the requirement. Event
Number of ways A can happen S Sample space
Probability for event A, P (A) = .
all outcomes in the sample space
Mutually exclusive
Dependent events two events are dependent if the outcome of event
P (A∪ B) = P (A) + P (B)
A affects the outcome of event B so that the probability is
P (A ∩ B) = 0
changed.
Independent events two events are independent if the fact that A
occurs does not affect the probability of B occurring. Combined events
Conditional probability the probability of A, given that B has P (A ∪ B) = P (A) + P (B) − P (A ∩ B)
P (A ∩ B)
happened: P (A|B) = . P (A ∩ B) = P (A) + P (B) − P (A ∪ B)
P (B)

7.2. Multiple events 120


Probabilities for successive events can be expressed through tree
diagrams or a table of outcomes.
A ∪ B (union) A ∩ B (intersect)
Table of outcomes Tree diagram
H T A B A B
H
H H,H H,T H
T
T T,H T,T H
T
T
In general, if you are dealing with a question that asks for the
If independent: P (A ∩ B) = P (A) × P (B).
probability of:
Compliment, A0 where P (A0 ) = 1 − P (A)
• one event and another, you multiply
Exhaustive when everything in the sample
• one event or another, you add space is contained in the events

7.3. Distributions 122


P (X = x) = 1.
P
For a distribution by function the domain of X must be defined as

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

Normal distribution X ∼ N (µ, σ 2 )

On calculator:
• normcdf(lower bound, upper bound, = µ, σ )
• invnorm(area, = µ, σ )
mean St. dv. x
where µ = mean, σ = standard deviation

117
PROBABILITY Single events

7.1 Single events

7.1.1 Venn diagrams

Probability for single events can be expressed through Venn diagrams.

Sample space the list of all possible outcomes.


Event the outcomes that meet the require-
A B ment.
Probability for event A,

Number of ways A can happen


DB 4.5
0 P (A) =
all outcomes in the sample space

Here the shaded circle.

Imagine I have a fruit bowl containing 6 apples and 4 bananas.


.

I pick a piece of fruit.


Example

What is the probability of picking each fruit?

Apple = 0.6 Banana = 0.4

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

Of the apples 2 are red, 2 are green and 2 are yellow.


Example

What is the probability of picking a yellow apple?

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).
.

What is the probability of picking an apple or a yellow fruit?


Example

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
.

What is the probability of not picking a yellow fruit?


Example

A B
A: apples

B: yellow fruit

This is known as the compliment of B or B 0 . B 0 = 1 − B.

119
PROBABILITY Multiple events

Here we are interested in everything but the yellow fruit.

.
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)

7.2 Multiple events

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)

Dependent events two events are dependent if the outcome of event A


affects the outcome of event B so that the probability is changed.
Questions involving
dependent events will
often involve elements
that are drawn “without Conditional probability used for successive events that come one after
replacement”. another (as in tree diagrams). The probability of A, given that B has
Remember that the P (A ∩ B)
probabilities will be happened: P (A|B) = .
changing with each P (B)
new set of branches.

120
PROBABILITY Multiple events 7

7.2.1 Tree diagrams

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

blue disks. Draw a tree diagram for all outcomes.

The probability of drawingtwo red‹ disks can be found by multiplying both


4 3
probabilities of getting red × .
9 8

1st draw 2nd draw

3 4 3 12 The probabilities for


8 R R and B: × = each event should
9 8 72
always add up to 1. The
4 R probabilities describing
9 5 4 5 20 all the possible
B R and B: × = outcomes should also
8 9 8 72 equal 1 (that is, the
probabilities that we
4 5 4 20 found by multiplying

8 R B and R: × = along the individual


5 9 8 72 branches).
9 B
4 5 4 20
B B and R: × =
8 9 8 72

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)
 

P (R) × P (B) P (B) × P (R)


 
It is common for
conditional probability
20 20 40 5 questions to relate to
+ = =
72 72 72 9 previous answers.

What is the probability to draw at least one red disk?


P (at least one red)
P (R and R) + P (B and R) + P (R and B) = 1 − P (B and B)
12 20 20 20 52 13
+ + = 1− = =
72 72 72 72 72 18

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

7.3 Probability distributions

7.3.1 Discrete random variables


Another way of representing multiple events is with sample space diagrams. These show
all the possible combinations of events in a sample space. The probabilities of the
possible outcomes are often summarised in a table.

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 distribution links each outcome of a statistical experiment with


its probability of occurrence; usually presented as a table or function

Discrete random variable a variable measured from a random phenomenon


that has a finite number of possible outcomes (e.g. the outcome of
flipping a coin)
X
DB 4.7 Expected value E(X ) = x P (X = x)

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.

1. Draw a sample space diagram. H T


H H, H H, T
T T, H T, T

2. Tabulate the probability distribution.


x 0 1 2
1 1 1
P (X = x)
4 2 4

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

7.3.2 Distribution by function

A probability distribution can also be given by a function.

The domain of X must be specified, as the sum of the probabilities must equal 1.

Probability distribution by function


 ‹ x−1
1
P (X = x) = k for x = 1, 2, 3. Find constant k .
3
X  ‹1−1  ‹2−1  ‹3−1
1. Use the fact that P (X = x) = 1 to 1 1 1
k +k +k =1
set up an equation. 3 3 3
2. Simplify and solve for k. 1 1 13 9
k + k + k = k = 1. So, k= .
3 9 9 13

7.3.3 Binomial distribution

Binomial distribution type of probability distribution used to calculate the


probability of obtaining a certain number of successes in a given
number of trials

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

“Less than r ” P (X < r ) = P (X ≤ r − 1) calculators you can


specify what probability
“More than r ” P (X > r ) = 1 − P (X ≤ r ) you are looking for, so
“At least r ” P (X ≥ r ) = 1 − P (X ≤ r − 1) this may not apply to
you

123
PROBABILITY Probability distributions

Use binomial distribution to find a probability

A fair coin is flipped 10 times. Find the probability of flipping 4 heads.

IB ACADEMY IB ACADEMY IB ACADEMY

Enter values of So the probability of getting


Press menu
n=10 exactly 4 heads is 0.205.
5: Probability
p=0.5
5: Distributions
r=4 ≈
Select Binompdf
Press enter

Use binomial distribution to find a probability

A fair coin is flipped 10 times. Find the probability of flipping less than 4 heads.
P (X < 4) = P (X ≤ 3)

IB ACADEMY IB ACADEMY IB ACADEMY

Enter values of So the probability of getting


Press menu
n=10 less than 4 heads is 0.172.
5: Probability
p=0.5
5: Distributions
lower bound=0
Select Binomcdf
upper bound=3

Press enter

124
PROBABILITY Probability distributions 7

7.3.4 Normal distribution

A normal distribution is one type of probability distribution which gives a bell-shape


curve if all the values and their corresponding probabilities are plotted. The bell shape is
symmetrical around the mean, µ. The width of the bell shape is given by the standard
deviation, σ. The IB expects you to
be aware that 68% of
the data lies between µ
and ±σ (the mean and
1 st.dev. either side of
Total area under curve = 1 it, 95% lies between µ
and ±2σ , and 99% lies
between µ and ±3σ .

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.

Use normalcdf (lowerbound, upperbound, µ, σ) for the probability that x is between


any 2 values. Even though you will be
using your GDC, it’s
always useful to draw a

For lower bound = −∞, use −1E99 quick sketch to indicate


for yourself (and the
examiner) what area or
For upper bound = ∞, use 1E99
x -value you are looking
for.

Use invnorm (ρ, µ, σ) to get an x-value for a given probability.

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

Finding a probability/ percentage/ the area under a normal


distribution curve

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

Shade area you are looking for

100 110 130 weight (g)

IB ACADEMY IB ACADEMY IB ACADEMY

Enter lower and upper Press OK


Press menu , choose
boundaries, mean (µ) and
5: Probability
standard deviation (σ ).
5: Distributions
For lower bound = −∞,
2: Normal Cdf
set lower: -1E99
For upper bound = ∞,
set upper: 1E99

So 88.8% of the pears weigh between 100 g and 130 g.

126
PROBABILITY Probability distributions 7

Finding an x -value when the probability is given

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

110 m weight (g)

IB ACADEMY IB ACADEMY IB ACADEMY

Enter probability (Area), Press OK


Press menu
mean (µ) and standard
5: Probability
deviation (σ ).
5: Distributions
The calculator assumes the
3: Inverse Normal
area is to the left of the
x -value you are looking for.
So in this case:
area = 1 − 0.08 = 0.92

So m = 121, which means that 8% of the pears weigh more than 121 g.

127
PROBABILITY Poisson distribution

Finding an expected value

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.

1. Sketch. pears weighing


< 105 g

x 110 weight (g)

2. Use normcdf to find the relevant lower bound = -1E99


probability. upper bound = 105
µ = 110
σ =8 → ρ = 0.266

3. Find expected value by multiplying the expected number = 0.266 × 250


probability by the total number = 66.5
DB 4.8 E(x) = P (x) × n .
→ you would expect 67 pears to weigh
less than 105 g

7.4 Poisson distribution

The Poisson distribution is used to calculate the probabilities of various numbers of


“successes”. Each “success” must be independent. i.e. If mean number of calls to a fire
station on weekday is 8. What is probability that on a given weekday there would be 11
calls?

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

Definitions 8.2.2. Statistical graphs 135

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.

8.2. Descriptive statistics 133 lowest value highest value


Q1 Q3
For 1 variable data with frequency use 1-Var Stats on mean, Q2
GDC.

Mean the average value


the sum of the data 8.3. Bivariate statistics 139
x̄ =
no. of data points For analysis of data with two Scatter diagrams
Mode the value that occurs most often variables. Perfect positive
Median when the data set is ordered low to high and the On GDC use LinReg(ax+b). y
number of data points is:
Regression Line (r = ax + b )
• odd, then the median is the middle value;
Can be used to interpolate
• even, then the median is the average of the two unknown data.
middle values.
Interpretation of r -values x
Range largest x-value − smallest x-value
The correlation between the two
Variance σ 2 calculator only sets of data. Can be positive or No correlation
y
p negative.
Standard deviation σ = variance calculator only
r -value correlation
Grouped data data presented as an interval 0.00 ≤ |r | ≤ 0.25 very weak
Use the midpoint as the x-value in all calculations. 0.25 ≤ |r | ≤ 0.50 weak x
Q1 first quartile = 25th percentile 0.50 ≤ |r | ≤ 0.75 moderate
0.75 ≤ |r | ≤ 1.00 strong Weak negative
Q2 median = 50th percentile
y
Q3 third quartile = 75th percentile
Q3 − Q1 interquartile range (IQR) = middle 50 percent Correlation does not mean
causation.

131
STATISTICS Basic statistical concepts

8.1 Basic statistical concepts

Population the entire group from which statistical data is drawn (and which
the statistics obtained represent).

Sample the observations actually selected from the population for a


statistical test.

Discrete finite or countable number of possible values. (e.g. money, number


Note that continuous of people)
data can be presented
as discrete data, e.g. if
you round time to the Continuous infinite amount of increments. (e.g. time, weight)
nearest year or weight
to the nearest kilogram.

8.1.1 Sampling techniques

In practice, samples can be obtained in different ways.

Simple random sample selected from the population with no bias or


criteria; each member of the population has an equal chance of being
picked

Convenience sample selected from a group that is easy to reach

Systematic sample selected at a fixed sampling interval; e.g. every 20th


customer is asked to fill out a questionnaire

Stratified sample a population is first split into several mutually exclusive


subgroups. A random sample is then drawn from each subgroup.

Quota sample like a stratified sample, except a non-random sample is drawn


from each subgroup (e.g. a convenience sample)

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

8.2 Descriptive statistics


The mean, mode and median, are all ways of measuring “averages”. Depending on the
distribution of the data, the values for the mean, mode, median and range can differ
slightly or a lot. They are all useful for understanding your data set.

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

Mode the value that occurs most often (highest frequency)

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

Range largest x-value − smallest x-value

Standard deviation indicates the spread of a data set, σ calculator only

Grouped data data presented as an interval; e.g. 10 ≤ x < 20 cm

• Use the midpoint as the x-value in all calculations. So for 10–20 cm


use 15 cm.
• For 10–20 cm, 10 is the lower boundary, 20 is the upper boundary and the
width is 20 − 10 = 10.

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:

adding constant k multiplying by k


mean x̄ + k k × x̄
standard deviation σ k ×σ

133
STATISTICS Descriptive statistics

8.2.1 Quartiles

Q1 first quartile = 25th percentile.


The value of x so that 25% of all the data values are ≤ to it.

Q2 median = 50th percentile

Q3 third quartile = 75th percentile

DB 4.2 IQR interquartile range (Q3 − Q1 ) = middle 50 percent

Outlier any point lower than Q1 − 1.5 ×IQR and larger than Q3 + 1.5 ×IQR
.

Snow depth is measured in centimetres:


Example

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

8.2.2 Presenting and interpreting data

Frequency the number of times an event occurs in an experiment

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.

f A histogram is used to display and compare the


100
90 frequencies for a specific condition. The frequencies
80 (here: # of students) are displayed on the y-axis, and
70
60 the different classes of the sample (here: age) are
50
40 displayed on the x-axis. Neighbouring bars should
30
20 be touching and their width should be drawn to
10 scale (i.e. a wider class will be represented by a
17 18 19 20 21 Age wider bar).

cf The cumulative frequency graph is used to display


250 the development of the frequencies as the classes of
the event increase. The graph is plotted by using the
200
sum of all frequencies for a particular class, added to
150 the frequencies for all the classes below it. The
classes of the event (age) are displayed on the x-axis,
100
and the frequency is displayed on the y-axis. The
50 cumulative frequency graph always goes upwards,
Q1 Q2 Q3 Q4 because the cumulative frequency increases as you
17 18 19 20 21 Age include more classes.

A box and whisker plot neatly summarises the


distribution of a data set. It gives information about
the range, the median and the quartiles. The first
and third quartiles are at the ends of the box, the
lowest value highest value median is indicated with a vertical line inside the
Q1 Q2 Q3 box, and the maximum and minimum points are at
the ends of the whiskers. Box and whisker plots are
drawn to scale in the x-direction

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.
.

Using the histogram, create a cumulative frequency graph and use it to


Example

construct a box and whisker diagram.

12

10
Length (cm)

20 40 60 80 100 120
Number of fish

Write out the table for frequency and cumulative frequency.

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

Use graph to find Q1 , Q2 and Q3 .

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

Plot box and whiskers.

20 48 62 83 120

137
STATISTICS Descriptive statistics

8.2.3 Using GDC

Finding the mean, standard deviation and quartiles etc.

Find the mean, standard deviation and Q1.


Age 17 18 19 20 21
No. of students 21 45 93 61 20

IB ACADEMY IB ACADEMY IB ACADEMY

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

IB ACADEMY IB ACADEMY IB ACADEMY

Enter Num of lists: 1. Enter names of columns you mean = 19.1


OK used to enter your x -list standard deviation = 1.06
Press
and frequency list and Q1 = 18.5
column where you would
like the solutions to appear:
a[], b[] and c[].
Press OK

138
STATISTICS Bivariate statistics 8

8.3 Bivariate statistics

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

Perfect positive Weak negative


correlation No correlation correlation
r =1 r =0 −1 < r < 0
y y y

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

8.3.1 Pearson’s correlation coefficient

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

Bivariate-statistics type questions

The height of a plant was measured the first 8 weeks


Week x 0 1 2 3 4 5 6 7 8
Height (cm) y 23.5 25 26.5 27 28.5 31.5 34.5 36 37.5

1. Plot a scatter diagram.

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.

IB ACADEMY IB ACADEMY IB ACADEMY

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

y -values in another column


(e.g. B)

IB ACADEMY

So, equation of regression


line is y = 1.83x + 22.7
and Pearson’s correlation
( r -value) = 0.986
4. Comment on the result. Pearson’s correlation is r = 0.986, which
is a strong positive correlation.

141
STATISTICS Bivariate statistics

8.3.2 Spearman’s rank correlation coefficient

Spearman’s rank correlation coefficient used to assess the strength of a


monotonic relationship between two variables (−1 ≤ r s ≤ 1)

Monotonic relationship the values of two variables either both increase or


both decrease, but not necessarily at a constant rate (i.e. can be linear or
non-linear)

Spearman’s rank correlation

Students’ grades in Maths and Physics are recorded.

Maths 81 75 30 18 55 70 93 89 89 75
Physics 53 70 24 23 32 38 88 96 71 42

Find Spearman’s Rank correlation coefficient and comment on it

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

also be found using the


RSX function

+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 Chi-squared test

8.4.1 Independence

Chi-square test of independence used to test independence of two variables

H0 the variables are independent (null hypothesis)

H1 the variables are not independent (alternative hypothesis)

Determine if the variables are independent by the χ2 test

Directors Managers Teachers Totals

Male 26 148 448 622


Female 6 51 1051 1108

Totals 32 199 1499 1730

Perform a χ 2 test of independence at the 10% significance level to determine whether


employment grade is independent of gender.

1. State the null and alternative hypotheses. H0 : gender and employment grade are
independent
H1 : gender and employment grade are
not independent

2. Calculate the table of expected e.g. expected number of male directors:


frequencies The expected
t f1 t f2 622 32 frequency formula is
Formula: · ·T. · · 1730 = 11.5
T T 1730 1730 not given in your data
booklet, but you are
Directors Managers Teachers expected to know it.

Male 11.5 71.5 539


Female 20.5 127.5 960

3. Write down the degrees of freedom df = (2 − 1) · (3 − 1) = 2


df = (# rows - 1)(# columns - 1).

143
STATISTICS Chi-squared test

4. Write down the chi-square value using


GDC..

IB ACADEMY IB ACADEMY IB ACADEMY

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

IB ACADEMY IB ACADEMY IB ACADEMY

Enter name of Observed So Chi-square value


Press menu

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

5. The critical value is 4.605. Use the 180.03 > 4.605


You will always be given
the critical value in
critical value or the p -value to comment → so we reject the null hypothesis;
exam questions. on your result. gender and employment grade are not
independent.
Reject null hypothesis if:
χ 2 > critical value
or
p -value < significance level.

144
STATISTICS Chi-squared test 8

8.4.2 Goodness of fit

Chi-square goodness of fit test used to determine whether categorical data


fit a hypothesized distribution

H0 the variables are consistent with the hypothesized distribution


(null hypothesis)

H1 at least one of the categories is not consistent with the


hypothesized distribution (alternative hypothesis)

Determine goodness of fit of variables using the χ2 test

Chocolate bar Number sold

County 1526
Lars 758
Swix 1780
Silkyway 847
Trickers 1089

Total 6000

Perform a χ 2 test of goodness of fit at the 5% significance level to determine whether


chocolate bar sales fit a uniform distribution.

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

2. Find the expected frequencies. Uniform distribution means that each


category is equally likely.
With 5 types of chocolate bar and 6000
sales recorded in total, the expected
frequency for each category:
6000
= 1200
5
3. Write down the degrees of freedom df = (5 − 1) = 4
df = (# rows − 1).

145
STATISTICS Chi-squared test

4. Write down the chi-square value using


GDC..

IB ACADEMY IB ACADEMY IB ACADEMY

Enter data into GDC Enter name of Observed


Press menu
off
and Expected columns (in
Press on go to Lists 4: Statistics
this case A and B)
and Spreadsheets 4: Stat Tests
Enter degrees of freedom
Enter observed and 7: χ 2 GOF Test
Press OK
expected data in two
columns (e.g. A and B)

So Chi-square value
χ 2 = 645.808, and
p -value =
−16
4.440 89 × 10

5. Comment on your result. p < 0.05


→ so we reject the null hypothesis;
chocolate bar sales are not uniformly
distributed.

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.

Two-tailed test statistical significance is assessed in both directions from a


reference value (i.e. you test whether two groups are significantly
different, but not in which direction)

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.

Conduct a two-sample t 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

Mean 768 803


Standard deviation 55 47
n 100 100

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

2. Conduct t -test using GDC.

IB ACADEMY IB ACADEMY IB ACADEMY

Select Stats. Enter means ( x̄ ), standard


Press menu
OK deviations (Sx) and sample
6: Statistics
sizes (n)
7: Stat Tests
Select appropriate H1
4: 2-Sample t Test
( Ha )
Choose ‘Yes’ on Pooled
As a general rule, you OK

will always conduct a


‘pooled’ two-sample IB ACADEMY

test. With a pooled test,


we assume that the
variance of the two
samples is the same.

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

8.6 Non-linear regression

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

Quadratic and cubic 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

IB ACADEMY IB ACADEMY IB ACADEMY

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. . .

IB ACADEMY IB ACADEMY IB ACADEMY

. . . or To find the R2 , open a new . . . or


5: Cubic window and select 7: Cubic Regression
calculator. Then enter the data sets for
the X and Y lists.
Press menu

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

8.7 Linear transformations of random


variables

Single random variables can be multiplied by a constant, or have a constant added to


them to transform them. The following equations can be used to find the new expected
value and variance of the transformed variable. DB 4.14

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

E(a1 X1 ± a2 X2 ± · · · ± an Xn ) = a1 E(X1 ) ± a2 E(X2 ) ± · · · ± an E(Xn )


Var(a1 X1 ± a2 X2 ± · · · ± an Xn ) = a12 Var(X1 ) + a22 Var(X2 ) + · · · + an2 Var(Xn )

8.7.1 Unbiased estimators

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

The unbiased estimate of the variance is given by the following equation.


2 n 2
sn−1 = s
n −1 n

Both unbiased estimators can be calculated using your calculator.

151
STATISTICS Combining normal variables

Unbiased estimators

A sample of 10 people is taken from the population of a school in Amsterdam, to measure


their ages. The following data is obtained: 11, 12, 11, 9, 13, 10, 9, 13, 11, 9. Calculate
unbiased estimates for the mean and standard deviation of the entire population.

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.

8.8 Combining normal variables

Normal random variables can be added together to form a new variable. The new
variable will also be normally distributed.

Suppose there is a large population which is normally distributed as follows.


€ Š
X ∼ N µ, σ 2

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

8.8.1 Central limit theorem

The sample means of a normal distribution will form a normal distribution, regardless of
the number of samples.

A population is not normally distributed, but instead follows a different distribution.


The mean of each sample taken from the population will begin to follow a normal
distribution as the number of samples increases. This is what the central limit theorem
states. In exams, if the number of samples is larger than 30, the sample mean can be
considered normally distributed.

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.

8.9 Confidence intervals of means

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

Calculating confidence intervals

A sample of 40 goldfish is taken from a population and measured, with mean


x = 8.9 cm. The population standard deviation is σ = 1.2 cm. Estimate, with 95%
confidence, the mean length of the entire goldfish population.

1. Decide which distribution should be used. The population standard deviation is


known, so we pick the normal distribution
( z -distribution).

2. Open a calculator page on your calculator


and select the confidence interval option.

IB ACADEMY IB ACADEMY

Press OK and read off your confidence


Press menu
interval bounds.
6: Statistics
CLower is the lower bound and CUpper is
6: Confidence Intervals
the upper bound.
1: z Interval
Our confidence interval is between
Select stats as the data input method if
8.53 cm and 9.27 cm,
you are given the mean and variance.
which means we have
Select data as the data input method if
you are given a set of numbers.
µ = 8.9 cm ± 0.37 cm.

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

8.10 Critical values and regions

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.

8.11 More tests

8.11.1 z -tests and t -tests

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.

z -test and t -test


A machine fills bags of pasta with a labelled weight of 500 g. It is known the standard
deviation of the bags filled by the machine is 10 g. To ensure the bags are filled to the
correct weight, a sample of 50 bags is taken. The sample mean is found to be 505 g. Is
the machine filling bags to the correct weight under a 5% significance level? Calculate
the critical value and region for this test.

1. Determine which test to use. We know the standard deviation of the


population so we pick the z -test.

2. Write out the null and alternative H0 : µ = 500 H1 : µ > 500


hypotheses.

155
STATISTICS More tests

3. Use your calculator to find the p -value.

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.

7. Use the inverse normal distribution on We find the critical value is


your calculator to find the critical region a = x = 503.29, and the critical region is
and value. x > 503.29.

156
STATISTICS More tests 8

8.11.2 Binomial test

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 lesssixes.‹
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

8.11.3 Poisson test

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(λ)

1. Set up the null and alternative H0 : λ=4 H1 : λ<4


hypotheses.

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.

4. If this probability is smaller than the The probability of having 56 or less


significance level then reject the null breakdowns is 0.3% which is less than
hypothesis. our significance level. The null
hypothesis is rejected. The breakdown
rate of cars has decreased.

8.11.4 Test for product moment correlation


coefficient

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

Test for product moment correlation coefficient

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.

1. Write out the null and alternative H0 : ρ=0 H1 : ρ 6= 0


hypotheses.

2. Use your calculator.

IB ACADEMY IB ACADEMY IB ACADEMY

Enter the data into a table Open a calculator page to 6: Stats


in your calculator. perform the test.
Press menu

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.

Type I: H0 is rejected when it is true


Type II: H0 is accepted when it is false

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.

In general the probability of making a type II error is



P accepting H0 |H1 is true

which can also be written as

P p-value > significance level|H1 is true



.

Poisson distribution type II errors


Example

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy