STA1301 Lecture Notes
STA1301 Lecture Notes
PREPARED
BY
AHMAD A. SULEIMAN
DEPARTMENT OF STATISTICS
KANO UNIVERSITY OF SCIENCE AND
TECHNOLOGY, WUDIL
2017
1|Page
STA1301
Basic Terminology
To understand probability, we must know about some important terms which will be used in
defining probability.
If in each trial of an experiment conducted under identical conditions, the outcome is not
unique, but may be any one of the possible outcomes, then such an experiment is called a
random experiment.
Examples of random experiments are: - tossing a coin, throwing a die, selecting a card from a
pack of playing card and so on. In all these cases, there are a number of possible results which
can occur but there is an uncertainty as to which one of them will actually occur.
(ii) Outcome
(iii) Trial
The set of all possible outcomes of a random experiment is defined as sample space, and is
denoted by S , each member in the set is called a sample point.
Example 1:
A coin is tossed three times. List all the possible outcomes ( Sample Space) of the experiment.
Solution:
2|Page
STA1301
Since the random experiment of tossing a coin has two possible outcomes ( Head or Tail ) , and
the experiment is repeated three times, then the number of the sample point we have can
calculated as 23 8 .
(v) Event
An event is a subset of a sample space. Event is called simple if it corresponds to a single sample
point of the sample space otherwise it is known as a compound or composite event.
Example 2:
Solution:
The outcomes of random experiment are said to be equally likely or equally probable if the
occurrence of none of them is expected in preference to others. For example, if an unbiased
coin is tossed once, the two possible outcomes, a head or a tail are equally likely.
3|Page
STA1301
Types of Events
mn
Thus, P 1
mn
An event which never happens, i.e., no outcome favours to this event, is called an impossible or
a null event, denoted by .
0
Thus, P 0
mn
The events which are made up by the combination of two or more events are called compound
events. For example, suppose we throw a single die, and A is the event of getting an even
number on the die and B is the event of getting a number less than 3, then A B or A B is
the event of getting an even number or number less than 3. Thus, A B or A B is termed as
compound event.
If E is an event, then the event of not happening the event E is called complementary event
of E , denoted by E c or E or E. It is probability can be found by subtracting the P E from 1.
i.e., P Ec 1 P E
Two events A, B are said to be mutually exclusive or disjoint events if A happens, then B
cannot happen, and if B happens, then A cannot happen. Thus, out of A, B only one can
happen at a time, i.e., both cannot happen simultaneously. In this case, A B .
Hence, P A B or P AB 0
4|Page
STA1301
For example, from a pack playing cards, if R is the event of drawing a red card and B is the
event of drawing a black card. Then this experiment of drawing a card, both R and B cannot
happen simultaneously or we say when R happens, then B cannot happen and vice versa. So
these are mutually exclusive events.
Two events A, B are said to be independent if happening of one event does not affect the
happening of the other, i.e., when A happens, B may or may not occur. The occurrence of B
is not linked with happening of A , i.e., B is independent of A .
For example, if we throw a coin and die simultaneously, then the result of coin is independent
of result of die. So H and 5 are two independent events.
Axioms of Probability
In order to find the probability of any event of a sample space, the following rules, popularly
known as axioms or postulates of probability, must satisfied:
0 P A 1 .
Axiom II: if A1 , A2 ,..., Ak are k mutually exclusive event of the sample space S , then
k
P A1 A2 ... Ak P Ai .
i 1
The first axiom implies that the probability of an event is non-negative number less than or
equal to unity. The second axiom implies that the probability of an event that is certain to occur
must be equal to unity. Axiom III gives a basic rule of addition of probabilities when events are
mutually exclusive.
Theorems on Probability
Theorem 1.
5|Page
STA1301
Proof.
Since S and are mutually exclusive, using axiom III, we can write
P S P P S . Hence, P 0 .
Theorem 2.
P A 1 P A , where A is compliment of A .
Proof.
P A P A P S 1 . Hence, P A 1 P A .
Theorem 3.
i. P A B P B P A B
ii.
P A B P A P A B
Proof.
A B AB
A A B B
6|Page
STA1301
B A B A B or P B P A B A B
Since A B and A B are mutually exclusive, we have
P B P A B P A B
P A B P B P A B
P A B P A P A B
If A and B are any two events of the same random experiment, then probability of the event
of happening of at least one event out of these, is given by
P A B A B P A P B P A B
Proof.
A B A A B or P A B P A A B
Since A and A B are mutually exclusive, we can write
P A B P A P A B
Substituting the value of P A B from theorem 3, we get
P A B P A P B P A B
Aliter: Recall:
n( A)
P( A) and n( A B) n( A) n( B) n( A B)
n( S )
7|Page
STA1301
n( A B ) n( A) n( B ) n( A B )
P( A B)
n( S ) n( S )
n( A) n( B) n( A B )
n( S ) n( S ) n( S )
P( A) P( B) P( A B )
Note: The addition theorem can be generalized for more than two events. If A, B and C are three
events of a sample space S , then the probability of occurrence of at least one of them is given by
P A B C P A B C P A P B C P A B C
P A P B C P A B A C
P A B C P A P B P C P A B P A C P B C P A B C .
Example 3:
The probability that a student passes a mathematics test is 2 3 and the probability that he
passes both mathematics test and statistics test is 14 45 . The probability that he passes at least
one test is 4 5 . What is the probability that he passes the statistics test?
Solution:
P A B P A P B P A B
4 5 2 3 P B 14 45
4 14 2 36 14 30 4
P B
5 45 3 45 9
Example 4:
8|Page
STA1301
If two dice are thrown together, find the probability that the sum is
Solution:
The required events can happen in the following mutually exclusive ways:
P S 8 P S 9 P S 10 P S 11 P S 12
Thus,
4
S 9 : (3, 6), (6,3), (4,5), (5, 4) P S 9
36
3
S 10 : (4, 6), (6, 4), (5,5) P S 10
36
2
S 11: (5, 6), (6,5) P S 11
36
1
S 12 : (6, 6) P S 12
36
4 3 2 1 10 5
P S 8
36 36 36 36 36 18
(b) Let A denote the events of getting the sum of 7 and B denote the events of getting the
sum of 11. We have
6 1
A 7 : (1, 6), (6,1), (2,5), (5, 2), (3, 4), (4,3) P( A) P( A 7)
36 6
9|Page
STA1301
2 1
B 11: (5, 6), (6,5) P( B) P( B 11)
36 18
Re quired probability P Ac B c 1 P A B
1 P A P B
1 1 7
1
6 18 9
Example 5:
A man shoots at a target, the probability that he hits the target is 2 5 , if he shoots three times,
what is the probability that
Solution:
Let H denotes the event the man hits the target, and F denotes the event he fails to hit the
target, then
Given, P H 2 5 P F 1 P H 1 2 5 3 5
2 3 3 3 2 3 3 3 2
5 5 5 5 5 5 5 5 5
18 18 18 54
125 125 125 125
Example 6:
What is the probability of drawing a black card or a king from a pack of playing cards?
10 | P a g e
STA1301
Solution:
Let A be the event that the drawn card is black and B be the event that it is a king. We want find
P A B .
Since there are 26 black cards, 4 kings and 2 black kings in a pack, we have
P A 26 52 , P B 24 52 and P A B 2 52 .
Thus,
26 4 2 7
P A B P A P B P A B
52 52 52 13
If A and B are any two independent events, the probability of simultaneous happening
of both the events is given by
P A B P AB P A .P B
Prove as an exercise.
Example 6:
Three balls are drawn from the box containing 6 white ball, 5 red balls and 4 blue balls. Find the
probability that they are drawn in the order blue, red and white if each ball is
Solution:
(a) The probability of drawing a blue, a red and a white ball with replacement is
P B R W P B R W
4 5 6
But P B , P R and P W
15 15 15
4 5 6 8
P B R W
15 15 15 225
11 | P a g e
STA1301
(b) Probability of drawing a blue, a red and a white ball without replacement is
P B R W P B R W
4 5 6
But P B , P R and P W
15 14 13
4 5 6 4
P B R W
15 14 13 91
Let A and B be two events, then the conditional probability of event A given that event B
has already occurred is given by
B P PAB B
P A ; P B 0
Similarly, the conditional probability of event B given that event A has already occurred is
given by
A P PAAB
P B ; P A 0
Example 7:
The probabilities that a student will fail MTH1301 (M) and STA1301 (S) or both are:
P M 0.20, P S 0.15 and P M S 0.03. What is the probability that he/she will fail
MTH1301 given that he/she has failed STA1301?
Solution:
We want P M
S
and by definition of conditional probability
Example 8:
Find the probability that a single toss of a die results in a number less than 4 if it is given that
the toss resulted in an odd number.
Solution:
12 | P a g e
STA1301
Let A be the event (less than 4) and B be the event (odd number) then
1 1 1 1
P A P 1 P 2 P 3
6 6 6 2
1 1 1 1
P B P 1 P 3 P 5
6 6 6 2
1 1 1
Also, P A B P 1 P 3
6 6 3
P A B P PAB B 11 32 23
Theorem 7: (Bayes’ Theorem)
If an event D can occur only in combination with any of the n mutually exclusive and exhaustive
events A1 , A2 ,..., An and if, in an actual observation, D is found to have occurred, then the probability
that it was preceded by a particular event Ak is given by
P Ak .P D
P k
A Ak
D
P Ai .P D
n
i 1 Ai
Example 9:
In a bolt factory, machine A, B and C manufacture 25%, 35% and 40% of the total respectively.
If their output 5%, 4% and 2% are defective bolts. A bolt is drawn at random from the product
and is found to be defective. What is the probability that it was manufactured by machine B?
Solution:
D: bolt is defective.
13 | P a g e
STA1301
B
P B D
D
P B
P A P D P B P D P C P D
A B C
0.35 0.04
0.41
0.25 0.05 0.35 0.04 0.40 0.02
Counting Techniques
Counting techniques or combinatorial methods are often helpful in the enumeration of total
number of outcomes of a random experiment and the number of cases favourable to the
occurrence of an event.
If the first operation can be performed in any one of the m ways and then a second operation
can be performed in any one of the n ways, then both can be performed together in any one of
the m n ways.
This rule can be generalized. If first operation can be performed in any one of the n1 ways,
second operation in any one of the n2 ways, .... Kth operation in any one of the nk ways, then
together these operations can be performed in any one of the n1 n2 ...nk ways.
Factorial Notation
The notation n! is used to denote the product of all the positive whole numbers from 1 up to n
. i.e., n ! product of the first n natural numbers. For example,
5! 5 4 3 2 1 120
6! 6 5 4 3 2 1 720 etc.
In general, n! n n 1!
Hence, by definition 0! 1.
14 | P a g e
STA1301
Permutation
A permutation of a number of objects is their arrangement in some finite order. For example,
given three letters a, b, c, we can permute them two at a time as “bc, cb, ca, ac, ab, ba” yielding
6 permutations.
n n 1 n 2 ... n r 1
and is denoted by n Pr .
n!
n
Pr
Thus, n r !
Example 1:
Solution:
n!
n
Pr ; n 7, r 7
n r !
7! 7! 7!
7
P7
7 7 ! 0! 1
7 6 5 4 3 2 1 5040 ways
Example 2:
Solution:
n!
n
Pr ; n 5, r 3
n r !
5! 5! 5 4 3 2 1
5
P3
5 3 ! 2! 2 1
5 4 3 60 ways
15 | P a g e
STA1301
(ii) Permutations with repetitions. The number of permutation of n object of which r1 are
alike, r2 are alike and r3 are alike is
n!
r1 !r2 !r3 !
Example 3:
How many distinct arrangements can be made from the word STATISTICS?
Solution:
Example 4:
Solution:
n6
n 1! 6 1! 5!
5 4 3 2 1 120 ways.
Example 5:
In how many ways can 5 boys and 5 girls stand in a circle so that no two boys and no two girls
stand together?
Solution:
By fixing the position of a boy, remaining four boys can stand in 4! 24 ways . Now the five girls
can stand in 5! 120 ways . Thus, total number of required arrangements
4! 5! 24 120 2880 ways.
(iv) The number of ways of arranging n objects in a circle which can be turned.
n 1!
2
16 | P a g e
STA1301
Example 6:
Find the number of ways of arranging 5 objects in a ring that can be turned.
Solution:
n5
Example 7:
If n
P4 12. n P2 , find n .
Solution:
n
P4 12. n P2
n! n!
12.
n 4 ! n 2 !
n 2! 12 n 4!
n 2 n 3 n 4! 12 n 4 !
n 2 5n 6 0
n6 or n 1
Combinations
n
n! Pr Permutation
Thus, n
Cr or n
Cr
n r !r ! r! r!
Example 1:
17 | P a g e
STA1301
Solution:
n 10, r 4
10! 10!
10
C4 210 ways.
10 4 !4! 6!4!
Example 2:
Solution:
n 5, r 5
5! 5!
5
C5 1 way.
5 5!5! 0!5!
Example 3:
Find the number of ways of forming a club of 5 people from 5 women and 4 men, if
Solution:
5! 4! 5! 4!
(a) 5 C2 4 C3
5 2 !2! 4 3!3! 3!2! 1!3! 40 ways.
5! 4! 5! 4!
(b) 5 C5 4 C0 11 1 way
5 5!5! 4 0 !0! 0!5! 4!0!
4! 5! 4! 5!
(c) 4
C2 5 C3 60 ways.
4 2 !2! 5 3!3! 2!2! 2!3!
4! 5! 4! 5!
(d) 4 C4 5 C1 5 ways.
4 4!4! 5 1!1! 0!4! 4!1!
18 | P a g e
STA1301
Example 4:
Solution:
n
C2 2 2 n P1
n!
2
2n !
n 2!2! 2n 1!
n n 1 n 2 ! 2n 2n 1!
2
n 2!2 1 2n 1!
n n 1
2 2n
2
n 2 5n 4 0
n 1 or n4
19 | P a g e
STA1301
A random variable is generally denoted by capital letters, i.e., X , Y , Z etc. and the values of
these random variables are denoted by corresponding small letters i.e., x, y, z etc. For example,
in an experiment of tossing a coin twice, if we define X to be the numbers of head, then the
values of the random variable X are 0,1,1, 2 corresponding to outcomes HH , HT , TH , TT
respectively.
If in a random experiment, the event corresponding to a number " a " occurs, then the
corresponding random variable X is said to assume the value " a " and the probability of the
event is denoted by P X a . Similarly, the probability of the event X assuming any value in
the interval a X b
A variable which can assume only a countable number of real values is called a discrete random
variable. Examples of discrete random variables are: number of academic staff of KUST, Wudil,
number of accidents per month, number of telephone calls per unit time and so on.
If we tabulate all probabilities corresponding to all possible values of the random variable X ,
then the table of values of probabilities is called probability distribution, distribution function,
discrete density function or probability mass function of X .
X x1 x2 ...... xi ……. xk
P X x p1 p2 …… pi ……. pk
k
Where P X xi pi 1
i 1
Note:
20 | P a g e
STA1301
(i) P X xi p X x1 p X x2 ... p X xi
(ii) P X xi p X xi p X xi 1 ... p X xk
Definition: if X is a discrete random variable with distinct values x1 , x2 ,..., xn ,..., then the
function f x is defined as :
P X xi fi
; if x xi
f x for i 1, 2,...
0 ; if x xi
Is called the probability mass function or discrete density function of random variable X .
Properties of PMF
(i) f xi 0 i
..
(ii)
f x 1
i 1
i
Example 1:
Find the probability distribution of the random variable (number of tail) when two coins are
tossed.
Solution:
Let S be the sample space and X be the discrete random variable “number of tails). Then
S HH , HT , TH , TT and the possible values of X are 0,1, 2 .
1
Thus, p X 0 p HH
4
2 1
p X 1 p HT , TH
4 2
1
p X 2 p TT
4
21 | P a g e
STA1301
X 0 1 2
P X x 14 12 14
Example 2:
X 2 1 0 1 2 3
P X x 0.1 k 0.2 3k 2k 0.3
(i) Find k
(ii) Obtain (a) p X 2 (b) p X 2 (c) p 2 X 2
Solution:
6k 0.4
k 0.07
(i ) (a) p X 2 p X 2 p X 1 p X 0 p X 1
0.1 k 0.2 3k
0.1 0.07 0.2 3 0.07
0.58
(b) p X 2 p X 2 p X 3
2k 0.3 2 0.07 0.3 0.44
(c) p 2 X 2 p X 1 p X 0 p X 1
k 0.2 3k
4 0.07 0.2 0.48.
Example 3:
X 0 1 2 3 4 5
F(X ) 0.1 0.23 0.28 0.11 0.19 0.09
22 | P a g e
STA1301
Calculate
Solution:
2
(i) f x 0.1 0.23 0.28 0.61
x 0
5
(ii) f x 0.11 0.19 0.09 0.39
x 3
F x P X x f x .
The value F x is also known as the cumulative distribution function of X . It gives the
probability that the random variable X takes on a value less than or equal to a given value of
X.
The distribution function for a discrete random variable must satisfy the following conditions:
1. F 0
2. F 1
3. If a b , then F a F b for any real numbers a and b .
Example 1:
X 0 1 2 3
FX 18 38 38 18
Find the distribution function of X .
Solution:
23 | P a g e
STA1301
F 0 f 0 1 8
F 1 f 0 f 1 1 8 3 8 1 2
F 2 f 0 f 1 f 2 1 8 3 8 3 8 7 8
F 3 F X f 0 f 1 f 2 f 3 1 8 3 8 3 8 1 8 8 8 1
0 ; x 0
1 8 ; 0 x 1
F X 1 2 ; 1 x 2
7 8 ; 2 x 3
1 ; 3 x
Example:
Let X be the number of boys in a family of 3. Find the distribution of X and the CDF of X .
Solution:
Then,
Now,
p X 0 p ggg 1 8
p X 1 p bgg , gbg , ggb 3 8
p X 2 p bbg , bgb, gbb 3 8
p X 3 p bbb 1 8
The values of X are 0,1, 2, and 3 and hence, the distribution of X is given by
X 0 1 2 3
FX 18 38 38 18
24 | P a g e
STA1301
0 ; x0
1 8 ; 0 x 1
F X 4 8 ; 1 x 2
7 8 ; 2 x3
1 ; 3
For a continuous random variable X and for any real number a and b with a b , we can
obtain the value of the probability distribution of X at a given point x within an interval a, b
by subtracting the value of the distribution function of X at the point a from the distribution
function of X at the point b . Also we can obtain the density function by differentiating the
distribution function with respect to x
dFx X
fX x
dx
(i) f x 0
(ii) f x dx 1
P a X b f x dx F b F a
b
(iii)
a
Example 1:
ax ; 0 x 1
The random variable X has pdf f x
0 elsewhere
25 | P a g e
STA1301
Solution:
1 1
0
axdx 1 a xdx 1
0
1
x2
a 1
2 0
a2
2 x ; 0 x 1
Thus, f x
0 elsewhere
0.8
x2
p X 0.8
0.8
(i) 2 xdx 2 0.64
0
2 0
1
x2
p X 0.2 2 xdx 2 0.96
1
(ii)
0.2
2 0.2
Example 2:
cx 2 ; 0 x 3
(a) Find the constant c such that the function f x is a probability
0 otherwise
density function.
(b) Compute P 1 X 2 .
Solution:
(a) Since f x dx 1
3
0
cx 2 dx 1
26 | P a g e
STA1301
3
x3
c 1
3 0
c 1 9
2
1 2 1 x3 7
(b) P 1 X 2 x 2 dx
9 1 9 3 1 28
F X P X x f t dt ; x
x
Thus, Fx X is a cumulative distribution function since it gives the distribution of the values of
the continuous random variable X in cumulative form.
Properties of CDF
(i) F 0
(ii) F 1
(iii) If a b , then F a F b for any real number a and b i.e.,
P a X b f x dx
b
(iv) f x 0
(v) f x dx 1
Example 1:
1 x2 ,
1 x 2,
f ( x) 3 .
0, elsewhere.
Solution:
27 | P a g e
STA1301
If x 1, then
FX
x x
f (t )dt 0dt 0
If 1 x 2, then
t dt t 3 x 3 1
1 1 1
FX
x x
f (t )dt 0dt
x
1 2
1 3 9 1 9
If x 2 , then
1
FX
x 2 x
f (t )dt f (t )dt f (t )dt f (t )dt
1 2
1 2 x
0dt 1 2
t dt 0dt
1 3 2
1
8 1 1.
2
0 19 t 3 0
1 9
Therefore,
0, x 0,
1
F X ( x 3 1), 1 x 2,
9
1, x 2.
If X is a discrete random variable and f x is the value of its probability distribution function
at x , then the expectation or expected value of X , denoted by E X or is defined by
E X xf ( x)
E X xf ( x)dx ; x
Properties of Expectation
28 | P a g e
STA1301
2 E aX aE X
3 E aX b aE X b
4 E X Y E X E Y
Variance
Var X E X or 2 x f x or E X 2 2
2 2
( for discrete case)
Or 2 ( x ) 2 f ( x)dx ( for continuous case)
Properties of Variance
2 Var aX b a 2Var X
3 Var aX a 2Var X
Example 1:
Find the expectation and variance of the number of heads in three tosses of a coin.
Solution:
Let X denotes the number of heads. Then X takes the values 0,1, 2,3 . Their respective
probabilities are calculated below:
29 | P a g e
STA1301
p X 0 p TTT 1 8
p X 3 p HHH 1 8
X xi p X x f x xf x x2 f x
0 18 0 0
1 38 38 38
38 68 12 8
2 38 98
3 18
Total 1 xf ( x) 3 2 x 2
f ( x) 3
E X xf ( x) 3 2
2 x f x E X 2 2 x 2 f ( x) 2
2
9 3
3 3 2 3
2
4 4
Example 2:
Hence,
E X xf ( x) = 1 2 3 4 5 6
1 1 1 1 1 1
6 6 6 6 6 6
1 7
1 2 3 4 5 6
6 2
(b) The probability function of X (the sum of numbers obtained on two dice)
30 | P a g e
STA1301
X :x 2 3 4 5 6 7 8 9 10 11 12
f ( x) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36
E X xf ( x)
1 2 3 4 5 6 5 4 3 2 1
2 3 4 5 6 7 8 9 10 11 12
36 36 36 36 36 6 36 36 36 36 36
1
2 6 12 20 30 42 40 36 30 22 21 7
36
Example 3:
X 3 6 9
p X x 16 12 13
Find
(a) E X and E X 2
(b) Variance of X .
Solution:
(a) E X xf ( x) (3) 6 9
1 1 1 11
6 2 3 2
1 1 1 93
E X 2 x 2 f ( x) 9 36 81
6 2 3 2
(b)
Var X X E X 2 2
2
2
93 11 65
2 2 4
Example 4:
The diameter of an electric cable is assumed to be continuous random variable with probability
density function: 6 x 1 x , 0 x 1 . Find the mean variance.
Solution:
31 | P a g e
STA1301
1
Mean x. f ( x)dx x.6 x(1 x)dx
0
1
1 1
(6 x 2 6 x3 )dx 2 x 3 32 x 4
0 0 2
Variance ( x ) 2 f ( x)dx
1
( x 12 ) 2 .6 x(1 x)dx
0
1
( x 2 x 14 ) 2 .(6 x 6 x 2 ) dx
0
1
(12 x3 6 x 4 152 x 2 32 x)dx
0
2 x 4 65 x5 52 x3 34 x 2
1 1
0 20
Example 5:
2 x 1 ,
1 x 1
1
If f x
0, elsewhere
Solution:
E X x. f ( x)dx
1 1 1 2
x. 12 ( x 1)dx
2 1
( x x)dx
1
1
1 x3 x 2 1
2 3 2 1 3
E X 2 x 2 . f ( x)dx
1 1 1 3
x 2 . 12 ( x 1)dx x x 2 dx
1 2 1
32 | P a g e
STA1301
1
1 x 4 x3 1
2 4 3 1 3
Thus,
Var X E X 2 2
2
1 1 1 1 2
3 3 3 9 9
After discussing probability distribution of a random variable, we shall now discuss about some
special probability distributions as follows:
A Bernoulli trial is a random experiment in which there are precisely two possible outcomes,
statistically known as ‘success’ ( p ) and ‘failure’ (q ) in any single trial.
A random variable X is defined as (1) , if a Bernoulli results in success and (0) , if same trial
results in failure. Thus, X have Bernoulli distribution with parameter ( p ) (i.e., the probability
of success) and (q ) (i.e., the probability of failure).
p 1 p ,
1 x
x
x 0,1
f x P X x
0, otherwise
Theorem 1: if X is a Bernoulli random variable with parameter p , then the mean and variance
are respectively given by
p
2 p 1 p
33 | P a g e
STA1301
1
xf ( x)
x 0
1
xp x (1 p )1 x
x 0
p.
2 E X E X 2 2
2
Thus, E X 2 x 2 p x (1 p )1 x p
1
x 0
2 p p2
p 1 p
Example 1:
Find the probability of getting a head in a single toss of a coin. Hence find the mean and
variance.
Solution:
1 1 1
Now, p and q 1 p 1 .
2 2 2
1 1
P X 0 P failure and P X 1 P success
2 2
1
Hence, the probability of getting a head in a single toss of a coin is .
2
1 1
xf ( x) xp x (1 p )1 x
x 0 x 0
1
1
x( 12 ) x (1 12 )1 x
x 0 2
34 | P a g e
STA1301
2 E X E X 2 2
2
E X 2 x 2 p x (1 p )1 x x 2 ( 12 ) x (1 12 )1 x
1 1
1
x 0 x 0 2
2
1 1 1
p p
2 2
2 2 4
n
f x p x q n x , x 0,1, 2,..., n
x
n
where is the Binomial coefficient.
x
(i) Each trial has only two possible outcomes (i.e., success and failure)
(ii) The repeated trials are independent
(iii) The probability of success in each trial remains constant.
Theorem 2: if X is Binomial random variable with parameter p and n , then the mean and
variance are respectively given by
np
2 np 1 p .
Proof:
35 | P a g e
STA1301
n
xf ( x)
x 0
n
n
x p x q n x , x 0,1, 2,..., n
x 0 x
n
x ( n nx!)!x! p x q n x
x 0
n
x ( n x )!nx!( x 1)! p x q n x
x 1
n
np ( n (xn)!(1)!x 1)! p x 1q n x
x 1
Letting x 1 y and n 1 m ,
m
np y!( mm! y )! p y q m y
y 0
m
But
y 0
m!
y !( m y )! p y q m y is the complete summation of Binomial distribution and therefore, is
equal to unity.
Therefore, np
2 E X E X 2 2
2
n
E X 2 x 2 p x q n x
n
x 0 x
n
x( x 1) x ( n nx!)!x! p x q n x
x 0
n n
x( x 1) ( n nx!)!x! p x q n x x ( n nx!)!x! p x q n x
x 0 x 0
Since the second summation is the expected value of Binomial distribution. Thus, we have
36 | P a g e
STA1301
EX x( x 1)
n
n ( n 1)( n 2)!
2
( n x )! x ( x 1)( x 2)! p x q n x np
x 0
n
n( n( nx1)( n 2)! x n x
)!( x 2)! p q np
x2
n
n(n 1) p 2 ( n (xn)!( 2)!
x 2)! p
x2 n x
q np
x2
E X 2 n(n 1) p 2 ( m my!)! y! p y q m y np
m
y 0
n(n 1) p (1) np
2
Thus,
2 n(n 1) p 2 np (np ) 2
n 2 p 2 np 2 np n 2 p 2
np (1 p ).
Example 1:
If a machine produces 10% defective items, what is the probability of getting 2 defective items
out of 5 items produced by the machine?
Solution:
n
f x p x q n x , x 1, 2,3, 4,5
x
5
f x (0.1) 2 (0.9)3 0.0729
2
Example 2:
A die is thrown 20 times. Getting a number greater than 4 is considered a success. Find the
mean and variance of the number of success.
Solution:
37 | P a g e
STA1301
Thus,
1 20
Mean np 20
3 3
1 2 40
Variance npq 20
3 3 9
Poisson distribution is the limiting form of the Binomial distribution when the number of trials
n becomes very large and the probability of success, p in a trial very small (i.e., np ) .
Theorem 3: if X is Poisson random variable with parameter , then the mean and variance
are respectively given by
EX
Var X
Proof:
If is the average n umber of occurrence of an event at a given time interval and the random
variable x assumes the infinite set of values 0,1, 2,3,..., , then the mean of Poisson
distribution is given by
38 | P a g e
STA1301
E X xf ( x)
x 0
x
x 1
x x
x 0 x! x 0 x( x 1)!
x 1
x 1 ( x 1)!
Letting x 1 y , we have
y
E X
y 0 y!
(1)
2 E X E X 2 2
2
x
E X 2 x2
x 0 x!
x
x( x 1) x
x 0 x!
x
x
x( x 1) x
x 0 x! x 0 x!
x2
2
x2 ( x 2)!
Letting x 2 y , we have
y
EX 2
2
y 0 y!
2
Thus,
Var X 2 ( ) 2
39 | P a g e
STA1301
Example 1:
The number of accidents in a junction in a week time follows a Poisson distribution with mean
3. Find the probability that:
Solution:
Let X denote the number of accidents occurring in a junction during the week and 3 .
x
Applying P X x f x ; x 0,1, 2,...,
x!
We have
3
(3)0
(i) P X 0 3
0.050
0!
(ii)
P X 3 P X 0 P X 1 P X 2 P X 3
3 3 3 3
(3)0 (3)1 (3) 2 (3)3
0! 1! 2! 3!
9 27
3 1 3 0.647
2 6
(iii)
P X 3 1 P X 3
1 P X 0 P X 1 P X 2 P X 3
1 0.647 0.353
Example 2:
40 | P a g e
STA1301
If 2% of electric bulbs manufactured by a certain company are defective, find the probability
that in a sample of 200 bulbs
Solution:
(i)
P X 2 P X 0 P X 1
4 4
(4)0 (4)1
0! 1!
4
(5) 0.0183 5 0.0915
(ii)
P X 3 1 P X 3
1 P X 0 P X 1 P X 2 P X 3
4
(4) 2 (4)3
4
1 0.0915 0.5668
2! 3!
M N M
nx
f x P X x
x
for x 1, 2,..., n
N
n
41 | P a g e
STA1301
nM
EX
N
nM N n N M
Var X .
N2 N 1
Proof
n
E X xf ( x) x.
n
x n x
M N M
x 0 x 0 Nn
M0 Nn0M n x. Mx NnMx
n
0. N
x 1 Nn
n
x.
Mx NnMx n x. M ! ( N n )!n! NnMx
x 1 Nn
x 1
( M x )! x! N !
EX
nM n
Mx NnMx
N
x 0 Nn
n
Mx NnMx 1
Now, we can see that
x 0 Nn
nM
Hence, E X
N
42 | P a g e
STA1301
n
E X 2 x 2 f ( x) x 2 .
n
Mx NnMx
x 0 x 0 Nn
M0 Nn0M n x 2 . Mx NnMx
n
02 . N
x 1 Nn
M M 1 N M x 1 n x
n M 1 N M
nM n
x. N N 1
x 1 n x
x.
x 1 n n 1
N x 1 Nn11
Now, we define the variables inside the sum as M M 1, x x 1, N N 1, n n 1.
nM n
Mx NnMx
E X 2
N
x 0
( x 1). Nn
nM n x n x
M N M n
x n x
M N M
x .
N x 0 n
N
x 0 Nn
We can observe that, the first sum is the expected value of a hypergeometric distribution with
parameters n, M , N . The second sum is the total sum of that distribution which is equal to
unity.
Thus,
nM nM
E X 2 N 1
N
nM (n 1)( M 1) nM (n 1)( M 1) ( N 1)
( N 1) 1
N N ( N 1)
nM (n 1)( M 1) ( N 1) nM
2
Var X N
N ( N 1)
nMN (n 1)( M 1) ( N 1) ( N 1) n 2 M 2
( N 1) N 2
N 2 ( N 1)
nM ( N n)( N M )
N 2 ( N 1)
Example 1:
A bag contains 10 items out of which 4 are defectives. Samples of 4 items are selected, what is
the probability that there are:
43 | P a g e
STA1301
Solution:
M N M
x n x
(i) P X x
N
n
4 10 4
2 4 2
P X 2
10
4
C2 6C2
4
10
0.4285
C4
(ii)
P X 2 P X 0 P X 1
4 10 4 4 10 4
0 4 0 1 4 1
10 10
4 4
Example 2:
Among 120 applicants for a job, only 80 are actually qualified; if 5 of these applicants are
randomly selected for an interview, find the probability that only 2 of the five will be qualified
for the job.
Solution:
44 | P a g e
STA1301
M N M
nx
P X x f x
x
n
x
(120 80)
C2
80
C(52)
P X 2 180
0.0210
C5
The normal distribution is the most widely used continuous distribution. This distribution serves
as an excellent approximation to a large class of distributions which have great practical
importance. One reason why the normal distribution is so important is that a number of natural
phenomena are normally distributed. Phenomena such as heights and weights of individuals
and sores on various tests all have normal distribution.
Definition: The random variable X has a normal distribution with mean and variance 2 if
its probability density function is given by
x 2
1
f x P X x . 2 2
, x
2 2
The random variable X is said to have a standardized normal distribution with mean ( 0)
and variance ( 2 1) if its probability density function is given by
x2
1
f x 2
, x
2
Thus, if X is a normal variate with ( 0) and ( 2 1) , we can form a new variate Z by the
formula
45 | P a g e
STA1301
z2
1
f z 2
, z
2
X
where Z
For finding the area under the normal curve, it is necessary to convert every normal distribution
to the standard normal distribution ( Z - transformation) due to the fact that Z variate is
tabulated.
46 | P a g e
STA1301
The area or probability under a normal probability distribution or curve bounded by two
ordinate at X a and X b is writing as
P a X b
This probability is the probability that the normal variate X lies between two specified value a
and b which can be represented by shaded area below:
a b X
a a
z1 and z2 .
a X b
P a X b P P z1 Z z2
Then we use the standard normal curve table to compute the needed probability or area.
Theorems 5: if X is a random variable with parameters and , then the mean and variance
are respectively given by
EX
47 | P a g e
STA1301
Var X 2
Proof
E X xf ( x)dx
x 2
1
E X x. . 2 2
dx
2 2
x
Let z x z , dx dz
Thus,
1
1 z2
EX ( z ). 2
dz
2
1
z2
1
z2
2
2
dz
2
z. 2
dz
It follows that, the first integral is an odd function which is found to be 2 . Similarly, the
second integral is the expected value of standard normal distribution which is equal to 0 .
Hence,
EX . 2 .0
2 2
48 | P a g e
STA1301
Var X E X
2
x 2
1
2
( x )2 . 2 2
dx
x
By substituting z , we have
1 2
1 z
Var X (( z ) ) . 2 2
dz
2
2
1
z2
2
z2 . 2
dz
1
z2
Consider
z2 . 2
dz as an even function which is equal to 2 .
Thus,
2
Var X . 2 2
2
The following important points should be kept in mind while computing area or probability
under a standard normal curve:
Example 1:
49 | P a g e
STA1301
Solution:
For determining the area under standard normal curve, we use the table given at the end of
this lecture note.
(a) From the table, it is seen that the tabulated value at Z 1.50 is 0.4322 43.22% i.e.,
P 0 Z 1.50 0.4322 43.22% , which is actually the area between Z 0 and
Z 1.50 as shown in the figure below
00
50 | P a g e
STA1301
zzzzzzzzzzzzzzzzzzzzzzzzzzzz
Example 2:
Suppose that in a certain pediatric population, systolic blood pressure is normally
distributed with 115 mm of Hg and 2 225 . Find the probability that a child
randomly selected from the population will have:
(a) Systolic blood pressure less than 140 mm .
(b) A pressure greater than 100 mm .
(c) A pressure between 110 mm and 120 mm .
(d) A pressure between 120 mm and 140 mm .
Solution:
(a) First we find the value of Z by converting the data to standard normal distribution.
X 140 115 25
Z 1.67
15 15
Thus, P Z 1.67 is the area under the curve for Z 0 and Z 1.67
51 | P a g e
STA1301
P Z 1
X 140
Z 0 Z 1.67
Therefore, the probability that the child will have systolic pressure of 140 mm is
0.4525 0.5000 0.9525
100 115
(b) Here Z 1
15
X 100 155
Z 1 Z 0
P Z 1 P 1 Z 0 P 0 Z
0.3413 0.5 0.8413
52 | P a g e
STA1301
Thus, the probability that the child will have systolic pressure greater than 100 is 0.8413 .
X 1 110 X 2 120
Z1 0.33 Z 0 Z 2 0.33
From the table we find that the area between Z 0 and Z 0.33 is 0.1293 . Similarly, area
between Z 0 and Z 0.33 is 0.1293 . Thus, total area from Z1 0.33 to Z1 0.33 is
0.1293 0.1293 0.2586 .
Thus, the probability that a child picked at random will have systolic pressure between 10 and
120 is 0.2586 .
120 115
For X 1 , Z1 0.33
15
140 115
For X 2 , Z 2 1.66
15
53 | P a g e
STA1301
X 1 120 X 2 140
Z 0 Z1 0.33 Z1 1.66
From the table the area for Z 0 and Z 0.33 is 0.1293 and for Z 1.66 is 0.4415 . The
required area is 0.4415 0.1293 0.3122 . Thus, the probability that the child will have systolic
pressure between 120 and 140 is 0.3122 .
54 | P a g e
STA1301
Exercises of interest
1. In a family there are three children. What is the probability that the family has
(i) No male child.
(ii) At least one male child. (Assuming that the chances of a child being a male or female
are equal).
2. A ball is drawn at random from a box containing 6 red balls, 4 white balls, and 5 blue balls.
Determine the probability that it is
(a) Red (b) White (c) Blue (d) Not red (e) Red or white (d) Red, blue or white.
3. Two dice are thrown.
(i) Find the probability of getting an odd number on the one and a multiple of three on
the other.
(ii) What is the probability that the sum of the numbers on the two dice is greater than
8?
4. If we toss a coin twice, let A be the event ‘at least one head occurs’ and B the event ‘the second
toss results in tail’. Find
(i) A B (ii) A B (iii) A (iv) A B
5. In how many ways can 10 people be seated on a bench if only 4 seats are available?
6. A random variable X has the following probability distribution:
X: 2 1 0 1 2
Pr : 1 6 p 14 p 16
(i) Find the value of p .
(ii)
Calculate E X 2 and E 2 X 2 3 X 5
7. Find the probability of drawing an ace or spade or both from a deck of cards.
8. Given P A 1 4, P B 1 3 and P A B 1 2 , evaluate
P A B , P B A ,
P A B and P A
B
cx 2 , 0 x3
9. (a) Find the constant c such that the function f x
0, otherwise
is a density function.
(b) Compute P 1 X 2
(c) Find the distribution function of X .
10. For an events A, B and C , show that
P A B C P A P B P C P A B P A C P B C P A B C
2 n 1 2 n 1
11. If Pn1 : Pn 3: 5 find the value of n .
55 | P a g e
STA1301
12. If 8 Cr 7 C3 7 C2 , find r .
13. In a factory, machines A, B and C manufacture 25%, 35% and 40% of the total bolts produced. Of
the total of their output, 5%, 4% and 2% are defective bolts. A bolt is drawn at random and found to
be defective. What are the probabilities that it was manufactured by Machine A or B or C ?
14. The probability that a KUST applicant will get admission in statistics is 2 3 , and the probability that
he will not get admission in geography is 5 9 . If the probability of getting at least one admission is
4 5 , what is the probability that he will get both?
15. Eight coins are thrown simultaneously. Find the probability of getting at least six heads.
16. There are 3 different books of Mathematics, 4 different books of Engineering and 5 different books
of Statistics. In how many ways these books can be arranged on KUST library’s shelf when
(a) All the books are arranged at random.
(b) Books of each subject are arranged together.
17. The average number of customers who appear at a counter of a certain bank per minute is 2. Find
the probability that during a given minute.
(i) No customer appears
(ii) Three or more customers appear . Given 2
0.1353 .
18. A man and a woman appear in an interview for two vacancies. The probability of man’s selection is
1 4 and that of woman is 1 3 . Find the probability of the event
(i) Both of them will be selected,
(ii) None of them will be selected,
(iii) At least one of them will be selected.
19. The time ( t in minute) for a machine to be repaired has the following probability density function:
10ct 2 , 0 t 40
f t 9c(1 t ), 40 t 60
0, otherwise
(a) Using the fact that the probability 0 t 60 is 1 , evaluate c .
(b) Determine the expected value of t .
20. Let X be a continuous random variables with probability distribution function given by
kx ; 0 x 1
k 1 x 2
;
f x
kx 3k ; 2 x3
0 ; elsewhere
56 | P a g e
STA1301
57 | P a g e