Statistical Analysis - Prelim Module 2 and PS P2
Statistical Analysis - Prelim Module 2 and PS P2
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
𝑖𝑓 𝑥 = 1
4
𝑓(𝑥) = 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}, 𝑃(𝑋 = 𝑥) = 10
𝑥 > 0.
In simplified form,
1
𝑓(𝑥) = {10 𝑥, 𝑖𝑓 𝑥 = 1, 2, 3, 𝑜𝑟 4
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
By substitution,
1
𝑃 = (𝑋 = 1) =
10
2 1
𝑃 = (𝑋 = 2) = =
10 5
3
𝑃 = (𝑋 = 3) =
10
4 2
𝑃 = (𝑋 = 4) = =
10 5
Therefore, 𝑃(𝑋) ≥ 0
1 1 3 2 10
∑ 𝑃(𝑋 = 𝑥) = + + + = =1
10 5 10 5 10
1
Both properties of a probability mass function are satisfied. So, 𝑘 = 10
The above probabilities can be presented in tabular form:
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:
1
𝑃(𝑋 = 𝑥) = 𝑥 > 0 𝑓𝑜𝑟 𝑥 ∈ {1, 2, 3} 𝑎𝑛𝑑
6
𝑃(𝑋 = 𝑥) = 0 𝑓𝑜𝑟 𝑥 ∈ {1, 2, 3}
Therefore, 𝑃(𝑋 = 𝑥) ≥ 0
1 1 1 6
= (1) + (2) + (3) = = 1
6 6 6 6
The property that the sum of the probabilities is equal to 1 is satisfied.
1 2
𝑓(𝑥) = 30 𝑥 , 𝑖𝑓 𝑥 ∈ {1, 2, 3, 4}
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
The expected value of a discrete random variable X, denoted by E(X), is equal to the
weighted average of the elements x in the support S where each element is weighted
by its respective probability. Use the formula below;
𝐸(𝑋) = ∑ 𝑥 𝑓(𝑥)
𝑥∈𝑆
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 1 1 1 6
= 0( ) +1( ) + 2( ) + 3( ) =
4 4 4 4 4
𝐸(𝑋) = 1.5
Example 6: Let X be a discrete random variable with support S={1, 2, 3}
1
𝑥, 𝑖𝑓 𝑥∈𝑆
𝑓(𝑥) = 6
0, 𝑥 ∈ 𝑆
{
Solution:
𝐸(𝑋) = ∑ 𝑥𝑃(𝑋 = 𝑥)
𝑥∈𝑆
1 1 1 1 4 9
= 1( )1 + 2( )2 + 3( )3 = ( ) + ( ) + ( )
6 6 6 6 6 6
14 1
𝐸(𝑋) = 𝑜𝑟 2
6 3
1 2
𝑥 , 𝑖𝑓 𝑥∈𝑆
𝑓(𝑥) = 14
0, 𝑥 ∈ 𝑆
{
Solution:
𝐸(𝑋) = ∑ 𝑥𝑃(𝑋 = 𝑥)
𝑥∈𝑆
1 1 1 1 8 27
= 1( ) 𝑥 2 + 2 ( ) 22 + 3 ( ) 32 = ( ) + ( ) + ( )
14 14 14 14 14 14
36 4
𝐸(𝑋) = 𝑜𝑟 2
14 7
1.3 Mean, Variance and Standard Deviation of a Discrete Random Variable
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
or
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.
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:
1
, 𝑖𝑓 𝑥 ∈ 𝑡ℎ𝑒 𝑠𝑢𝑝𝑝𝑜𝑟𝑡 𝑆
1. 𝑓(𝑥) = 3
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{
S = {0, 1, 2}
1
, 𝑖𝑓 𝑥 ∈ {0, 1, 2, 3}
2. 𝑓(𝑥) = 4
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{
𝑥
, 𝑖𝑓 𝑥 = {2, 4, 6}
3. 𝑓(𝑥) = 12
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{
𝑥2
, 𝑖𝑓 𝑥 ∈ 𝑡ℎ𝑒 𝑠𝑢𝑝𝑝𝑜𝑟𝑡 𝑆
4. 𝑓(𝑥) = 14
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{
𝑆 = {1, 2, 3}
II. Find the expected value E(X) or the mean 𝜇 of each of the following probability
mass functions shown below.
1.
x 0 1 2 3
P(x) 0.15 0.32 0.37 0.16
2.
x 0 1 2 3
P(x) 0.17 0.33 0.36 0.14
3.
x 0 1 2 3
P(x) 0.20 0.30 0.32 0.18
4.
x 0 1 2 3 4
P(x) 0.08 0.19 0.39 0.27 0.07
5.
x 0 1 2 3 4
P(x) 0.11 0.21 0.22 0.39 0.07
6.
x 0 1 2 3 4
P(x) 0.05 0.26 0.33 0.20 0.16
7.
x 0 1 2 3 4
P(x) 0.09 0.25 0.36 0.22 0.08
8.
x 0 1 2 3 4
P(x) 0.07 0.30 0.35 0.23 0.05
III. Find the variance and the standard deviation of each of the following probability
distributions.
1.
x 0 1 2 3 4
P(x) 0.09 0.19 0.39 0.22 0.11
2.
x 0 1 2 3 4
P(x) 0.11 0.22 0.33 0.25 0.09
3.
x 1 2 3 4 5
P(x) 0.08 0.29 0.31 0.26 0.06
4.
x 0 1 2 3 4 5
P(x) 0.05 0.13 0.31 0.30 0.14 0.07
5.
x 0 1 2 3 4 5
P(x) 0.10 0.41 0.19 0.15 0.10 0.05
6.
x 0 1 2 3 4 5
P(x) 0.09 0.49 0.11 0.17 0.13 0.01
7.
x 0 1 2 3 4 5
P(x) 0.12 0.45 0.13 0.11 0.13 0.06
IV. Show that each of the following is a probability mass function.
1
𝑥, 𝑖𝑓 𝑥 ∈ {1, 2}
1. 𝑃(𝑋 = 𝑥) = 3
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{
1 2
𝑥 , 𝑖𝑓 𝑥 ∈ {1, 2, 3, 4, 5}
2. 𝑃(𝑋 = 𝑥) = 55
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{
1
, 𝑖𝑓 𝑥 ∈ {1, 2, 3, 4, 5, 6}
3. 𝑃(𝑋 = 𝑥) = 6
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{
1
𝑥, 𝑖𝑓 𝑥∈𝑆
20
𝑓(𝑥) =
0, 𝑖𝑓 𝑥 ∈ 𝑆
{
4 1−𝑥
𝑓(𝑥) = 5 5 , 𝑖𝑓 𝑥 ∈ {1, 2, 3, … }
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{
𝑥2
6. 𝑃(𝑋 = 𝑥) = 285 , 𝑖𝑓 𝑥 ∈ {1, 2, 3, . . ,9}
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{
V. Solve the following
1. Let f(x) = kx for x = 2, 3, 4. Find k so that the function of f(x) satisfies the
two properties of probability mass function.
2. Let X be a discrete random variable. Let its support S be the set of the first
10 whole numbers. Given the pmf of X:
1
𝑥, 𝑖𝑓 𝑥∈𝑆
𝑃(𝑋 = 𝑥) = 55
0, 𝑖𝑓 𝑥 ∈ 𝑆
{
1
𝑃(𝑋 = 𝑥) = 6 , 𝑖𝑓 𝑥 ∈ 𝑆
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{
1
𝑃(𝑋 = 𝑥) = 78 𝑥, 𝑖𝑓 𝑥 ∈ 𝑆
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{