Random Variable
Random Variable
Random Variable
&
Probability Distributions
Flow of the presentation
• Random Variables
• Probability Distributions
• Probability Mass/Density Functions
• Expected Value
• Bernoulli’s trial Experiments
• Binomial Distribution
• Poisson Distribution
• Normal Distribution
Random Variable
• Definition: A random variable is a rule that assigns a number to each
outcome of an experiment.
e.g. If a coin is tossed twice, random variable X: number of heads that
appears
OUTCOME X
HH 2
HT 1
TH 1
TT 0
Types of Random Variable
1. Discrete: which can take finite or isolated values is the given
interval, it can be measured exactly
e.g. The number of heads in tossing coins
2. Continuous: which can take all possible values that are infinite, it
cannot be measured exactly
e.g. The number of blank calls during 11.00 a.m. to 1.00 p.m.
Types of Probability Distribution
b) P ( x ) + P ( x ) + ... + P ( x ) = 1
1 2 n
Probability Functions
• A real valued function f(x) which gives the probability of occurrence
of event ‘x’ is called probability function defined as, P(X=x)=f(x).
X= 0 1 2
P(X)=5/18 5/9 1/6
Expected Value
• Definition: IF X is a random variable then the expected value of X,
denoted by E(X) is defined as,
n
E ( X ) = xi f ( xi ), (discrete distriution)
i =1
E( X ) = xf ( x)dx,
−
(continuous distriution)
e.g. A tray of electronics components contains nine good components
and three defective components. If two components are selected at
random, what is the expected number of defective components?
Solution:
P(0)= 12/22, P(1) = 9/22, P(2) = 1/22
E(X)= ½
(i.e. if a large number of selections are made, average ½ each time we
expect to get no defective a little less then half time and either one or
two the rest of the time, but the average will be one half)
Discrete Probability Distribution
• Poisson Distribution
Bernoulli Trial Experiments
Problems involved repeated trials of an experiment with only two
possible outcomes are called Bernoulli trial experiments.
• Properties:
1. The experiment is repeated a fixed number of times (n times)
2. Each trial has only two possible outcomes: success and failure
3. The probability of success remains the same for each trial
4. The trials are independent
5. We are interested only in the total number of success (in any order)
Probability of a Bernoulli Experiment
• Given a Bernoulli experiment and n independent repeated trials,
p: probability of success in single trial
q: probability of failure in single trial
n− x
P( x) = nCx p q x
Binomial Distribution
• Consider, Bernoulli experiment with probability distribution function
n− x
P( x) = nCx p q x
for which the probabilities are the successive terms in the binomial
expansion
n −1 n− x
(q + p ) = q + nC1q
n n
p + ... + nC x q p + ... + p = 1
x n
• Variance 2 = npq
p = 75/100=3/4, q = ¼
X: random variable defined as number of tomes correct distinctions
We have P(5)=2P(4),
P(5)=2*P(4)
=>10C5*p^5*(1-p)^5 = 2* 10C4*p^4*(1-p)^6
=>(3/5)p = 1-p
=>(8/5)p=1
=>P=5/8
=>p= 5/8 and q=1-p=3/8
Required number of times that in10,000 sets of 10 throws each, we get
no even number =10,000*P(0)=0.55
4. A department in a works has 10 machines which may need adjustment
from time to time during the day. Three of these machines are old, each
having a probability of 1/11 of needing adjustment during the day and 7 are
new having corresponding probabilities of 1/21. Assuming that no machine
needs adjustment twice on the same day, determine the probability that on
a particular day just 2 old and no new machines need adjustment.
Solution:
p1: an old machine needs adjustment = 1/11=> q1=10/11
p2 : a new machine needs adjustment = 1/21=> q2=20/21
X1: ‘x’ old machine needs adjustment= P1(x)=(3Cx)(p1^x)(q1^(3-x))
X2: ‘x’ new machine needs adjustment= P2(x)=(7Cx)(p2^x)(q2^(7-x))
Required probability, P1(2)*P2(0)=0.016
Poisson Distribution
Poisson Distribution was discovered by French Mathematician Simeon
Denis Poisson in 1873. It is limiting case of the binomial distribution
under the following conditions:
i) n, the number of trials is indefinitely large
ii) p, the probability of success for each trial is indefinitely small
iii) n*p = λ (mean)
Definition
A random variable X is said to follow a Poisson distribution if it assumes
only non-negative values and its probability mass function is given by:
e− x
; x = 0,1,...; 0
P( X = x) = x !
0; otherwise
Examples:
1. A manufacturer of cotter pins knows that 5% of his products is
defective. If the sells cotter pins in boxes of 100 and guarantees that
not more than 10 pins will be defective, what is the approximate
probability that a box will fail to meet the guaranteed quality ?
Solution:
n: 100, p: probability of a defective pin= 0.05, λ = n*p=5
X: random variable denote the number of defective pins in a box of
100
e− x e−5 5x
P( X = x) = = , x = 1, 2,...
x! x!
10
e−5 5x
P( X 10) = 1 − P( X 10) = 1 −
x =0 x !
2. A car hire has two cars, which it hires out day by day. The number of
demand for a car on each day is distributed as a Poisson distribution
with mean 1.5. Calculate the proportion of days on which (i) neither car
is used, and (ii) the proportion of days on which some demand is
refused.
Solution:
X: random variable denotes the number of demands for a car on
any day
λ: 1.5 (mean)
e−1.5 (1.5) x
P( X = x) = , x = 1,2,...
x!
(i) P(X=0)= 0.2231 (ii) P(X>2)=1-P(X<=2)=0.19126
3. A manufacturer, who produces medicine bottles, find that 0.1% of
the bottle are defective. The bottles are packed in boxes containing 500
bottles. A drug manufacturer buys 100 boxes from the producer of
bottles. Find how many boxes contain:
(i) no defective and (ii) at least two defective
Solution:
n=500, p: probability of defective bottle = 0.001, λ = n p = 0.5
X: random variable denotes the number of defective bottles in a box
e −0.5 0.5 x
P( X = x) = , x = 1, 2,...
x!
(i) 100*P(X=0) = 60.65≈61,
(ii) 100*P(X>=2)=100*[1-{P(0)+P(1)}]=9.025≈10
Continuous Distribution: Normal Distribution
• First discovered in 1753 by Abraham De Moivre
1 −
2
y = f ( x) = e
2
: mean
: s.d .
Standard form of the Normal Distribution
X −
• Standard normal variable: Z =
1 − 12 Z 2
f (Z ) = e , − Z .
2
Normal Curve
Properties of PDF
1. If f(z) is the probability density function for the normal distribution,
then z z
2
P ( z1 Z z2 ) = f ( z )dz = F ( z ) − F ( z ), F ( z ) = f ( z )dz
z1
2 1
0
= P ( Z z ), disribution function
2. F(-z)=1-F(z)
Probability Calculations Using Normal Variable Table
P ( X 4) = P ( Z −1) = P ( Z 1) = 0.5 − P(0 Z 1) = 0.5 − 0.3414 = 0.1586