Bayes'

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 15

Bayes’ Theorem

 If A1, A2, A3, …. An is a set of mutually exclusive


and equally likely events, and B is another
event such that P(B) ≠ 0

 P(A1/B) = P(A1). P(B/ A1)


∑ [P(Ai). P(B/ Ai)]

1
Q: Assume that a factory has two machines. Past
records show that machine 1 produced 30% of
the items of output and machine 2 produced
70% of the items. Further 5% of the items
produced by machine 1 were defective and
only 1% produced by machine 2 were
defective. If a defective item is drawn at
random, what is the probability that the
defective item was produced by machine 1 or
machine 2?

2
Let A1 be the event of drawing an item produced by
machine 1;
A2 be the event of drawing an item produced by
machine 2; and
B be the event of drawing a defective item produced
either by machine 1 or machine 2.

Given, P(A1) = 30% = 0.30


P(A2) = 70% = 0.70
Also, P(B/A1) = 5% = 0.05
P(B/A2) = 1% = 0.01

3
probability that the defective item was produced by machine 1 = P(A1/B) = ?

Using Bayes’ Theorem,

P(A1/B) = P(A1). P(B/ A1)


∑ [P(Ai). P(B/ Ai)]

= P(A1). P(B/ A1)


[P(A1). P(B/ A1)] + [P(A2). P(B/ A2)]

= 0.30 x 0.05
0.30 x 0.05 + 0.70 x 0.01

= 0.681 = 68%

4
 Implies that
P(A2/B) = 1 - P(A1/B) ; as there are only 2
machines in the given system.
= 1 – 0.681 = 0. 319 = 32%
 Implies that
P( defective item coming from Machine 1) >
P( defective item coming from Machine 2)

i.e, chances are more from Machine 1


i.e, machine 1 to be rectified.
5
Random Variable (X)
 Outcome of a random experiment

 Eg: X: No. of Heads obtained while tossing a


coin
S = { H, T}
X: 0, 1

6
Probability Distribution
 Listing out all X values and corresponding
probabilities

Eg: If X is No. of Heads obtained while tossing a


coin,
Probability Distribution is,
X : 0 1
P(X) : 0.5 0.5 Σ P(X) = 1

7
 Discrete Probability Distribution

 Where X is discrete
Eg: No. of heads/tails while tossing a coin

 Continuous Probability Distribution

 Where X is continuous
Eg: Life length of a bulb

8
Expected Value
If X is a discrete random variable with values
X1,
X2, X3, X4, …, Xn with corresponding
probabilities p1, p2, p3, p4, …, pn, where p1 + p2,
p3 + p4 + …, pn = 1,

Expected value of X = E (X)


= p 1 X 1 + p 2 X 2 + p 3 X 3 + p 4 X4 + … + p n X n

9
Q: A Petrol pump proprietor sells an average of
Rs. 80,000 petrol on rainy days and an average
of Rs. 95,000 on clear days. Statistics from the
meteorological department show that the
probability is 0.76 for clear weather and 0.24
for raining weather on coming Monday. Find
the expected value of petrol sale.

10
Solution:
X1 = 80,000 p1 = 0.24
X2 = 95,000 p2 = 0.76

Also, p1 + p2 = 1

E(X) = p1 X1 + p2 X2

= Rs. 91, 400

11
Binomial Distribution - Discrete
 Conditions:
a) Experiment need to be performed ‘n’ times
under identical conditions ;
b) There are only two possible outcomes – success
& failure
Or S = { success, failure}
where p+q = 1;
p: P(success) & q: P(failure)
c) The trials are statistically independent
12
 If X ~ P (n, p) ----- Binomial Distribution

i.e, P ( getting r successes out of n trails)

= P(X=r) = n Cr px (q)n-x

Where r: 0, 1, 2, …n ;
& p+q=1
n: total no. of trials
p: probability of success in a single trial

13
Also…
 More appropriate in the case of all
distributions with sample size ≤ 30
And p 0.5

Mean (Expected Value) = np


Std. Deviation = √npq

14
15

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy