0% found this document useful (0 votes)
97 views17 pages

Statistical Analysis - Prelim Module 2 and PS P2

The document discusses probability mass functions (pmf) of discrete random variables. It provides 3 key points: 1) The pmf satisfies two properties: a) f(x) must be greater than or equal to 0, and b) the sum of all probabilities f(x) must equal 1. 2) Examples are provided to illustrate how to calculate the pmf of discrete random variables that take on a fixed set of values. 3) The expected value (or mean) of a discrete random variable can be calculated as the sum of each value x multiplied by its probability f(x). Formulas and examples are given.
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)
97 views17 pages

Statistical Analysis - Prelim Module 2 and PS P2

The document discusses probability mass functions (pmf) of discrete random variables. It provides 3 key points: 1) The pmf satisfies two properties: a) f(x) must be greater than or equal to 0, and b) the sum of all probabilities f(x) must equal 1. 2) Examples are provided to illustrate how to calculate the pmf of discrete random variables that take on a fixed set of values. 3) The expected value (or mean) of a discrete random variable can be calculated as the sum of each value x multiplied by its probability f(x). Formulas and examples are given.
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/ 17

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.

a. 𝑓(𝑥) = 𝑃(𝑋 = 𝑥) ≥ 0 𝑖 𝑥 ∈ 𝑡ℎ𝑒 𝑠𝑢𝑝𝑝𝑜𝑟𝑡 𝑆


b. ∑𝑥∈𝑆 𝑓(𝑥) = ∑𝑥∈𝑆 𝑃(𝑋 = 𝑥) = 1

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, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{

In simplified form, the above pmf can be represented as:

1
, 𝑖𝑓 𝑥 = 0, 1, 2, 𝑜𝑟 3
𝑓(𝑥) = 4
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{

Here the support, denoted S is S = {0, 1, 2, 3}


Example 2:

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 = k(1) + k(2) + k(3) + k(4)

1 = 10k
1
Then 𝑘 = 10

1
For 𝑥 ∈ {1, 2, 3, 4}, 𝑃(𝑋 = 𝑥) = 10
𝑥 > 0.

For 𝑥 ∈ {1, 2, 3, 4}, 𝑃(𝑋 = 𝑥) = 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

To check the sum of the probabilities is 1, we have:

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

Draw the probability histogram of the above example.

0.5

0.4

0.3

0.2

0.1

0
1 2 3 4

Example 3. Consider the pmf:

1
𝑥, 𝑖𝑓 𝑥 ∈ {1, 2, 3}
𝑓(𝑥) = 𝑃(𝑋 = 𝑥) = 6
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{

Show that P(X = x) is indeed a probability mass function.

Solution:
1
𝑃(𝑋 = 𝑥) = 𝑥 > 0 𝑓𝑜𝑟 𝑥 ∈ {1, 2, 3} 𝑎𝑛𝑑
6
𝑃(𝑋 = 𝑥) = 0 𝑓𝑜𝑟 𝑥 ∈ {1, 2, 3}

Therefore, 𝑃(𝑋 = 𝑥) ≥ 0

The nonnegative property of the probability mass function is satisfied.


3

∑ 𝑃(𝑋 = 𝑥) = 𝑃(𝑋 = 1) + 𝑃(𝑋 = 2) + 𝑃(𝑋 = 3)


𝑥=1

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.

Therefore, P(X=x) is indeed a probability mass function.

Example 4: Consider the following pmf:

1 2
𝑓(𝑥) = 30 𝑥 , 𝑖𝑓 𝑥 ∈ {1, 2, 3, 4}
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒.
{

Show that f(x) is indeed a probability mass function.

Solution:

1 2
𝑓(𝑥) = 𝑥 > 0 𝑓𝑜𝑟 𝑥{1, 2, 3, 4}
30

𝑓(𝑥) = 0 𝑓𝑜𝑟 𝑥 ∈ {1, 2, 3, 4}

𝑓(𝑥) ≥ 0

The nonnegative property of probability mass function is satisfied.


4

∑ 𝑓(𝑥) = ∑ 𝑃(𝑋 = 𝑥)
𝑥∈𝑆 𝑥=1

∑ 𝑃(𝑋 = 𝑥) = 𝑃(𝑋 = 1) + 𝑃(𝑋 = 2) + 𝑃(𝑋 = 3) + 𝑃(𝑋 = 4)


𝑥=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 property that the sum of the probabilities is equal to 1 is satisfied.

Therefore, f(x) is a probability mass function.


Expected Value of a Discrete Random Variable

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, 𝑖𝑓𝑥 ∈ 𝑆
{

Compute the expected value of X.

Solution:

𝐸(𝑋) = ∑ 𝑥 𝑓(𝑥)
𝑥∈𝑆

= 0𝑓(0) + 1𝑓(1) + 2𝑓(2) + 3𝑓(3)

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}

The probability mass function of X is;

1
𝑥, 𝑖𝑓 𝑥∈𝑆
𝑓(𝑥) = 6
0, 𝑥 ∈ 𝑆
{

Compute the expected value.

Solution:

𝐸(𝑋) = ∑ 𝑥𝑃(𝑋 = 𝑥)
𝑥∈𝑆

= 1𝑃(𝑋 = 1) + 2𝑃(𝑋 = 2) + 3𝑃(𝑋 = 3)

1 1 1 1 4 9
= 1( )1 + 2( )2 + 3( )3 = ( ) + ( ) + ( )
6 6 6 6 6 6
14 1
𝐸(𝑋) = 𝑜𝑟 2
6 3

Example 7: Let X be a discrete random variable with support S={1, 2, 3}

Let the probability mass function of X be;

1 2
𝑥 , 𝑖𝑓 𝑥∈𝑆
𝑓(𝑥) = 14
0, 𝑥 ∈ 𝑆
{

Compute the expected value.

Solution:

𝐸(𝑋) = ∑ 𝑥𝑃(𝑋 = 𝑥)
𝑥∈𝑆

= 1𝑃(𝑋 = 1) + 2𝑃(𝑋 = 2) + 3𝑃(𝑋 = 3)

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)

The mean or expected value of a discrete random variable X can be computed


by the use of the formula below;

𝑬(𝑿) = ∑[𝒙𝑷(𝒙)]
Where:
X = discrete random variable
x = outcome or value of the random variable
P(x) = probability of outcome x

Example 1: A researcher surveyed the households in a small town. The random


variable X represents the number of college graduate in the households. The
probability distribution of X is shown below.

x 0 1 2
P(x) 0.25 0.5 0.25

Find the mean or expected value of X.

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

The variance of a random variable X is denoted by 𝜎 2. 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;

𝑉𝑎𝑟 (𝑋) = ∑[(𝑥 − 𝜇)2 𝑃(𝑥)]

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.

The standard deviation of a discrete random variable X is written as 𝜎. It is


the square root of the variance. The standard deviation formula is;

𝝈 = √∑[(𝒙 − 𝝁)𝟐 𝑷(𝒙)]


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 P(x) x P(x) x–𝜇 (x – 𝜇)2 (x – 𝜇)2 P(x)


1 0.15 0.15 1 -2.95 = 1.95 3.8025 0.570375
2 0.25 0.50 2 – 2.95 = – 0.95 0.9025 0.225625
3 0.30 0.90 3 – 2.95 = 0.05 0.0025 0.000750
4 0.15 0.60 4 – 2.95 = 1.05 1.1025 0.165375
5 0.10 0.50 5 – 2.95 = 2.05 4.2025 0.420250
6 0.05 0.30 6 – 2.95 = 3.05 9.3025 0.465125
𝜇 =E(X) = 2.95 𝜎2 = 1.8475

Therefore, the variance is; 𝝈2 = 1.8475

And the SD is,√1.8475, 𝝈 = 1.36


Example 5: Determine the variance and the standard deviation of the following
probability mass function. Use alternate solution

x 0 1 2 3 4
P(x) 0.1 0.2 0.3 0.3 0.1

Solution:

Steps foralternate solution:


1. Determine the expected value or the mean
2. Multiply each probability to the square of their corresponding outcomes
3. Get the sum of step 2
4. Solve the variance by subtracting the square of the mean from the result
in step 3
5. Solve for the standard deviation using the same method from the previous
solution.
x P(x) x P(x) x2 x2 P(x)
0 0.1 0 0 0
1 0.2 0.2 1 0.2
2 0.3 0.6 4 1.2
3 0.3 0.9 9 2.7
4 0.1 0.4 16 1.6
𝜇 = 2.1 Σ[x2 P(x)] = 5.7

Solving for the variance we have;


𝜎2 = 5.7 – (2.1)2
𝝈𝟐 = 1.29

Solving for the standard deviation we have;


𝜎 = √1.29
𝝈 = 𝟏. 𝟏𝟒
Problem Set P2

Name: ________________________ Date: _______


Section: ______________________

I. Graph the following probability mass functions

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, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{

4. 𝐿𝑒𝑡 𝑋 𝑏𝑒 𝑎 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒 𝑟𝑎𝑛𝑑𝑜𝑚 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒 𝑤𝑖𝑡ℎ 𝑠𝑢𝑝𝑝𝑜𝑟𝑡 𝑆 = {1, 2, 3, . . . ,15}


𝑎𝑛𝑑 ℎ𝑎𝑠 𝑡ℎ𝑒 𝑓𝑜𝑙𝑙𝑜𝑤𝑖𝑛𝑔𝑝𝑚𝑓.

1
𝑥, 𝑖𝑓 𝑥∈𝑆
20
𝑓(𝑥) =
0, 𝑖𝑓 𝑥 ∈ 𝑆
{

5. 𝐿𝑒𝑡 𝑋 𝑏𝑒 𝑎 𝑑𝑖𝑠𝑐𝑟𝑒𝑡𝑒 𝑟𝑎𝑛𝑑𝑜𝑚 𝑣𝑎𝑟𝑖𝑎𝑏𝑙𝑒 𝑤𝑖𝑡ℎ 𝑠𝑢𝑝𝑝𝑜𝑟𝑡 𝑆 = {1, 2, 3, … }


𝑎𝑛𝑑 ℎ𝑎𝑠 𝑡ℎ𝑒 𝑓𝑜𝑙𝑙𝑜𝑤𝑖𝑛𝑔 𝑝𝑚𝑓:

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, 𝑖𝑓 𝑥 ∈ 𝑆
{

Compute the probability of 𝑃(𝑋 > 7)

3. Let X be a discrete random variable with support S = {1, 2, 3, 4, 5}. Its


pmf is given below:

1
𝑃(𝑋 = 𝑥) = 6 , 𝑖𝑓 𝑥 ∈ 𝑆
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{

Compute the probability 𝑃{1 ≤ 𝑋 < 5}

4. Let X be a discrete random variable with support S = {1, 2, 3,…,12}. Its


pmf is given below:

1
𝑃(𝑋 = 𝑥) = 78 𝑥, 𝑖𝑓 𝑥 ∈ 𝑆
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
{

Compute the probability 𝑃{𝑋 > 8}

You might also like