Learning Content
Learning Content
Learning Content
The values that a variable can assume are called data. It can be qualitative
(categorical) or quantitative (numerical and can be ranked). Quantitative data
can be discrete (countable) or continuous (includes decimals).
Levels of Measurement
Example:
Twenty-five army inductees were given a blood test to determine their blood
A,O,O,O,AB AB,A,O,B,A
X1 X 2 X 3 XN
X
N
N
EXAMPLE:
The data represent the number of days off per year for a sample of individuals selected
from nine different countries. Find the mean.
20 26 40 36 23 42 35 24 30 276
X 9 9 30.7
Median:
The median is the midpoint of the data array. The symbol for the median is MD.
It will be one of the data values if there is an odd number of values and will be
the average of two data values if there is an even number of values.
The number of rooms in the seven hotels in downtown Pittsburgh is 713, 300, 618, 595,
311, 401, and 292. Find the median.
Sort in ascending order.
292, 300, 311, 401, 595, 618, 713
Select the middle
value. MD = 401
The median is 401 rooms.
Mode:
The mode is the value that occurs most often in a data set. It is sometimes
said to be the most typical case.There may be no mode, one mode
(unimodal), two modes (bimodal), or many modes (multimodal)
Example:
Find the mode of the signing bonuses of eight NFL players for a specific year. The bonuses in
millions of dollars are
34.5
dollars.
The variance is the average of the squares of the distance each value is from the
mean.
2
X 2
N
X
2
N
Find the variance and standard deviation for the data set for Brand A paint. 10,
60, 50, 30, 40, 20
Months, X 𝜇 X-𝜇 (X − 𝜇)2
10 35 -25 625
60 35 25 625
50 35 15 225
30 35 -5 25
40 35 5 25
20 35 -15 225
1750
2 X 2
n 1
7
1750 5
6 17.1 0
291.7
6
XX
z s
X 65 50
zX 1.5 Calculus
s 10
30 25
X 1.0 History
zX 5
s
value mean
z standard deviation
X
z
Modulo n
One simple application of this is in terms of determining the time using the 12-hour clock,
like:
divided 15 with 2, we get 3 as the remainder and this what we would want to get.
b) But what if the problem is; What 70 hours after 7 o’clock? So it will take time to
count 70 hours from 8 o’clock. But what we can do is to add 70 hours to 7
o’clock and that
77
this will be 77. So using the formula, ≡ 5 mod 12. This means that it will be 5
12
o’clock.
The UPC is a 12-digit number that satisfi es a congruence equation that is similar to
the one for ISBNs. The last digit is the check digit. If we label the 12 digits of the UPC
as d1, d2, ... , d12, we can write a formula for the UPC check digit d12.
d12 = (3𝑑1 + 𝑑2 + 3𝑑3 + 𝑑4 + 3𝑑5 + 𝑑6 + 3𝑑7 + 𝑑8 + 3𝑑9 +𝑑10 + 3𝑑11) mod 10 and based on
this formula, d12 should be 0, If not 0, then the UPC is not valid.
This can also be applied in determining whether a credit card is valid or not is
calculated by calculating the last digit using the following steps:
=Beginning with the next-to-last digit (the last digit is the check digit) and
reading from right to left, double every other digit. If a digit becomes a two-digit
number after being doubled, treat the number as two individual digits. Now find the
sum of the new list of digits;
the final sum must be equal to sum mod 10. The last digit must be equal to d16 = 10-sum
mod
10. (Example, if the sum is 34 then this is 4 mod 10, thus, the last digit is 10-4 =6.)
d16 = (𝑑15 +2 𝑑14 + 𝑑13 +2𝑑12 + 𝑑11 + 2𝑑10 + 𝑑9 + 2𝑑8 + 𝑑7 + 2𝑑6 + 𝑑5+2𝑑4 + 𝑑3 + 2𝑑2 + 𝑑1) mod
10
Example: Check if this is a valid Credit Card Number; 5234 8213 3410 1298.
COMMUNICATION SECURITY:
Classical Cryptosystems
Shift Ciphers
Each letter in the plaintext is replaced by a letter some fixed number of positions
down the alphabet
Each letter in the plaintext is replaced by a letter some fixed number of positions
down the alphabet
EXAMPLE:
c = (p + 11) mod 26
plain P R A Y F O R M A R A W I
p 15 17 0 24 6 14 17 12 0 17 0 22 8
C 0 2 11 9 17 25 18 23 11 2 11 7 19
ciphr A C L J R Z S X L C L H T
ciphr G U N B L O F Y M
C 6 20 13 1 11 14 5 24 12
p 12 0 19 7 17 20 11 4 18
plain M A T H R U L E S