Moodule 1 - One Random Variable
Moodule 1 - One Random Variable
• In
an experiment, a measurement is usually
denoted by a variable such as X.
Example: Your team has won 9 games from a total of 12 games played:
the Frequency of winning is 9. the Relative Frequency of winning is 9/12 = 75%
Probability
Complement of an Event
• Given a set E, the complement of E is the set of
elements that are not in E. The complement is
denoted as E’.
Probability Properties
Probability
Events
• A measured value is not always obtained from an
experiment. Sometimes, the result is only classified
(into one of several possible categories).
• These categories are often referred to as events.
Illustrations
•The current measurement might only be
recorded as low, medium, or high; a manufactured
electronic component might be classified only as
defective or not; and either a message is sent through
a network or not.
Probability functions
p(x)
1/6
x
1 2 3 4 5 6
P(x) 1
all x
Probability mass function (pmf)
x p(x)
1 p(x=1)=1/6
2 p(x=2)=1/6
3 p(x=3)=1/6
4 p(x=4)=1/6
5 p(x=5)=1/6
6 p(x=6)=1/6
1.0
Cumulative distribution function
(CDF)
1.0 P(x)
5/6
2/3
1/2
1/3
1/6
1 2 3 4 5 6 x
Cumulative distribution function
x P(x≤A)
1 P(x≤1)=1/6
2 P(x≤2)=2/6
3 P(x≤3)=3/6
4 P(x≤4)=4/6
5 P(x≤5)=5/6
6 P(x≤6)=6/6
Examples
1. What’s the probability that you roll a 3 or less?
P(x≤3)=1/2
12 .25
1.0
Answer (b)
4 (3-4)/2=-.5
Answer (c)
c. f(x)= (x2+x+1)/25 for x=0,1,2,3
x f(x)
0 1/25
1 3/25 Doesn’t sum to 1. Thus,
2 7/25 it’s not a probability
function.
3 13/25
24/25
Practice Problem:
x 10 11 12 13 14
P(x) .4 .2 .2 .1 .1
f ( x)
49.5 50.5 x
Probability Density Function
• This is a valid p.d.f.
50.5
(1.5 6( x 50.0) )dx [1.5x 2( x 50.0) ]
2 3 50.5
49.5
49.5
x
F ( x) P( X x) f ( y )dy
dF ( x)
f ( x)
dx
P ( a X b) P ( X b) P ( X a )
F (b) F (a )
P ( a X b) P ( a X b)
Probability Density Function
• Example
x
F ( x) P( X x) (1.5 6( y 50.0) 2 )dy
49.5
P( X 50.0) 0.5
F ( x)
P( X 49.7) 0.104
P ( X xi ) pi
E( X ) px
i
i i
E( X ) state space
xf ( x)dx
0.3
0.2
x
Examples of Variance Calculations
• Example
Var( X ) E (( X E ( X )) 2 ) pi ( xi E ( X )) 2
i
17,100 130.77
Binomial Experiments
A binomial experiment is a probability experiment that satisfies the following conditions.
• You randomly select a card from a deck of cards, and note if the card is an Ace.
You then put the card back and repeat this process 8 times.
n 8 p 4 1 q 1 1 12 x 0,1,2,3,4,5,6,7,8
52 13 13 13
Binomial Experiments
Example:
Decide whether the experiment is a binomial experiment. If it is, specify the values of n, p,
and q, and list the possible values of the random variable x. If it is not a binomial
experiment, explain why.
• You roll a die 10 times and note the number the die lands on.
This is not a binomial experiment. While each trial (roll) is independent, there are
more than two possible outcomes: 1, 2, 3, 4, 5, and 6.
Binomial Probability Formula
In a binomial experiment, the probability of exactly x successes in n trials is
P (x ) nC x p xq n x n! p xq n x .
(n x )! x !
Example:
A bag contains 10 chips. 3 of the chips are red, 5 of the chips are white, and 2 of the chips are
blue. Three chips are selected, with replacement. Find the probability that you select exactly
one red chip.
3
p = the probability of selecting a red chip 0.3
10
q = 1 – p = 0.7 P (1) 3C1(0.3)1(0.7)2
n=3
3(0.3)(0.49)
x=1
0.441
Binomial Probability Distribution
Example:
A bag contains 10 chips. 3 of the chips are red, 5 of the chips are white, and 2 of the chips are
blue. Four chips are selected, with replacement. Create a probability distribution for the
number of red chips selected.
3
p = the probability of selecting a red chip 0.3
10
q = 1 – p = 0.7
n=4
x P ( x)
x = 0, 1, 2, 3, 4 0 0.240 The binomial
1 0.412 probability
2 0.265 formula is used to
3 0.076 find each
4 0.008 probability.
Finding Probabilities
Example:
The following probability distribution represents the probability of selecting 0, 1, 2, 3, or 4 red
chips when 4 chips are selected.
x P ( x) P (x)
Selecting Red Chips
0 0.24 0.5
1 0.412 Probability
0.4
2 0.265
0.3
3 0.076
4 0.008 0.2
0.1
0 x
0 1 2 3 4
Number of red chips
Mean, Variance and Standard Deviation
Population Parameters of a Binomial Distribution
Mean: μ np
Variance: σ 2 npq
Standard deviation: σ npq
Example:
One out of 5 students at a local college say that they skip breakfast in the morning. Find the
mean, variance and standard deviation if 10 students are randomly selected.
n 10 μ np σ 2 npq σ npq
p 1 0.2 10(0.2) (10)(0.2)(0.8) 1.6
5
q 0.8 2 1.6 1.3
Geometric Distribution
A geometric distribution is a discrete probability distribution of a random variable x
that satisfies the following conditions.
The probability that the success will occur on trial x is, here x=5
p = 0.20 q = 0.80
a.) x = 3 b.) x = 3, 4
= (0.2)(0.64) 0.230
= 0.128
Geometric Distribution
Example:
A fast food chain puts a winning game piece on every fifth package of French fries. Find
the probability that you will win a prize,
a.) with your third purchase of French fries,
b.) with your third or fourth purchase of French fries.
p = 0.20 q = 0.80
a.) x = 3 b.) x = 3, 4
= (0.2)(0.64) 0.230
= 0.128
Poisson Distribution
The Poisson distribution is a discrete probability distribution of a
random variable x that satisfies the following conditions.
1. The experiment consists of counting the number of times
an event, x, occurs in a given interval. The interval can be
an interval of time, area, or volume.
2. The probability of the event occurring is the same for each
interval.
3. The number of occurrences in one interval is independent
of the number of occurrences in other intervals.
The probability of exactly x occurrences in an interval is
x μ
P (x ) e
μ
x!
where e 2.71828 and μ is the mean number of occurrences.
The probability of an event is the number of favorable outcomes divided by the
total number of outcomes possible.
For example:
Rolling a 3 on a die, the number of events is 1 (there's only a single 3 on each die), and
the number of outcomes is 6.
Message arrive at a switchboard in a Poisson manner at an average rate of six per
hour. Find the probability for each of the following events.
𝑎) 𝑢 = 6, 𝑥 = 2
62 𝑒 −6
𝑃 𝑥=2 = = 0.0446
2!
b) 𝑢 = 6, 𝑥 = 0
60 𝑒 −6
𝑃 𝑥=0 = = 0.0024
0!
𝐶) 𝑢 = 6, 𝑥 = 2
𝑃 𝑥 ≥ 3 = 1 − 𝑃(𝑥 < 3)
𝑃 𝑥 ≥ 3 = 1 − *𝑃 0 + 𝑃 1 + 𝑃 2 +
60 𝑒 −6 61 𝑒 −6 62 𝑒 −6
𝑃 𝑥 ≥3 =1−* + + +
0! 1! 2!
𝑃 𝑥 ≥ 3 = 0.9380
Poisson Distribution
Example:
The mean number of power outages in the city of Brunswick is 4 per year. Find the
probability that in a given year,
a.) there are exactly 3 outages,
b.) there are more than 3 outages.