0% found this document useful (0 votes)
33 views29 pages

Lecture 6-7 Random Variable

- A random variable is a numerical measure of the outcome of a probability experiment. Random variables can be discrete or continuous. - Discrete random variables have countable outcomes while continuous random variables have uncountable outcomes in an interval. - The probability distribution of a random variable specifies the possible outcomes and their probabilities. For discrete variables it is a probability mass function and for continuous variables it is a probability density function. - Key properties of random variables include expected value, variance, and cumulative distribution function. These describe the central tendency, variability, and probability of outcomes being less than or equal to a value.

Uploaded by

Shahadat Hossain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
33 views29 pages

Lecture 6-7 Random Variable

- A random variable is a numerical measure of the outcome of a probability experiment. Random variables can be discrete or continuous. - Discrete random variables have countable outcomes while continuous random variables have uncountable outcomes in an interval. - The probability distribution of a random variable specifies the possible outcomes and their probabilities. For discrete variables it is a probability mass function and for continuous variables it is a probability density function. - Key properties of random variables include expected value, variance, and cumulative distribution function. These describe the central tendency, variability, and probability of outcomes being less than or equal to a value.

Uploaded by

Shahadat Hossain
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 29

RANDOM VARIABLES

Discrete and Continuous Random Variables:


A variable is a quantity whose value changes.
A discrete variable is a variable whose value is obtained by counting.
Examples: number of students present
number of red marbles in a jar
number of heads when flipping three coins
students’ grade level
A continuous variable is a variable whose value is obtained by measuring.
Examples: height of students in class
weight of students in class
time it takes to get to school
distance traveled between classes
A random variable is a variable whose value is a numerical outcome of a random
phenomenon.
▪ A random variable is denoted with a capital letter
▪ The probability distribution of a random variable X tells what the possible
values of X are and how probabilities are assigned to those values
▪ A random variable can be discrete or continuous
A discrete random variable X has a countable number of possible values.
Example: Let X represent the sum of two dice.

Then the probability distribution of X is as follows:

X 2 3 4 5 6 7 8 9 10 11 12

P(X) 1/36 2/36 3/36 4/36 5/36 6/36 5/36 4/36 3/36 2/36 1/36

A continuous random variable X takes all values in a given interval of numbers.

▪ The probability distribution of a continuous random variable is shown by a


density curve.
▪ The probability that X is between an interval of numbers is the area under the
density curve between the interval endpoints
▪ The probability that a continuous random variable X is exactly equal to a
number is zero
Random Variables
•A random variable is a numerical measure of the
outcome from a probability experiment, so its value is
determined by chance. Random variables are
denoted X, Y, Z etc.
•A discrete random variable is a random variable
that has either a finite number of possible values or
a countable number of possible values.
•A continuous random variable is a random
variable that has an infinite number of possible
values that is not countable.
A probability distribution provides the possible values
of the random variable and their corresponding
probabilities. A probability distribution can be in the form
of a table, graph or mathematical formula.
The table below shows the probability distribution for the
random variable X, where X represents the number of
DVDs a person rents from a video store during a single
visit.
Probability Distributions for
Discrete Random Variables
(Probability Mass Function (PMF)).
• The probability distribution is defined by a
probability function, denoted by p(x), which
provides the probability for each value of the
random variable.
• The probability distribution for discrete random
variable is called Probability Mass Function
(PMF).
Properties for
Discrete Random Variables
• The properties for a discrete probability function
(PMF) are:

• Cumulative Distribution Function (CDF)


Example
Using past data on TV sales (below left), a tabular
representation of the probability distribution for TV
sales (below right) was developed.

Units Sold Number of Days(X) p(x)


80 0
.40
50 1
.25
40 2
.20
10 3
.05
20 4
.10
Total 200 1.00
• Graphical Representation of the Probability Distribution

.50
.40

.30
p(x)

.20

.10

0 1 2 3 4

Values of Random Variable X (TV sales)


Example
• Random Variable: Grades of the students
Student ID 1 2 3 4 5 6 7 8 9 10

Grade 3 2 3 1 2 3 1 3 2 2

Probability Mass Function PMF

Grade
Example
• Random Variable: Grades of the students
Student ID 1 2 3 4 5 6 7 8 9 10

Grade 3 2 3 1 2 3 1 3 2 2

CDF
Probability Mass Function

Cumulative Distribution Function

Grade
Example
• Toss a fair coin three times and
define X = number of heads.
x X p(x)
P(X = 0) = 1/8
HHH 1/8 3 P(X = 1) = 3/8 0 1/8
HHT 1/8 2 P(X = 2) = 3/8 1 3/8
HTH 1/8 2 P(X = 3) = 1/8 2 3/8
1/8 2 3 1/8
THH

HTT 1/8 1
1/8 1
THT Probability
1/8 1 Histogram for x
TTH
1/8 0
TTT
Expected Value and Variance
• The expected value, or mean, of a random variable
is a measure of its central location.
– Expected value of a discrete random variable:

• The variance summarizes the variability in the


values of a random variable.
– Variance of a discrete random variable:
Expected Value and Variance

Ex. Given that X is random variable whose mean = 4,


find the mean of 3X+5.
Solution. E(3X+5)= 3 E(X)+E(5)= 3x4+5=17

Ex. Given that X is random variable whose variance = 2,


find the variance of 3X+5.
Solution. V(3X+5)= 9 V(X)= 9x2=18
Example
● Using past data on TV sales (below left), a tabular
representation of the probability distribution for TV
sales (below right) was developed.
Units Sold Number of Days(X)
p(x)
80 0
.40
50 1
.25
40 2
.20
10 3
.05
Find the mean 20
and variance. 4
.10
Total 200
1.00
Example:
• Variance and Standard Deviation of a Discrete Random
Variable

x p(x) xp(x) x 2p(x)

0 .40 .00 .00


1 .25 .25 .25
2 .20 .40 .80
3 .05 .15 .45
4 .10 .40 1.6
1.20 3.1

▪ standard deviation is
Example
• Toss a fair coin 3 times and
record x the number of heads.
X p(x) xp(x)
(x-μ)2p(x)
0 1/8 0 (-1.5)2(1/8)
1 3/8 3/8 (-0.5)2(3/8)
2 3/8 6/8 (0.5)2(3/8)
3 1/8 3/8 (1.5)2(1/8)
Alternative Solution (Suggested): √
x p(x) x.p(x) x2p(x)

0 1/8 0 0
1 3/8 3/8 3/8
2 3/8 3/4 3/2
3 1/8 3/8 9/8
Notes about Continuous RV
• A continuous random variable can assume any
value in an interval on the real line or in a collection
of intervals.

• It is not relevant to talk about the probability of the


random variable assuming a particular value.

• Instead, we talk about the probability of the


random variable assuming a value within a given
interval.
Probability Distributions for
Continuous Random Variables
(Probability Density Function (PDF)).

• The probability distribution is defined by a


probability function, denoted by f(x), which
provides the probability for each value of the
random variable.

• The probability distribution for continuous


random variable is called Probability
Density Function (PDF).
Properties for
Continuous Random Variables

The properties for a Cumulative Distribution Function


continuous probability (CDF)
function (PDF) are:
Example
– Let X be a random variable with range [0,2] and pdf
defined by f(x)=1/2 for all x between 0 and 2 and f(x)=0
for all other values of x. Note that since the integral of
zero is zero we get

– That is, as with all continuous pdfs, the total area under
the curve is 1. We might use this random variable to
model the position at which a two-meter with length of
rope breaks when put under pressure, assuming “every
point is equally likely”. Then the probability the break
occurs in the last half-meter of the rope is
Example
– Let Y be a random variable whose range is the
nonnegative and whose pdf is defined by

The random variable Y might be a reasonable choice to model


the lifetime in hours of a standard light bulb with average life
750 hours. To find the probability a bulb lasts under 500 hours,
you calculate
Expected Value and Variance
• The expected value, or mean, of a random variable is
a measure of its central location.
– Expected value of a continuous random variable:

• The variance summarizes the variability in the values


of a random variable.
– Variance of a discrete random variable:
Discrete versus Continuous Random Variables
Discrete RV Continuous RV
Finite Sample Space Infinite Sample Space
e.g. {0, 1, 2, 3} e.g. [0,1], [2.1, 5.3]
Probability Mass Function (PMF) Probability Density Function (PDF)

Cumulative Distribution Function (CDF)


Example

• Probability that the customer waits exactly 3 minutes is:

• Probability that the customer waits between 2 and 3


minutes is:

• The Probability that the customer waits less than 2


minutes
Example

• Probability that the customer waits between 2 and 3


minutes is:

• The Probability that the customer waits less than 2 minutes


CDF

CDF
Expected Value and Variance

A continuous variable X has a probability density function

where c is constant. Find (i) the value of c (ii)


(iii) (iv)
v) compute mean and variance of X.
Key Concepts
Discrete Random Variables and Probability
Distributions
1. Random variables, discrete and continuous
2. Properties of probability distributions

3. Mean or expected value of a discrete random


variable:
4. Variance and standard deviation of a discrete
random variable:

You might also like