Professional Documents
Culture Documents
StatApp Module 2
StatApp Module 2
Cunanan, A. S.
2.1 Mass Function of a Discrete Random Variable
A probability describes the probability of each specific value in a random
variable. The probability distribution of a discrete random variable is called
probability mass function (pmf). The pmf of x is denoted by f(x) and satisfies the
following two basic properties.
According to the first property, for every element x in the support S, all the
probabilities must be positive and according to the second property, the sum of all
the probabilities for all possible x values in the support S must be equal to 1. The
values of the discrete random variable X where f(x) ˃ 0 are called its mass point.
The Support S of a random variable is the set of values that the random
variable can take. It contains countable infinite number of possible values. This
means that the element of S can be put into one to one correspondence with the
set of all real numbers.
Example 1:
Supposed a random variable X can only take the four values (0, 1, 2 and 3).
If each value has an equal probability, then its probability mass function is:
⎛1
𝑖𝑓 𝑥 = 0
4
1
⎪ 4 𝑖𝑓 𝑥 = 1
𝑓(𝑥) = 1
⎨ 𝑖𝑓 𝑥 = 2
4
1
𝑖𝑓 𝑥 = 3
4
⎪0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{
⎛1
⎪ , 𝑖𝑓 𝑥 = 0, 1, 2, 𝑜𝑟 3
𝑓(𝑥) = 4
⎨
⎪ 0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{
Let f(x) = kx for x = 1, 2, 3, 4. Find k so that f(x) satisfies the two properties of being a
probability mass function.
Solution:
4
∑ 𝑓(𝑥) = ∑ 𝑘𝑥 = 1
𝑥∈𝑠 𝑥=1
1 = 10k
1
Then 𝑘 =
10
1
For 𝑥 ∈ {1, 2, 3, 4}, 𝑃(𝑋 = 𝑥) = 𝑥 > 0.
10
In simplified form,
1
𝑥, 𝑖𝑓 𝑥 = 1, 2, 3, 𝑜𝑟 4
𝑓(𝑥) = {10
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
By substitution,
1
𝑃 = (𝑋 = 1) =
10
2 1
𝑃 = (𝑋 = 2) = =
10 5
3
𝑃 = (𝑋 = 3) =
10
4 2
𝑃 = (𝑋 = 4) = =
10 5
Therefore, 𝑃(𝑋) ≥ 0
X 1 2 3 4
1 1 3 2
P(x)
10 5 10 5
0.5
0.4
0.3
0.2
0.1
0
1 2 3 4
⎛1
𝑥, 𝑖𝑓 𝑥 ∈ {1, 2, 3}
𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = 6
⎨ 0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{
Solution:
Therefore, 𝑃(𝑋 = 𝑥) ≥ 0
= 1 (1) + 1 1 6
(2) + (3) = = 1
6 6 6 6
1
𝑥2, 𝑖𝑓 𝑥 ∈ {1, 2, 3, 4}
𝑓(𝑥) = 30
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒.
{
Solution:
1
𝑓(𝑥) = 𝑥2 > 0 𝑓𝑜𝑟 𝑥{1, 2, 3, 4}
30
𝑓(𝑥) ≥ 0
∑ 𝑓(𝑥) = ∑ 𝑃(𝑋 = 𝑥)
𝑥∈𝑆 𝑥=1
4 1 1 1 1
∑ 𝑃(𝑋 = 𝑥) = (1)2 + (2)2 + (3)2 + (4)2
30 30 30 30
𝑥=1
4
1 4 9 16 30
∑ 𝑃(𝑋 = 𝑥) + + + = =1
= 30 30 30 30 30
𝑥=1
𝐸(𝑋) = ∑ 𝑥 𝑓(𝑥)
𝑥∈𝑆
Example 5:
Let X be a discrete variable and S={0, 1, 2, 3} be its support. With the pmf of X
given below,
⎛1
, 𝑖𝑓 𝑥 ∈ 𝑆
𝑓(𝑥) = 4
⎨ 0, 𝑖𝑓𝑥 ∈ 𝑆
{
Solution:
𝐸(𝑋) = ∑ 𝑥 𝑓(𝑥)
𝑥∈𝑆
𝐸(𝑋) = 1.5
Example 6: Let X be a discrete random variable with support S={1, 2, 3}
⎛1
𝑥, 𝑖𝑓 𝑥 ∈ 𝑆
𝑓(𝑥) = 6
⎨ 0, 𝑥 ∈ 𝑆
{
Solution:
𝐸(𝑋) = ∑ 𝑥𝑃(𝑋 = 𝑥)
𝑥∈𝑆
⎛1
𝑥2, 𝑖𝑓 𝑥 ∈ 𝑆
𝑓(𝑥) = 14
⎨ 0, 𝑥 ∈ 𝑆
{
Solution:
𝐸(𝑋) = ∑ 𝑥𝑃(𝑋 = 𝑥)
𝑥∈𝑆
The mean of a distance random variable X is also called the expected value
of X. It is the weighted average of all the values that the random variable X would
assume in the long run. The discrete random variable X assumes values or
outcomes in every trial of an experiment with their corresponding probabilities. The
expected value of X is the average of the outcomes that is likely to be obtained if
the trials are repeated over and over again.
The expected value of X is denoted by E(X)
𝑬(𝑿) = ∑[𝒙𝑷(𝒙)]
Where:
X = discrete random variable
x = outcome or value of the random variable
P(x) = probability of outcome x
x 0 1 2
P(x) 0.25 0.5 0.25
Solution:
x P(x) x P(x)
0 0.25 0
1 0.5 0.5
2 0.25 0.5
Σ [x P(x)] =
1.0
E(X) = 1.0
The expected value is 1.0, so the average number of college graduates in the
household of the small town is one.
Example 2: a random variable X has this probability distribution:
x 1 2 3 4
P(x) 0.10 0.20 0.45 0.25
Solution:
X P(x) x P(x)
1 0.10 0.10
2 0.20 0.40
3 0.45 1.35
4 0.25 1.00
Σ[ x P(x)] =
2.85
E(X) = 2.85
Example 3: A security guard recorded the number of people entering the bank
every hour during one working day. The random variable X represents the number
of people who entered the bank. The probability distribution of X is shown below;
x 0 1 2 3 4 5
P(x) 0 0.1 0.2 0.4 0.2 0.1
What is the expected number of people enters the bank every hour?
Solution:
x P(x) x P(x)
0 0 0
1 0.1 0.1
2 0.2 0.4
3 0.4 1.2
4 0.2 0.8
5 0.1 0.5
ΣP(x) = 1 Σ[x P(x)] = 3
So, E(X) = 3
Therefore, the average number of people entering the bank every hour during that
working day is three.
Variance and Standard deviation of a discrete Random Variable
2
The variance of a random variable X is denoted by 𝜎 . It can likewise be
written as Var (X). The variance of random variable is the expected value of the
square of the difference between the assumed value of random variavle and the
mean. The variance of X is;
or
𝜎2 = ∑[(𝑥 − 𝜇)2𝑃(𝑥)]
Where:
x = outcome
𝜇 = population mean or expected value E(X)
P(x) = probability of the outcome
The larger of the value of the variance, the further are the values of X from
the mean. The variance is tricky to interpret since its uses the square of the unit of
measure of X. So, it is easier to interpret the value of standard deviation because it
uses the same unit of measure of X.
𝝈 = √∑[(𝒙 − 𝝁)𝟐𝑷(𝒙)]
Example 4: Determine the variance and the standard deviation of the following
probability mass function.
x P(x)
1 0.15
2 0.25
3 0.30
4 0.15
5 0.10
6 0.05
Solution:
Steps:
1. Find the expected value
2. Subtract the expected value from each outcome
3. Square each difference of step 2
4. Multiply each value of step 3 by their corresponding probability
5. Sum up all the figures in step 4. This is Var (X) or 𝜎2
6. Take the square root of the value obtain in step 5 to obtain the SD
x 0 1 2 3 4
P(x) 0.1 0.2 0.3 0.3 0.1
Solution: