0% found this document useful (0 votes)
14 views

Moodule 1 - One Random Variable

The document discusses random variables and probability. It defines random variables and how they are used to represent experimental outcomes that can vary. It also defines probability and common probability concepts like events, probability mass functions, cumulative distribution functions, and expectations of random variables.

Uploaded by

Latha Prabu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views

Moodule 1 - One Random Variable

The document discusses random variables and probability. It defines random variables and how they are used to represent experimental outcomes that can vary. It also defines probability and common probability concepts like events, probability mass functions, cumulative distribution functions, and expectations of random variables.

Uploaded by

Latha Prabu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Random Variables

• In
an experiment, a measurement is usually
denoted by a variable such as X.

• In a random experiment, a variable whose


measured value can change (from one replicate of
the experiment to another) is referred to as a
random variable.
Definition of a Random Variable
• A numerical value to each outcome of a particular
experiment
• Example 1 : Machine Breakdowns
– Sample space : S  {electrical , mechanical , misuse}
– Each of these failures may be associated with a
repair cost
– State space : {50, 200,350}
– Cost is a random variable : 50, 200, and 350
Probability

• Used to quantify likelihood or chance

• Used to represent risk or uncertainty in


engineering applications

•Can be interpreted as our degree of belief or


relative frequency

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

• Probabilitystatements describe the likelihood that


particular values occur.

• The likelihood is quantified by assigning a number


from the interval [0, 1] to the set of values (or a
percentage from 0 to 100%).

• Higher numbers indicate that the set of values is


more likely.
Probability

•A probability is usually expressed in terms of a


random variable.
• For the part length example, X denotes the part
length and the probability statement can be
written in either of the following forms

• Both equations state that the probability that the


random variable X assumes a value in [10.8, 11.2] is
0.25.
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’.

Mutually Exclusive Events


• The sets E1 , E2 ,...,Ek are mutually exclusive if
the intersection of any pair is empty. That is, each
element is in one and only one of the sets E1 , E2
,...,Ek .
Probability

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

• A probability function maps the possible values of


x against their respective probabilities of
occurrence, p(x)
• p(x) is a number from 0 to 1.0.
• The area under a probability function is always 1.
Discrete example: roll of a die

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

2. What’s the probability that you roll a 5 or higher?


P(x≥5) = 1 – P(x≤4) = 1-2/3 = 1/3
Practice Problem

Which of the following are probability functions?

a. f(x)=.25 for x=9,10,11,12

b. f(x)= (3-x)/2 for x=1,2,3,4

c. f(x)= (x2+x+1)/25 for x=0,1,2,3


Answer (a)

a. f(x)=.25 for x=9,10,11,12


x f(x) Yes, probability
function!
9 .25
10 .25
11 .25

12 .25
1.0
Answer (b)

b. f(x)= (3-x)/2 for x=1,2,3,4


x f(x)
Though this sums to 1,
1 (3-1)/2=1.0 you can’t have a negative
probability; therefore, it’s
2 (3-2)/2=.5 not a probability
function.
3 (3-3)/2=0

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:

• The number of ships to arrive at a harbor on any given day is a


random variable represented by x. The probability distribution for x is:

x 10 11 12 13 14
P(x) .4 .2 .2 .1 .1

Find the probability that on a given day:


a. exactly 14 ships arrive p(x=14)= .1
b. At least 12 ships arrive p(x12)= (.2 + .1 +.1) = .4

c. At most 11 ships arrive p(x≤11)= (.4 +.2) = .6


Practice Problem:

You are lecturing to a group of 1000 students. You


ask them to each randomly pick an integer between
1 and 10. Assuming, their picks are truly random:
• What’s your best guess for how many students picked the
number 9?
Since p(x=9) = 1/10, we’d expect about 1/10th of the 1000
students to pick 9. 100 students.

• What percentage of the students would you expect picked a


number less than or equal to 6?
Since p(x≤ 6) = 1/10 + 1/10 + 1/10 + 1/10 + 1/10 + 1/10 =.6 60%
Probability Density Function
Probability Density Function (PDF)
• used to specify the probability of the random
variable falling within a particular range of values
– Probabilistic properties of a continuous random
variable
Continuous Random Variables
Example of Continuous Random
Variables
• Example: Metal Cylinder Production
– Suppose that the random variable X is the
diameter of a randomly chosen cylinder
manufactured by the company. Since this
random variable can take any value between
49.5 and 50.5, it is a continuous random
variable.
Probability Density Function
• Example
– Suppose that the diameter of a metal cylinder has a
p.d.f

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

 [1.5  50.5  2(50.5  50.0)3 ]


[1.5  49.5  2(49.5  50.0)3 ]
 75.5  74.5  1.0
Probability Density Function
• The probability that a metal cylinder has a
diameter between 49.8 and 50.1 mm can be
calculated to be
50.1
49.8
(1.5  6( x  50.0) 2 ) dx  [1.5 x  2( x  50.0)3 ]50.1
49.8
f ( x)
 [1.5  50.1  2(50.1  50.0)3 ]
[1.5  49.8  2(49.8  50.0)3 ]
 75.148  74.716  0.432

49.5 49.8 50.1 50.5 x


Problem
Cumulative Distribution Function

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

 [1.5 y  2( y  50.0)3 ]49.5


x

 [1.5 x  2( x  50.0)3 ]  [1.5  49.5  2(49.5  50.0)3 ]


1.5 x  2( x  50.0)3  74.5
P(49.7  X  50.0)  F (50.0)  F (49.7)
 (1.5  50.0  2(50.0  50.0)3  74.5)
(1.5  49.7  2(49.7  50.0)3  74.5)
 0.5  0.104  0.396
Probability Density Function

P(49.7  X  50.0)  0.396


1

P( X  50.0)  0.5
F ( x)

P( X  49.7)  0.104

49.5 49.7 50.0 50.5 x


Cumulative Distribution Function
Expectations of Discrete Random
Variables
• Expectation of a discrete random variable with p.m.f

P ( X  xi )  pi

E( X )  px
i
i i

• Expectation of a continuous random variable with p.d.f f(x)

E( X )  state space
xf ( x)dx

• The expected value of a random variable is also called the


mean of the random variable
Probability Mass Function
• Example 1 : Machine Breakdowns
– P (cost=50)=0.3, P (cost=200)=0.2,
P (cost=350)=0.5
– 0.3 + 0.2 + 0.5 =1 xi 50 200 350

f ( x) pi 0.3 0.2 0.5


0.5

0.3
0.2

50 200 350 Cost($)


Expectations of Discrete Random
Variables
• Example 1 (discrete random variable)
– The expected repair cost is

E (cost)  ($50  0.3)  ($200  0.2)  ($350  0.5)  $230


Definition and Interpretation of
Variance
Var( X )  E (( X  E ( X )) 2 )
 E ( X 2  2 XE ( X )  ( E ( X )) 2 )
 E ( X 2 )  2 E ( X ) E ( X )  ( E ( X )) 2
 E ( X 2 )  ( E ( X )) 2
f ( x)
Two distribution with
identical mean values but
different variances

x
Examples of Variance Calculations
• Example

Var( X )  E (( X  E ( X )) 2 )   pi ( xi  E ( X )) 2
i

 0.3(50  230) 2  0.2(200  230) 2  0.5(350  230) 2


 17,100   2

  17,100  130.77
Binomial Experiments
A binomial experiment is a probability experiment that satisfies the following conditions.

1. The experiment is repeated for a fixed number of


trials, where each trial is independent of other trials.
2. There are only two possible outcomes of interest for
each trial. The outcomes can be classified as a success
(S) or as a failure (F).
3. The probability of a success P (S) is the same for each
trial.
4. The random variable x counts the number of
successful trials.
Notation for Binomial Experiments
Symbol Description

n The number of times a trial is repeated.

p = P (S) The probability of success in a single trial.

q = P (F) The probability of failure in a single trial. (q = 1 – p)

x The random variable represents a count of the number of


successes in n trials: x = 0, 1, 2, 3, … , n.
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 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.

This is a binomial experiment. Each of the 8 selections represent an independent


trial because the card is replaced before the next one is drawn. There are only two
possible outcomes: either the card is an Ace or not.

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) a.) Find the probability of selecting no more than 3


0 0.24 red chips.
1 0.412
2 0.265
3 0.076 b.) Find the probability of selecting at least 1 red
chip.
4 0.008
a.) P (no more than 3) = P (x  3) = P (0) + P (1) + P (2) + P (3)
= 0.24 + 0.412 + 0.265 + 0.076 = 0.993
b.) P (at least 1) = P (x  1) = 1 – P (0) = 1 – 0.24 = 0.76
Complement
Graphing Binomial Probabilities
Example:
The following probability distribution represents the probability of selecting 0, 1, 2, 3, or 4 red
chips when 4 chips are selected. Graph the distribution using a histogram.

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.

1. A trial is repeated until a success occurs.


2. The repeated trials are independent of each other.
3. The probability of a success p is constant for each
trial.
The probability that the first success will occur on trial x is
P (x) = p(q)x – 1, where q = 1 – p.
A bag contains six blue balls and four red balls. Balls are randomly drawn from the bag,
one at a time, until a red ball is obtained. If we assume that each drawn ball is replaced
before the next one is drawn, what is the probability that the experiment stops after
exactly five balls have been drawn?

Success with Probability = 4/10=0.4

The probability that the success will occur on trial x is, here x=5

P (x) = p(q)x – 1, where q = 1 – p.


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

P (3) = (0.2)(0.8)3 – 1 P (3 or 4) = P (3) + P (4)

= (0.2)(0.8)2  0.128 + 0.102

= (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

P (3) = (0.2)(0.8)3 – 1 P (3 or 4) = P (3) + P (4)

= (0.2)(0.8)2  0.128 + 0.102

= (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.

a) Exactly two messages arrive within one hour.


b) No message arrives within one hour.
c) At least three messages arrive within one hour.

𝑎) 𝑢 = 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.

a.)   4, x  3 b.) P (more than 3)


 1  P (x  3)
43(2.71828)-4
P (3)   1  [P (3)  P (2) + P (1) + P (0)]
3!

 0.195  1  (0.195  0.147  0.073  0.018)


 0.567
Two or Multi random variable
• Single random variable defined on a given
sample space.
• Two or multi random variable
• Consider two random variable X and Y defined
on the same sample space. For example, X
denotes the grade of a students and Y denotes
the height of the same student.

You might also like