You are on page 1of 41

DICT

DIPLOMA
IN INFORMATION COMMUNICATION TECHNOLOGY

s
te
no
COMPUTER MATHEMATICS e
pl
am
-S
om
a.c
ny
ke
ea

LEVEL 1
om
.s
w
w
w

STUDY TEXT
COMPUTER MATHEMATICS

PAPER NO. 2 COMPUTER MATHEMATICS

GENERAL OBJECTIVE

This paper is intended to equip the candidate with the knowledge. skills and attitude that wit! enable him/her
to apply computer mathematical approaches to solve business problems

2.0 LEARNING OUTCOMES

A candidate who passes this paper should be able to:

• Perform binary arithmetic operations


• Draw simple deductions and conclusions from given data
• Use matrix algebra to solve real life problems
• Solve basic linear equations
• Relate probability and statistics to computing
• Apply set theory in solving computing problems
• Solve computer related problems using logic and truth table concepts

s
te
CONTENT

no
e
2.1 Data representation and number systems pl
am
-S

- Computer codes: BCD, ASCII. EBCDIC


om

- Bit, byte, nibble, word


.c

- Number systems: Decimal numbers, Binary numbers. 'Octal numbers. Hexadecimal numbers
a
ny

- Number conversions
ke
ea

2.2 Binary arithmetic


om
.s

- Addition, subtraction
w
w

- Multiplication, division
w

- Complements
2 :3 Set theory

- Introduction: definitions and purpose


- Types of sets: Universal set. empty null set, sub-sets, finite, infinite, power sets, partition
- Description of sets; enumeration method and descriptive method
- Operations: Union and intersection, complements, difference
- Duality
- Sets and elements
- Venn diagrams
- Ordered pairs, product sets, relations

www.someakenya.com Contact: 0707 737 890 Page 2


COMPUTER MATHEMATICS

2.4 Logic and truth tables

- Introduction
- Conjunction and disjunction
- Negation
- Proportions and truth tables
- Tautology and contradiction
- Logical equivalence
2.5 Elementary matrices

- Introduction to matrices: definitions and importance of matrices


- Matrix addition and subtraction
- Dimensions/order of matrices
- Types of matrices
- Identity matrix
- Matrix operations: addition, subtraction. multiplication, inversion of 2x2 matrices
- Applications of matrices to business problems

s
te
no
25 Linear equations

e
pl
- Linear equations in one unknown
am

- System of two linear equations in two unknowns


-S
om

2.7 Elementary statistics


a.c
ny

- Sources of data: primaries are and secondary


ke

- Methods of collecting primary data: observation. interviews, questionnaires Sampling methods:


ea

probabilistic and non-probabilistic


om

- Data presentation: frequency tables and histograms


.s
w

- Measures of central tendency: arithmetic mean, mode, median


w
w

- Measures of dispersion: range. mean deviation. standard deviation, variance, coefficient of variation
2.8 Introduction to probability

- Definitions: events, outcome, experiment, sample space


- Types of events: simple, elementary. mutually exclusive, mutually inclusive, dependent and
independent
- Laws of probability addition and multiplication
- Basic probability trees
- Finite probability spaces and conditional probability
2.8 Emerging issues and trends

www.someakenya.com Contact: 0707 737 890 Page 3


COMPUTER MATHEMATICS

TOPIC PAGE NUMBER

Topic 1: Data representation and number systems.................................................................5

Topic 2: Binary arithmetic.........................................................................................................22

Topic 3: Set theory......................................................................................................................30

Topic 4: Logic and truth tables..................................................................................................61

Topic 5: Elementary matrices.....................................................................................................82

Topic 6: Linear equations...........................................................................................................103

s
te
Topic 7: Elementary statistics....................................................................................................117

no
e
Topic 8: Introduction to probability..........................................................................................176
pl
am

Topic 9: Emerging issues and trends.........................................................................................210


-S
om
a .c
ny
ke
ea
om
.s
w
w
w

Revised on: May 2017

www.someakenya.com Contact: 0707 737 890 Page 4


COMPUTER MATHEMATICS

TOPIC 1

DATA REPRESENTATION AND NUMBER SYSTEM

COMPUTER CODES (BCD, ASCII, AND EBCDIC

In computing, standards are an agreed way of doing things. Standards make it easier for people to build
programs and software that work on different systems in different countries.
Standards affect many areas of computing, e.g. software files, formats and hardware. Some common
standards include:
MP3 - a file format for audio files supported by most media-playing software
HTML - a markup language for creating websites

s
te
Unicode - a form of representing text

no
e
pl
There are advantages to using standards if you are a creating a program or a product. For instance, the
am

program or product will be more popular if it is widely compatible. Also, it is easier to work with other
-S

people if you work to the same standards.


om
a.c
ny

ASCII
ke
ea

ASCII Table and Description


om

ASCII stands for American Standard Code for Information Interchange. Computers can only understand
.s
w

numbers, so an ASCII code is the numerical representation of a character such as 'a' or '@' or an action of
w
w

some sort. ASCII was developed a long time ago and now the non-printing characters are rarely used for
their original purpose. Below is the ASCII character table and this includes descriptions of the first 32 non-
printing characters. ASCII was actually designed for use with teletypes and so the descriptions are somewhat
obscure. If someone says they want your CV however in ASCII format, all this means is they want 'plain'
text with no formatting such as tabs, bold or underscoring - the raw format that any computer can
understand. This is usually so they can easily import the file into their own applications without issues.
Notepad.exe creates ASCII text, or in MS Word you can save a file as 'text only'

www.someakenya.com Contact: 0707 737 890 Page 5


COMPUTER MATHEMATICS

s
te
no
e
pl
am
-S
om
a.c
ny
ke

Extended ASCII Codes


ea
om
.s
w
w
w

www.someakenya.com Contact: 0707 737 890 Page 6


COMPUTER MATHEMATICS

BCD
Short for Binary Coded Decimal, BCD is also known as packet decimal and is numbers 0 through 9
converted to four-digit binary. Below is a list of the decimal numbers 0 through 9 and the binary conversion.

Decimal BCD
0 0000
1 0001
2 0010
3 0011
4 0100
5 0101
6 0110
7 0111
8 1000
9 1001

s
te
no
Using this conversion, the number 25, for example, would have a BCD number of 0010 0101 or 00100101.
e
However, in binary, 25 is represented as 11001. pl
am
-S

BCD was used in some of the early decimal computers, as well as the IBM System/360 series systems.
om

Numbers larger than 9, having two or more digits in the decimal system, are expressed digit by digit. For
.c

example, the BCD rendition of the base-10 number 1895 is 0001 1000 1001 0101
a
ny
ke

The binary equivalents of 1, 8, 9, and 5, always in a four-digit format, go from left to right.
ea
om
.s

The BCD representation of a number is not the same, in general, as its simple binary representation. In
w

binary form, for example, the decimal quantity 1895 appears as


w
w

11101100111

Other bit patterns are sometimes used in BCD format to represent special characters relevant to a particular
system, such as sign (positive or negative), error condition, or overflow condition.

BCD takes advantage of the fact that any one decimal numeral can be represented by a four bit pattern. The
most obvious way of encoding digits is "natural BCD" (NBCD), where each decimal digit is represented by
its corresponding four-bit binary value, as shown in the following table. This is also called "8421" encoding.

www.someakenya.com Contact: 0707 737 890 Page 7


COMPUTER MATHEMATICS

BCD
Decimal digit
8 4 2 1
0 0 0 0 0
1 0 0 0 1
2 0 0 1 0
3 0 0 1 1
4 0 1 0 0
5 0 1 0 1
6 0 1 1 0
7 0 1 1 1

s
te
8 1 0 0 0

no
e
9 1 0 0 1 pl
am
-S

Other encodings are also used, including so-called "4221" and "7421" — named after the weighting used for
om

the bits — and "excess-3". For example the BCD digit 6, '0110'b in 8421 notation, is '1100'b in 4221 (two
a.c

encodings are possible), '0110'b in 7421, and '1001'b (6+3=9) in excess-3.


ny
ke

As most computers deal with data in 8-bit bytes, it is possible to use one of the following methods to encode
ea
om

a BCD number:
.s
w

 Unpacked: each numeral is encoded into one byte, with four bits representing the numeral and the
w

remaining bits having no significance.


w

 Packed: two numerals are encoded into a single byte; with one numeral in the least
significant nibble (bits 0 through 3) and the other numeral in the most significant nibble (bits 4 through
7).

As an example, encoding the decimal number 91 using unpacked BCD results in the following binary pattern
of two bytes:

Decimal: 9 1

Binary : 0000 1001 0000 0001

www.someakenya.com Contact: 0707 737 890 Page 8


COMPUTER MATHEMATICS

In packed BCD, the same number would fit into a single byte:

Decimal: 9 1

Binary : 1001 0001

Hence the numerical range for one unpacked BCD byte is zero through nine inclusive, whereas the range for
one packed BCD is zero through ninety-nine inclusive.
To represent numbers larger than the range of a single byte any number of contiguous bytes may be used.
For example, to represent the decimal number 12345 in packed BCD, using big-endian format, a program
would encode as follows:

Decimal: 1 2 3 4 5

Binary : 0000 0001 0010 0011 0100 0101

s
te
no
e
Note that the most significant nibble of the most significant byte is zero, implying that the number is in
pl
actuality 012345. Also note how packed BCD is more efficient in storage usage as compared to unpacked
am

BCD; encoding the same number (with the leading zero) in unpacked format would consume twice the
-S

storage.
om
.c

Shifting and masking operations are used to pack or unpack a packed BCD digit. Other logical
a
ny

operations are used to convert a numeral to its equivalent bit pattern or reverse the process
ke
ea

The BCD system offers relative ease of conversion between machine-readable and human-readable
om

numerals. As compared to the simple binary system, however, BCD increases the circuit complexity. The
.s

BCD system is not as widely used today as it was a few decades ago, although some systems still employ
w
w

BCD in financial applications.


w

Advantages of BCD Codes

 It is very similar to decimal system.


 We need to remember binary equivalent of decimal numbers 0 to 9 only.

Disadvantages of BCD Codes

 The addition and subtraction of BCD have different rules.


 The BCD arithmetic is little more complicated.
 BCD needs more number of bits than binary to represent the decimal number. So BCD is less
efficient than binary.

www.someakenya.com Contact: 0707 737 890 Page 9


This is a SAMPLE (Few pages extracted from the complete notes: Note page
numbers reflects the original pages on the complete notes). It’s meant to show
you the topics covered in the notes.

Download more at our websites:

www.someakenya.co.ke
or
www.someakenya.com

To get the complete notes either in softcopy form or in


Hardcopy (printed & Binded) form, contact us:

s
te
no
Call/text/whatsApp 0707 737 890
e
pl
am
-S
om

Email:
a .c

someakenya@gmail.com
ny
ke

info@someakenya.co.ke
ea

info@someakenya.com
om
.s
w
w
w

Get news and updates about kasneb by liking our page


www.fb.com/studycpa
Or following us on twitter www.twitter.com/someakenya

Pass on first attempt


“Buy quality notes and avoid a refers/retakes which costs more money and time”

Sample/preview is NOT FOR SALE


COMPUTER MATHEMATICS

TOPIC 2

BINARY ARTHMETIC
Introduction

Binary arithmetic is one of those skills which you probably won't use very often. It can be very useful to
know however. These processes are often stepping stones to more complex processes which can do very
powerful things. Fortunately, they are not too difficult so with a bit of practice you'll be off and running in no
time.

There are many calculators now which can do binary arithmetic for you. Just about every desktop OS, smart
phone and tablet has one built in or one can easily be aquired. It is perfectly fine to use the calculator but we
should know how to do it by hand as well. This will give us a much better understanding as to what is
actually happening. That understanding is important in order to understand how certain mechanisms work

s
(especially in computing). My recommendation is to practice on paper by hand but use the calculator to

te
no
verify your working.
e
pl
am
-S

BINARY ADDITION
om
a.c

Addition, subtraction, multiplication and division are the four types of operation on which all the arithmetic
ny
ke

operation depends of decimal number system, similarly these are the pillars of binary arithmetic also. The
ea

first and perhaps the most important of them all is binary addition and it is the easiest of them all also.
om

Now coming to the method of addition, there are four points or steps to remember before proceeding through
.s
w
w
w

the operation. These are

As there no numbers other than 0 and 1 in the binary number system these four steps include all the possible
operations of addition.
Now let us explain the operation through an example
Suppose A = 10010101 and B = 10000110
Now we want to find out A + B i.e. we have to perform binary addition, we will look through the process

with thorough explanation. This is the addition of the first two least significant digits which

www.someakenya.com Contact: 0707 737 890 Page 22


COMPUTER MATHEMATICS

are 0 and 1 and 1 + 0 = 1 which is written. Here again the similar step is done i.e. 0 + 1 =

1.

Here 1 + 1 = 0 and the carry is written on the top of the next significant bit which will be used in the next

s
te
no
e
pl
am
-S
om

step. As we know 0 + 0 = 0 and 1 + 0 = 1 (1 comes from the carry) and the result 1 is
a.c
ny
ke
ea
om
.s
w

written. Again 1 + 0 = 1 and that is exactly what is written. The next


w
w

two bits which are to beaded are 0 and 0 and 0 + 0 = 0. Again the same operation 0 + 0 =

0 is done and written. The last two bits include 1 + 1 = 0 and carry 1 which is written
directly in the result.

www.someakenya.com Contact: 0707 737 890 Page 23


This is a SAMPLE (Few pages extracted from the complete notes: Note page
numbers reflects the original pages on the complete notes). It’s meant to show
you the topics covered in the notes.

Download more at our websites:

www.someakenya.co.ke
or
www.someakenya.com

To get the complete notes either in softcopy form or in


Hardcopy (printed & Binded) form, contact us:

s
te
no
Call/text/whatsApp 0707 737 890
e
pl
am
-S
om

Email:
a .c

someakenya@gmail.com
ny
ke

info@someakenya.co.ke
ea

info@someakenya.com
om
.s
w
w
w

Get news and updates about kasneb by liking our page


www.fb.com/studycpa
Or following us on twitter www.twitter.com/someakenya

Pass on first attempt


“Buy quality notes and avoid a refers/retakes which costs more money and time”

Sample/preview is NOT FOR SALE


COMPUTER MATHEMATICS

TOPIC 3

SET THEORY

A set can be defined as a collection of things that are brought together because they obey a certain rule.

These 'things' may be anything you like: numbers, people, shapes, cities, bits of text ..., literally anything.

The key fact about the 'rule' they all obey is that it must be well-defined. In other words, it enables us to say
for sure whether or not a given 'thing' belongs to the collection. If the 'things' we're talking about are English
words, for example, a well-defined rule might be:

'... has 5 or more letters'

A rule which is not well-defined (and therefore couldn't be used to define a set) might be:

s
te
'... is hard to spell'

no
e
Requirement of a set
pl
am

1. A set must be well defined i.e. it must not leave any room for ambiguities e.g sets of all students- which?
-S

Where? When?
om

A set must be defined in terms of space and time


a.c
ny

2. The objective (elements or members) from a given set must be distinct i.e each object must appear once
ke

and only once, Must appear but not more than once
ea

3. The order of the presentation of elements of a given set is immaterial


om

4. e.g 1,2,3 = 1,3,2 = 3,2,1


.s
w
w
w

TYPES OF SETS:

In set theory, there are different types of sets. All the operations in set theory could be based on sets. Set
should be a group of individual terms in domain. The universal set has each and every element of domain.
We are having different types of sets. We will see about the different types of sets.

Different Types of Sets

There are different types of sets in set theory. They are listed below:

 Universal Set
 Empty set
 Singleton set

www.someakenya.com Contact: 0707 737 890 Page 30


COMPUTER MATHEMATICS

 Finite and Infinite set


 Union of sets
 Intersection of sets
 Difference of sets
 Subset of a set
 Disjoint sets
 Equality of two sets

Universal Set

The set of all the 'things' currently under discussion is called the universal set (or sometimes, simply the
universe). It is denoted by U.

The universal set doesn’t contain everything in the whole universe. On the contrary, it restricts us to just
those things that are relevant at a particular time. For example, if in a given situation we’re talking about

s
numeric values – quantities, sizes, times, weights, or whatever – the universal set will be a suitable set of

te
no
numbers (see below). In another context, the universal set may be {alphabetic characters} or {all living
e
people}, etc. pl
am
-S

Singleton Set:
om
.c
a

 A set which contains only one element is called a singleton set.


ny
ke
ea

For example:
om

 • A = {x : x is neither prime nor composite}


.s
w
w

It is a singleton set containing one element, i.e., 1.


w

• B = {x : x is a whole number, x < 1}

This set contains only one element 0 and is a singleton set.

• Let A = {x : x ∈ N and x² = 4}

Here A is a singleton set because there is only one element 2 whose square is 4.

• Let B = {x : x is a even prime number}

Here B is a singleton set because there is only one prime number which is even, i.e., 2.

www.someakenya.com Contact: 0707 737 890 Page 31


COMPUTER MATHEMATICS

Finite Set:

 A set which contains a definite number of elements is called a finite set. Empty set is also called a
finite set.

For example:
 • The set of all colors in the rainbow.

• N = {x : x ∈ N, x < 7}

• P = {2, 3, 5, 7, 11, 13, 17, ...... 97}

Infinite Set:
 The set whose elements cannot be listed, i.e., set containing never-ending elements is called an
infinite set.

For example:

s
 • Set of all points in a plane

te
no
e
• A = {x : x ∈ N, x > 1} pl
am
-S

• Set of all prime numbers


om

• B = {x : x ∈ W, x = 2n}
.c
a
ny

Note:
ke
ea

 All infinite sets cannot be expressed in roster form.


om
.s

For example:
w
w

 The set of real numbers since the elements of this set do not follow any particular pattern.
w

Cardinal Number of a Set:


 The number of distinct elements in a given set A is called the cardinal number of A. It is denoted by
n(A).

For example:
 • A {x : x ∈ N, x < 5}

A = {1, 2, 3, 4}

Therefore, n(A) = 4

• B = set of letters in the word ALGEBRA

B = {A, L, G, E, B, R}
www.someakenya.com Contact: 0707 737 890 Page 32
This is a SAMPLE (Few pages extracted from the complete notes: Note page
numbers reflects the original pages on the complete notes). It’s meant to show
you the topics covered in the notes.

Download more at our websites:

www.someakenya.co.ke
or
www.someakenya.com

To get the complete notes either in softcopy form or in


Hardcopy (printed & Binded) form, contact us:

s
te
no
Call/text/whatsApp 0707 737 890
e
pl
am
-S
om

Email:
a .c

someakenya@gmail.com
ny
ke

info@someakenya.co.ke
ea

info@someakenya.com
om
.s
w
w
w

Get news and updates about kasneb by liking our page


www.fb.com/studycpa
Or following us on twitter www.twitter.com/someakenya

Pass on first attempt


“Buy quality notes and avoid a refers/retakes which costs more money and time”

Sample/preview is NOT FOR SALE


COMPUTER MATHEMATICS

TOPIC 4

LOGIC, TRUTH TABLES AND CIRCUITS

INTRODUCTION

This is the first of a series of articles on mathematical logic which will show that truth tables, set theory,
Boolean algebra and electronic circuits are essentially equivalent; that is, theorems that can be proved in one
system have their counterparts in the other systems. In subsequent articles we shall see how Boolean algebra
is used in designing electronic circuits. In this article we begin to explore the links between electronic
circuits and mathematical logic.

Although logic does not model language perfectly it does form a useful system that, in practice, is the basis
of most of the communication of mathematical ideas between working mathematicians. Logical conventions

s
te
are used to overcome the ambiguities and inadequacies of language. The philosophical aspects of the subject

no
are rather more subtle and complicated and we shall not dwell on them.
e
pl
am
-S
om

CONJUNCTION AND DISJUNCTION


a.c
ny
ke
ea

A conjunction is a compound statement formed by joining two statements with the connector AND. The
om

conjunction "p and q" is symbolized by p q. A conjunction is true when both of its combined parts are true;
.s

otherwise it is false.
w
w
w

Example 1:
Given: p: Ann is on the softball team.
q: Paul is on the football team.
Problem: What does p q represent?

Solution:
In Example 1, statement p represents the sentence, "Ann is on the softball team," and statement q
represents the sentence, "Paul is on the football team." The symbol is a logical connector which
means "and." Therefore, the compound statement p q represents the sentence, "Ann is on the softball
team and Paul is on the football team." The statement p q is a conjunction.

www.someakenya.com Contact: 0707 737 890 Page 61


COMPUTER MATHEMATICS

Now that we have defined a conjunction, we can apply it to Example 1. The conjunction p q is true
when both "Ann is on the softball team" and "Paul is on the football team" are true statements;
otherwise it is false. We can construct a truth table for the conjunction "p and q." In order to
list all truth values of p q, we start by listing every combination of truth values in the first two
columns of the truth table below.

p q p q
TT
TF
F T
F F
Next, we complete the last column according to the rules for conjunction listed above.

p q p q
TT T

s
te
TF F

no
F T F
e
pl
F F F
am
-S
om

The truth table above lists the truth values of p q. A truth table is an excellent tool for listing the truth
a.c

values of a conjunction (or any compound statement). (Note: Throughout our lessons on symbolic
ny
ke

logic, we will always construct truth tables with the first two columns listed exactly as above. The order
ea

of the truth values in these first columns is critical to finding all truth values for a given statement. This
om

order will also apply to other formats used to list truth values in more advanced lessons.) Let's look at
.s

some more examples of conjunction.


w
w
w

Example 2:

Given: a: A square is a quadrilateral.


b: Harrison Ford is an American actor.
Problem: Construct a truth table for the conjunction "a and b."

Solution:
a b a b
TT T
TF F
F T F

www.someakenya.com Contact: 0707 737 890 Page 62


COMPUTER MATHEMATICS

F F F
Example 3:

Given: r: The number x is odd.


s: The number x is prime.
Problem: Can we list all truth values for r s in a truth table? Why or why not?
Solution: Since each statement given in this example represents an open sentence, the truth value of r
s will depend on the value of variable x. But there are an infinite number of replacement
values for x, so we cannot list all truth values for r s in a truth table. We can, however, find
the truth value of r s for given values of x as shown below.

If x = 3, then r is true, s is true. The conjunction r s is true.


If x = 9, then r is true, s is false. The conjunction r s is false.
If x = 2, then r is false, s is true. The conjunction r s is false.
If x = 6, then r is false, s is false. The conjunction r s is false.

s
te
no
e
pl
In the next example we are given the truth values of each statement. We are then asked to determine the
am

truth values of the specified conjunctions.


-S
om
.c

Example 4:
a
ny
ke

Given: p: The number 11 is prime. true


ea

q: The number 17 is composite. false


om
.s

r: The number 23 is prime. true


w
w

Problem: For each conjunction below, write a sentence and indicate if it is true or false.
w

1. p q The number 11 is prime and the number 17 is composite. false


2. p r The number 11 is prime and the number 23 is prime. true
3. q r The number 17 is composite and the number 23 is prime. false

A conjunction is formed by combining two statements with the connector "and." One of these
statements can be a negation as shown in the example below.
Example
Construct a truth table for each conjunction below:
5:
1. x and y
2. ~x and y
3. ~y and x

www.someakenya.com Contact: 0707 737 890 Page 63


COMPUTER MATHEMATICS

Solution:
x y x y x y ~x ~x y x y ~y ~y x
TT T TT F F TT F F
TF F TF F F TF T T
F T F F T T T F T F F
F F F F F T F F F T F

Summary: A conjunction is a compound statement formed by joining two


statements with the connector "and." The conjunction "p and q" is
symbolized by p q. A conjunction is true when both of its
combined parts are true; otherwise it is false.

s
te
DISJUNCTION

no
e
pl
am

Example 1:
-S
om

Given: p: Ann is on the softball team.


.c

q: Paul is on the football team.


a
ny
ke

Problem: What does p q represent?


ea
om
.s
w

Solution:
w
w

In Example 1, statement p represents, "Ann is on the softball team" and statement q represents, "Paul is on
the football team." The symbol is a logical connector which means "or." Thus, the compound statement p
q represents the sentence, "Ann is on the softball team or Paul is on the football team." The statement p q
is a disjunction.

Definition: A disjunction is a compound statement formed by joining two statements with the
connector OR. The disjunction "p or q" is symbolized by p q. A disjunction is false
if and only if both statements are false; otherwise it is true. The truth values of p q
are listed in the truth table below.
p q p q
T T T
T F T
F T T

www.someakenya.com Contact: 0707 737 890 Page 64


This is a SAMPLE (Few pages extracted from the complete notes: Note page
numbers reflects the original pages on the complete notes). It’s meant to show
you the topics covered in the notes.

Download more at our websites:

www.someakenya.co.ke
or
www.someakenya.com

To get the complete notes either in softcopy form or in


Hardcopy (printed & Binded) form, contact us:

s
te
no
Call/text/whatsApp 0707 737 890
e
pl
am
-S
om

Email:
a .c

someakenya@gmail.com
ny
ke

info@someakenya.co.ke
ea

info@someakenya.com
om
.s
w
w
w

Get news and updates about kasneb by liking our page


www.fb.com/studycpa
Or following us on twitter www.twitter.com/someakenya

Pass on first attempt


“Buy quality notes and avoid a refers/retakes which costs more money and time”

Sample/preview is NOT FOR SALE


COMPUTER MATHEMATICS

TOPIC 5
ELEMENTARY MATRICES

INTRODUCTION TO MATRICES, DEFINITION AND IMPORTANCE OF MATRIX

DEFINITION

A matrix is a collection of numbers arranged into a fixed number of rows and columns. Usually the numbers
are real numbers. In general, matrices can contain complex numbers but we won't see those here. Here is an
example of a matrix with three rows and three columns:

s
te
no
The top row is row 1. The leftmost column is column 1. This matrix is a 3x3 matrix because it has three rows
e
and three columns. In describing matrices, the format is: pl
am
-S

Rows X columns
om

Each number that makes up a matrix is called an element of the matrix. The elements in a matrix have
a.c

specific locations.
ny
ke
ea

The upper left corner of the matrix is row 1 column 1. In the above matrix the element at row 1 col 1 is the
om

value 1. The element at row 2 column 3 is the value 4.6.


.s
w
w
w

IMPORTANCE OF MATRICES

Matrix mathematics applies to several branches of science, as well as different mathematical disciplines.
Let’s start with computer graphics, then touch on science, and return to mathematics.

We see the results of matrix mathematics in every computer-generated image that has a reflection, or
distortion effects such as light passing through rippling water.

Before computer graphics, the science of optics used matrix mathematics to account for reflection and for
refraction.

Matrix arithmetic helps us calculate the electrical properties of a circuit, with voltage, amperage, resistance,
etc.

www.someakenya.com Contact: 0707 737 890 Page 82


COMPUTER MATHEMATICS

In mathematics, one application of matrix notation supports graph theory. In an adjacency matrix, the integer
values of each element indicates how many connections a particular node has.

The field of probability and statistics may use matrix representations. A probability vector lists the
probabilities of different outcomes of one trial. A stochastic matrix is a square matrix whose rows are
probability vectors. Computers run Markov simulations based on stochastic matrices in order to model
events ranging from gambling through weather forecasting to quantum mechanics.

Matrix mathematics simplifies linear algebra, at least in providing a more compact way to deal with groups
of equations in linear algebra.

DIMENSIONS/ORDER OF MATRICES

The numbers of rows and columns of a matrix are called its dimensions. Here is a matrix with three rows
and two columns:

s
te
no
e
pl
am
-S

Sometimes the dimensions are written off to the side of the matrix, as in the above matrix. But this is just a
om

little reminder and not actually part of the matrix. Here is a matrix with different dimensions. It has two rows
.c

and three columns. This is a different "data type" than the previous matrix
a
ny
ke
ea
om
.s

.
w
w
w

TYPES OF MATRICES

Row Matrix

A row matrix is formed by a single row.

Column Matrix

A column matrix is formed by a single column.

www.someakenya.com Contact: 0707 737 890 Page 83


COMPUTER MATHEMATICS

Rectangular Matrix

A rectangular matrix is formed by a different number of rows and columns, and its dimension is noted as:
mxn.

Square Matrix

A square matrix is formed by the same number of rows and columns.

s
te
no
The elements of the form aii constitute the principal diagonal.
e
pl
am

The secondary diagonal is formed by the elements with i+j = n+1.


-S
om
.c
a
ny
ke
ea

Zero Matrix
om
.s
w

In a zero matrix, all the elements are zeros.


w
w

Upper Triangular Matrix

In an upper triangular matrix, the elements located below the diagonal are zeros.

Lower Triangular Matrix

In a lower triangular matrix, the elements above the diagonal are zeros.
www.someakenya.com Contact: 0707 737 890 Page 84
This is a SAMPLE (Few pages extracted from the complete notes: Note page
numbers reflects the original pages on the complete notes). It’s meant to show
you the topics covered in the notes.

Download more at our websites:

www.someakenya.co.ke
or
www.someakenya.com

To get the complete notes either in softcopy form or in


Hardcopy (printed & Binded) form, contact us:

s
te
no
Call/text/whatsApp 0707 737 890
e
pl
am
-S
om

Email:
a .c

someakenya@gmail.com
ny
ke

info@someakenya.co.ke
ea

info@someakenya.com
om
.s
w
w
w

Get news and updates about kasneb by liking our page


www.fb.com/studycpa
Or following us on twitter www.twitter.com/someakenya

Pass on first attempt


“Buy quality notes and avoid a refers/retakes which costs more money and time”

Sample/preview is NOT FOR SALE


COMPUTER MATHEMATICS

TOPIC 6

LINEAREQUATIONS

A linear function is a first degree polynomial function that takes the following general form.

y= a +bx

Where: y is dependent variable


x is independent variable
a is y-intercept or the value of y when x = 0
b is the slope or gradient or the amount by which y changes in value when x changes by a unit

s
te
Properties/characteristics of linear equations

no
e
pl
When plotted on an x-y coordinate system, the result is a straight line whose general direction is dependent
am

on the slope, b of the function.


-S
om
a.c

Specifically, if
ny
ke
ea

a) Slope, b > 0 (+ve)


om
.s

Y
w
w

Y = a + bx
w

a
X

b) Slope, b < 0 (negative)


Y
a

y = a - bx

c) Slope, b = 0 a X
/b
www.someakenya.com Contact: 0707 737 890 Page 103
COMPUTER MATHEMATICS

y=a
a
x
d) Slope, b is undefined or b = ∞

s
te
1. A linear equation has only one root or solution

no
2. A linear function is completely specified if either
e
pl
a) Two points or
am

b) One point and the slope of the function are given.


-S
om
.c
a
ny
ke

ILLUSTRATIONS
ea
om

Properties of linear functions or equations


.s
w
w
w

1. Find the equation of the straight line which passes through the two point given as :
When x = 1, y = 8
x = -2, y = 4
2. Find the expression for the linear function which passes through the two points given as:
(x,y) = (1,1)
(x,y) = (-2,6)
3. Find the equation of the straight line with a slope of -5 which passes through the point (3,5)

Solutions

1. Let the linear equation be y = a +bx


i) 8=a+b 8 = a + b (i)
ii) 4 = a + -2b 4= a – 2b (ii)
www.someakenya.com Contact: 0707 737 890 Page 104
COMPUTER MATHEMATICS

4 = a =2b 4 = 3b b = 4/3
Substitute b in (i) 8=a+
a= − = =
Hence the equation of the straight line is:
y= − x
3y = 20 + 4x

2. Let the linear equation be y = a + bx


Let the linear equation be y = a+bx
1 = a+b............. (i)

∴ b = −5 3
1=a−5 3
a= + = =

s
te
no
∴ The equation will be

e
pl
am

y= −
-S
om

3y = 8 – 5x
a .c
ny
ke

3. Let the equation be y = a+bx


ea

b= - 5, x = 3, y=5
om

5 = a – 5x
.s
w

5 = a – 15
w
w

a = 5 + 15 = 20 Hence the equation will be y = 20 – 5x.

LINEAR EQUATION IN ONE UNKNOWN

An equation of the shape: ax + b = 0, where a and b – the known numbers, x – an unknown value, is
called a linear equation in one unknown. To solve this equation means to find the numerical value of x , at
which this equation becomes an identity.

If a is not equal to zero ( a ≠ 0 ), then a solution ( root ) has the shape:

www.someakenya.com Contact: 0707 737 890 Page 105


This is a SAMPLE (Few pages extracted from the complete notes: Note page
numbers reflects the original pages on the complete notes). It’s meant to show
you the topics covered in the notes.

Download more at our websites:

www.someakenya.co.ke
or
www.someakenya.com

To get the complete notes either in softcopy form or in


Hardcopy (printed & Binded) form, contact us:

s
te
no
Call/text/whatsApp 0707 737 890
e
pl
am
-S
om

Email:
a .c

someakenya@gmail.com
ny
ke

info@someakenya.co.ke
ea

info@someakenya.com
om
.s
w
w
w

Get news and updates about kasneb by liking our page


www.fb.com/studycpa
Or following us on twitter www.twitter.com/someakenya

Pass on first attempt


“Buy quality notes and avoid a refers/retakes which costs more money and time”

Sample/preview is NOT FOR SALE


COMPUTER MATHEMATICS

TOPIC 7

ELEMENTARY STATISTICS

Statistics is the art and science of getting information from data or numbers to help in decision making.

As a science, statistics follows a systematic procedure to reach objective decisions or solutions to


problems.

As an art statistics utilizes personal judgment and intuition to reach a solution. It depends on experience
of the individual involved. It is more subjective.

Statistics provides us with tools that aid decision making. For example, using statistics we can estimate

s
that expected returns and associated risks of a given investment opportunity. Statistics involves collection

te
no
of data, analysis, presentation and interpretation of data.
e
pl
am

There are various types of summary measures including averages and measures of dispersion. An average
-S

is a figure which represents the whole data. It removes all unnecessary details and gives a clear picture of
om

the data under investigation.


a.c
ny

Definitions of key terms


ke
ea

Statistical inference is deduction about a population based on information obtained from a sample drawn
om

from it. It includes:


.s
w

 point estimation
w
w

 interval estimation
 hypothesis testing (or statistical significance testing)
 prediction

Measures of central tendency are single numbers that are used to summarise a larger set of data in a
distribution of scores. The three measures of central tendency are mean, median, and mode.

Measures of dispersion – These are important for describing the spread of the data, or its variation
around a central value. Such measures of dispersion include: standard deviation, interquartile range,
range, mean difference, median absolute deviation, avarage absolute deviation (or simply average
deviation)

Variance is the sum of squared deviations divided by the number of observations. It is the average of the
squares of the deviation of the individual values from their means.

www.someakenya.com Contact: 0707 737 890 Page 117


COMPUTER MATHEMATICS

Skewness describes the degree of symmetry in a distribution. When data are uni-modal and symmetrical,
the mean, mode and median will be almost the same value.

Kurtosis describes the degree of peakedness or steepness in a distribution.

Statistics has two broad meanings

1. Statistics refers to the mass of components or measures such as the mean, mode, standard
deviation etc. that help in describing the characteristics of a given set of data or distribution. In
this respect, statistics is simply, numerical facts about a given situation.
This is the original meaning of statistics. Governments were the first organisations to collect
vital statistics such as death rates, birth rates, economic growth etc.

2. Statistics refers to a method of study. This is commonly known as the scientific method.
Statistics is the process that gives thorough systematic steps to aid problem solving or decision
making.

s
te
no
e
pl
The steps are:
am
-S

a) Problem identification and definition


om
a.c
ny

Once the problem is identified, it should be formulated as clearly and as unambiguously as possible. The
ke

questions to be answered will clearly be defined at this point. This is necessary because it enables us to
ea

make appropriate conclusion from the study.


om
.s
w

b) Research methodology design


w
w

After formulating the problem, we need to come up with a defined plan on how the study will be
conducted to solve the problem.

Research design entails the following:

i. Determine the population of study. Population of study refers to the entire collection of objects
or subjects for which we want to make a decision e.g. the number of customers of a supermarket;
the number of students in public universities, the number of matatus in Nairobi, the number of
employees in campus, the number of hospitals in Nyeri.
ii. Decide whether to use a census or a sample study. A census entails studying each and every
element in a population. A sample study entails studying a portion of the population
iii. Decide the data collection techniques to use e.g. observation, questionnaires, interviews, Internet
pop-ups etc.

www.someakenya.com Contact: 0707 737 890 Page 118


COMPUTER MATHEMATICS

iv. Identify the data analysis technique to be used.

• Actual data collection/fieldwork


• Data analysis

After data is collected, it is analysed so as to enable us make decisions. Data analysis involves the following:

• Organisation of data- This enables us to check for completeness, accuracy and reference. Organising
data can also involve coding the data for ease of analysis.

Data presentation – Diagrams, graphs, tables etc. are used to present data so asto highlight the visual
impression of the data. The kinds of graphs and charts used will depend on the audience. Type of graphs and
charts may also be determined by type of information being presented

Statistical inference

The four steps above are referred to as descriptive statistics. Descriptive statistics helps us to organise,

s
te
summarise and present data in a convenient and informative way.

no
e
pl
am
Inferential statistics, on the other hand, enables us to draw conclusions about the characteristics of a
-S

population. Because most studies depend on samples, we use the sample results to draw conclusions about
om

the population from which the sample was drawn. The process of making conclusions about the population
.c

based on sample statistics is known as sample inference.


a
ny
ke

Use sample statistics conclude on population parameters


ea
om
.s

Based on the statistical inference, then we answer the question or make the decision or solve the problem that
w
w

we set out to do.


w

Qualities of a good average

1. It should be clearly defined


2. Should be based on all values or observation
3. Should be easily understood and calculated
4. Should be capable of further statistical investigation/treatment
5. Should be least affected by fluctuations of sampling

www.someakenya.com Contact: 0707 737 890 Page 119


COMPUTER MATHEMATICS

SOURCES OF DATA: PRIMARY AND SECONDARY

Data collection is a process of collecting data using different methodologies. It is a very important topic of
statistics as well as mathematics. The data collections are known as, any information collected from some
person or some other ways to get news. Data collection can be defined as a term which is used to explain the
process of preparing and collecting data, such as, a part of a process improvement. The purpose of data
collection is to collect important information to keep on record for further use, to make important decisions
about different issues, and to pass vital information on to others.

What is Data Collection Methods?

The data collection is to collect important information to keep on record for further use, to make important
decisions about different issues, and to pass vital information on to others.
In terms of the method of data collection that will be used for the study, there are mainly two types of data:

 Primary data

s
 Secondary data

te
no
e
Primary Data pl
am
-S

They are collected afresh and for the first time, and thus happens to be original in character. They are the
om

most original data and mostly have not undergone any sort of statistical test.
a.c
ny

Secondary Data
ke
ea

They are those that has already been collected by someone else and which has been already been passed
om

through the statistical process. They are not pure and have undergone some treatment at least once.
.s
w
w
w

Data Edition:

After collecting the required data, either from primary or secondary means, the next step leads to edition.
Editing is a process by which the data collected is examined to discover any error and mistake before it is
presented. It has to be understood before hand it self to what degree the accuracy is needed and to what
extent the errors can be tolerated in the inquiry. The editing of secondary data is much simpler than that of
primary data.

www.someakenya.com Contact: 0707 737 890 Page 120


This is a SAMPLE (Few pages extracted from the complete notes: Note page
numbers reflects the original pages on the complete notes). It’s meant to show
you the topics covered in the notes.

Download more at our websites:

www.someakenya.co.ke
or
www.someakenya.com

To get the complete notes either in softcopy form or in


Hardcopy (printed & Binded) form, contact us:

s
te
no
Call/text/whatsApp 0707 737 890
e
pl
am
-S
om

Email:
a .c

someakenya@gmail.com
ny
ke

info@someakenya.co.ke
ea

info@someakenya.com
om
.s
w
w
w

Get news and updates about kasneb by liking our page


www.fb.com/studycpa
Or following us on twitter www.twitter.com/someakenya

Pass on first attempt


“Buy quality notes and avoid a refers/retakes which costs more money and time”

Sample/preview is NOT FOR SALE


COMPUTER MATHEMATICS

TOPIC 8

INTRODUCTION TO PROBABILITY
Introduction

Probability is a measure of likelihood, the possibility or chance that an event will happen in future.
It can be considered as a quantification of uncertainty.

Uncertainty may also be expressed as likelihood, chance or risk theory. It is a branch of


mathematics concerned with the concept and measurement of uncertainty.

Much in life is characterized by uncertainty in actual decision making.

s
Probability can only assume a value between 0 and 1 inclusive. The closer a probability is to zero the more

te
no
improbable that something will happen. The closer the probability is to one the more likely it will happen.

e
pl
am
-S
om

DEFINITIONS
a.c
ny

An Event of an experiment is a subset of a sample space e.g. in tossing a coin twice S= (HH, HT, TH,
ke
ea

TT) HH is a subset of a sample space.


om
.s

Outcome is the result of an experiment e.g. head up, gain, loss, etc. Specific outcomes are known as
w
w

events.
w

Trial- Each repetition of an experiment can be thought of as a trial which has an observable outcome e.g. in
tossing a coin, a single toss is a trial which has an outcome as either head or tail

Random experiment results in one of a number of possible outcomes e.g. tossing a coin

Sample space is the set of all possible outcomes in an experiment e.g. a single toss of a coin, S=(H,T). The
sample space can be finite or infinite. A finite sample space has a finite number of possible outcomes e.g. in
tossing a coin only 2 outcomes are possible.

An infinite sample space has an infinite number of possible outcomes e.g. time between arrival of
telephone calls and telephone exchange.

www.someakenya.com Contact: 0707 737 890 Page 176


COMPUTER MATHEMATICS

Other concepts

Unconditional and conditional probabilities –with unconditional probability we express probability of an


event as a ratio of favourable outcomes to the number of all possible outcomes. A conditional probability
is the probability that a second event occurs if the first event has already occurred.

Joint probability –joint probability gives the probability of the joint or simultaneous occurrence
of two or more characteristics.

Marginal probability –is the sum of two or more joint probabilities taken over all values of one or more
variables. It is the probability that the results when we ignore one or more criteria of classification when
computing probability.
Probability is used throughout business to evaluate financial risks and decision-making.

Every decision made by management carries some chance for failure, so probability analysis is conducted
formally.

s
te
no
In many natural processes, random variation conforms to a particular probability distribution known as
e
pl
the normal distribution, which is the most commonly observed probability distribution.
am
-S
om
a.c
ny
ke
ea

TYPES OF EVENTS: SIMPLE ELEMENTARY, MUTUALLY EXCLUSIVE, MUTUALRY


om

INCLUSIVE, DEPENDENT AND INDEPENDENT


.s
w
w
w

SIMPLE ELEMENTARY

In probability theory, an elementary event (also called an atomic event or simple event) is an event which
contains only a single outcome in the sample space. Using set theory terminology, an elementary event is
a singleton.

For Example: Randomly taking a card from a deck is an elementary event.


When two coins are tossed, possible outcomes are {HH}, {HT}, {TH}, {TT}. Then each of these outcomes
are known as elementary event.

www.someakenya.com Contact: 0707 737 890 Page 177


COMPUTER MATHEMATICS

MUTUALLY EXCLUSIVE AND MUTUALRY INCLUSIVE

Mutually exclusive event - A set of events is said to be mutually exclusive if the occurrence of any one of
the events precludes the occurrence of other events i.e. the occurrence of any one event means none of the
others can occur at the same time e.g. the events head and tail are mutually exclusive

Mutually inclusive events are the ones in which there are some common outcomes in between the given
events. Like getting an odd number or getting a prime number when we throw a dice. In these two events
there are common outcomes {3, 5} repeating in both the events. So these two events are mutually inclusive
events.

INDEPENDENT EVENTS AND DEPENDENT EVENTS

Independent events

When two events are said to be independent of each other, what this means is that the probability that one

s
te
event occurs in no way affects the probability of the other event occurring. An example of two independent

no
events is as follows; say you rolled a die and flipped a coin. The probability of getting any number face on
e
pl
the die in no way influences the probability of getting a head or a tail on the coin.
am
-S

Dependent events
om
.c

When two events are said to be dependent, the probability of one event occurring influences the likelihood of
a
ny

the other event.


ke
ea

For example, if you were to draw a two cards from a deck of 52 cards. If on your first draw you had an ace
om

and you put that aside, the probability of drawing an ace on the second draw is greatly changed because you
.s
w

drew an ace the first time. Let's calculate these different probabilities to see what's going on.
w
w

Collectively exclusive event - A set of events is said to be collectively exclusive if their union accounts
for all possible outcomes i.e. one of their events must occur when an experiment is conducted.

Favourable events refer to the number of possible occurrences of a given event in an experiment e.g. if
we pick a card from a deck of 52 cards the number favorable to a red card is 26, in tossing coin the
number favourable to a head is one.

Independent events –Events are independent if the happening or non-happening of one has no effect on
the future happening of another event. E.g. in tossing two times of a coin, the outcome of 1st toss does not
affect 2nd toss.

www.someakenya.com Contact: 0707 737 890 Page 178


This is a SAMPLE (Few pages extracted from the complete notes: Note page
numbers reflects the original pages on the complete notes). It’s meant to show
you the topics covered in the notes.

Download more at our websites:

www.someakenya.co.ke
or
www.someakenya.com

To get the complete notes either in softcopy form or in


Hardcopy (printed & Binded) form, contact us:

s
te
no
Call/text/whatsApp 0707 737 890
e
pl
am
-S
om

Email:
a .c

someakenya@gmail.com
ny
ke

info@someakenya.co.ke
ea

info@someakenya.com
om
.s
w
w
w

Get news and updates about kasneb by liking our page


www.fb.com/studycpa
Or following us on twitter www.twitter.com/someakenya

Pass on first attempt


“Buy quality notes and avoid a refers/retakes which costs more money and time”

Sample/preview is NOT FOR SALE


DICT
DIPLOMA
IN INFORMATION COMMUNICATION TECHNOLOGY

s
te
no
COMPUTER MATHEMATICS e
pl
am
-S
om
a.c
ny
ke
ea

LEVEL 1
om
.s
w
w
w

STUDY TEXT
This is a SAMPLE (Few pages extracted from the complete notes: Note page
numbers reflects the original pages on the complete notes). It’s meant to show
you the topics covered in the notes.

Download more at our websites:

www.someakenya.co.ke
or
www.someakenya.com

To get the complete notes either in softcopy form or in


Hardcopy (printed & Binded) form, contact us:

s
te
no
Call/text/whatsApp 0707 737 890
e
pl
am
-S
om

Email:
a .c

someakenya@gmail.com
ny
ke

info@someakenya.co.ke
ea

info@someakenya.com
om
.s
w
w
w

Get news and updates about kasneb by liking our page


www.fb.com/studycpa
Or following us on twitter www.twitter.com/someakenya

Pass on first attempt


“Buy quality notes and avoid a refers/retakes which costs more money and time”

Sample/preview is NOT FOR SALE

You might also like