Topic-2 Probability & Prob Distribution

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 67

Quantitative Methods

Probability & Probability Distribution


Terminology
 Probability
 Events
 Experiment
 Sample space
EXERCISE P1:
 A large company has 200 members of management staff,
of which 120 are male and 80 are female, working in one
of three departments: HR, Accounts or Marketing.

Department Male Female Total


HR 60 50 110
Accounts 24 16 40
Marketing 36 14 50
Total 120 80 200
EXERCISE P1:
 Calculate the probability that:
 A woman wins the raffle

 A man wins the raffle

 A man from the Accounts department wins the


raffle
A Priori Probabilities
 A Priori probabilities: possible to work out the probability of
an event occurring before the event happens (also known as
the classical approach to probability).

 We can work out the probability of an a priori event


occurring by:
number of ways that event can occur
P(Event) = total number of possible outcomes

 This method only holds where the outcomes are equally


likely
Empirical Probabilities
 It’s not always possible to work out the probability of
an event occurring before it happens.
 Eg: it is not possible to determine the number of
students on a module who will pass the exam at
first attempt before the exam is taken.

 But - can look at the previous pass rates for the


module over a number of years to get an idea of the
pass rate
 Also called as Relative frequency Approach.
EXERCISE P2:
 Historical data suggests that 70% of students on a
particular module pass the exam at the first attempt. If
there are 550 students currently taking the module, how
many students would you expect to pass the exam at the
first attempt this year (you can assume that all students
on the module sit the first exam)?
Mutually Exclusive Outcomes
 Staff at the company in P1 are classed as working in
only one of the three departments

 They are classed as


 management or
 accounts or
 marketing

 As they can’t be classed as working in more than one


department at a time, we say the departments are
mutually exclusive.
Complements
 For an event with only two possible mutually exclusive
outcomes then these outcomes are the complements of
each other.

 For example, the event ‘the raffle winner is male’ is the


complement of the event ‘the raffle winner is female’.

 The winner can be either male or female (mutually


exclusive) and if they are not male they must be female
(complement).
Complements
 Reconsider your answers for P1a and P1b:
 P(female) = 0.4 and P(male) = 0.6

 If we knew only one of these probabilities, we could


easily work out the other:
 P(female) = 1 – P(male)
 P(male) = 1 – P(female)

 Note: outcomes that are complements must be


mutually exclusive, outcomes which are mutually
exclusive do not have to be complements.
Independent Events
 Two events are independent if the outcome of one
event doesn’t affect the outcome of another event

 For example, rolling a dice and flipping a coin;


 if I roll a dice and get a 6 it won’t affect whether I
get a head or tail on the flip of a coin.
EXAMPLE P3:
 Rolling a dice and getting a 1 or a 6

 Upgrading your phone or not upgrading your phone

 Choosing whether to pay for your food shopping by cash,


credit card or debit card

 The outcome of a normal premier league football match

 The outcome of the FA cup final


EXERCISE P4:
 Let’s suppose you are playing a card game and you
want to work out the probability of selecting a
particular type of card from a full deck. Using a
standard full deck of playing cards:
 There are 52 cards in total
 26 red cards:
 13 hearts (♥) and 13 diamonds (♦)

 26 black cards:
 13 clubs (♣) and 13 spades (♠)
EXERCISE P4:
 If you select one card from a full deck of cards, what is
the probability that it is:
 a) A club or a spade;

 b) A red card or a 2;

 c) A red 2?
PUTTING PROBABILITIES TOGETHER
 The probabilities from P4 can be worked out as the
combination of two separate probabilities, and we can
combine probabilities like this in one of two ways:
 ‘Or’ Rule
 determines the probability of one event OR another
occurring
 ‘And’ Rule
 determines the probability of one event AND
another occurring at the same time
‘Or’ Rule
 For two mutually exclusive events, the probability
of A or B happening is:
number of ways A or B can happen

total number of possibilities

number of ways A can happen  number of ways B can happen



total number of possibilit ies

number of ways A can happen number of ways B can happen


 
total number of possibilities total number of possibilities

 probability of A happening  probability of B happening


The ‘Or’ Rule: P4a
 For mutually exclusive events, the probability of A or B:
P(A or B) = P(A) + P(B)

 Going back to P4a the probability of selecting a club or a


spade is:
The ‘Or’ Rule: P4b
 For non-mutually exclusive events, the probability of A or B:
P(A or B) = P(A) + P(B) – P(A and B)

 Going back to P4b, the probability of selecting a red card or


a 2 is:
The ‘And’ Rule
 Let’s consider your answer for P4c, that the card
selected is a red 2.
 We can again split this into two separate events:
 Let A be the card is red
 Let B be the card is a 2

 We are now looking for the joint probability of event


A and event B (ie: that both events occur).
 For two events, A and B, that are independent, then:
P(A and B) = P(A) x P(B)
The ‘And’ Rule
 Going back to P4c, the probability of selecting a red 2 is:
EXERCISE P5:
 Suppose you are playing a game of cards where you need
to select two cards of the same suit from a standard deck
of cards to win. The cards are shuffled and you pick a
club. What is the probability that second card you pick
will be a club?
CONDITIONAL PROBABILITY
 A conditional probability is one where the outcome of
one event is already known and will affect the outcome of
another event.
 In P5, the probability of the second event (the second
card being a club) is affected by the first event.
 The conditional probability is written as P(B|A), the
probability that B, the second card will be a club given the
first card, A, is a club.
 For two events, A and B, that are not independent, then:
P(A and B)
P(B|A) = P(A)
EXERCISE P6:
 125 students on a module sat a test for which they do not
yet know their result. After the test they were asked
whether they thought the exam was too hard, too easy or ok
Too hard OK Too easy Total
Passed test 15 30 20 65
Failed test 45 10 5 60
Total 60 40 25 125
 What is the probability that the student thought the exam
was too hard?
 What is the probability that the student thought the exam
was too hard given they had failed the test?
Bayes’ Theorem
 Often we begin probability analysis with initial or
prior probabilities.
 Then, from a sample, special report, or a product
test we obtain some additional information.
 Given this information, we calculate revised or
posterior probabilities.
 Bayes’ theorem provides the means for revising the
prior probabilities.

Application
Prior New Posterior
of Bayes’
Probabilities Information Probabilities
Theorem
Example of Bayes’ Theorem
 A manufacturing firm that receives shipments of parts
from two different suppliers. Let A1 denote the event that
a part is from supplier 1 and A2 denote the event that a
part is from supplier 2. Currently 65% of the parts
purchased by the company are from supplier 1 and the
remaining 35% are from supplier 2.
 Hence if a part is selected at random, we would assign
the prior probabilities P(A1)=0.65 and P(A2)= 0.35
 The quality of the purchased parts varies with the source
of supply.
 Historical data suggest that the quality ratings of the two
suppliers are shown in table.
PERCENTAGE PERCENTAGE
OF GOOD PARTS OF BAD PARTS

SUPPLIER 1 98 2
SUPPLIER 2 95 5

 So here, P(G/A1)= 0.98 P(B/A1)= 0.02



P(G/A1)= 0.95 P(B/A1)= 0.05
 Now from conditional probability

Now From probability tree, we know

Now, to find P(B), event B an occur in only two ways:


 Now substituting equation 2 and 3 in equation 1, we get
P(A1/B)= P(A1)P(B/A1)
P(A1)P(B/A1)+ P(A2)P(B/A2)

P(A1/B)= 0.65*0.02
( 0.65)(0.02) + (0.35)(0.05)
= 0.4262

P(A2/B)= P(A2)P(B/A2) = 0.5738


P(A1)P(B/A1)+ P(A2)P(B/A2)
Bayes’ Theorem
 To find the posterior probability that event Ai will
occur given that event B has occurred, we apply
Bayes’ theorem.
P( Ai )P( B| Ai )
P( Ai |B) 
P( A1 )P( B| A1 )  P( A2 )P( B| A2 )  ...  P( An )P( B| An )

 Bayes’ theorem is applicable when the events for


which we want to compute posterior probabilities
are mutually exclusive and their union is the entire
sample space.
Bayes’ Theorem –Tabular Approach
Events - Priori Conditional Joint Posterior Probabilities
Probabilities Probabilities Probabilities
Ai P(Ai) P(B/Ai) P(Ai ∏ B) P(Ai/B)

A1 0.65 0.02 0.0130 0.0130/0.0305 = 0.4262


A2 0.35 0.05 0.0175 0.0175/0.0305 = 0.5738
P(B)= 0.0305 = 1.0000
Discrete Random Variables
 A random variable is something that can take on
varying numerical values resulting from a random
event.
 A discrete random variable can only take on discrete
values.
 We use X to represent our discrete random variable
and x to represent the values it can take on.
 We can then describe the probability that our random
variable takes on a particular value as P(X = x).
Expected Value

The expected value, or mean, of a random variable


is a measure of its central location.
E(x) =  = xf(x)

The expected value is a weighted average of the


values the random variable may assume. The
weights are the probabilities.

The expected value does not have to be a value the


random variable can assume.
Variance and Standard Deviation

The variance summarizes the variability in the


values of a random variable.

Var(x) =  2 = (x - )2f(x)

The variance is a weighted average of the squared


deviations of a random variable from its mean.
The weights are the probabilities.

The standard deviation, , is defined as the


positive square root of the variance.
Expected Value
 Example: JSL Appliances

x f(x) xf(x)
0 .40 .00
1 .25 .25
2 .20 .40
3 .05 .15
4 .10 .40
E(x) = 1.20

expected number of
TVs sold in a day
Variance
 Example: JSL Appliances

x x- (x - )2 f(x) (x - )2f(x)

0 -1.2 1.44 .40 .576


1 -0.2 0.04 .25 .010
2 0.8 0.64 .20 .128
3 1.8 3.24 .05 .162
TVs
4 2.8 7.84 .10 .784
squared
Variance of daily sales = s 2 = 1.660
Standard deviation of daily sales = 1.2884 TVs
Exercise P8
 Two fair dice are thrown once and the number of
spots shown is recorded (where X is the number of
spots shown). What are the possible outcomes?
Probability Distributions
 Probability distribution is a ‘list’ of all outcomes and
their associated probabilities
 E.g.: for P8, list the possible dice combinations, and the
probability of getting each outcome

 We usually show probability distributions in one of


three ways:
 Tabular
 Graphically
 Mathematically
Tabular
x P(X = x)
2 1/36
3 2/36
4 3/36
5 4/36
6 5/36
7 6/36
8 5/36
9 4/36
10 3/36
11 2/36
12 1/36
P(X=x) = 36/36 = 1
Graphically
Probability distribution for number of spots shown
when two fair dice are rolled

6/36
5/36
Probability

4/36
3/36
2/36
1/36

2 3 4 5 6 7 8 9 10 11 12
Number of spots
Mathematically: The Binomial Distribution
 The Binomial Distribution is the appropriate
distribution to use when an event has the following
characteristics:
 There are a number of repeatable trials, n
 There are two complementary outcomes: success
or failure
 The probability of success at each trial is the same,
so P(success) = p.
 The trials are independent.
Exercise P9:
 A fair coin is tossed three times, and the outcome (a
head or tail) of throw is noted. What is the probability
that a head is shown on only one toss of the coin?
 Is the Binomial distribution appropriate?
 1.

 2.

 3.

 4.
Exercise P10:
 Three cards are selected at random from a fair pack of
playing cards. What is the probability that they are all red
cards?
 Is the Binomial distribution appropriate?
 1.

 2.

 3.

 4.
Mathematical representation of the
Binomial Distribution
 To find the probability that a discrete random variable (X)
takes on a particular value (r) we can find P(X=r) as
follows:

n r
P(X  r)  C r p (1  p)
n r
Combinations
 There is a symbol in the binomial distribution that may
not be familiar:
n
Cx

 This is the notation for a combination, which determines


the number of ways you can group x items together from
a pool of n items (where the order in which you group
them does not matter).
 It is read as ‘n C x’ or ‘n choose x’. We use factorials to
help us determine the number of combinations for an
event.
Factorials
 A student has 5 essays to write by the end of the semester,
and he plans to write them one after the other
 There is more than one order in which he can write them,
i.e., there are 5 essays he can choose from to do first, then
4 left to choose from to do second and so on:
Choices 1st 2nd 3rd 4th 5th
essay essay essay essay essay
Essays to choose from 5 4 3 2 1
Number of choices n (n – 1) (n – 2) (n – 3) (n – 4)

 This means that there are: 5 x 4 x 3 x 2 x 1 = 120 different


orders that he can write these essays in.
Factorials
 If we use n to represent the number of items, we can
show that the number of ways to order these essays is n!
 A factorial is found by multiplying together all the positive
integers up to and including n. So:
n! = n x (n – 1) x (n – 2) x (n – 3) x …. x (n – (n – 1))
 5! = 120 = 5 x 4 x 3 x 2 x 1
 4! = 24 = 4 x 3 x 2 x 1
 3! = 6 = 3 x 2 x 1
 2! = 2 = 2 x 1
 1! = 1
EXERCISE P11:
 A small restaurant offers 5 starters, 8 main courses and 6
deserts. One night you visit the restaurant and all dishes
are available. How many different 3-course menus could
you make?
Combinations
 Let’s now assume the student has 10 essays to write but
only time to write 5 of them.
 There are many groups of 5 essays that he can choose to
write out of the 10 he has to do.
 A combination is the number of ways we can pick a group
of items from a number of items available when we are
not concerned with the order in which we pick them,
 the number of groups of any 5 essays the student could write.

n!
Combination: n
Cx 
x! (n  x )!
EXERCISE P12:
 Find the number of groups of 5 essays the student could
write if there are 9 essays he has to do.
EXERCISE P13:
 A woman has a voucher to rent 3 DVDs. She has identified
10 DVDs that she wants to watch. How many different
groups of 3 DVDs could she rent?
EXERCISE P14:
 What is the probability of you winning the national
lottery?
EXERCISE P15:
 Reconsider P9 where a fair coin is tossed three times, and
the outcome (a head or tail) of throw is noted. What is the
probability that a head is shown on only one toss of the
coin?

 To use the Binomial Distribution:


 Let a success be:
 p=
 (1 – p) =
 n=
 x=
Verify with a Probability Tree
.5
P(H)=0
= 0 .5
H )
P( P(T)=0.
5
.5
= 0.
5 P(T)
=0.5 P(H)=0
)
P (H
P(T)=0.
5

.5
P(
T) P(H)=0
=0 .5
. 5 ) = 0
P( H P(T)=0.
5
P(T 5
)= 0 .5 P(H)=0.

P(T)=
0.5
EXERCISE P16:
 A manufacturer makes chips to go in mobile phones.
The machine used to make the chips is getting old,
and therefore, there is a 40% probability that a chip
made will be defective. The manufacturer makes a
batch of 6 chips. You are told that the binomial
distribution would be an appropriate probability
distribution to model this scenario.

 What is the probability that two chips are defective,


i.e., P(X = 2)
EXERCISE P16:
 To use the Binomial Distribution:
 Let a success be:
p=
 (1 – p) =
n=
x=
EXERCISE P16:
 Either 1 or 2 chips are defective
EXERCISE P16:
 No more than 5 chips are defective
Expected Value and Variance
 When using the binomial distribution:

 μ = np

 σ2 = np(1 - p)

 σ = np(1 - p)
EXERCISE P17:
 What is the expected value and variance of the number
of defective chips made in the sample for P16?
Poisson Distribution
 Used where we have an event that has two
complementary outcomes, but when we do not know
n or p
 We need to know the mean number of successes per
‘unit’, where a unit maybe time or number of items
made etc.
 The criteria of the Poisson distribution are that:
 There are two complementary events
 The probability of success is unknown, but
considered to be small
 The mean number of successes is known and fixed
EXERCISE P18: (taken from core text, page 205)
 Attendance records at a large factory show that on
average, there are seven absentees on any one day. What
is the probability that on a certain day, there will be eight
people absent?

 Is the Poisson appropriate?


 1.

 2.

 3.
Mathematical representation of the Poisson
Distribution
 The Poisson distribution can be generalised as
follows. To find the probability that a discrete
random variable (X) takes on a particular value (r) we
can find P(X=r) as follows:

P( X  r ) 
e m 
-m r

r!
 m is the mean number of successes per ‘unit’
 r is the number of successes
 e is a constant and approximately e = 2.71828
EXERCISE P19:
 Find the probability that there will be eight people
absent on a certain day for the example in P18.
EXERCISE P20:
 A nationwide energy company experiences 2 electricity
power failures any particular month.

 What is the probability of there being exactly 3 electricity


power failures next month?
EXERCISE P20:
 A nationwide energy company experiences 2 electricity
power failures any particular month.

 What is the probability of there being exactly 4 electricity


power failures next quarter?

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