You are on page 1of 22

Presenter: Ms.

Sidra Raees

LECTURE 07
Department of Mathematics, NED University of
Engineering & Technology, Karachi

1
2
As an application of probability, there are two more concepts
namely random variables and probability distributions. Before
seeing the definition of probability distribution, random variable
needs to be explained. It has been a general notion that if an
experiment is repeated under identical conditions, values of the
variable so obtained would be similar. However, there are situations
where these observations vary even though the experiment is
repeated under identical conditions. As the result, the outcomes of
the variable are unpredictable and the experiments become random.

We have already learnt about random experiments and formation of


sample spaces. In a random experiment, we are more interested
in, x number associated with the outcomes in the sample space
rather than the individual outcomes. These numbers vary with
different outcomes of the experiment. Hence it is a variable. That
is, this value is associated with the outcome of the random
experiment. To deal with such situation we need a special type of
variable called random variable.
Probability & Statistics (MT-331), Sidra Raees
Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
3
A variable whose values are determined by the outcomes
of a random experiment is called a Random Variable.
To fully understand, let us consider the following
example:
Suppose an experiment consists of tossing a coin two
times. The sample space of the possible outcomes is
S = {HH, HT, TH, TT}. The set of possible outcomes is
not a numerical quantity and suppose we are interested in
the number of Heads. To express the outcomes in
numbers, we assign to each non-numerical outcomes of
the sample space in terms of numerical values as;
Probability & Statistics (MT-331), Sidra Raees
Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
4
Sample Space HH TH HT TT
X 2 1 1 0

That is;
X(HH) = 2, X(HT) = 1, X(TH) = 1, X(TT) = 0
Therefore the numbers 2, 1, 0 in the above example are
random quantities determined by the outcomes of the
random experiment. Such a numerical quantity whose
value is determined by the outcome of a random
experiment, is called a random variable. Thus, the
number of heads obtained in the experiment of tossing a
coin two times in the above example are the values of
random variable.

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
5
A random variable is also called a chance
variable, a Stochastic variable or simply a
variate. We shall denote a random variable by
capital letters X, Y, Z, etc. and the values of the
random variable are denoted by the
corresponding small letters x, y, z, etc.

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
6
Random variable may be Discrete or Continuous. If the
random variable takes on the integer values (i.e. the values in
whole numbers) such as 0, 1, 2, 3,……., then it is called a
discrete random variable. For example, the number of
defective items in a sample, the number of printing mistakes
in each page of a book, the number of telephone calls
received by an office of a firm, etc. A discrete random
variable may be defined as a random variable whose values
form a finite (or countably infinite) set of numbers.
If the random variable can take any value (i.e. numerical or
fractional) within a given interval, then it is called a
Continuous Random Variable. For example, height of a
person, weight of a baby, temperature at a place, etc.

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
7
For a discrete random variable X, a table, a graph or a
formula showing all possible values of the random variable X
i.e. 𝑥1 , 𝑥2 , 𝑥3 , … … . . 𝑥𝑛 with their corresponding probabilities
𝑃 𝑋 = 𝑥1 , 𝑃 𝑋 = 𝑥2 , 𝑃 𝑋 = 𝑥3 , … … … , 𝑃 𝑋 = 𝑥𝑛
Is called a discrete probability distribution of the random
variable X. In any probability distribution, the sum of all
probabilities should be equal to unity.

NOTE:
The probability distribution of a discrete random variable X is
also called probability mass function or simple probability
function of the random variable X.
Probability & Statistics (MT-331), Sidra Raees
Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
8
A discrete probability distribution must posses the
following properties:

 𝑓 𝑥 ≥ 0,
 σ 𝑓 𝑥 = 1,
 𝑃 𝑋 = 𝑥 = 𝑓(𝑥).

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
9
Example
Suppose a unbiased coin is tossed 3 times, then find
probability distribution of the random variable “No. of
Heads” in the following forms:
(a) Tabular form (b) Graphic Form

Solution:

(a) Tabular Form


Since S = {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT}
Let X = No. of Heads = 0, 1, 2 and 3, then

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
10
1
𝑓 0 = 𝑃 𝑋 = 0 = 𝑃 𝑎𝑙𝑙 𝑇𝑎𝑖𝑙𝑠 =
8
3
𝑓 1 = 𝑃 𝑋 = 1 = 𝑃 1 − 𝐻𝑒𝑎𝑑 𝑎𝑛𝑑 2 − 𝑇𝑎𝑖𝑙 =
8
3
𝑓 2 = 𝑃 𝑋 = 2 = 𝑃 2 − 𝐻𝑒𝑎𝑑 𝑎𝑛𝑑 1 − 𝑇𝑎𝑖𝑙 =
8
1
𝑓 3 = 𝑃 𝑋 = 3 = 𝑃 3 𝐻𝑒𝑎𝑑𝑠 =
8
Therefore, the probability distribution (i.e. probability
mass function) in tabular form is
𝒙 0 1 2 3
𝑓 𝑥 = 𝑃(𝑋 = 𝑥) 1 3 3 1
8 8 8 8

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
11
(b) Graphic Form

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
12
Example
A shipment of 20 similar laptop computers to a retail
outlet contains 3 that are defective. If a school makes a
random purchase of 2 of these computers, find the
probability distribution for the number of defectives.

Solution:
Let X be a random variable whose values x are the
possible numbers of defective computers purchased by
the school. Then x can only take the numbers 0, 1, and 2.
Now

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
13
3
68 𝐶0 × 17𝐶2
𝑓 0 =𝑃 𝑋=0 = 20 =
𝐶2 95
3
𝐶1 × 17𝐶1 51
𝑓 1 =𝑃 𝑋=1 = 20 =
𝐶2 190
3
𝐶2 × 17𝐶0 3
𝑓 2 =𝑃 𝑋=2 = 20 =
𝐶2 190

Thus, the probability distribution of X is


𝒙 0 1 2
𝑓(𝑥) 68 51 3
95 190 190

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
14
The cumulative distribution function 𝐹(𝑥) of a discrete
random variable X with probability distribution 𝑓 𝑥 is

𝐹 𝑥 = 𝑃 𝑋 ≤ 𝑥 = ෍𝑓 𝑡 , 𝑓𝑜𝑟 − ∞ < 𝑥 < ∞


𝑡≤𝑥

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
15
Example
Find the cumulative distribution of the random variable
X for the following probability distribution:

Solution:
The cumulative distribution function of coin is
1
𝐹 0 =𝑓 0 =
8
1 3 4
𝐹 1 =𝑓 0 +𝑓 1 = + =
8 8 8

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
16
1 3 3 7
𝐹 2 =𝑓 0 +𝑓 1 +𝑓 2 = + + =
8 8 8 8
1 3 3 1
𝐹 3 =𝑓 0 +𝑓 1 +𝑓 2 +𝑓 3 = + + + =1
8 8 8 8

Hence,
0, 𝑓𝑜𝑟 𝑥 < 0
1
, 𝑓𝑜𝑟 0 ≤ 𝑥 < 1
8
4
, 𝑓𝑜𝑟 1 ≤ 𝑥 < 2
8
7
, 𝑓𝑜𝑟 2 ≤ 𝑥 < 3
8
1, 𝑓𝑜𝑟 𝑥 ≥ 3

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
17
Probability & Statistics (MT-331), Sidra Raees
Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
18
Example
A random variable x has the following probability
distributions.
𝒙 0 1 2 3 4 5 6 7
𝑃 𝑥 = 𝑓(𝑥) 0 k 2k 2k 3k 𝑘2 2𝑘 2 7𝑘 2 + 𝑘

Find
(a) K
(b) 𝑃 𝑥 < 6
(c) 𝑃 𝑥 ≥ 6
(d) 𝑃 0 < 𝑥 < 5
(e) Distribution function (CDF)

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
19
Solution:
(a) σ𝑓 𝑥 = 1
10𝑘 2 + 9𝑘 = 1
10𝑘 2 + 9𝑘 − 1 = 0
10𝑘 2 + 10𝑘 − 𝑘 − 1 = 0
𝑘 + 1 10𝑘 − 1 = 0
1
𝑘 = −1 , 𝑘=
10
𝒙 0 1 2 3 4 5 6 7
𝑃(𝑥) 0 0.1 0.2 0.2 0.3 0.01 0.02 0.17

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
20
(b) 𝑃 𝑥 < 6 = 𝑃 0 + 𝑃 1 + 𝑃 2 + 𝑃 3 + 𝑃 4 + 𝑃(5)
= 0 + 0.1 + 0.2 + 0.2 + 0.3 + 0.01
= 0.81
(OR)
𝑃 𝑥 <6 =1−𝑃 𝑥 ≥6
= 1 − {𝑃 6 + 𝑃(7)}
= 1 − 0.19
= 0.81

(c) 𝑃 𝑥 ≥ 6 = 𝑃 6 + 𝑃 7
= 0.02 + 0.17
= 0.19

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
21
(d) 𝑃 0 < 𝑥 < 5 = 𝑃 1 + 𝑃 2 + 𝑃 3 + 𝑃 4
= 0.1 + 0.2 + 0.2 + 0.3
= 0.8

(e) Cumulative Distribution Function (CDF)


0, 𝑓𝑜𝑟 0 ≤ 𝑥 < 1
0.1, 𝑓𝑜𝑟 1 ≤ 𝑥 < 2
0.3, 𝑓𝑜𝑟 2 ≤ 𝑥 < 3
0.5, 𝑓𝑜𝑟 3 ≤ 𝑥 < 4
0.8, 𝑓𝑜𝑟 4 ≤ 𝑥 < 5
0.81, 𝑓𝑜𝑟 5 ≤ 𝑥 < 6
0.83, 𝑓𝑜𝑟 6 ≤ 𝑥 < 7
1, 𝑥≥7

Probability & Statistics (MT-331), Sidra Raees


Copyrights Protected-Department of Mathematics, NED University of Engineering & Technology, Karachi
22

You might also like