You are on page 1of 20

Chapter-5:

Discrete Probability Distributions


BITS Pilani
Pilani Campus

1
Discrete probability distribution
Restaurant Housing Loan Sanction Trucks sold
 Probability distribution: Outcome Probability Duration Probability Units sold Probability
Tea 0.4 <5 days 0.40 0 0.10
 Probability of all outcomes. Coffee 0.6 5-7 days 0.50 1 0.60
Tota l 1 >7 days 0.10 1+ 0.30
Tota l 1 Tota l 1

Discrete means the outcome is a-


 Categorical variable (H/T, M/F, Won/Lost/Draw) or
 A integer (1, 2, 3, 4…). 1 2 3
Hospital stay
 But not a fraction (0.666, 1.414, 1.618, 2.718, 3.1415,
Days Probability
9.11, etc.). Fractions are considered in Continuous 1 0.10
Probability distributions, like Normal distribution. 2 0.15
3 0.30
4 0.25
5 0.15
5+ 0.05
Tota l 1

4
Sometimes the probability distribution may also be expressed by an equation,

2
BITS Pilani, Pilani Campus
Probability Distribution
Visual representation of the probabilities of a particular
variable taking the possible values
If we toss a fair coin,
Head- 0.5
Tail- 0.5
If we toss an unfair coin that gives head 55% of the times,
Head- 0.55
Tail- 0.45
If I take a card from a pack of 52 cards, what is probability 3
Textbook example (p-: 184, TB-1)

Distribution of interruptions per day in a


computer network are given in the table
below.
Interruption Probability, All these 6 outcomes are mutually exclusive, and mutually
per day, A B exhaustive

0 0.35
1 0.25
2 0.20
3 0.10
4 0.05
5 0.05
Total 1

4
BITS Pilani, Pilani Campus
Probability distribution (p-: 184, TB-1)

Interruption Probability,
per day, A B
0 0.35
1 0.25
2 0.20
3 0.10
4 0.05
5 0.05
Total 1

Distribution of interruptions per day in a computer network.


 What is the average number of interruptions/day?
 What is the variation in the number of interruptions/day?
5
BITS Pilani, Pilani Campus
Average interruptions per day

Interruption Probability,
A*B
per day, A B
0 0.35 0.00
1 0.25 0.25
2 0.20 0.40
3 0.10 0.30
4 0.05 0.20
5 0.05 0.25
Total 1 1.40 Mean

Mean = 1.4 interruptions/day.


 Mean here is called Expected Value (EV).
 EV= µ= E(X)= ∑ xi * P(xi),
 where xi is a random variable and P(xi) is its probability.
 In the table, As are xi and Bs are P(xi).
6
BITS Pilani, Pilani Campus
Standard deviation of interruptions

Interruption Probability, (A-Average)^2,


C*B
per day, A B C
0 0.35 1.96 0.69 (0-1.4)^2=1.96
1 0.25 0.16 0.04 (1-1.4)^2= 0.16
2 0.20 0.36 0.07 (2-1.4)^2 = 0.36
3 0.10 2.56 0.26 (3-1.4)^2 =2.56
4 0.05 6.76 0.34 (4-1.4)^2=6.76
5 0.05 12.96 0.65 (5-1.4)^2 = 12.96
Total 1 Total 2.04 Variance
Expected Value (EV) = 1.40, from previous
slide. Avoided here.
1.43 Standard deviation
Error- Deviation from Average. (A-Average) is error.
 Variance, σ2 = ∑ (xi-µ)2*P(xi)
Standard deviation is Root Weightedsum Square of  where xi is a random variable and P(xi) is its probability.
Error, say RWSSE, similar to RMSE explained earlier In the table, As are xi and Bs are P(xi).
1.43 x 1.43 = 2.04.
for standard deviation of raw data. EV= µ= ∑ xi * P(xi). EV is computed in the previous slide
7
BITS Pilani, Pilani Campus
More on the textbook problem

 Probability of interruptions is empirical probability-


estimated from observed data.
 This data can be used for-
 Preparing Service Level Agreements (SLA).
 No of technicians required.
 No of spare parts required.
 Reliability studies- Mean Time Between Failures (MTBF).
 AMC rate.

Average or Expected Value = 1.40


Standard deviation = 1.43

8
BITS Pilani, Pilani Campus
Take 5… Expected value

Gambling Rain
Head Tail Expected Good Other Expected
Probability 0.5 0.5 Value Probability 0.6 0.4 Value
Game-1 1 0 0.5 Crop-1 8 3 6 0.6*8+0.4*3=6
Game-2 2 1 1.5 Crop-2 5 10 7 0.6*5+0.4*10=7
0.6*5+0.4*5 = 5
Game-3 200 300 250 Crop-3 5 5 5
0.5*1+0.5*0=0.5 and so on .

Sales if the economy is- Stock price Expected Fire insurance


Up Same Down Expected Probability 0.6 0.4 Value NoFire Fire Expected
Probability 0.3 0.5 0.2 Value Stock-1 100 80 92 Probability 0.9 0.1 Value
Strategy-1 40 60 40 50 Stock-2 120 40 88 Policy-A 10 -40 5
Strategy-2 40 50 15 40 Stock-3 150 20 98 Policy-B 20 -60 12
Strategy-3 20 20 40 24 Stock-4 80 120 96 Policy-C 4 -16 2
Strategy-4 20 80 30 52 Stock-5 80 100 88 Policy-D 1 -8 0.1
0.3*20+0.5*80+0.2*30=52 and so on . 0.6*100+0.4*80=92 and so on . 0.9*1+0.1*(-8)=0.1 and so on .

 EV= µ= E(X)= ∑ xi * P(xi),


 where xi is a random variable and P(xi) is its probability. 9
BITS Pilani, Pilani Campus
PM’s car…..?

10
BITS Pilani, Pilani Campus
BITS Pilani
Pilani Campus

Binomial distribution
Sources of probability distributions

1. Empirical
 From historical data

2. Theoretical
 Binominal Interruptions: Empirical probability distribution

 Poisson
 Normal

3. Numerous other theoretical distributions


 F, t, Chi-square (later in the course) PM which car?: Uniform distribution.

 Uniform, Geometric, Hypergeometric, Beta,


Gamma, Maxwell-Boltzman, Cauchy, Rayleigh,
Erlang, ….. (not in the course)

12
BITS Pilani, Pilani Campus
Binomial Distribution
Whenever we conduct some trials in an experiment that has two possible outcomes in each trial, we can find the probability
of different outcomes in the experiment using binomial distribution
If I toss a coin, we can get either a head or a tail,, probability both is 0.5
If I toss this coin 3 times, HHH TTT HHT HTH THH TTH THT HTT
Total possible outcomes = 2*2*2 =8
Probability of getting all the heads = 1/8
If I am doing an experiment n times, probability of success (head) is p, and probability of failure is q or (1-p), what is the
chance of getting r successes in the n trials = (Ways in which we can choose those r trials out of n trials) * p*p*p… upto r
times * q*q*q…. upto (n-r) failures
= nCr * p^r * q^(n-r) = n!/ [r! (n-r)!] * * p^r * q^(n-r)

n! is the product of first n natural numbers 3!= 1*2*3 = 6 5! =1*2*3*4*5 = 120

Probability of getting all the heads = Probability of getting all the successes out of n trials = nCn * p^n * q^0 = n! /
[n!. (0!] * p^n * q^0
= 3C3 * 0.5^3 * 0.5^0 = 3!/[3! 0!] * 0.5^3 * 0.5^0 = 1 * (1/2)^3 * 1 = 1/8

Prob(exactly 2 heads) = 3C2 * 0.5^2 * 0.5^1 = 3!/(2!1!) * (½)^2 *(1/2) = 3 * 1/8 =3/8
13
BITS Pilani, Pilani Campus
Binomial Distribution
The coin is expected to give head 60% of the times, and tail 40% of the times

Probability of getting all the heads in 3 trials = Probability of getting all the successes out of n trials = nCn * p^n *
q^0 = n! / [n!. (0!] * p^n * q^0
= 3C3 * 0.6^3 * 0.4^0 = 3!/[3! 0!] * 0.6^3 * 0.4^0 = 1 * (6/10)^3

Prob(exactly 2 heads) = 3C2 * 0.6^2 * 0.4^1

14
BITS Pilani, Pilani Campus
Binomial examples
Two outcomes If a throw a dice 4 times, what is the chance
that a number less than 2 appears exactly
 Coin: Head, Tail. once in the 4 times?
 Births: Male, Female. Underweight, NotUnderweight
 Dice: <2, >=2 Odd, Even n=4, p= 1/6 , q= 5/6
 KBC: Correct, Incorrect Option a, Option not a 4C1 * (1/6)^1 * (5/6)^3
 Cards: Red, Black Picture, NotPicture 4!/ (1!*3!) * (1/6) *(5/6)^3
 Quality: Ok, Defective. Machine: Working, Not Working.
 Patient: Inpatient, Outpatient Diagnostic result: Positive, Negative. nCr = nCn-r 4C3 = 4C1
 Football: Win, NotWin.
 Voting: TMC, NotTMC.
 SS Operation: Successful, Failure.
 Other: Defaulter, NotDefaulter, BSEup, BSEdown, Employed, Unemployed;
Graduate, NotGraduate; Immigrant, NotImmigrant. InPatient, Outpatient;
OnDuty, OnLeave.

15
BITS Pilani, Pilani Campus
Generate Binomial distribution….

Given Generate probability distribution for


1. P(Head)= 0.50, P(Tail)= 0.50. 2 tosses- all possible outcomes and probabilities
2. P(Boy)= 0.52, P(Girl)= 0.48. 3-children families- all possible outcomes and probabilities.
3. P(correct)=1/5, P(incorrect)=4/5. 5-option MCQ. 10 questions- all possible outcomes and probabilities.
4. P(Up)= 0.55, P(Down)= 0.45. 5 days- all possible outcomes and probabilities.
5. P(Defective)= 0.03, P(Ok)= 0.97. 30 parts- all possible outcomes and probabilities.
6. P(breakdown)= 0.001, P(breakdown’)=0.999. 4 Xerox m/c- all possible outcomes and probabilities.
7. P(Rain)= 0.75, P(NoRain)= 0.25. 10 days- all possible outcomes and probabilities.
8. P(Male)= 0.20, P(NotMale)= 0.80. 20 BPO employees- all possible outcomes and probabilities.

Solution of 1 above: A fair coin is tossed twice.


What is the chance that out of 5 consecutivbe days, the rain
happens on exactly 2 days
= 5C2 * (0.75)^2 * (0.25)^3
What is the chance that out of 5 consecutive days, the rain
happens on atleast 2 days
P(2) + p(3) + p(4) + p(5) = 1- [p(0) + p(1)]
In this case the probability distribution can also generated by an equation.
= 1- [5C0 * 0.75^0*0.25^5 + 5C1* 0.75^1 * 0.25^4] 16
Probability of 0, 1, 2 Heads?
BITS Pilani, Pilani Campus
BITS Pilani
Pilani Campus

Generating Binomial probability distribution-


A coin tossed 2, 3, 4 times
Outcomes
Tossed once Tossed 2 times Tossed 3 times Tossed 4 times

Given

18
BITS Pilani, Pilani Campus
Outcomes and probability distribution on
probability tree
Tossed once Tossed 2 times Tossed 3 times Tossed 4 times

Given

P(HH) = P(H)*P(H) =0.5* 0.5= 0.25,


P(HHHT)=P(H)*P(H)*P(H)*P(T)=0.5*0.5*0.5*0.5= 0.0625, and so on. 19
BITS Pilani, Pilani Campus
Remaining chapter will be covered in the next lecture.

20
BITS Pilani, Pilani Campus

You might also like