Professional Documents
Culture Documents
Descriptive Statistics
1.) Mean
2.) Mode
3.) Median
If observations are in raw form then the mean is computed by summing up the observations
and then dividing their sum by the number of observations. That is,
n
1X
X̄ = Xi (1.1)
n i=1
Sum of all observations
=
Their total number
1
1.1. MEASURES OF CENTRAL TENDENCY
Example 1.1.1 Given the following observations, 2, 5, 50, 100, 200, 0 and 10.
Example 1.1.2 Let the observations be 2, 3, 5, and 10 in a given data set. Using an assumed
mean of 5. find their arithmetic mean.
Xi di
2 -3
3 -2
5 0
10 5
P
di = 0
Thus from,
n
P
di
i=1
X̄ = A +
n
0
X̄ = 5 + =5
4
Note 1.1.1 The working( assumed) mean is chosen randomly that is without special consid-
eration from within the range of the observations for easy computations.
where fi is the frequency of the ith class mark Xi - is the class mark of the ith class. n is the
number of classes.
Alternatively, we can compute the grouped mean using the assumed mean. The steps involved
using the working mean are
1.) Choose the assumed mean A where A is preferably a value near or equal to the class mark
of a class with highest frequency.
Example 1.1.3 The frequency table below shows the marks obtained by students in a certain
examination,
Class Frequency
60 - 62 5
63 - 65 18
66 - 68 42
69 - 71 27
72 - 74 8
Using the information above, find the arithmetic mean with and without using the working
mean.
60 − 62 61 5 305 −6 −30
63 − 65 64 18 1152 −3 −54
66 − 68 67 42 2814 0 0
69 − 71 70 27 1890 3 81
72 − 74 73 8 584 6 48
5
P 5
P 5
P
fi = 100 fi Xi = 6745 fi di = 45
i=1 i=1 i=1
5
P
fi X i
i=1 6745
µ= 5
= = 67.45
P 100
fi
i=1
with the working mean A = 67.
5
P
f i di
i=1 45
µ=A+ 5
= 67 + = 67.45.
P 100
fi
i=1
Example 1.1.6 In 1980 the population of a town is 300,000. In 1990 a new census reveals it
has risen to 410,000. Estimate the population in 1985.
Solution : If we assume that was no net immigration or migration then the birth
rate will depend on the size of the population (exponential growth) so the geometric
mean is appropriate.
p
G = 2 300, 000 × 410, 000 = 350, 713
■
Example 1.1.7 An aeroplane travels a distance of 900 miles. If it covers the first third and
the last third of the trip at a speed of 250 mph and the middle third at a speed of 300 mph,
find the average (harmonic) speed.
Solution :
n 3 3
H= Pn 1 = 1 = = 264.7
1 1 0.01133
+ +
i=1 Xi 250 300 250
■
Definition 1.1.2 The Harmonic mean of frequency and grouped data is given by
n
H = n
(1.7)
P f
i=1 Xi
Definition 1.1.3 The Geometric mean of frequency and grouped data is given by
P
f log Xi
G = Antilog (1.8)
n
Example 1.1.8 Calculate Geometric mean, Harmonic mean from the following grouped data
f
Class Mark (X) f log(X)
X
2-4 3 3 1.4314 1
8 - 10 9 1 0.9542 0.1111
P P P f
f = 10 f log X = 6.8717 = 2.1968
X
Solution :
P
f log Xi 6.8717
G = Antilog = Antilog = Antilog (0.6872) = 4.866
n 10
n 10
H = n = = 4.552
P f 2.1968
i=1 Xi
■
Example 1.1.9 Calculate Geometric mean, Harmonic mean from the following grouped data
Frequency 2 10 7 5 3 8
Solution :
P
f log Xi 3.7387
G = Antilog = Antilog = Antilog (1.0925) = 12.3739
n 35
n 35
H = n = = 9.3616
P f 3.7387
i=1 Xi
■
5.) The sum of squares of the deviations from the mean are minimal ie the sum of squares
of deviation from the mean is less than the sum of sums of squares of deviation from any
observation i.e. n n
X X
2
(Xi − X̄) < (Xi − x⋆ )2 .
i=1 i=1
⋆
Where x is any other observation and X̄ is the mean of the observations
2.) Divide total frequency by 2 in order to ascertain the median class and locate this class using
the cumulative frequency column,
Where
lm - lower class boundary of the median class.
fm - frequency of the median class.
cfb - cumulative frequency of the class just before the median class
c - the class width.
3. At the point of intersection with the graph (ogive) draw another perpendicular to the x -
axis (lower class boundaries axis).
Example 1.1.11 Given the frequency distribution table as in the Example 1.1.3, find the
median mark using,
60 - 62 61 5 5
63 - 65 64 18 23
66 - 68 67 42 65
69 - 71 70 27 92
72 - 74 73 8 100
Median class is
66 − 68
with,
lm = 65.5, c = 3, cfb = 23, fm = 42
such that
" #
N
− cfb 2
Median = lm + ×c
fm
50 − 23
= 65.5 + ×3
42
= 67.429
(fm − fb )
Mode = lm + ×c (1.10)
(fm − fb ) + (fm − fa )
Where
66 − 68
with
lm = 65.5, fm = 42, fa = 27, fb = 18, c = 3
Therefore,
(42 − 18)
Mode = 65.5 + ×3
(42 − 18) + (42 − 27
= 67.3
3.) For grouped data if the modal class happens to be the first or the last class in the distribution
then we estimate the mode as mode = 3(median) - 2 (mean).
4.) The mode can be estimated practically from the histogram. This is done by drawing lines
diagonally from the upper corners of the tallest bar to the upper corner of the adjacent
bars and a perpendicular line is drawn from the point of intersection to the x - axis and
the mode is read from the class boundaries axis.
Interquartile range is the difference between the third quartile and the first quartile.
Example 1.2.1 Consider the monthly salaries of secretaries in a certain organization in dollars
as,
441, 430, 515, 420, 490, 438, 435, 447, 445, 500, 510
Find the quartiles together with the interquartile range?.
420, 430, 435, 438, 441, 445, 447, 490, 500, 510, 515
The positions for the quartiles are,
11 + 1
Q1 = (1) = 3rd observation
4
11 + 1
Q2 = (2) = 6th observation
4
11 + 1
Q3 = (3) = 9th observation
4
That’s Q1 is in the third position, Q2 is in the sixth position and Q3 is in the ninth position
thus
Q1 = 435, Q2 = 445 and Q3 = 500
The interquartile range is given by
Q3 − Q1 = 500 − 435 = 65
Example 1.2.3 Given the following frequency distribution table use it to find the quartiles
and their interquartile range.
Age of students Number of students (f ) Cumulative Frequency
20 - 24 11 11
25 - 29 24 35
30 - 34 30 65
35 - 39 18 83
40 - 44 11 94
45 - 49 5 99
50 - 54 1 100
1.) Lower quartile Q1
1 100 + 1
Q1 = (n + 1) = = 25.25th position.
4 4
this implies that the lower quartile class is = 25 − 29
i 1
lm = 24.5, c = 5, Cfb = 11, CF1 = × n = (100) = 25, fw = 24
4 4
25 − 11
Q1 = 24.5 + × 5 = 27.42 units.
24
2.) Upper quartile Q3 :
3 3 100 + 1
Q3 = (n + 1) = (100 + 1) = (3) = 75.75th position.
4 4 4
this implies that the Upper quartile class is = 35 − 39
i 3
lm = 34.5, c = 5, Cfb = 65, CF3 = × n = n = 75, fw = 18
4 4
75 − 65
Q3 = 34.5 + × 5 = 37.27778 units.
18
3.) Interquartile range Q3 − Q1 = 9.85778
2, 4, 6, 5, 3, 21, 70
Have a range = 70 − 2 = 68
For grouped data the range is given by the difference between the class mark of the last class
interval and the class mark of the first class interval.
Note 1.3.1 The greater the range value the wider the dispersion/spread and vice versa.
60 - 62 61 5
63 - 65 64 18
66 - 68 67 42
69 - 71 70 27
72 - 74 73 8
Though the range has an advantage of easy computation, it has some disadvantages viz;
1.) It may be misleading if either of the extreme values are outliers (far smaller or far larger
than other observations).
2.) The range is silent about the arrangement of the observation that fall in between the two
extreme values.
For a given data set xi , i = 1, 2, . . . , n we define the mean deviation as the average of the
absolute deviation from the mean given by the formula,
n
1X
Median Deviation = SX̄ = Xi − X̄ (1.12)
n i=1
2.) The Variance is defined as the mean of the squared deviations of individual observations
from their arithmetic mean.
(a) For the ungrouped population, the population variance, denoted by σ 2 defined as;
n
1X
σ2 = (Xi − µ)2 (1.13)
n i=1
n
P
Xi
i=1
where µ = for a population with n as the total number of observations in the
n
population. Xi is the ith observation.
(b) For the ungrouped sample, the sample variance denoted as S 2 is given by
n
2 1 X
S = (Xi − X̄)2 (1.14)
n − 1 i=1
n
1X
with the sample mean X̄ = Xi , n is the total number of observations in the
n i=1
sample with Xi the ith observation.
Equation (1.13) gives the population variance and equation (1.14) gives the sample
variance.
3.) The standard Deviation is defined as the positive square root of the variance. Equation
(1.15) gives the population standard deviation for the un-grouped data and equation (1.16)
gives the sample standard deviationfor the un-grouped data .
v
u n
u1 X
σ = t (Xi − µ)2 (1.15)
n i=1
v
u n
u 1 X
S = t (Xi − X̄)2 (1.16)
n − 1 i=1
Note 1.3.2
Example 1.3.3 The figures below show production of a certain product in a Kampala based
factory
98, 99, 99, 100, 100, 100, 101, 101, 102
Find
but n
1X 900
X̄ = Xi = = 100
n i=1 9
8
⇒ Mean deviation = SX̄ =
9
2.) The variance and standard deviation
!2
n n
1 X X
σ2 = n fi Xi2 − f i Xi
n2 i=1 i=1
n
n
2
fi Xi2
P P
f i Xi
2 i=1 i=1
σ −
=
n n2
(c) Standard Deviation: Given by the square root of the Variance.
2.) For a grouped sample (subset of the population) of size n.
(a) Mean deviation
n
1X
Mean deviation = SX̄ = fi Xi − X̄ (1.19)
n i=1
!2
n n
1 X X
S2 = n fi Xi2 − fi X i
n(n − 1) i=1 i=1
n
n
2
2
P P
fi X i f i Xi
i=1 i=1
S2 = −
(n − 1) n(n − 1)
(c) Standard Deviations will respectively be the positive square roots of the Variance.
Example 1.3.4 Consider the following tiny grouped data set in Table below
f X 2 = 298004.5
P P P
f = 98 f X = 5029
Determine
n
P
f i Xi
i=1 5029
1.) Mean: µ = n = = 51.3163
P 98
fi
i=1
98
2.) Median: = 49, so the median class is (40.5 − 60.5)
2
" #
N
− 49 − 30
2
cf b
Median = lm + × c = 40.5 + × 20 = 50.7703
fm 37
3.) Mode: The modal class is the class with the highest frequency, (40.5 − 60.5)
(fm − fb ) (37 − 25)
Mode = lm + × c = 40.5 + × 20 = 49.7308
(fm − fb ) + (fm − fa ) (37 − 25) + (37 − 23)
n+1 98 + 1
4.) Lower quartile: Q1 = i= (1) = 24.75th value of the observation in cf
4 4
i 1
column, so class (20.5 − 40.5), and CF1 = n = × 98 = 24.5
4 4
CF1 − cfb 24.5 − 5
Q1 = lm + × c = 20.5 + × 20 = 36.1
fw 25
n+1 98 + 1
5.) Upper quartile: Q3 = i= (3) = 74.25th value of the observation in cf
4 4
i 3
column, so class (60.5 − 80.5), and CF3 = n = × 98 = 73.5
4 4
CF3 − cfb 73.5 − 67
Q3 = lm + × c = 60.5 + × 20 = 66.1522
fw 23
Example 1.3.5 Given the following frequency distribution table from a given sample
Class Class Mark(Xi ) Freq(fi ) f i Xi |Xi − X̄| (Xi − X̄)2 fi |Xi − X̄| fi (Xi − X̄)2
60-62 61 5 305 6.45 41.6025 32.25 208.0125
63-65 64 18 1152 3.45 11.9025 62.1 214.245
66-68 67 42 2814 0.45 .2025 18.9 8.505
69-71 70 27 1890 2.55 6.5025 68.85 175.5675
72-74
P 73 8 584 5.55 30.8025 44.4 246.42
100 6745 226.5 852.75
Find
1.) Mean deviation
n
1 X 226.5
Mean deviation = SX̄ = P fi Xi − X̄ = = 2.265
f i=1 100
Exercise 1.1 The systolic blood pressure of seven middle aged ladies were as follows:
Compute their
Exercise 1.2 Six men with high cholesterol participated in a study to investigate the effects
of diet on cholesterol level. At the beginning of the study, their cholesterol levels (mg/dL) were
as follows:
366, 327, 274, 292, 274 and 230
Exercise 1.3 Define the median of the random sample, distinguishing between the two cases
n odd and n even. Show that the median has expected value 21 if the random sample is drawn
from a uniform distribution on (0, 1).
Find its variance in the particular case when n is odd. What is the expected value of the
median if the random sample is drawn from a uniform distribution on (a, b)?
Exercise 1.4 Consider the following: Data are Total Patient Care Revenues for a sample of
hospitals in Buddu County (Greater Masaka) Note that,
Compute
Exercise 1.5 Repeat problems in Exercise 1.4 for the grouped data
Heights: 160 - 164 165 - 169 170 - 174 175 - 179 180 -184 185-189
Frequency: 7 11 17 20 16 6
Example 1.3.6 The wheat production (in Kg) of 20 acres is given as:
1120 1240 1320 1040 1080 1200 1440 1360 1680 1730
1785 1342 1960 1880 1755 1720 1600 1470 1750 1885
1040 1080 1120 1200 1240 1320 1342 1360 1440 1470
1600 1680 1720 1730 1750 1755 1785 1880 1885 1960
1.)
1 1
Q1 = (n + 1) = (21) = 5.25th = 5th + 0.25(6th − 5th )
4 4
= 1240 + 0.25(1320 − 1240)
= 1240 + 20 = 1260
2.)
3 3
Q3 = (n + 1) = (21) = 15.75th = 15th + 0.75(16th − 15th )
4 4
= 1750 + 0.75(1755 − 1750)
= 1750 + 3.75 = 1753.75
3.)
2 2
Q2 = (n + 1) = (21) = 10.5th = 10th + 0.5(11th − 10th )
4 4
= 1470 + 0.5(1600 − 1470)
= 1470 + 65 = 1533
1 - 10 8
11 - 20 14
21 - 30 12
31 - 40 9
41 - 50 7
Find
[Q3 − Q1 = 9 − 4 = 5]
Exercise 1.9 In a work study investigation, the times taken by 20 men in a firm to do a
particular job were tabulated as follows:
Frequencies 2 4 6 4 3 1
Example 1.3.7 The mean has one main disadvantage: it is particularly susceptible to the
influence of outliers. These are values that are unusual compared to the rest of the data set by
being especially small or large in numerical value. For example, consider the wages of staff at
a factory below:
Staff 1 2 3 4 5 6 7 8 9 10
Salary 5k 18k 16k 14k 15k 15k 12k 17k 90k 95k
The mean salary for these ten staff is $30.7k. However, inspecting the raw data suggests that
this mean value might not be the best way to accurately reflect the typical salary of a worker,
as most workers have salaries in the $12k to $18k range. The mean is being skewed by the two
large salaries. Therefore, in this situation, we would like to have a better measure of central
tendency. As we will find out later, taking the median would be a better measure of central
tendency in this situation.
65 , 55 , 89 , 56 , 35 , 14 , 56 , 55 , 87 , 45 , 92
55.5
1.) mean/avaerge 6
2.) range 9
3.) median 6
Example 1.3.9 Consider the aptitude test scores of ten children below:
95, 78, 69, 91, 82, 76, 76, 86, 88, 80
Find the mean, median, and mode.
1.) Mean
Solution :
1
X̄ = (95 + 78 + 69 + 91 + 82 + 76 + 76 + 86 + 88 + 80) = 82.1
10
■
2.) Median
Solution : First, order the data.
69, 76, 76, 78, 80, 82, 86, 88, 91, 95
(10 + 1)
With n = 10, the median position is found by = 5.5. Thus, the median
2
is the average of the fifth (80) and sixth (82) ordered value and the median = 81
■
3.) Mode
Solution : The most frequent value in this data set is 76. Therefore the mode
is 76. ■
Exercise 1.12
1.) What are measures of central tendency as used in statistics?.
2.) Mention any three measures of central tendency you know.
3.) Construct a frequency distribution table for the following figures of weights obtained from
36 Elements of mathematics students in a Ugandan university using a class width of 3 and
starting with the class 56 − 58.
66 70 68 67 71 60
64 70 68 65 64 61
71 66 67 65 68 59
67 65 68 66 69 58
66 65 65 71 70 56
57 60 62 56 59 72
Probability Spaces
Introduction
Every busy mind at the onset of a day starts with an activity that involves some element of
“chance”. The most probable words that would be involved are ‘either’ and ‘or’. These tend
to originate from probabilistic situations that hang round every aspect of life. Think of a
pregnant woman. Either she would produce a baby boy or a baby girl (leave alone the rare
cases of “both”). Consider a football match in which the verdict must be decided on. Either
one team will win or lose. Initially, the probability (chance) of doing something or not doing it
1
would seem to be to most of you. On a cloudy day, it would even be obvious that the chance
2
1
or raining or not raining is .
2
The relevance of probability theory in life’s problems was identified as early as the 16th century
by great Mathematicians such as Abraham de Moivre (1776 − 1754), Reverend Thomas Baye
(1702 − 1761), and Joseph Lagrange (1736 − 1813). This was later strengthened in the 19th
century by researchers such as Laplace who unified all these early ideas.
24
2.1. SAMPLE SPACE, EVENTS AND EXPERIMENT
Definition 2.1.1 The results of an experiment are called outcomes. For instance, in tossing a
coin, a head or a tail appearing is an outcome. An experiment can result in various outcomes.
Definition 2.1.2 A set of all possible outcomes that may occur in a particular experiment is
called a sample space. We denote this by Ω.
1.) Toss a die, then Ω = {1, 2, 3, 4, 5, 6}. If the desired quality is that an “odd” number shows
up then Odd is the event E and thus Ee = {1, 3, 5}.
A∩B =∅
Note 2.2.1 It should be noted that an event may be simple or compound. For instance if
in tossing a coin the event E is to obtain an odd number then this is a simple event and if
in shuffling a pack of cards an event is drawing a spade or heart then this is compound. The
number of outcomes in an event or a sample space need not be finite or countable.
2.2.6 Subsets
For any two events A and B, if all the outcomes in A are also in B then we say that A is
contained in B and we write A ⊂ B (or B ⊃ A) then the occurrence of A necessarily implies
the occurrence of B.
Example 2.2.5 An ordinary die is thrown. Let A denote the event that the score obtained
will be even, B the event that the score will be less than 3 and C the event that the score will
be a multiple of 3.
Write down the sample space for the possible scores and elements of events
ξ=U =Ω = {1, 2, 3, 4, 5, 6}
A = {2, 4, 6}
B = {1, 2}
C = {3, 6}
Example 2.3.1 What is the probability of getting a similar values when a pair of dice is
tossed?
6
36
Example 2.3.2 What is the probability of getting a head and an even number when a die and
a coin are thrown together?
3
12
Example 2.3.3 What is the probability of getting two heads when a pair of coins is tossed
once?
1
4
Exercise 2.1 What is the probability of getting two heads when three coins are tossed once?
n(A)
P (A) = ; n(Ω) ̸= 0 (2.2)
n(Ω)
If we assume that for each event Ai of a sample space Ω, a number P (A) is defined then it will
satisfy the following Axioms.
Axiom 1
0 ≤ P (Ai ) ≤ 1 (2.3)
Axiom 2
n
X
P (Ω) = P (Ai ) = 1 (2.4)
i=1
1.) Since A ∪ ϕ = A
P (ϕ) = 0 (2.6)
3.)
Proof :
Proof :
ϕ ⊂ A ⊂ Ω
P (ϕ) ≤ P (A) ≤ P (Ω)
0 ≤ P (A) ≤ 1
Example 2.5.2 From the additive rule of probability theorem, Equation (2.7)
We may generalize the additive rule to more than two events. For instance if for two events A
and B,
P (A ∪ B) = P (A) + P (B) − P (A ∩ B)
then for three events A, B and C
P (A ∪ B ∪ C) = P (A ∪ (B ∪ C))
= P (A) + P (B ∪ C) − P (A ∩ (B ∪ C)
= P (A) + P (B) + P (C) − P (B ∩ C) − P (A ∩ (B ∪ C))
and
P (A ∩ (B ∪ C)) = P ((A ∩ B) ∪ (A ∩ C)
= P (A ∩ B) + P (A ∩ C) − P (A ∩ B ∩ C)
To have
From a Venn-Diagram
The Contingency table is a tabular summary of the venn diagram as shown in Table 2.1.
A Ac
B A∩B Ac ∩ B P (B)
Bc A ∩ Bc Ac ∩ B c P (B c )
P (A) P (Ac ) 1
P (A) = 1 − P (Ac )
5 3
= 1− =
8 8
P (A ∪ B) = P (A) + P (B) − P (A ∩ B)
⇒ P (B) = P (A ∪ B) + P (A ∩ B) − P (A)
7 1 3 3
= + − =
8 4 8 4
P (A ∩ B c ) = P (A) − P (A ∩ B)
3 1 1
= − =
8 4 8
P (Ac ∪ B c ) = P (A ∩ B)c
= 1 − P (A ∩ B)
1 3
= 1− =
4 4
5.) By the Axiom of probability (Axiom 3) since (A ∩ B c ), (Ac ∩ B) are disjoint sets
19 2 4
Example 2.7.4 Events A and B are such that P (A) = , P (B) = and P (A ∪ B) = .
30 5 5
Find P (A ∩ B). [7/30]
Example 2.7.5 A coin and a die are tossed together, draw the possibility sample diagram and
find the probability of getting
Example 2.7.6 A card is drawn from an ordinary pack of 52 playing cards.Find the proba-
bility that a card selected is a club or a diamond. [1/2]
Exercise 2.2 An ordinary die is thrown once. Let E denote the event that the score obtained
will be even, F the event that the score obtained will be less than 3 and G the event that the
score will be multiple of 3. Give verbal descriptions and set representation of the events.
Exercise 2.3 A green die and a blue die are thrown simultaneously. Write down the sam-
ple space of this experiment expressing each element as an ordered pair. Determine the set
representation of each of these verbal events given
1.) A ∩ C 3.) B ∩ Ac
2.) B ∪ D 4.) (A ∪ B c )
Compute
Exercise 2.7 For a married couple, the probability that the husband will vote is 0.21 and
that the wife will vote is 0.28 and that both will vote is 0.15. What is the probability that at
least one of them will vote?
Exercise 2.8 At Nile College, it is known that 14 of the students live off campus, 59 of the
students come from Busoga and 43 of the students are out-of-Busoga or live on campus. What
is the probability that a student selected at random from Nile College is from Out-of-Busoga
and lives on campus? [4/9]
P (A ∩ B) = 0 (2.15)
Then from the additive rule of events, if two events A and B are mutually exclusive
Example 2.8.1 In the example of selecting a number from a set of integers, events
are mutually exclusive since we cannot select even and odd numbers at the same time picking.
We define for three events A, B, C (or more) that if they are mutually exclusive pairwise, that
is
P (A ∩ B) = P (B ∩ C) = P (A ∩ C) = 0
and in addition
A∪B∪C = ξ (2.17)
Example 2.8.2 A and B are mutually exclusive events such that P (A) = 0.5 and P (B) = 0.2.
Find
1.)
P (A ∪ B) = P (A) + P (B) − P (A ∩ B)
= 0.5 + 0.2 − 0 = 0.7
2.)
Example 2.8.3 In a race, the probability that John wins is 0.3; the probability that Paul
wins is 0.2 and the probability that Mark wins is 0.4. Find the probability that
Assume that there are no deed heats. But even if not said, winning a race is mutually exclusive
since both people cannot win a race = mutually exclusive.
Define Events
Then
(a)
P (J ∪ M ) = P (J) + P (M ) − P (J ∩ M )
= 0.3 + 0.4 − 0 = 0.7
P (J c ∩ P c ) = P (J ∪ P )c = 1 − P (J ∪ P )
= 1 − [(P (J) + P (P ) − P (J ∩ P )]
= 1 − (0.3 + 0.2 − 0) = 0.5
Definition 2.8.1 Conditional probability: A probability computed under the assumption that
some condition holds.
Then the probability that an event A will occur given that another event B has occurred (or
must occur) is known as the conditional probability of A given B and is written as P (A | B).
Definition 2.8.2 Regardless of whatever they stand for, the conditional probability of event
A given that B has occurred denoted by P (A | B), is
P (B ∩ A)
P (A | B) = ; P (B) ̸= 0 (2.18)
P (B)
P (A ∩ B)
P (B | A) = ; P (A) ̸= 0 (2.19)
P (A)
P (A ∩ B ∩ C) = P (C | A ∩ B) · P (B | A) · P (A) (2.20)
Consequences:
P (B ∩ Ω) P (B)
1.) P (Ω | B) = = =1
P (B) P (B)
P (B ∩ ϕ) P (ϕ) 0
2.) P (ϕ | B) = = = =0
P (B) P (B) P (B)
3.) If A1 , A2 , . . . , An are mutually exclusive
n
X
P (A1 ∪ A2 ∪ . . . ∪ An | B) = P (A1 | B) + P (A2 | B) + . . . + P (An | B) = P (Ai | B)
i=1
4.) a) P (Ac | B) = 1 − P (A | B)
Proof :
P (B ∩ Ac ) P (B) − P (A ∩ B)
P (Ac | B) = = = 1 − P (A | B)
P (B) P (B)
■
P (B c ∩ Ac ) 1 − P (A ∪ B)
b) P (Ac | B c ) = =
c
P (B ) 1 − P (B)
P (A ∩ B ∩ C) = P (C | A ∩ B) · P (B | A) · P (A)
For, writing P (A ∩ B ∩ C) as
P ((A ∩ B) ∩ C) = P (C | A ∩ B) · P (A ∩ B) = P (C | A ∩ B) · P (B | A) · P (A)
P (A1 ∩A2 ∩. . .∩An ) = P (An | A1 ∩A2 ∩. . .∩An−1 ) · · · P (A3 | A1 ∩A2 )·P (A2 | A1 )·P (A1 )
Example 2.8.4 Given that events A and B are such that P (A) = 0.6, P (B) = 0.2 and P (B |
A) = 0.1. Find
2.)
P (B ∩ A) 0.06
P (A | B) = = = 0.3
P (B) 0.2
P (B ∩ A) = P (A ∩ B), P (B ∪ A) = P (A ∪ B) for such events with no order.
3.)
P (B c ∩ Ac ) P (A ∪ B)c 1 − P (A ∪ B)
P (Ac | B c ) = = =
c
P (B ) c
P (B ) 1 − P (B)
1 − [P (A) + P (B) − P (A ∩ B)]
=
1 − P (B)
1 − [0.6 + 0.2 − 0.06]
=
[1 − 0.2]
0.26
=
0.8
= 0.325
Note 2.8.1 A ∩ B = B ∩ A only if the occurrence of events do not matter, however they
usually do.
Example 2.8.5 An urn contains 20 mangos of which 5 are bad. If 2 mangos are selected at
random in succession without replacement of the first one what is the probability that both are
bad.
Example 2.8.6 The probability that a student wakes up early is 0.83 and the probability
that he arrives at school on time is 0.92. The probability that he wakes up early and arrives on
time is 0.78. Find the probability that the student
Define events
E = wakes up early
A = arrives on time
P (A ∩ E) ???
P (E | A) = =
P (A) 0.92
Note 2.8.2 “and” is usually not commutative, (waking up early “and” arrive on time, might
not be, arriving on time “and” then wake up early) that is P (A ∩ E) ̸= P (E ∩ A)
Example 2.8.7 A coin is flipped twice. If we assume that all four elements in the sample
space Ω = {(H, H), (H, T ), (T, H), (T, T )} are equally likely to occur, what is the probability
that both flips result in heads given that the first flip resulted in a head?
1
P (H1 ∩ H2 ) P (H, H) 4 1
P (H2 | H1 ) = = = 1 1 =
P (H1 ) P ((H, H) or (H, T )) 4
+ 4
2
Example 2.8.8 An Urn contains 10 white, 5 yellow and 10 black marbles. A marble is chosen
at random from the urn and it is noted that it is not black. What is the probability that it was
yellow?
P (B ′ ∩ Y )
P (Y | B ′ ) =
P (B ′ )
P (B ′ ∩ Y )
=
1 − P (B)
P (Y )
=
1 − P (B)
5/25 1
= =
1 − 10/25 3
Example 2.8.9 Using a pen when it is raining or not raining are independent events.
Definition 2.8.3 Two events A and B are said to be Independent if the occurrence of one
does not affect or hinder the occurrence of the other. Thus, events A and B are said to be
independent if
P (A | B) = P (A) (2.21)
P (B | A) = P (B) (2.22)
Then from (2.21) and (2.22), that two events are independent if
P (A ∩ B) = P (B | A) · P (A)
= P (B) · P (A)
= P (A) · P (B)
That is
Definition 2.8.4 Three events A, B, C are said to be pairwise independent if and only if each
pair of events chosen from A, B, C are independent (that is, A and B are independent, B and
C are independent, A and C are independent).
Consequences:
P (A ∩ B c ) = P (A) − P (A ∩ B)
= P (A) − [P (A) · P (B)]
= P (A) · [1 − P (B)]
= P (A) · P (B c )
P (Ac ∩ B c ) = P (A ∪ B)c = 1 − P (A ∪ B)
= 1 − [P (A) + P (B) − P (A ∩ B)]
= 1 − P (A) − P (B) + P (A) · P (B), A, B are independent
= 1 − P (A) − P (B)(1 − P (A))
= [1 − P (A)][1 − P (B)]
= P (Ac ) · P (B c )
■
Alternatively,
Proof :
P (Ac ∩ B c ) = P (B c ) − P (A ∩ B c )
= P (B c ) − P (A) · P (B c ), Example 2.8.11
= P (B c )[1 − P (A)]
= P (Ac ) · P (B c )
Example 2.8.13 A fair coin is tossed twice. Let A denote the event that a head is obtained
on the first toss, B the event that a head is obtained at the second toss and C the event that
exactly one head is obtained. Discuss the independence of A, B, C
Define events
Then
1 1 1
P (A) = , P (B) = , P (C) =
2 2 2
Since A ∩ B = {H, H} then
1
P (A ∩ B) = = P (A) · P (B)
4
Hence A and B are independent.
Similarly
P (A ∩ C) = P (A) · P (C)
P (B ∩ C) = P (B) · P (C)
Example 2.8.14 The probability that a student passes Mathematics is 0.98 and the proba-
bility that he passes English is 0.92. Find the probability that he passes both.
P (M ∩ E) = P (E | M ) · P (M )
= P (E) · P (M )
= (0.92) · (0.98)
= 0.9016
Example 2.8.16 A die is thrown four times. Find the probability that a 5 is obtained each
throw.
Exercise 2.10 A coin is tossed twice, find the probability of getting at least a head.
[3/4]
Exercise 2.11 Professor Janet loves to give F ′ s. If the probability that Jones will make an F
2 1
is and the probability that Smith will make an F is , what is the probability that at least
3 2
one of them will make an F .
Example 2.8.17 Three people A, B and C decided to enter a marathon race. Their respective
probabilities that they will complete the marathon are 0.9, 0.7 and 0.6. Find the probability
that
1.) only A completes the marathon 4.) only two complete the marathon
2.) all complete the marathon 5.) at least two will complete the marathon
3.) only one complete the marathon 6.) no one completes the marathon
Define events
P (A ∩ B ′ ∩ C ′ ) = P (C ′ | (A ∩ B ′ )) · P (B ′ | A) · P (A)
= P (C ′ ) · P (B ′ ) · P (A), Independency
= (0.4) · (0.3) · (0.9)
= 0.108
P (A ∩ B ∩ C) = P (C | (A ∩ B)) · P (B | A) · P (A)
= P (C) · P (B) · P (A), Independency
= (0.6) · (0.7) · (0.9)
= 0.378
Only one ≡ A ∩ B ′ ∩ C ′ or A′ ∩ B ∩ C ′ or A′ ∩ B ′ ∩ C
P (Only one) = P (A ∩ B ′ ∩ C ′ ) + P (A′ ∩ B ∩ C ′ ) + P (A′ ∩ B ′ ∩ C)
P (Only one) = P (C ′ | (A ∩ B ′ )) · P (B ′ | A) · P (A) + P (C ′ | (A′ ∩ B)) · P (B | A′ ) · P (A′ )
+P (C | (A′ ∩ B ′ )) · P (B ′ | A′ ) · P (A′ )
= P (C ′ ) · P (B ′ ) · P (A) + P (C ′ ) · P (B) · P (A′ )
+P (C) · P (B ′ ) · P (A′ ) , Independency
= (0.4) · (0.3) · (0.9) + (0.4) · (0.7) · (0.1) + (0.6) · (0.3) · (0.1)
= 0.154
Only two ≡ A ∩ B ∩ C ′ or A ∩ B ′ ∩ C or A′ ∩ B ∩ C
P (Only two) = P (A ∩ B ∩ C ′ ) + P (A ∩ B ′ ∩ C) + P (A′ ∩ B ∩ C)
= P (C ′ | (A ∩ B)) · P (B | A) · P (A) + P (C | (A ∩ B ′ )) · P (B ′ | A) · P (A)
+P (C | (A′ ∩ B)) · P (B | A′ ) · P (A′ )
= P (C ′ ) · P (B) · P (A) + P (C) · P (B ′ ) · P (A)
+P (C) · P (B) · P (A′ ) , Independency
= (0.4) · (0.7) · (0.9) + (0.6) · (0.3) · (0.9) + (0.6) · (0.7) · (0.1)
= 0.456
1 1
Example 2.8.18 If A and B are independent events, with P (A) = and P (B) = , find the
3 4
following:
1.) P (Ac ∩ B c ).
Solution 1. Since A and B are independent, then Ac and B c are also independent [See
Example 2.8.12, (pg. 44)]. So
c c c c 1 1 1
P (A ∩ B ) = P (A ) · P (B ) = [1 − P (A)] [1 − P (B)] = 1 − 1− =
3 4 2
1
Solution 2. P (A ∩ B) = P (A) · P (B) = 12
.
c c 1 1 1 1
P (A ∩ B ) = 1 − P (A ∪ B) = 1 − P (A) + P (B) − P (A ∩ B) = 1 − + − =
3 4 12 2
Note 2.8.4 If two events are independent, one does not depend on the occurrence of the other.
But if Mutually exclusive, one does not influence the other.
1 1
Example 2.8.19 In a race the probability that John wins is , Paul wins is , and Mark to
3 4
1
win is . Find the probability that
5
1.) John or Mark wins [8/15]
1 1 8
P (J ∪ M ) = P (J) + P (M ) − P (J ∩ M ) = + −0=
3 5 15
Since winning, its mutually exclusive, both cannot win, only one wins, its different from
completing race.
Neither = 1- Either
A = B1 ∩ A, B2 ∩ A . . . , Bn ∩ A
⇒ A = (B1 ∩ A) ∪ (B2 ∩ A) ∪ . . . U (Bn ∩ A)
⇒ P (A) = P (B1 ∩ A) + P (B2 ∩ A) + . . . + P (Bn ∩ A) (2.26)
P (A | Bk ) · P (Bk )
P (Bk | A) = P
n (2.28)
P (A | Bi ) · P (Bi )
i=1
P (A ∩ Bk )
P (Bk | A) = (2.29)
P (A)
and since
P (A | Bk ) · P (Bk )
P (Bi | A) = (2.32)
P (A | B1 ) · P (B1 ) + P (A | B2 ) · P (B2 ) + · · · + P (A | Bn ) · P (Bn )
P (B | A) · P (A)
P (A | B) =
P (B | A) · P (A) + P (B | A′ ) · P (A′ )
where:
Example 2.10.2 Three professors A, B, C are nominated for the post of Dean of Science.
Their respective probabilities of being elected are 0.3, 0.5 and 0.2. If Professor A is elected the
probability that the mathematics department gets a new computer is 0.8 and if B is elected is
0.1 and if C is elected is 0.3. The Head of Mathematics goes away to London and learns that
the department has received a new computer.
1.) Find the probability that a Mathematics department gets a new computer,
a) A b) B c) C
3.) if the department did not get a new computer, what is the probability that professor B was
elected?
Define events
A = professor A is elected
B = Professor B is elected
C = Professor C is elected
N = Maths department gets a new computer.
Then
N ≡ (A ∩ N ) or (B ∩ N ) or (C ∩ N )
P (N ) = P (A ∩ N ) + P (B ∩ N ) + P (C ∩ N )
P (N ) = P (N | A) · P (A) + P (N | B) · P (B) + P (N | C) · P (C)
= (0.8)(0.3) + (0.1)(0.5 + (0.2)(0.3)
= 0.24 + 0.05 + 0.06 = 0.35
P (N | A) · P (A)
P (A | N ) =
P (N | A) · P (A) + P (N | B) · P (B) + P (N | C) · P (C)
P (N | A) · P (A)
=
P (N )
(0.8)(0.3) 24
= =
0.35 35
P (N | B) · P (B)
P (B | N ) =
P (N | A) · P (A) + P (N | B) · P (B) + P (N | C) · P (C)
P (N | B) · P (B)
=
P (N )
(0.1)(0.5) 1
= =
0.35 7
P (N | C) · P (C)
P (C | N ) =
P (N | A) · P (A) + P (N | B) · P (B) + P (N | C) · P (C)
P (N | C) · P (C) (0.3)(0.2) 6
= = =
P (N ) 0.35 35
3.) We need
P (B | N ′ )
P (N ′ | B) · P (B)
P (B | N ′ ) =
P (N ′ | A) · P (A) + P (N ′ | B) · P (B) + P (N ′ | C) · P (C)
(0.9)(0.5)
=
(0.2)(0.3) + (0.9)(0.5) + (0.7)(0.2)
= 0.692
Exercise 2.12 For the problem in Example 2.10.3, find the probability that if he did not
complete the journey in under three hours calculate the probability that he traveled by the first
of the four routes.
Example 2.10.3 A motorist travels regularly from one town to another. On each occasion he
chooses a route at random from four possible routes. From his experience the probabilities of
completing a journey under three hours via those routes are 0.5, 0.8, 0.9 and 0.9 respectively.
Given that on a certain occasion he completed the journey in under three hours calculate the
probability that he traveled by the first of the four routes.
Define events
P (E | A1 ) · P (A1 )
P (A1 | E) =
P (E | A1 ) · P (A1 ) + P (E | A2 ) · P (A2 ) + P (E | A3 ) · P (A3 ) + P (E | A4 ) · P (A4 )
(0.5)(0.25) 0.125
= =
(0.5)(0.25) + (0.8)(0.25) + (0.9)(0.25) + (0.9)(0.25) 0.775
Example 2.10.4 There are five urns, and are numbered 1 to 5. Each urn contains 10 balls.
Urn i has i defective balls and 10 − i non defective balls, i = 1, 2, . . . , 5. For example urn 4
has 4 defective balls and 6 non defective balls. Consider the following experiment: First, an
urn is selected at random and then a ball is selected at random from the selected urn. (The
experimenter does not know the urn selected). Lets us ask two questions:
1.) What is the probability that a defective ball will be selected?
2.) If we have already selected a ball and noted it is defective what is the probability that it
came from urn 5?
Define event
D ≡ defective ball is selected
Bi ≡ urn i is selected, i = 1, 2, . . . 5
then
1
P (Bi ) = , i = 1, 2, · · · , 5
5
and also
1 9
P (D | B1 ) = ⇒ P (D′ | B1 ) =
10 10
2 8
P (D | B2 ) = ⇒ P (D′ | B2 ) =
10 10
3 7
P (D | B3 ) = ⇒ P (D′ | B3 ) =
10 10
4 6
P (D | B4 ) = ⇒ P (D′ | B4 ) =
10 10
5 5
P (D | B5 ) = ⇒ P (D′ | B5 ) =
10 10
1.) From Theorem of total probability
P (D) = P (B1 ∩ D) + P (B2 ∩ D) + P (B3 ∩ D) + P (B4 ∩ D) + P (B5 ∩ D)
= P (D | B1 ) · P (B1 ) + P (D | B2 ) · P (B2 ) + P (D | B3 ) · P (B3 )
+P (D | B4 ) · P (B4 ) + P (D | B5 ) · P (B5 )
1 1 2 1 3 1 4 1 5 1
= · + · + · + · + ·
10 5 10 5 10 5 10 5 10 5
15 3
= =
50 10
2.) To find the probability that if a defective ball is selected, came from urn 5
P (B5 | D)
P (D | B5 ) · P (B5 )
=
P (D | B1 ) · P (B1 ) + P (D | B2 ) · P (B2 ) + P (D | B3 ) · P (B3 ) + P (D | B4 ) · P (B4 ) + P (D | B5 ) · P
P (D | B5 ) · P (B5 )
=
P (D)
5 1
· 1
= 10 3 5 =
10
3
And generally
k 1
10
· 5 k
P (Bk | D) = 3 = . k = 1, 2, . . . , 5.
10
15
Example 2.10.5 A box contains 4 red and 6 black balls. If two balls are picked without
replacement from the box, what is the probability that
Same color ≡ B1 ∩ B2 or R1 ∩ R2
P (Same color) = P (B1 ∩ B2 ) + P (R1 ∩ R2 )
= P (B2 | B1 ) · P (B1 ) + P (R2 | R1 ) · P (R1 )
5 6 3 4
= · + ·
9 10 9 10
Different colors ≡ B1 ∩ R2 or R1 ∩ B2
P (Different colors) = P (B1 ∩ R2 ) + P (R1 ∩ B2 )
= P (R2 | B1 ) · P (B1 ) + P (B2 | R1 ) · P (R1 )
4 6 6 4
= · + ·
9 10 9 10
Example 2.10.6 Repeat the problem above in Example 2.10.5 with replacement.
1.)
2.)
Same color B1 ∩ B2 or R1 ∩ R2
P (Same color) = P (B1 ∩ B2 ) + P (R1 ∩ R2 )
= P (B2 | B1 ) · P (B1 ) + P (R2 | R1 ) · P (R1 )
6 6 4 4
= · + ·
10 10 10 10
Example 2.10.7 Two boxes have balls. The first box (Box A) contains 9 yellow and 7 purple
balls. The second box (Box B) contains 8 yellow and 10 purple balls. A ball is picked from
box A and placed in box B without noticing its color. Then after thorough shaking of box B,
a ball is picked from box B. What is the probability
P2 = Y1 ∩ P2 or P1 ∩ P2
P (P2 ) = P (Y1 ∩ P2 ) + P (P1 ∩ P2 )
= P (P2 | Y1 ) · P (Y1 ) + P (P2 | P1 ) · P (P1 )
10 9 11 7
= · + ·
19 16 19 16
2.) the second ball is yellow given that the ball brought was yellow
9
P (Y2 | Y1 ) =
19
Same color ≡ Y1 ∩ Y2 or P1 ∩ P2
= P (Y1 ∩ Y2 ) + P (P1 ∩ P2 )
= P (Y2 | Y1 ) · P (Y1 ) + P (P2 | P1 ) · P (P1 )
9 9 11 7
= · + ·
19 16 19 16
Example 2.10.8 Suppose that A and B are independent events such that the probability
1 1
that neither occurs is and the probability of B occurring is . Determine the probability of
2 3
A occurring.
P ((A ∪ B)c ) = 1 − P (A ∪ B) = 1/2
To have
P (A ∪ B) = 1/2
Since A and B are independent
Random Variables
Remark 3.1.1 We use capital X to denote the random variables, and a small x to denote its
outcome.
57
Random Variables
1
2 Elements of Probability & Statistics– MTH1202
X = 0, 1, 2
If X is the number of boys in a family of five then X = 0, 1, 2, 3, 4, 5
Definition 3 A table of formula listing all possible values that a discrete random variable
X can take on, together with associated probabilities is called a discrete probability
distribution. A distribution function that shows the outcomes of a discrete random
variable together with the corresponding probabilities is called a probability mass
function.
1. P(x) = P(X = x)
Example 1 Consider the experiment of tossing a die once. Then X would take up
values 1,2,3,4,5,6; each with probability 16 , of occuring. Thus in tabular form we have
x 1 2 3 4 5 6
P(X = x) 16 16 16 16 16 16
1
1. P(X = 1) = P(X = 2) = ... = P(X = 6) = 6
X 1 1 1 1 1 1
2. P(x) = + + + + + =1
6 6 6 6 6 6
allx
Example 2 Consider the experiment of tossing a coin three times and let X be the
random variable denoting the number of heads that occur. Then the sample space
S = {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT} so that either we have zero, one,
two or three heads with respective probabilities 18 , 38 , 38 and 18 . We tabulate this as shown
below.
x 0 1 2 3
1 3 3 1
P(X = x) 8 8 8 8
B.K. Nannyonga, H.W. Kayondo, N. Muyinda, & B.N. Kirenga c 3
Observe that
3
X 1 3 3 1
2. P(x) = + + + =1
x=0
8 8 8 8
Example 3 Consider the experiment of toss two dice simultaneously and let X be the
random variable representing the sum on the two. Write the probability mass function
of X.
b
X
P(a X b) = P(X = x)
x=a
Thus,
b
X
1. P(a x b) = P(X = x)
x=a
b
X
2. P(a < x b) = P(X = x)
x=a+1
b 1
X
3. P(a x < b) = P(X = x)
x=a
1
X
4. P(x > a) = P(X = x)
x=a+1
Example 4 The cumulative distribution function of the example of tossing a coin three
times is given by
4 Elements of Probability & Statistics– MTH1202
x 0 1 2 3
1 3 3 1
P(X = x) 8 8 8 8
1 4 7
P(X x) 8 8 8 1
or we can write
8
>
> 0 x<0
>
> 1
>
> 0x<1
>
< 84
F(x) = >
> 8 1x<2
>
> 7
>
> 2x<3
: 18
>
x 3
Example 6 ( )
x
15k x=1,2,3,4
P(x) =
0 elsewhere
Solution:
Z 1
(i) Since f (x) is a pd f , then f (x)dx = 1. Thus,
1
Z 2
2x2 2 3
c(4x 2x2 )dx = 1 ) c[2x2 ] )c=
0 3 0 8
6 Elements of Probability & Statistics– MTH1202
(ii) To verify that f (x) is indeed a pd f you need to show that within 0 < x < 2,
(a) f (x) 0
Z 1
(b) f (x)dx = 1
1
Thus with
3
f (x) = (4x 2x2 ), f (0) = 0 and f (2) = 0 ) f (x) 0
8
and Z 1
3 3 2 32
(4x 2x2 )dx = 2x2 x =1
1 8 8 3 0
Hence f (x) is a pd f .
Z 2
1
(iii) P(X > 1) = 8 3
(4x 2x2 )dx =
1 2
Example 9 A continuous random variable X has a pdf defined by
(
kx(16 x2 ) 0 < x < 4
f (x) =
0 elsewhere
(a) Find k
(b) Evaluate
(i) P(1 < X < 2)
(ii) P(X 3)
(iii) P(X < 2|1 < X < 3)
Solution:
Z 1
(a) To find k you know that f (x)dx = 1 Thus
1
Z 4
1 44 1
kx(16 x2 ) = 1 ) k 8x2 x =1)k=
0 4 0 64
R2 R2
1 1 42 81
(b) (i) P(1 < X < 2) = 1 f (x)dx = 64 1
(16x x3 ) = |8x2 4 x |0 = 256
R4
1 49
(ii) P(X 3) = 64 3
(16x x3 )dx = 456
P[(X<2)\(1<X<3)] P(1<X<2)
(iii) P(X < 2|1 < X < 3) = P(1<X<3) = P(1<X<3)
Z 2
1 81
P(X < 1 < 2) = (16x x3 )dx =
64 1 256
Z 3
1 44
P(X < X < 3) = (16x x3 )dx =
64 1 64
81 64 81
therefore, P(X < 2)/(1 < X < 3) = 256 · 44 = 176
B.K. Nannyonga, H.W. Kayondo, N. Muyinda, & B.N. Kirenga c 7
Example 10 For (
3e 3x x>0
f (x) =
0 elsewhere
Find (i) F(x) (ii) P(0.5 < x < 1) using F(x). Rx
Solution: for x < 0, F(x) = 0, and for x > 0, F(x) = 1 f (u)du
( )
Rx 0 for x 0
= 1 3e 3u du = e 3u |x0 = 1 e 3x . Thus, F(x) = .
1 e 3x for x 0
P(0.5 < x < 1) = F(1) F(0.5) = (1 e 3 ) (1 e 3/2 ) = e 1.5 e 3 = 0.173
(i) Find the cdf, F(x) and (ii) P(0 < RX < 1)
x
Solution: (i) By definition F(x) = 1 f (u)du, therefore,
Z x
1 2 1 1
F(x) = u du = | u3 |x 1 = (x3 + 1)
1 3 9 9
Thus 8
>
>
> 0 x< 1
< 1 3
F(x) = >
>
> 9 (x + 1) 1x<2
: 1 x 2
R1
2 1 1 1 3
(ii)P(0 < x < 1) = F(1) F(0) = 9 9 = 9 which is the same as 0 3
x dx = 19 .
8 Elements of Probability & Statistics– MTH1202
1 1
F(x) = 1 cos x, 1<x<1
⇡
d
Find the probability density function. Solution: From the definition f (x) = dx [F(x)].
Therefore,
d 1 1
f (x) = [1 cos 1 x] = p
dx ⇡ ⇡ (1 x2 )
so that 8 9
>
>
< p1 1<x<1 > >
=
f (x) = >
>
⇡ (1 x2 ) >
>
: 0 otherwise ;
Properties of Expectation
1. For any constant c, E(c) = c. This is because
X X
E(c) = cP(X = x) = c P(X = x) = c · 1 = c
allx allx
4. For any two functions g(x) and h(x), E(g(x) + h(x)) = E[g(x)] + E[h(x)]. This
is because
X
E(g(x) + h(x)) = (g(x) + h(x))P(X = x)
allx
X X
= g(x)P(X = x) + h(x)P(X = x) = E[g(x)] + E[h(x)]
allx allx
Example 14 Find the expected number of heads that will be obtained when a fair coin
is tossed three times. The probability distribution is
x 0 1 2 3
1 3 3 1
P(X = x) 8 8 8 8
Find (a) E(X)=2/3 (b) E(2X + 3)=13/3 (c)E(X2 ) =1/2 (d)Is E(2X + 3) = 2E(X) + 3? Yes
(e)E(2X2 5X + 6)=11/3
Example 16 Let
( 4
⇡(1+x2 )
for 0 < x < 1
f (x) =
0 elsewhere
Find E(X).
Variance
Thus for a continuous random variable X with a pdf f (x), the variance is
Z 1 Z 1
Var(X) = E(X2 ) [E(X)]2 = x2 f (x)dx [ x f (x)dx]2
1 1
Properties of Variance
If the density function f (x) has more than one interval, first integrate f (x)
within the first interval. If the answer to this is less than 12 then this interval
does not contain the median. Next add the answer from the integral of the first
function to the integral of the second function up to m, then the sum which
should be 12
12 Elements of Probability & Statistics– MTH1202
Since the answer is less than 12 , then the interval 0 x 1 does not contain the median.
You therefore add the sum from this interval to the calculation in the next interval to
obtain
Z m
1 3 1 1
+ ( x)dx =
4 1 2 2 2
3 1 2m 1
)| x x| =
2 4 1 4
3 1 2 3 1 1
) m m + =
2 4 2 4 4
)m2 6m + 6 = 0
p p
The roots of the quadratics equation are 3 ± 3 which shows that 3 3 = 1.27 to be
the one that lies within the interval 1 x 2. Therefore the median m = 1.27.
x 1 2 3 4 y 0 1 2
P(X=x) 14 14 14 14 P(Y=y) 14 12 14
P P
(b)E(X) = PxP(x) = 5/2 and E(Y) = y.P(Y) P =1
(c)E(X2 ) = x2 .P(x) = 15/2 and E(Y2 ) = y2 .P(y) = 3/2
(d)Var(X) = 15/2 25/4 = 5/4 and Var(Y) = 3/2 1 = 1/2
(e)If X, Y are independent; X + Y will take on values 1,2,3,4,5,6. Thus, you have
1 1 1
P(X + Y = 1) = P(1 on die, 0 on heads) = ⇤ =
4 4 16
1 1 1 1 3
P(X + Y = 2) = P(2 on die, 0 on heads) + P(1 on die , 1 head) = ⇤ + ⇤ =
4 4 4 2 16
P(X + Y = 3) = P(3 on die, 0 heads) + P(2 on die , 1 head) + P(1 on die , 2 heads)
1 1 1 1 1 1 4
= ⇤ + ⇤ + ⇤ =
4 4 4 2 4 4 16
P(X + Y = 4) = P(4 on die, 0 heads) + P(3 on die , 1 head) + P(2on die , 2 heads)
1 1 1 1 1 1 4
= ⇤ + ⇤ + ⇤ =
4 4 4 2 4 4 16
P(X + Y = 5) = P(4 on die, 1 head) + P(3 on die , 2 heads)
1 1 1 1 3
= ⇤ + ⇤ =
4 2 4 4 16
1 1 1
P(X + Y = 6) = P(4 on die, 2 heads) = ⇤ =
4 4 16
(e)The probability distribution of X + Y is given in the table below.
x+y 1 2 3 4 5 6
1 3 4 4 3 1
P(X+Y=x+y) 16 16 16 16 16 16
14 Elements of Probability & Statistics– MTH1202
P 1 6
From the table, E(X + Y) = (x + y).P(x + y) = 16 + 16 + 12 16 15 6 7
16 + 16 + 16 + 16 = 2 and
5 7
E(X) + E(Y) = 2 + 1 = 2 . Therefore, E(X + Y) = E(X) + E(Y) and E[(X + Y)2 ] =
P
(x + y)2 .P(x + y) = 14. Var(X + Y) = E[(X + Y)2 ] [E(X + Y)]2 = 14 [ 72 ]2 = 74
and Var(X) + Var(Y) = 54 + 32 = 74 . Therefore, Var(X + Y) = Var(X) + Var(Y)
=
=
=
=
ff
ff
ff
=
= =
=
ff
ffi
= / =
= / =
= =
=
=
Table A.1 Binomial Probability Table 729
!
r
Table A.1 (continued) Binomial Probability Sums b(x; n, p)
x=0
p
n r 0.10 0.20 0.25 0.30 0.40 0.50 0.60 0.70 0.80 0.90
15 0 0.2059 0.0352 0.0134 0.0047 0.0005 0.0000
1 0.5490 0.1671 0.0802 0.0353 0.0052 0.0005 0.0000
2 0.8159 0.3980 0.2361 0.1268 0.0271 0.0037 0.0003 0.0000
3 0.9444 0.6482 0.4613 0.2969 0.0905 0.0176 0.0019 0.0001
4 0.9873 0.8358 0.6865 0.5155 0.2173 0.0592 0.0093 0.0007 0.0000
5 0.9978 0.9389 0.8516 0.7216 0.4032 0.1509 0.0338 0.0037 0.0001
6 0.9997 0.9819 0.9434 0.8689 0.6098 0.3036 0.0950 0.0152 0.0008
7 1.0000 0.9958 0.9827 0.9500 0.7869 0.5000 0.2131 0.0500 0.0042 0.0000
8 0.9992 0.9958 0.9848 0.9050 0.6964 0.3902 0.1311 0.0181 0.0003
9 0.9999 0.9992 0.9963 0.9662 0.8491 0.5968 0.2784 0.0611 0.0022
10 1.0000 0.9999 0.9993 0.9907 0.9408 0.7827 0.4845 0.1642 0.0127
11 1.0000 0.9999 0.9981 0.9824 0.9095 0.7031 0.3518 0.0556
12 1.0000 0.9997 0.9963 0.9729 0.8732 0.6020 0.1841
13 1.0000 0.9995 0.9948 0.9647 0.8329 0.4510
14 1.0000 0.9995 0.9953 0.9648 0.7941
15 1.0000 1.0000 1.0000 1.0000
16 0 0.1853 0.0281 0.0100 0.0033 0.0003 0.0000
1 0.5147 0.1407 0.0635 0.0261 0.0033 0.0003 0.0000
2 0.7892 0.3518 0.1971 0.0994 0.0183 0.0021 0.0001
3 0.9316 0.5981 0.4050 0.2459 0.0651 0.0106 0.0009 0.0000
4 0.9830 0.7982 0.6302 0.4499 0.1666 0.0384 0.0049 0.0003
5 0.9967 0.9183 0.8103 0.6598 0.3288 0.1051 0.0191 0.0016 0.0000
6 0.9995 0.9733 0.9204 0.8247 0.5272 0.2272 0.0583 0.0071 0.0002
7 0.9999 0.9930 0.9729 0.9256 0.7161 0.4018 0.1423 0.0257 0.0015 0.0000
8 1.0000 0.9985 0.9925 0.9743 0.8577 0.5982 0.2839 0.0744 0.0070 0.0001
9 0.9998 0.9984 0.9929 0.9417 0.7728 0.4728 0.1753 0.0267 0.0005
10 1.0000 0.9997 0.9984 0.9809 0.8949 0.6712 0.3402 0.0817 0.0033
11 1.0000 0.9997 0.9951 0.9616 0.8334 0.5501 0.2018 0.0170
12 1.0000 0.9991 0.9894 0.9349 0.7541 0.4019 0.0684
13 0.9999 0.9979 0.9817 0.9006 0.6482 0.2108
14 1.0000 0.9997 0.9967 0.9739 0.8593 0.4853
15 1.0000 0.9997 0.9967 0.9719 0.8147
16 1.0000 1.0000 1.0000 1.0000
734 Appendix A Statistical Tables and Proofs
!
r
Table A.2 (continued) Poisson Probability Sums p(x; µ)
x=0
µ
r 10.0 11.0 12.0 13.0 14.0 15.0 16.0 17.0 18.0
0 0.0000 0.0000 0.0000
1 0.0005 0.0002 0.0001 0.0000 0.0000
2 0.0028 0.0012 0.0005 0.0002 0.0001 0.0000 0.0000
3 0.0103 0.0049 0.0023 0.0011 0.0005 0.0002 0.0001 0.0000 0.0000
4 0.0293 0.0151 0.0076 0.0037 0.0018 0.0009 0.0004 0.0002 0.0001
5 0.0671 0.0375 0.0203 0.0107 0.0055 0.0028 0.0014 0.0007 0.0003
6 0.1301 0.0786 0.0458 0.0259 0.0142 0.0076 0.0040 0.0021 0.0010
7 0.2202 0.1432 0.0895 0.0540 0.0316 0.0180 0.0100 0.0054 0.0029
8 0.3328 0.2320 0.1550 0.0998 0.0621 0.0374 0.0220 0.0126 0.0071
9 0.4579 0.3405 0.2424 0.1658 0.1094 0.0699 0.0433 0.0261 0.0154
10 0.5830 0.4599 0.3472 0.2517 0.1757 0.1185 0.0774 0.0491 0.0304
11 0.6968 0.5793 0.4616 0.3532 0.2600 0.1848 0.1270 0.0847 0.0549
12 0.7916 0.6887 0.5760 0.4631 0.3585 0.2676 0.1931 0.1350 0.0917
13 0.8645 0.7813 0.6815 0.5730 0.4644 0.3632 0.2745 0.2009 0.1426
14 0.9165 0.8540 0.7720 0.6751 0.5704 0.4657 0.3675 0.2808 0.2081
15 0.9513 0.9074 0.8444 0.7636 0.6694 0.5681 0.4667 0.3715 0.2867
16 0.9730 0.9441 0.8987 0.8355 0.7559 0.6641 0.5660 0.4677 0.3751
17 0.9857 0.9678 0.9370 0.8905 0.8272 0.7489 0.6593 0.5640 0.4686
18 0.9928 0.9823 0.9626 0.9302 0.8826 0.8195 0.7423 0.6550 0.5622
19 0.9965 0.9907 0.9787 0.9573 0.9235 0.8752 0.8122 0.7363 0.6509
20 0.9984 0.9953 0.9884 0.9750 0.9521 0.9170 0.8682 0.8055 0.7307
21 0.9993 0.9977 0.9939 0.9859 0.9712 0.9469 0.9108 0.8615 0.7991
22 0.9997 0.9990 0.9970 0.9924 0.9833 0.9673 0.9418 0.9047 0.8551
23 0.9999 0.9995 0.9985 0.9960 0.9907 0.9805 0.9633 0.9367 0.8989
24 1.0000 0.9998 0.9993 0.9980 0.9950 0.9888 0.9777 0.9594 0.9317
25 0.9999 0.9997 0.9990 0.9974 0.9938 0.9869 0.9748 0.9554
26 1.0000 0.9999 0.9995 0.9987 0.9967 0.9925 0.9848 0.9718
27 0.9999 0.9998 0.9994 0.9983 0.9959 0.9912 0.9827
28 1.0000 0.9999 0.9997 0.9991 0.9978 0.9950 0.9897
29 1.0000 0.9999 0.9996 0.9989 0.9973 0.9941
30 0.9999 0.9998 0.9994 0.9986 0.9967
31 1.0000 0.9999 0.9997 0.9993 0.9982
32 1.0000 0.9999 0.9996 0.9990
33 0.9999 0.9998 0.9995
34 1.0000 0.9999 0.9998
35 1.0000 0.9999
36 0.9999
37 1.0000