Download as pdf or txt
Download as pdf or txt
You are on page 1of 65

Random variable and

probability function
Definition: Random Variable
A function whose value is a real number determined by
each elements in the sample space is called a random
variable.

𝑋: Ω → ℝ
Example:
1. Consider the experiment of tossing a coin. Let the
random variable X denote the number of heads. What are
the values of X?

2. Consider the experiment of tossing a coin twice. Let the


random variable X denote the number of heads. What are
the values of X?
3. Consider the experiment of tossing two dice.
Ω = 𝑖, 𝑗 : 𝑖 = 1,2, … , 6 𝑎𝑛𝑑 𝑗 = 1,2, … 6
Several random variable can be defined. For example, let X
denote the sum of the upturned faces, so
𝑋 𝑤 = 𝑖 + 𝑗, 𝑖𝑓 𝑤 = (𝑖, 𝑗)
Also let Y denote the absolute difference between the
upturned faces then
𝑌 𝑤 = |𝑖 − 𝑗|
Definition: Discrete Random Variable
A random variable X will be defined to be discrete if the
range of X is countable.

Definition: Continuous Random Variable (CRV)


A random variable X that can assume any value in an
interval is called a continuous random variable.
Example:
1.) Life span of a light bulb
2.) Length of the telephone call
3.) Length of an infant at birth
4.) The daily amount of rainfall in Cebu City
5.) Weight of the student in CNU
Definition: Discrete Probability Function (DPF)
If X is a discrete random variable with distinct values
𝑋1 , 𝑋2 , … , 𝑋𝑛 , …
then the function defined by
𝑃 𝑋 = 𝑥 𝑖𝑓 𝑥 = 𝑥𝑗 , 𝑗 = 1,2, …
𝑓 𝑥 =
0 𝑖𝑓 𝑥 ≠ 𝑥𝑗
Is defined to be the discrete probability function of X.
Other terms used in place of discrete density function are
probability mass function, discrete frequency
distribution, and probability function.

The values of a discrete random variable are often called


mass points
Example:
1. Consider the experiment of tossing of two dice. Let X
denote the total of the upturned faces. The mass points of
X are 2,3,…,12. Give 𝑓𝑥 . in tabular form.

2. Let Y denote the absolute difference of the upturned


faces. Give 𝑓𝑦 . in tabular form.
Properties of Discrete Probability function

𝑖) 𝑓 𝑥𝑗 > 0 𝑓𝑜𝑟 𝑗 = 1,2, …


𝑖𝑖) 𝑓 𝑥 = 0 𝑓𝑜𝑟 𝑥 ≠ 𝑥𝑗
𝑖𝑖𝑖) 𝑓 𝑥𝑗 = 1, where the summation is over the points 𝑥1 , 𝑥2 , …
Definition: Cumulative Distribution function
The cumulative distribution function of a random variable X,
denoted by 𝐹𝑥 . , is defined to be that function with domain
the real line and counter domain the interval [0,1] which
satisfies
𝐹𝑥 𝑥 = 𝑃 𝑋 ≤ 𝑥 = 𝑃[ 𝑤: 𝑋 𝑤 ≤ 𝑥 ]
for every real number x.
Example:
1. Consider the experiment of tossing of two dice. Let X
denote the total of the upturned faces. Find
a.) 𝐹𝑥 4 , b.) 𝐹𝑥 12 , c.) 𝐹𝑥 6

2. Consider the experiment of tossing a coin thrice. Let Y


denote the number of heads. Find
a.) 𝐹𝑦 2 , b.) 𝐹𝑦 4 , c.) 𝐹𝑦 −1
Definition: Probability Density Function (PDF)
A probability density function of a continuous random
variable X in an interval I, where I may be bounded or
unbounded, is a function f having the following properties.
1. 𝑓 𝑥 ≥ 0, 𝑓𝑜𝑟 𝑎𝑙𝑙 𝑥
2. The total area of the region under the graph of f is
equal to 1
3. The probability that an observed value of the random
variable X lies in the interval [a,b] is given by
𝑏
𝑃 𝑎≤𝑥≤𝑏 = 𝑓 𝑥 𝑑𝑥
𝑎
Example:
1. Show that each of the following functions satisfies the
nonnegative condition and property of probability density
function.
2
a.) 𝑓 𝑥 = 27
𝑥 𝑥−1 , 1≤𝑥≤4
1 −1𝑥
b.) 𝑓 𝑥 = 3
𝑒 3 , 0≤𝑥<∞
2. (Life Span of Light Bulbs) TKK Products manufactures a
200-watt electric light bulb. Laboratory tests show that the
spans of these light bulbs have a distribution described by
the probability density function
𝑓 𝑥 = .001𝑒 −.001𝑥
Determine the probability that a light bulb will have a life
span of:
a.) 500 hours or less
b.) More than 500 hours
3. The amount of snowfall (in feet) in a remote region of
Alaska in the month of January is a continuous random
variable with probability density function
2
𝑓 𝑥 = 𝑥 3−𝑥 , 0≤𝑥≤3
9
Find the probability that the amount of snowfall will be
a.) between 1 and 2 ft.
b.) more than 1 ft.
MATHEMATICAL EXPECTATION
Let X be a random variable. The mean of X, denoted by 𝜇𝑥 or
E[x], is defined by
i.) 𝐸 𝑥 = 𝑥 𝑓(𝑥)if X is discrete w/ mass points 𝑥′𝑠
ii.)

𝐸𝑥 = 𝑥𝑓 𝑥 𝑑𝑥
−∞
if X is continuous with probability function 𝑓𝑥 𝑥
iii.) Cumulative Density Function
∞ 0

𝐸𝑥 = 1 − 𝐹𝑥 𝑥 𝑑𝑥 − 𝐹𝑥 𝑥 𝑑𝑥
0 −∞
for an arbitrary random variable X
Example:
1. Consider the experiment of tossing two dice. Let X
denote the total of unturned faces of the dice and Y
their absolute difference. Find the mean of X and Y.
2. Let X be a continuous random variable with probability
density function
𝑓 𝑥 = 𝜆𝑒 −𝜆𝑥 , 𝑥 𝜖 [0, ∞)
Find 𝐸[𝑥]
3. Let X be a random variable of cumulative distribution
function given by
𝐹 𝑥 = 1 − 𝑝𝑒 −𝜆𝑥 𝑜𝑛 [0, ∞)
Find 𝐸[𝑥]
4. Let X be a random variable with probability function
given by 𝑓𝑥 𝑥 = 𝑥 −2 𝑜𝑛 [1, ∞)
Find 𝐸[𝑥]
VARIANCE
The variance of a random variable X will be a measure of
the spread or dispersion of the density of X.

While the mean of a random variable X is a measure of


where the values of the random variable X are centered.
VARIANCE
Let X be a random variable and let 𝜇𝑥 𝑏𝑒 𝐸 𝑋 .
i.) The variance of X, denoted by 𝜎𝑥2 𝑜𝑟 𝑣𝑎𝑟 𝑋 , is defined by
𝑣𝑎𝑟 𝑋 = (𝑥 − 𝜇𝑥 )2 𝑓𝑥 (𝑥)
𝑥
If X is a discrete with mass points x’s.
ii.)

𝑣𝑎𝑟 𝑋 = (𝑥 − 𝜇𝑥 )2 𝑓𝑥 𝑥 𝑑𝑥
−∞
If X is continuous with probability density function 𝑓𝑥 𝑥 .
iii.)

𝑣𝑎𝑟 𝑋 = 2𝑥 1 − 𝐹𝑥 𝑥 + 𝐹𝑥 −𝑥 𝑑𝑥 − 𝜇𝑥2
0
where X is a random variable with cdf 𝐹𝑥.

Notice that from i.) and ii.)


𝑣𝑎𝑟 𝑋 = [𝐸(𝑋 − 𝜇𝑥 )2 ]
STANDARD DEVIATION
Let X be a random variable. The standard deviation of X,
denoted by 𝜎𝑥 , is defined as + 𝑣𝑎𝑟 [𝑋].
Example
1. Let X denote the totals of the upturned faces when two dice
are tossed. Compute the variance of X and the standard
deviation of X.
2. Find variance of Y and the standard deviation of Y, when Y is
the absolute difference of upturned faces.
3. Let X be a random variable with probability density
function
𝑓 𝑥 = 𝜆𝑒 −𝜆𝑥 , 𝑥 𝜖 [0, ∞)
Find var[𝑋]

4. Let X be a random variable with cumulative distribution


given by
𝐹𝑥 𝑥 = 1 − 𝑝𝑒 −𝜆𝑥 𝑜𝑛 [0, ∞)
Find var [X]
Theorem:
Let X be a random variable with mean 𝜇𝑥 Then
𝑣𝑎𝑟 𝑋 = 𝐸[𝑋 2 ] − 𝜇𝑥 2 .
EXPECTATION
Let 𝑋 be a random variable and 𝑔 be a function with both
domain and counterdomain in the real line. The expectation
or expected value of the function 𝑔 of the random variable 𝑋
is

i) 𝐸 𝑔 𝑋 = 𝑗 𝑔(𝑥𝑗 )𝑓𝑥 (𝑥𝑗 )


if 𝑋 is discrete with mass points 𝑥1 , 𝑥2 , … , provided this series
is absolutely convergent.

(ii) 𝐸 𝑔 𝑋 = −∞
𝑔 𝑥 𝑓𝑥 𝑥 𝑑𝑥
if 𝑋 is continuous with probability density function 𝑓𝑥 𝑥 .
Theorem 1

(i) 𝐸 𝑐 = 𝑐
(ii) 𝐸 𝑐𝑔(𝑋) = 𝑐𝐸[𝑔 𝑋 ]
(iii) 𝐸 𝑐1 𝑔1 𝑋 + 𝑐2 𝑔2 (𝑋) = 𝑐1 𝐸 𝑔1 𝑋 + 𝑐2 𝐸[𝑔2 𝑋 ]
(iv) 𝐸 𝑔1 𝑋 ] ≤ 𝐸[𝑔2 (𝑋) 𝑖𝑓 𝑔1 𝑥 ≤ 𝑔2 𝑥 , ∀𝑥.
Theorem 2

If 𝑋 is a random variable,

2
𝑣𝑎𝑟 𝑋 = 𝐸 𝑋 − 𝐸 𝑋 = 𝐸 𝑋 2 − (𝐸 𝑋 )2

provided 𝐸[𝑋 2 ] exists.


MOMENTS
Definition. If 𝑋 is a random variable, the rth moment of 𝑋,
denoted by 𝜇𝑟′ , is defined as
𝜇𝑟′ = 𝐸[𝑋 𝑟 ]
if the expectation exists.
NOTE:
If r=1; 𝜇′1 = 𝐸 𝑥 = 𝜇𝑥
1st moment = mean of X
If r = 2;
𝜇′2 = 𝐸 𝑥 2
CENTRAL MOMENTS

If 𝑋 is a random variable, the rth central moment of 𝑋


about 𝑎 is defined as
𝝁𝒓 = 𝑬[ 𝑿 − 𝝁 𝒓 ].
The third central moment defined by
𝜇3 = 𝐸[ 𝑋 − 𝜇 3 ]
is sometimes called a measure of symmetry or skewness.
Symmetrical distributions have 𝜇3 = 0.

A function that is skewed to the right can be shown to


have a positive third moment about the mean.
A function that is skewed to the left can be shown to have
a negative third moment about the mean.
The fourth moment about the mean is sometimes used as a
measure of excess or kurtosis, which is the degree of flatness
of a density near its center.

Kurtosis – is the measure of the degree of peakness or flatness


of a distribution.
Factorial Moment
If 𝑋 is a random variable, the rth factorial moment of 𝑋 is
defined as
𝐸 𝑋 𝑋−1 … 𝑋−𝑟+1 ,
where r is a positive integer.
Moment generating function

Let 𝑋 be a random variable with density 𝑓𝑥 . The expected


value of 𝑒 𝑡𝑋 is defined to be the moment generating
function of 𝑋 if the expected value exists for every value of
𝑡 in some interval −ℎ < 𝑡 < ℎ; ℎ > 0.
The moment generating function
𝒕𝒙 ∞ 𝒕𝒙
𝒎 𝒕 =𝑬𝒆 = −∞
𝒆 𝒇𝒙 𝒙 𝒅𝒙.
if the random variable 𝑋 is continuous
and is
𝒎 𝒕 = 𝑬 𝒆𝒕𝒙 = 𝒆𝒕𝒙 𝒇𝒙 𝒙 ,
𝒙
if the random variable is discrete.
Example
Let X be a random variable with probability density function
𝑓𝑥 𝑥 = 𝜆𝑒 −𝜆𝑥 on 0, ∞ .
Find the following:
i.) 𝑚𝑥 (𝑡) iv.) 𝑚′(0)
ii.) 𝑚′(𝑡) v.) 𝑚′′(0)
iii.) 𝑚′′(𝑡)
DISCRETE UNIFORM DISTRIBUTION
Each member of the family of discrete probability functions
1/𝑁 𝑓𝑜𝑟 𝑥 = 1,2, … , 𝑁
𝑓 𝑥 = 𝑓 𝑥, 𝑁 =
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
where the parameter N ranges over the positive integers, is
defined to have a discrete uniform distribution.
Example:
Tossing a die once
X= random variable representing the number of dots that
turned face up
X = 1,2,3,4,5,6 = N
1
𝑃 𝑋 = 𝑥 = 𝑓𝑥 𝑥 = 6
for x=1,2,3,4,5,6
1
𝑃 𝑋 = 1 = 𝑓𝑥 1 =
6
1
𝑃 𝑋 = 2 = 𝑓𝑥 2 =
6
Theorem 1
If X has a discrete uniform distribution, then
𝑁+1
𝐸𝑋 = ,
2
𝑁2 − 1
𝑣𝑎𝑟 𝑋 = ,
12
𝑁
1
𝑚𝑥 𝑡 = 𝐸 𝑒 𝑡𝑥 = 𝑒 𝑗𝑡 .
𝑁
𝑗=1
Bernoulli Distribution
A random variable X is defined to have a Bernoulli distribution
if the discrete probability function of X is given by

𝑥 1−𝑥
𝑓𝑥 𝑥 = 𝑓𝑥 𝑥, 𝑝 = 𝑝 1 − 𝑝 𝑓𝑜𝑟 𝑥 = 0,1
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

where the parameter p satisfies 0 ≤ 𝑝 < 1. Often q is used to


denote 1-p.
Theorem 2
If X has a Bernoulli distribution, then

𝐸 𝑋 =𝑝
𝑣𝑎𝑟 𝑋 = 𝑝𝑞
𝑚𝑥 𝑡 = 𝑝𝑒 𝑡 + 𝑞
A random experiment whose outcomes has been classified
into two categories, called success and failure, is called a
Bernoulli trial.
p = probability of a success
q = 1 - p = probability of failure
Example 1
Toss a coin once. Success when it is a head, failure when it is a
tail. This is a Bernoulli experiment.
Binomial Distribution

The binomial distribution with parameters 𝑛 and 𝑝 is the


discrete probability distribution of the number of
successes in a sequence of 𝑛 independent Bernoulli trials,
each of which yields success with probability 𝑝.
When 𝑛 = 1, the binomial distribution is a Bernoulli
distribution.
The binomial distribution is frequently used to model the
number of successes in a sample of size 𝑛 drawn with
replacement from a population of size 𝑁. If the sampling is
carried out without replacement, the draws are not
independent and so the resulting distribution is a
hypergeometric distribution, not a binomial one. However,
for 𝑁 much larger than 𝑛, the binomial distribution is a good
approximation, and widely used.
Binomial Distribution
A random variable X is defined to have a binomial distribution
if the discrete probability function of X is given by
𝒏 𝒙 𝒏−𝒙
𝒑 𝒒 𝒇𝒐𝒓 𝒙 = 𝟎, 𝟏, 𝟐, … , 𝒏
𝒇𝒙 𝒙 = 𝒇𝒙 𝒙; 𝒏, 𝒑 = 𝒙
𝟎, 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
where the two parameters 𝑛 and 𝑝 satisfy 0 ≤ 𝑝 ≤ 1, 𝑛
ranges over the positive integers, and 𝑞 = 1 − 𝑝.
Theorem 3
If X has a binomial distribution, then

𝐸 𝑋 = 𝑛𝑝
var 𝑋 = 𝑛𝑝𝑞
𝑚𝑥 𝑡 = 𝑞 + 𝑝𝑒 𝑡 𝑛
.
Example 2
Toss a coin 5 times. Success represents a head coming out.
This is a binomial experiment. What is p?

Example 3
Toss a die 3 times. Getting a 5 is a success. This is a binomial
experiment. What is p?
Hypergeometric Distribution
A random variable X is defined to have a hypergeometric
distribution if the discrete probability function of X is given by
𝒌 𝑵−𝒌
𝒙 𝒏−𝒙
𝒇𝑿 𝒙; 𝑵, 𝒌, 𝒏 = 𝑵 , 𝒇𝒐𝒓 𝒙 = 𝟎, 𝟏, … , 𝒏
𝒏
and 0 otherwise, where N is a positive integer, k is a
nonnegative integer that is at most N, and 𝑛 is a positive
integer that is at most N.
Any distribution function defined by the density function
given above is called a hypergeometric distribution.
Theorem 4
If X is a random variable with a hypergeometric
distribution then,
𝑘
𝐸𝑋 = 𝑛.
𝑁
and
𝑘 𝑁−𝑘 𝑁−𝑛
𝑣𝑎𝑟 𝑋 = 𝑛. 𝑁 . 𝑁 . 𝑁−1 .
Criteria for a Hypergeometric Probability
Experiment
1. The finite population to be sampled has N elements.
2. For each trial of the experiment, there are two outcomes,
success or failure. There are exactly k successes in the
population.
3. A sample of size 𝑛 is obtained from the population of size N
without replacement.
If a probability experiment satisfies these three requirements,
the random variable X, the number of successes in 𝑛 trials of the
experiment, follows the hypergeometric probability function.
Example 1
Suppose a researcher goes to a small college of 100 faculty, 12 of
which have blood type O-negative. She obtains a simple random
sample of 𝑛 = 20 students of the faculty. Let the random variable
X represent the number of faculty in the sample of size 𝑛 = 20
that have blood type O-negative.
(a) What is the probability that 3 of the faculty have blood type O-
negative?
(b) What is the probability that at least one of the faculty has
blood type O-negative?
n=20, N=100, k=12, x=3
12 88
3 17
𝑎. ) 𝑃 𝑋 = 3 = 100
20
= .0833

𝑏. ) 𝑃 𝑋 ≥ 1 = 1 − 𝑃[𝑥 < 1]
= 1 − 𝑃[𝑋 = 0]
= 1 − 0.05734
= .9426
Poisson Distribution
The Poisson distribution is the discrete probability
distributions for the counts of events that occur randomly in
a given interval of time (or space)

Let X= the number of events in a given interval


Poisson Distribution
A random X is defined to have a Poisson distribution if the
density of X is given by
𝒆−𝝀 𝝀𝒙
𝒇𝒙 𝒙 = 𝒙𝒇𝒙 𝒙; 𝝀 = 𝒙!
, 𝒇𝒐𝒓 𝒙 = 𝟎, 𝟏, 𝟐, …
and 0 otherwise. The parameter 𝜆 > 0. the density given
is called Poisson density.
X is the number of events in a given time interval or space.
𝜆 is the mean number of events per interval.
Then
𝜆𝑥
𝑓𝑥 𝑥 = 𝑃 𝑋 = 𝑥 = 𝑒 −𝜆 , 𝑥 = 0,1,2, …
𝑥!
Theorem 5
Let X be a random variable with Poisson
distribution. Then
𝐸 𝑋 =𝜆
var 𝑋 = 𝜆,
and
𝜆 𝑒 𝑡 −1
𝑚𝑥 𝑡 = 𝑒 .
Example 5
Births in a hospital occur randomly at an average rate of
1.8 births per hour.
1. What is the probability of observing 4 births in a given
hour at the hospital?

Solution
Note that the events occur randomly.
Mean rate 𝜆 = 1.8

−1.8 1.8 4
𝑃 𝑋=4 =𝑒 4!
= .0723
2. What is the probability of observing more than or equal
2 births in a given hour at the hospital?

Solution:

𝑃 𝑋 ≥ 2 = 1 − 𝑃 𝑋 = 0 − 𝑃 𝑋 = 1 = .537
Example 6
Suppose that we know that births in a hospital occur
randomly at an average rate of 1.8 births per hour. What is
the probability that we observe 5 births in a given 2-hour
interval?
Solution
If births occur randomly at a rate of 1.8 births per 1 hour
interval, then births occur randomly at a rate of 3.6 births per
2 hour interval.
Let 𝑌 = number of births in a 2-hour period
Then
3.6 5
𝑃 𝑌 = 5 = 𝑒 −3.6 5!
= 0.13768
Example 7
Suppose that the average number of telephone calls arriving
at the switchboard of a small corporation is 30 calls per hour.
i.) What is the probability that no calls will arrive in a 3-
minute interval?
ii.) What is the probability that more than five calls will arrive
in a 5-minute interval?
Solution:
Assuming that the number of calls arriving during any time period
has a Poisson distribution.
i.) 30 calls/hour ↔ 30/60 calls/minute. That is, 0.5 calls/minute
So in a 3-minute interval, there are on the average,
(0.5)(3)=1.5 calls/3-minute interval.
Let 𝑌= no. of calls/3-minute interval. Then 𝜆𝑌 = 1.5
and
1.5 0
𝑃 𝑌 = 0 = 𝑒 −1.5 0!
= 𝑒 −1.5 ≈ 0.22313
ii.) Let Z be the number of calls arriving in a 5-minute interval.
Then
𝜆𝑍 = 0.5 5 = 2.5
Hence,
𝑃 𝑍 >5 =1−𝑃 𝑍 ≤5
2.5 𝑥
5 −2.5
=1− 𝑥=0 𝑒 𝑥!
−2.5
=1−𝑒 (1 + 2.5 + 3.125 + 2.6041 + 1.6276 + 0.81)
≈ .042338

You might also like