You are on page 1of 52

Unit V

Probability Distributions
Random variables (discrete and continuous),
Probability mass function,
Distributions:
Binomial,
Poisson,
Probability density function,
Distributions:
Uniform,
Exponential,
Normal.
Random Variable:
A variable whose value is determined by the outcome of a random experiment is called a random
variable. Flip a coin – random process
𝟏 𝒊𝒇 𝒉𝒆𝒂𝒅𝒔 Each flip – experiment
X=ቊ Quantifying the experiment- random variable
𝟎 𝒊𝒇 𝒕𝒂𝒊𝒍𝒔
Random variable is a function that maps a random process to an integer.
Example: Toss a coin 3 times
S HHH X = Number of tails
.
. 8 points For Ω belongs to S
.

HHT X:S→R
.
. X(HHH) = 0
.
X(THT) = 1
THH
. R
.
.
0 1 2 3
Why we define random variables?
Ans- to quantify outcomes
e.g. P(Sum of upward face after rolling 7 dice is ≤ 30) i.e. P(Y ≤ 30)
Discrete Random Variable: Continuous Random Variable:
If the random variable takes on only particular If the random variable takes on all values in a
numerical values or separate attributes is called certain interval then it is a continuous random
discrete random variable. variable.
e.g. Number of defective items in a lot e.g. Weight or height of students
(can have all values integral as well as fractional)
Examples-
X = Exact amount of rain in values (e.g. 1.111 inches of rain, 1.1’’, 1.1’ )
Continuous random variable
X = Year that a random student was born (1991, 1985,1999 etc.)
Discrete random variable

X = Number of ants born tomorrow in the universe


Discrete random variable

X = Exact wining time for men’s 100 meter run in 2019


Continuous random variable

X = Exact mass of a random animal selected at zoo. (123.75 kg, 5000 kg)

Continuous random variable


Probability Distributions
X = Number of facing up on a fair dice(6 faces)
P(4)=?
1
6
For X={1,2,3,4,5,6}
1 1 1
P(X=1) = ,P(X=2) = , …, P(X=6) = X = Toss a coin(Head or Tail)
6 6 6
P

1 1
6 2
X X
1 2 3 4 5 6 1 2
Probability Mass function
Q = # head / when flipping 2 coins simultaneously
Q= {0,1,2}
1 1 2
• f(1) = P(Q =1) =P(h, t) + P (t, h) = + =
4 4 4
1
• f(0) = P(Q=0) =P(t, t) =
4
1
• f(2) = P( Q=2) =P(h, h) =
4
f( )+ f( )+ f( )
q 0 1 2 = f( )+ f( )+ f( )
f(q) 1 2 1 = 1 +2 +1 =1
4 4 4 4 4 4

3. f(
Example X be a random variable , f is the PMF given by
X 0 1 2 3 4 5 6 7
f 0 k 2k 2k 3k k2 2k2 7k2+k

1. Determine K

Answer :
By rule 2,
2 2 2
0 + k + 2k +2k + 3k + k + 2k + 7k + k = 1
2
9k + 10 k = 1
2
10 k + 10k – k – 1 = 0
10K(K + 1) – (K + 1) = 0
(K + 1) (10K – 1)=0
K = -1 or k= 1/10
K ≠ -1 by rule 1
Therefore, K = 1/10
Consider an experiment of tossing 3 fair coins
and counting the number of heads.
Let X be the number of heads.
Prior to an experiment, its value is not known.
We can say is that X has to be an integer between 0 and 3.
Since assuming each value is an event, we can compute probabilities,
Random Variables

Discrete Random Continuous Random


Variables Variables

Probability Distribution function

Probability Mass Probability Density


Function Function

Uniform Distribution
Binomial Distribution
Probability Distributions Exponential Distribution
Poisson Distribution
Normal Distribution
Important Distributions. . .
Certain probability distributions occur with such regularity in real-life
applications.
We will discuss the following distributions:
• Binomial
• Poisson
• Uniform
• Normal
• Exponential

The first two are discrete and the last three continuous.
Binomial Distributions
Consider the following:
— The number of heads/tails in a sequence of coin flips
— Vote counts for two different candidates in an election
— The number of male/female employees in a company
— The number of accounts that are in compliance or not in compliance with an
accounting procedure
— The number of successful sales calls
— The number of defective products in a production run
— The number of days in a month your company’s computer network experiences
a problem

All of these are situations where the binomial distribution may be applicable.
Binomial Distributions
There is a set of assumptions which, if valid, would lead to a binomial
distribution.
These are:
• A set of n experiments or trials are conducted.
• Each trial could result in either a success or a failure.
• The probability p of success is the same for all trials.
• The outcomes of different trials are independent.
• We are interested in the total number of successes in these n trials.
Binomial Distributions
Consider an experiment with only two possible outcomes, namely a success with probability p and a failure with
probability q.

Hence p + q =1

1
e.g. If a fair coin is tossed, we either get a success (a head) with probability p = or a failure (i.e. tail) with probability
2
1
q=
2

Now, consider ‘n’ such independent trials. Also, let r = Number of successes in n trials (i.e. r=0,1,2,…n).

Then, the probability of getting r successes in n trials is given by

𝑛!
𝑃 𝑟 = nCr 𝑝𝑟 𝑞𝑛−𝑟 , r= 0,1,2,…n [nCr= 𝑟! × 𝑛−𝑟 !]

This is binomial probability distribution denoted by B(n, p, r) where n and p are called as the parameters of the
distribution.
Note
1. We have P(0) + P(1) + ….P(n) = 1

2. p and q must not be too small and n must be finite and fixed

3. Probability that there will be success at most r times:

P(0) + P(1)+…P(r) = nC0 𝑝0 𝑞𝑛 + nC1 𝑝1 𝑞𝑛 -1 + …..+ nCr 𝑝𝑟 𝑞𝑛−𝑟

Similarly, Probability of getting at least r success in n trials :

P(r) + P(r+1)+…P(n) = nCr 𝑝𝑟 𝑞𝑛−𝑟 + nCr+1 𝑝𝑟+1 𝑞𝑛−𝑟+1 + nC𝑛 𝑝𝑛 𝑞0

4. For a Binomial Distribution

Expected value of distribution i.e. mean of the distribution is E(r) = mean (r) = np and its variance, σ2=npq

5. If the set of n trials is represented N times, then the expected frequency of getting r success is given by

f(r) = N × P(r) = N × nCr 𝑝𝑟 𝑞𝑛−𝑟 , r= 0,1,2,….n.


Example: 10 unbiased coins are tossed simultaneously, find the probability that there will be
i) Exactly 5 heads ii) At least 8 heads
iii) Not more than 3 heads iv) At least one head

Solution:
1
Here, let p = Probability of getting a head in one trial =
2
1 1
Similarly, q = Probability of getting a tail in one trial = 1-p = 1- =
2 2
Also, the experiment is performed using 10 coins i.e. it is carried out n =10 number
of times.
Hence, the probability of getting r successes in 10 trials is given by the
Binomial probability function as
𝑃 𝑟 = 10C 𝑟
𝑝 𝑞 10−𝑟
= 10C (1)𝑟 1 10−𝑟
.( ) 10 1 10
= Cr ( ) =
1 10
Cr
r r 2 2 2 1024
1. Probability of getting 5 heads, i. e. r=5
1 10
C5
1024

1 10! 1 (10×9×8×7×6) × 5!
= × = ×
1024 5!× 10−5 ! 1024 (5×4×3×2×1) × 5!

1 10×9×8×7×6
= ×
1024 5×4×3×2×1

= 0.246

2) Probability of getting at least 8 heads i.e. P(r ≥ 8) = ? (H. W.)


Example: The mean and variance of a binomial distribution are 3 and 2 respectively. Find the
probability that the variable takes the values i) Exactly 2 ii) at most 2
Poisson Distributions
Another type of discrete probability distribution which is limiting case of the
binomial distribution under the following conditions
1. The number of trials (i.e. n) is very large
2. The constant probability of success for each trial i.e. p is very small or very
large
3. np = m (mean) is finite and positive
Then, the probability functions is,
𝑒 −𝑚 𝑚𝑟
P(r) = , for r=0,1,2…
𝑟!
Where, P(r) probability of the occurrences of the event
e is the natural logarithm= 2.7183 (approximately)
mean m = np which is the parameter of the distribution
Note
1. P(0) + P(1) + ….P(n) = 1 i..e σ∞
𝑟=0 𝑃 𝑟 = 1

ഥ = m and variance = σ2 = m
2. For Poisson distribution, Expected value of distribution i.e. E(r) = mean (𝑟)

3. This distribution is useful for events like


• Finding number of calls in a given time
• The hourly number of customers arriving at a bank in a given time
• The daily number of accidents on a particular stretch of highway
• The hourly number of accesses to a particular web server
• The number of accidents or defects in manufacturing
• The number of printing mistakes in a page
• The monthly number of employees who had an absence in a large company
• Monthly demands for a particular product
4. If there are N sets of n trials each, then the expected frequency of occurrence of r success is given by

f(r) = N × P(r)
Example: If 5% of tubes manufactured by a company are defective, use Poisson distribution to find
the probability that in a box of 100 tubes:
i. None is defective ii. 3 tubes are defective iii. More than 3 tubes are defective
(Given 𝑒 −5 = 0.007)
Solution:
We have p = probability that the tube is defective
= 5%
= 5/100
= 0.05 (Comparing it with 0(very small) and 1(very large))
= Which is very small
and n = number of tubes in a box
= 100
= Which is relatively large
Hence it is a case of Poisson distribution. The probability functions of Poisson
distribution is,
𝑒 −𝑚 𝑚𝑟
P(r) = , for r=0,1,2…
𝑟!
Therefore, m = np= 100 * 0.05 = 5
Therefore, Probability of getting r defective tubes in a box of (n=100) tubes is
𝑒 −𝑚 𝑚𝑟 𝑒 −5 5𝑟 (0.007) 5𝑟
P(r) = = P(r) = = (Given 𝑒 −5 = 0.007)
𝑟! 𝑟! 𝑟!
1. Probability that no tube is defective is (i.e. r = 0)
(0.007) 5𝑟 (0.007) 50 (0.007)(1)
P(r=0) = = = = 0.007
𝑟! 0! (1)
2. 3 tubes are defective (Home Work)
3. More than 3 tubes are defective i.e. P(r > 3) = ?
1. How many tubes are there?
100
1. More then 3 means Which probabilities?
P(4) + P(5)+…….+P(100)
1. What is the best solution?
Using probability rules.
1. Which rule?
Sum of all probabilities equals to 1
P(r<=3) + P(r > 3) = 1
Therefore P(r > 3) = 1 - P(r<=3)
Therefore P(r > 3) = 1 - P(r<=3)

= 1 – [ P(0) + P(1) + P(2) + P(3)]

(0.007) 50 (0.007) 51 (0.007) 52 (0.007) 53


=1–[ + + + ]
0! 1! 2! 3!

1 5 25 125
= 1 – (0.007)[ + + + ]
1 1 2 6

= 1- (0.007)[1 + 5 + 12.5 + 20.83]

= 1- (0.007)(39.33)

= 1 – 0.275 = 0.725
Example: An insurance company receives on an average 2 telephone calls every 12 minutes. Find the
probability that
i. No call
ii. Three calls are received in 30 minutes
(Given e−5 = 0.007)

Solution:
Since the insurance company receives on an average 2 telephone calls every 12
minutes.
Find out the probability of receiving call in a minute i.e. p
2 1
p= = = 0.166 (which is small)
12 6

Then n = 30 (which is large)


1
Therefore , lets find mean m = np = 30 * =5
6

Use Poison distribution formula


Home Work
If a discrete random variable X follows Poisson Distribution such that
P(X=1)=P(X=2), find P(X=0)
Continuous Probability Distributions
Uniform Distribution
Uniform Distribution
f(x) 1 a<x<b
1 𝑓 (𝑥 ) = ቊ𝑏−𝑎
𝑏−𝑎 0 otherwise

X
a b
𝑎+𝑏
E(x) = mean = m = 2
2
𝑏−𝑎
Variance = 12
f(x) = p(x) = probability density function
෍𝑝 𝑥 = 1

X ~ U[a, b]
Ex: Suppose X is a random variable that has uniform distribution with a=200 and b=250.
What is f(X)?
Compute P(X > 230)
Compute P(X=230)

. 1 1 1
1. 𝑓 𝑥 = = = , 𝑓𝑜𝑟 200 < 𝑥 < 250
𝑏−𝑎 250 − 200 50
1
= 0 , otherwise
50

200 x 250 2. 𝑝 𝑥 > 230 =?


(230) = (base * f(x))
1
= (250 − 230) × 50
1 2
= 20 × 50 = 5

3. 𝑝 𝑥 = 230 =?

= 0 (No interval given)


If a random variable ‘X’ has a uniform distribution in (-3,3), find
1) P(X < 2) 2) P(|X| > 1) 3) P(|X – 2|< 2)
1
4) k such that P(X > k)= 5) 𝑃(𝑋 = 2)
4

Solution: We have for X ~ U[-a, a], its pdf is


1
𝑓 𝑥 = ቐ 2𝑎 , −𝑎 < 𝑥 < 𝑎
0, 𝑂𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Here, a =3
Therefore,
1
𝑓 𝑥 = ቐ 6 , −3 < 𝑥 < 3
0, 𝑂𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Now, for continuous random variable we have
𝑏
𝑃 𝑎 < 𝑋 < 𝑏 = ‫𝑥𝑑 𝑥 𝑓 𝑎׬‬
1. 𝑃 𝑋 <2 =?

= 𝑃 −3 < 𝑋 < 2
2
= ‫׬‬−3 𝑓 𝑥 𝑑𝑥
2 1
= ‫׬‬−3 𝑑𝑥
6

1 2
= [𝑥] −3
6

1
= [2 − (−3)]
6

5
=
6
Now, for continuous random variable we have
𝑏
𝑃 𝑎 < 𝑋 < 𝑏 = ‫𝑥𝑑 𝑥 𝑓 𝑎׬‬
2. P(|X| > 1) = ?

= 𝑃 𝑋 < −1 𝑜𝑟 𝑋 > 1

= 𝑃 𝑋 < −1) + 𝑃( 𝑋 > 1 (Being mutually exclusive cases)

= 𝑃 −3 < 𝑋 < −1 ) + 𝑃(1 < 𝑋 > 3

−1 3
= ‫׬‬−3 𝑓 𝑥 𝑑𝑥 + ‫׬‬1 𝑓 𝑥 𝑑𝑥

−1 1 31
= ‫׬‬−3 𝑑𝑥 + ‫׬‬1 𝑑𝑥
6 6

1 1
= [𝑥] −1
−3
+ [𝑥] 3
1
6 6

1 1
= [−1 − (−3)] + [3 − 1]
6 6

2 2 3 1
= + = =
6 6 6 2
3) P(|X – 2|< 2)
P(|X – 2|< 2) = P(-2 < X-2 < 2)
= P(0 < X < 4)
4
= ‫׬‬0 𝑓 𝑥 𝑑𝑥
3 4
= ‫׬‬0 𝑓 𝑥 𝑑𝑥 + ‫׬‬3 𝑓 𝑥 𝑑𝑥
3
= ‫׬‬0 𝑓 𝑥 𝑑𝑥 + 0
1
4) k such that P(X > k)=
4
1
P(X > k) =
4
1
P(k < X < 3) =
4
3 1
‫𝑓 𝑘׬‬ 𝑥 𝑑𝑥 =
4
Find k?
5)P(X=2)=?
Exponential Distribution
Exponential distribution changes shape on the parameter λ.

Distribution is not symmetric

Sample space[0, ∞], one parameter λ

Denoted by X ~ Exp(λ)

0 ∞ −λ𝑥 ,
𝑓 𝑥 = ൝λ 𝑒 𝑥 ≥ 0, λ > 0
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
∞ ∞
න 𝑓 𝑥 𝑑𝑥 = න λ 𝑒 −λ𝑥 𝑑𝑥
0 0 if x ≥ 0, then f(x) = λ 𝑒 −λ𝑥
−λ𝑥 −1 ∞
=λ𝑒 ( ) =1 If x<0, then f(x) = 0
λ 0
Proves that exponential distribution is a
valid probability distribution
Ex: Assume that the duration in minutes of a telephone
conversation follows the exponential distribution
1
𝑓 𝑥 = 𝑒 −λ/5 , 𝑥 ≥0
5
What is the probability that the conversation will exceed five minutes?
i.e. P(x>5)=?
= -[𝑒 −∞/5 − 𝑒 −5/5 ]

P(x>5) =‫׬‬5 𝑓 𝑥 𝑑𝑥 −∞ −1
= -[𝑒 −𝑒 ]
∞1 1 1
= -[ ∞ - ]
=න 𝑒 −λ/5 𝑑𝑥 𝑒 e
5 5 1 1
= -[ - ]
1 𝑒 −λ/5 ∞ ∞ e
= [ ]
5 −1/5 5 1 1
= -[0 - ] =
e e
Normal Distribution
Characteristics of Normal Distribution
Standard Normal Distribution
Note
Example: The weekly wages of 1000 workers are normally distributed around a mean of Rs. 70 and
standard deviation of Rs. 5. Estimate the number of workers whose weekly wages will be:
1. Between Rs. 70 and 72
2. Between Rs. 69 and 72
3. More than Rs. 75
4. Less than Rs. 63
5. Also, estimate the lowest weekly wages of the 100 highest paid workers.
Solution:
Homework
In an intelligence test administered to 1000 students, the average score
was 42 and standard deviation 24.
Find
1. The number of students lying between 30 and 54 marks
2. The value of score exceeded by top 100 students.
End of the unit V

You might also like