0% found this document useful (0 votes)
2 views

Part 5

A random variable is a variable with associated probabilities for its possible values, which can be discrete or continuous. Discrete random variables have finite or countably infinite values, while continuous random variables can take uncountably infinite values within a range. The document also discusses the probability mass function for discrete random variables and compares frequency distribution with probability distribution.

Uploaded by

Tonmoy das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
2 views

Part 5

A random variable is a variable with associated probabilities for its possible values, which can be discrete or continuous. Discrete random variables have finite or countably infinite values, while continuous random variables can take uncountably infinite values within a range. The document also discusses the probability mass function for discrete random variables and compares frequency distribution with probability distribution.

Uploaded by

Tonmoy das
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Random variable

It is a variable that has probabilities associated with the possible values.


Example 1:
Let a coin be tossed once. 𝑆𝑆 = {𝐻𝐻, 𝑇𝑇}. Let 𝑋𝑋 = number of heads obtained. Then, 𝑋𝑋
can take values ‘0’ or ‘1’.
𝑃𝑃(𝑋𝑋 = 0) = 𝑃𝑃(𝑇𝑇) = 0.5
𝑃𝑃(𝑋𝑋 = 1) = 𝑃𝑃(𝐻𝐻) = 0.5
So, 𝑋𝑋 is a random variable.
Example 2:
Height is a variable. When we are interested in the probabilities of the possible
values of height, we call it a random variable.
• Any numerical variable is a random variable when we are interested in the
probabilities of its possible values. (Some authors say that categorical
variables are also random variables if probability is involved.)
Discrete random variable
A random variable is called discrete if there are gaps between any two possible
values. (Therefore, number of possible values is finite or countably infinite.)
Example 3:
Let two fair coins be tossed. 𝑆𝑆 = {𝐻𝐻𝐻𝐻, 𝐻𝐻𝐻𝐻, 𝑇𝑇𝑇𝑇, 𝑇𝑇𝑇𝑇}. Let 𝑋𝑋 = number of heads
obtained. Then, 𝑋𝑋 is a discrete random variable that can take values 0, 1 or 2.
𝑃𝑃(𝑋𝑋 = 0) = 𝑃𝑃(𝑇𝑇𝑇𝑇) = 0.25
𝑃𝑃(𝑋𝑋 = 1) = 𝑃𝑃(𝐻𝐻𝐻𝐻 or 𝑇𝑇𝑇𝑇) = 𝑃𝑃(𝐻𝐻𝐻𝐻) + 𝑃𝑃(𝑇𝑇𝑇𝑇) = 0.25 + 0.25 = 0.50
𝑃𝑃(𝑋𝑋 = 2) = 𝑃𝑃(𝐻𝐻𝐻𝐻) = 0.25
Here, number of possible values of 𝑋𝑋 is 3 (finite).
Example 4:
Let 𝑋𝑋 = number of calls that comes to a mobile in a day. Then 𝑋𝑋 = 0, 1, 2, ⋯. Here,
number of possible values of 𝑋𝑋 is countably infinite. (Probabilities of this type of
variables will be discussed later.)

16
Continuous random variable
A random variable for which all values within a certain interval are possible is called
a continuous random variable. Such a variable has uncountably infinite number of
possible values.
Example 5:
Let 𝑋𝑋 = weight in gram of a football (regulation size). Then, 410 < 𝑋𝑋 < 450. Here,
number of possible values of 𝑋𝑋 is uncountably infinite.
Example 6:
Let 𝑋𝑋 = Lifetime of an electric component. Then, 0 < 𝑋𝑋 < ∞. Here, number of
possible values of 𝑋𝑋 is uncountably infinite.
(Probabilities of continuous variables will be discussed later.)
Probability mass function for discrete random variable
Let 𝑋𝑋 be a discrete random variable. The probability mass function (pmf) or
probability function of 𝑋𝑋, denoted by 𝑝𝑝(𝑥𝑥), is defined as 𝑝𝑝(𝑥𝑥) = 𝑃𝑃(𝑋𝑋 = 𝑥𝑥). It
satisfies the following two consitions:
(i) 𝑝𝑝(𝑥𝑥) ≥ 0

(ii) � 𝑝𝑝(𝑥𝑥) = 1
𝑥𝑥

• The function 𝑝𝑝(𝑥𝑥) is also called the probability distribution of 𝑋𝑋.


Example 7:
Let a random experiment consist of tossing two coins once. 𝑆𝑆 = {𝐻𝐻𝐻𝐻, 𝐻𝐻𝐻𝐻, 𝑇𝑇𝑇𝑇, 𝑇𝑇𝑇𝑇}.
Let 𝑋𝑋 = number of heads obtained. Then, 𝑋𝑋 is a discrete random variable that can
take values 0, 1 or 2. The pmf of 𝑋𝑋 is as follows:
𝑥𝑥 0 1 2
𝑝𝑝(𝑥𝑥) 0.25 0.50 0.25

Here, 𝑝𝑝(0) = 𝑃𝑃(𝑋𝑋 = 0) = 0.25. That is, for input ‘0’, output of the function is 0.25.
Similarly, 𝑝𝑝(1) = 𝑃𝑃(𝑋𝑋 = 1) = 0.50, and so on.
The function 𝑝𝑝(𝑥𝑥) is plotted against 𝑥𝑥:

17
Frequency distribution vs probability distribution
Let the random experiment in Example 7 be repeated 𝑛𝑛 = 1000 times, and the data
be used to construct the following frequency table.
𝑥𝑥 Frequency Relative Probability
Frequency
0 270 0.27 0.25
1 480 0.48 0.50
2 250 0.25 0.25
Total 1000 1.00 1.00

The last column of the table above uses the probabilities obtained in Example 7.
Note that relative frequencies (sample) are comparable to probabilities (population).
In the plot below, solid lines are used to show probabilities, while dotted lines are
used to show relative frequencies.

18

You might also like