Unit 2 P&S
Unit 2 P&S
Unit 2 P&S
E5, Section -1
Unit -2
Random Variables
Random Variables
• Events give us more flexibility in designing experiments compared to just focusing on the outcomes themselves. An event can
be anything, like "drawing a spade" or something numerical, like "the outcome is 3.”
• Now , we introduce a new concept that will allow events to be defined in a more consistent way, i.e. they will be numerical
always.
• In tossing dice, often interested in the sum of the two dice and are not really concerned about the values of the individual dice.
i.e. interested in knowing that the sum is 7 and not be concerned over whether the actual outcome was
(1, 6) or (2, 5) or (3, 4) or (4, 3) or (5, 2) or (6, 1).
• A civil engineer may not be directly concerned with the daily risings and declines of the water level of a reservoir (which we
can take as the experimental result) but may only care about the level at the end of a rainy season.
• These quantities of interest that are determined by the result of the experiment are known as random variables.
• We define a real random variable as a real function of the elements of a sample space S.
• Value of a random variable is determined by outcome of experiment
• Assign probabilities of its possible values.
Conditions for a Function to be a Random Variable
• The second condition we require is that the probabilities of the event (X=∞) and
(X = -∞) be 0:
P{X= -∞} =0 P{X= ∞ }=0
Random Variables and Distribution Functions
• Set of possible values can be written either as a finite sequence x1, . . . , xn, or as an infinite
sequence x1, . . . are said to be discrete.
• E.g. a random variable whose set of possible values is the set of nonnegative integers is a
discrete random variable.
• Random variables may take on a continuum of possible values continuous random variables.
• It is uncountable. E.g., random variable denoting the lifetime of a car, when the car’s lifetime is
assumed to take on any value in some interval (a, b).
• Cumulative distribution function, or distribution function, F of random
variable X for any real number x
F (x) = P{X ≤ x}
• F (x) is the probability that the random variable X takes on a value that is
less than or equal to x.
• The distribution function has some specific properties derived from the fact
that F(x) is a probability.
• F(- ∞ )= 0
• F(∞) = 1
• 0≤F(x)≤1
• F(x1) ≤ F(x2) if x1< x2
• P{x1≤ X ≤ x2} = F(x2) – F(x1)
• Suppose the random variable X has distribution function
• There are nCi different sequences of the n outcomes leading to i successes and n − i failures
• By the binomial theorem, the probabilities sum to 1, that is,
• Since a binomial random variable X, with parameters n and p, represents the number of successes in n
independent trials, each having success probability p, we can represent X as follows:
Example 1
!
)* *
𝑃 𝑋=𝑖 = 𝑒 !! , 𝑖 = 0,1, …
• Probability mass function
$ $
!
𝜆
0 𝑝 𝑖 = 𝑒 )* 0 = 𝑒 )* 𝑒 * = 1
𝑖!
!"- !"-
5
(0.1755)3(0.8245)2 ≈ 0.0367
3
Poisson Distribution
• Suppose that n independent trials are to be performed, with the ith trial resulting in a
success with probability pi , i = 1, . . . , n.
• Then it can be shown that if n is large and each pi is small, then the number of
successful trials is approximately Poisson distributed with mean equal to
Ni =1 /pi .
• In fact, this result will sometimes remain true even when the trials are not
independent, provided that their dependence is “weak.”
• The Poisson distribution possesses the reproductive property that the sum of
independent Poisson random variables is also a Poisson random variable.
• Let, X1 and X2 are independent Poisson random variables having respective means
λ1 and λ2. Then the moment generating function of X1 + X2 is as follows:
Example:
• It has been established that the number of defective stereos produced
daily at a certain plant is Poisson distributed with mean 4.
• Over a 2-day span, what is the probability that the number of defective
stereos does not exceed 3?
Solution:
• Assuming that X1, the number of defectives produced during the first day, is
independent of X2, the number produced during the second day, then X1 +X2 is
Poisson with mean 8. Hence,
Poisson Distribution Function
• Hence,
P(μ − 2σ < X < μ + 2σ) = P(-2 < Z < 2)
= P(Z < 2) − P(Z < −2)
= 0.9772 − 0.0228 = 0.9544
Example:
• Given a normal distribution with μ = 40 and σ = 6, find the value of x
that has
• (a) 45% of the area to the left and
• (b) 14% of the area to the right.
Solution:
• An area of 0.45 to the left of the desired x value is shaded in Figure (a).
• We require a z value that leaves an area of 0.45 to the left.
• From Table A.3 we find P(Z <−0.13) = 0.45, so the desired z value is−0.13.
• Hence, x = (6)(−0.13) + 40 = 39.22.
• In Figure (b), we shade an area equal to 0.14 to the right of the desired x
value.
• This time we require a z value that leaves 0.14 of the area to the right and
hence an area of 0.86 to the left.
• Again, from Table A.3, we find P(Z < 1.08) = 0.86, so the desired z value is
1.08 and x = (6)(1.08)+ 40 = 46.48.
Example:
• A certain type of storage battery lasts, on average, 3.0 years with a
standard deviation of 0.5 year. Assuming that battery life is normally
distributed, find the probability that a given battery will last less than
2.3 years.
Solution:
Example:
• A certain machine makes electrical resistors having a mean resistance
of 40 ohms and a standard deviation of 2 ohms.
• Assuming that the resistance follows a normal distribution and can be
measured to any degree of accuracy, what percentage of resistors will
have a resistance exceeding 43 ohms?
Solution:
Normal Approximation to the Binomial
• If X is a binomial random variable with mean μ= np and variance σ2 = npq,
then the limiting form of the distribution of
/)01
𝑍=
012
• The density function forms a rectangle with base B−A and constant height
1/𝐵−𝐴
• Also called the rectangular distribution
• interval may not always be closed: [A,B]. It can be (A,B) as well
Uniform Distribution – Mean and Variance
3
𝐴+𝐵 3
𝐵−𝐴
𝜇= 𝑎𝑛𝑑 𝜎 =
2 12
Exponential Distribution
• A continuous random variable whose probability density function is given, for some λ >
0, by
𝜆𝑒 !"# , 𝑖𝑓 𝑥 ≥ 0
𝑓 𝑥 =%
0 , 𝑖𝑓 𝑥 < 0
• is said to be an exponential random variable (or, more simply, is said to be exponentially
distributed) with parameter λ. The cumulative distribution function F (x) of an
exponential random variable is given by
• 𝐹 𝑥 =𝑃 𝑋≤𝑥
"
=∫! 𝜆𝑒 #$% 𝑑𝑦
= 1 − 𝑒 !"# ,
• The exponential distribution often arises, in practice, as being the distribution of the amount of
time until some specific event occurs. For instance, the amount of time (starting from now) until an
earthquake occurs, or until a new war breaks out, or until a telephone call you receive turns out to
be a wrong number are all random variables that tend in practice to have exponential distributions
Example:
• Suppose that a number of miles that a car can run before its battery
wears out is exponentially distributed with an average value of 10,000
miles.If a person desires to take a 5,000-mile trip, what is the
probability that she will be able to complete her trip without having to
replace her car battery?
• What can be said when the distribution is not exponential?
Solution:
• It follows, by the memoryless property of the exponential distribution, that the
remaining lifetime (in thousands of miles) of the battery is exponential with
parameter λ = 1/10. Hence the desired probability is
• where t is the number of miles that the battery had been in use prior to the start of
the trip. Therefore, if the distribution is not exponential, additional information is
needed (namely, t ) before the desired probability can be calculated.
Conditional Distribution and Density Function
• We know that for two events A and B where P(B)≠ 0,the conditional probability of A
given B had occurred was
4 5∩7
•𝑃 𝐴𝐵 = 4 7
• Conditional Distribution
• Let A be identified as the event {X ≤ x} for the random variable X. The resulting probability
P(X ≤ x | B) is defined as the conditional distribution function of X, which we denote Fx(x | B).
Thus,
Fx(x | B) = P(X ≤ x | B) =P(X ≤ x ∩ B)/P(B)
where we use the notation {X ≤ x ∩ B} to imply the joint event {X ≤ x} ∩ B. This joint event
consists of all outcomes s such that:
X(s) ≤ x and s ∈ B.
• The conditional distribution applies to discrete, continuous, or mixed random variables.
Properties of Conditional Distribution.
• All properties of Ordinary distribution implies to this as well
Conditional Density
• Conditional Density function of random variable X is defined as the
derivative of the conditional distribution function.
• We denote this density by fx(x|B) then
dFx(x|B)
fx(x|B)=
𝒅𝒙
Properties of Conditional Density
It satisfies the same properties as ordinary density function