ENGINEERING DATA ANALYSIS
I LEARNING CONTENT
Random Variables and Probability Distributions
At the end of the lesson, the students should be able to;
• find values of random variables;
• distinguish between a discrete random variable and a continuous random variable;
• compute probabilities corresponding with a given random variable;
• calculate the expected value and variance and standard deviation of discrete random variables; and
• solve problems involving applications of the random variable and probability distribution in real world
text.
INTRODUCTION
When we make important decisions in life, there is a need for a method of combining probabilities and the
associated consequences. This results to introducing the concept of expected value or mathematical
expectations. Originally, mathematical expectations arose in connection with games of chance. Variance, as a
measure of variation, is the sum of the squared deviations of these consequences from their expected value.
Recall
• Experiment – An experiment is any activity or procedure which generates a set of data
• Sample Space – A collection of all possible outcomes in a given experiment and is denoted by the
symbol S
• Event – Subset of a sample space
• Sample Point – Each outcome of a sample space
TYPES OF RANDOM VARIABLES
• Discrete Random Variable
It can take on a countable (finite) number of values.
• Continuous Random Variable
It can take on any value in some interval or an infinite range of values.
Random Variables and Events
If we let A, B and C be random variables, then the following expressions below are events:
RANDOM VARIABLES EVENTS IN PROBABILITY
A=3 I finished three learning tasks today. P (A = 3)
I spend less than 3 hours every day
B<3 P (B < 3)
studying my lessons online.
Our online class will last less than 3
2<C<3 P (2 < C < 3)
hours but more than 2 hours.
Probability Distribution of a DISCRETE Random Variable
The Probability Distribution is the listing of values of a random variable X together with its associated
probability.
REQUIREMENTS for a Probability Distribution
1. The sum of the probabilities must be equal to 1, that is ∑ 𝑃(𝑋) = 1.
2. Each probability associated to a random variable X is in between 0 and 1, that is 0 ≤ 𝑃(𝑋) ≤ 1.
DATA 1013 – ENGINEERING DATA ANALYSIS 1p
ENGINEERING DATA ANALYSIS
RECALL:
Multiplication Rule for Independent & Dependent Events
EXAMPLE 1
In a Filipino family having three children, compute the following probabilities below:
a. Probability of having NO BOYS
b. Probability of having ALL BOYS
c. Probability to have 1 boy and 2 girls
Solution:
Let B be the event of having boy in the family
G be the event of having girl in the family
Since, we have two equally likely events, P(B) = P(G) = ½ then use Multiplication Rule for Independent events
since having boys and girls in the family are two independent events.
a. Probability of having NO BOYS
P (3 girls) = P(G*G*G)
P (3 girls) = P(G) * P(G) * P(G)
1 1 1
P(3 girls) = ∗ ∗
2 2 2
1
P(3 girls) =
8
b. Probability of having ALL boys
P (3 boys) = P (B * B * B)
P (3 boys) = P(B) * P(B) * P(B)
1 1 1
P(3 boys) = ∗ ∗
2 2 2
1
P(3 boys) =
8
c. Probability of 2 girls and 1 boy
P (2 girls & 1 boy) = P (GGB + GBG + BGG)
P(2 girls & 1 boy) = P(GGB) + P(GBG) + P(BGG)
P (2 girls & 1 boy) = P(G)*P(G)*P(B) + P(G)*P(B)*P(G) + P(B)*P(G)*P(G)
1 1 1 1 1 1 1 1 1
P(2 girls &1 boy) = ( )( )( ) + ( )( )( ) + ( )( )( )
2 2 2 2 2 2 2 2 2
1 1 1
P(2 girls &1 boy) = + +
8 8 8
3
P(2 girls &1 boy) =
8
P = 10
TYPES OF PROBABILITY DISTRIBUTION
Discrete Probability Distribution Continuous Probability Distribution
Binomial Continuous Uniform
DATA 1013 – ENGINEERING DATA ANALYSIS 2p
ENGINEERING DATA ANALYSIS
Hypergeometric Normal Distribution
Poisson Exponential
Discrete Uniform
Negative Binomial
MEAN & VARIANCE OF DISCRETE RANDOM VARIABLE
RECALL
The MEAN is computed by adding all the values and then dividing by the total number of values.
The STANDARD DEVIATION tells us how spread out or clustered are the values about the mean of the data
set.
Sample Problem
• Suppose we consider the problem of having girls in a family of three. By this example, you would expect
three girls (WWW) to occur approximately 1/8 of the time, two girls (MWW + WWM + WMW) to occur
approximately 3/8 of the time, 1 girl (MMW + MWM + WMM) to occur approximately 3/8 of the time, and
no girls (MMM) to happen relatively 1/8 of the time. Thus, on average, we can expect having girls to be
1 3 3 1 1
(0 ∗ ) + (1 ∗ ) + (2 ∗ ) + (3 ∗ ) + (5 ∗ ) = 1.5
8 8 8 8 6
Note that even if we cannot have the value 1.5 as a result, the theoretical average is 1.5.
VARIANCE
𝐧
MEAN
𝛍 = 𝐄(𝐗) = 𝛔𝟐 = 𝐕𝐚𝐫(𝐗) = ∑[𝐱 𝟐𝐢 ∗ 𝐏(𝐗 𝐢 )] − 𝛍𝟐
𝐧 𝐢=𝟏
∑ 𝐗 𝐢 𝐏 (𝐗 𝐢 ) = (𝐗 𝟏 )𝐏(𝐗 𝟏 ) + (𝐗 𝟐 )𝐏(𝐗 𝟐 )
𝐢=𝟏
+(𝐗 𝟑 )𝐏(𝐗 𝟑 ) + ⋯ + +(𝐗 𝐧 )𝐏(𝐗 𝐧 ) STANDARD DEVIATION
𝛔 = √𝐕𝐚𝐫
EXAMPLE 1
Let A = number of spots that appear in tossing a die once, with probability distribution given by the table below.
OUTCOME 1 2 3 4 5 6
P(A) 1/6 1/6 1/6 1/6 1/6 1/6
1. Find the mean of A.
2. Find the variance and standard deviation of A.
3. Find the expected value of A.
Solution:
a. MEAN
1 1 1 1 1 1
μ = ∑ni=1 A ∗ P (A) = (1 ∗ ) + (2 ∗ ) + (3 ∗ ) + (4 ∗ ) + (5 ∗ ) + (6 ∗ )
6 6 6 6 6 6
n
21
μ = ∑ A ∗ P (A) = = 3.5
6
i=1
b. VARIANCE
1 1 1 1 1 1
σ2 = Var(X) = (12 ∗ + 22 ∗ + 32 ∗ + 42 ∗ + 52 ∗ + 62 ∗ ) − 3.52
6 6 6 6 6 6
σ2 = 2.92
STANDARD DEVIATION
σ = √2.9 = 1.7
c. The expected value of A is just equal to the theoretical mean of the variable. That is, 𝜇 = E(A) = 3.5.
DATA 1013 – ENGINEERING DATA ANALYSIS 3p
ENGINEERING DATA ANALYSIS
EXAMPLE 2
Shown below is the probability distribution of X = number of students utilizing the NEO – LMS per hour:
X 6 8 10 12 14
P(X) 0.10 0.35 0.30 0.15 0.10
a. Find the mean, variance, and standard deviation of A.
b. Give the probability that at least 12 students are using the NEO - LMS in a given hour.
Solution:
a. MEAN
μ = 6(0.10) + 8(0.35) + 10(0.30) +12(0.15) + 14(0.10)
μ = 9.6
VARIANCE
σ2 = 62 (0.10) + 82 (0.35) + 102 (0.30) +122 (0.15) + 142 (0.10) − 9.62
σ2 = 5.04
STANDARD DEVIATION.
𝜎 = √5.04 = 2.24
b. The probability of having at least 12 students means 12 and 14.
This can be solved by finding 𝑃(𝑋 ≥ 12). Thus,
P(X ≥ 12) = P(X = 12) + P(X = 14)
P(X ≥ 12) = 0.15 + 0.10
P(X ≥ 12) = 0.25
APPLICATIONS of Random Variables in the Real World
EXAMPLE 1
If you go to Funtime at SM Tuguegarao Downtown Center, you can several games of chance. Suppose you are
with your brother and he wants to obtain a giant robot prize that costs 500 tickets. He can only choose from the
following 2 games: a slot machine and a spinning wheel. Each game costs P20 per play. He has to choose only
one game but he can play as many times as it takes to earn 500 tickets. Listed are the probability distributions
for the two games.
SLOT MACHINE SPINNING WHEEL
Tickets Probability Tickets Probability
1 0.44 1 0.50
5 0.40 2 0.20
10 0.10 5 0.15
50 0.05 25 0.10
100 0.01 100 0.05
Which GAME would you advise your brother to play?
Expected value for the slot machine is given by:
μ = E(X) = 1(0.44) + 5(0.40) + 10(0.10) +50(0.05) + 100(0.01)
μ = E(X) = 6.94 tickets
Expected value for the spinning wheel is given by:
μ = E(X) = 1(0.50) + 2(0.20) + 5(0.15) +25(0.10) + 100(0.05)
μ = E(X) = 9.15 tickets
DATA 1013 – ENGINEERING DATA ANALYSIS 4p
ENGINEERING DATA ANALYSIS
Thus, the spinning wheel would be the best game for him to play, because on average, your brother will earn
about 9 tickets for each play, while the slot machine on average is 7 tickets for each play.
The cost of the prize, playing the spinning wheel would be
500
Cost = (20)
9.15
Cost = P1,092.90
For the slot machine, the average cost of the prize would be
500
Cost = (20)
6.94
Cost = P1,440.00
EXAMPLE 2
The SEAITE Council is selling 1,000 raffle tickets for P20 each to raise funds for the coming SEAITE Day and
Night. If you buy 3 tickets, what are your expected winnings given that the major prize for the winner is P2,500
school supplies.
Solution:
Let X be the winning amount. The probability distribution is given below:
X 2,500 0
P(X) 𝟑 𝟗𝟗𝟕
𝟏, 𝟎𝟎𝟎 𝟏, 𝟎𝟎𝟎
Expected value of X is given by:
3 997
μ = E(X) = 2,500( ) + 0( )
1,000 1,000
μ = E(X) = P7.50
Expected value of X is given by:
3 997
μ = E(X) = 2,500( ) + 0( )
1,000 1,000
μ = E(X) = P7.50
This means that your expected winning is P7.50 if you buy 3 tickets. So, if you compare your expected winning
of P7.50 with the amount of the 3 tickets that you bought which is P60, then you can say buying tickets is really
just for the charity cause.
EXAMPLE 3
A carwash loses P800 during rainy days and gains P3500 when it is not raining. What is expected value if the
probability of raining is – 800 20%?
X – 800 3,500
P(X) 0.20 0.80
Solution:
Expected value of X is given by:
μ = E(X) = – 800(0.20) + 3,500(0.80)
μ = E(X) = P2,640
DATA 1013 – ENGINEERING DATA ANALYSIS 5p
ENGINEERING DATA ANALYSIS
REFERENCES
PRINTED RESOURCES:
Books:
Allan G. Bluman. (2018). Elementary statistics: a step-by-step approach. New York, NY: McGraw-Hill Education.
Altares, Priscilla S. et al. (2012). Elementary statistics: with computer application. Sampaloc, Manila: Rex Book
Store.
Altares, Priscilla S. et al. (2003). Elementary Statistics: A Modern Approach. Manila: Rex Book Store.
Mario F. Triola. (2001). Elementary statistics. Boston: Addison-Wesley.
John E. Freund, Gary A. Simon. (1997). Modern elementary statistics. Upper Saddle River, N.J.: Prentice Hall.
Reston, Enriqueta D. et. al. (2017). Seeing the World Through Statistics and Probability. University of San Carlos,
Manila: Rex Book Store.
ELECTRONIC RESOURCES
Internet Sites
Introductory Statistics. Retrieved from http://math.ucdenver.edu/~ssantori/MATH2830SP13/ Retrieved
January 6, 2020
Probability Theory and Mathematical Statistics. Retrieved from https://online.stat.psu.edu/stat414/
Retrieved January 6, 2020
Statistics. Retrieved from http://britannica.com/science/statistics/Retrieved January 6, 2020
Probabilty: Events and its types, videos, concepts with Solved Examples. Retrieved from
http://www.toppr.com/guides/maths/probability Retrieved January 6, 2020
DATA 1013 – ENGINEERING DATA ANALYSIS 6p