You are on page 1of 14

Bayes’ Theorem

• Prior Probabilities.
• Posterior Probabilities.

P(Bj|A) = Joint Probability P(BjA)


Marginal Probability of A
Where

P(BjA) = Joint Probability


P(A) = Marginal Probability (sum of joint events in which A is occurring)
In a post office, three clerks are assigned to process incoming mails.

The first clerk, B1, processes 40%, B2 processes 35% and B3 processes 25% of the mails. The
first clerk has an error rate of 0.04, the second has an error rate of 0.06 and the third has an error
rate of 0.03. A mail selected at random from a day’s output is found to have an error. The Post
Master wishes to know probability that the mail was processes by the first , second, or third clerk,
respectively.

Solution
P(B1)=0.4 P(B2)=0.35 P(B3)=0.25
P(Error|B1)=0.04 P(Error|B2)=0.06 P(Error|B3)=0.03
P(B1|error)=? P(B2|error)=? P(B3|error)=?

P(B1|error) = P(B1Error)
P(Error)
Calculating P(B1Error)
P(Error|B1)= P(B1Error)
P(B1)
0.04 = P(B1Error)
0.4
P(B1Error) = 0.016
P(B2Error) = P(Error|B2)*P(B2) = 0.021
P(B3Error) = P(Error|B3)*P(B3) =0.0075
Calculating P(Error)
P(B1Error)+ P(B2Error)+ P(B3Error) = 0.0445
P(A)=0.35 P(B)=0.45 P(C)=0.20. Assuming that A, B and C have occurred , the
conditional probabilities of another event, X, occurring are P(X|A)=0.8, P(X|
B)=0.65 and P(X|C)=0.3. Find P(A|X), P(B|X) and P(A|C) using bayes’
theorem?

Solution
P(A|X) = Probability of Joint event (AX)
Marginal Probability of event X

= P(A)* P(X|A)
P(A)* P(X|A) + P(B)* P(X|B)+P(C)* P(X|C)

= 0.35
0.35*0.8 + 0.45*0.65 + 0.20 * 0.3

= 0.46
Probability Distributions
• In probability distribution, variables are
distributed according to some definite function.
• Theoretical frequency distributions.
• Listing of probabilities of all possible outcomes
that could result if an experiment was done.

1. Discrete Probability Function/ Distribution.


2. Continuous Probability Function/ Distribution.
Random Variables
• If variable takes on different values as a result of
outcome of Random Experiment
• A value that changes from occurrence to occurrence in
no predictable sequence.

Discrete Random Variable


Continuous Random Variable.
Binomial Distribution
• The trial will happen fixed no. of times.
• The trials are independent.
• Each outcome has two possible outcomes.
p and q.
• Mutually exclusive events.
nC = n!
x

x! (n-x)!

Binomial Distribution =
n Cx pxq(n-x)

Mean (µ)= np
Variance = npq = σ2
Question
Assume that on average one telephone number out of fifteen is busy.
What is the probability that if six randomly selected telephone number
are called
1. Not more than three will be busy?
2. At least three of them will be busy?
Solution
Probability that telephone is busy = 1/15
q = 1-1/15= 14/15
P (not more than 3)= P(0) + P(1) + P(2) + P(3)
NORMAL DISTRIBUTION
• Continuous Probability Distribution
• Single peak, unimodal.
• Never touch the axis
• Area is 1. µ , σ
• Standard normal Probability Distribution( Normal Distribution with µ = 0 and σ = 1)
• µ ± σ = 68 % , µ ± 2σ = 95.5 %, µ ± 3σ = 99.7 % of area (values)
• z = x- µ
σ
The Normal Distribution
Shape

f(X) Changing μ shifts the


distribution left or right.

Changing σ increases
or decreases the
σ spread.

μ X
The Standardized Normal

• Any normal distribution (with any mean


and standard deviation combination) can
be transformed into the standardized
normal distribution (Z)

• Need to transform X units into Z units


Translation to the
Standardized Normal
Distribution
• Translate from X to the standardized normal
(the “Z” distribution) by subtracting the mean
of X and dividing by its standard deviation:

X μ
Z
σ
The Z distribution always has mean = 0 and
standard deviation = 1
Example
• If X is distributed normally with mean of 100
and standard deviation of 50, the Z value for
X = 200 is
X  μ 200  100
Z   2.0
σ 50
• This says that X = 200 is two standard
deviations (2 increments of 50 units) above
the mean of 100.
Comparing X and Z units

100 200 X (μ = 100, σ = 50)

0 2.0 Z (μ = 0, σ = 1)

Note that the distribution is the same, only the


scale has changed. We can express the problem in
original units (X) or in standardized units (Z)
How many workers have a salary between Rs. 4000 and Rs.6500, if
the arithmetic mean is Rs.5000, standard deviation is Rs. 1000 and
number if workers is 15000 and salary of workers us assumed to
follow normal law?

As a result of tests on 20000 electric fans manufactured by a company,


it was found that lifetime of the fans was normally distributed with an
average life of 2040 hours and standard deviation of 60 hours. On the
basis of the information, estimate the number of fans that is expected
to run for a) more than 2150 hours b) less than 1960 hours

You might also like