0% found this document useful (0 votes)
7 views

Lesson_06_Probability

Uploaded by

Anupam Swain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views

Lesson_06_Probability

Uploaded by

Anupam Swain
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 86

Statistics Essentials for Data Science

Probability
Learning Objectives

By the end of this lesson, you will be able to:

Understand the concepts of probability

Comprehend probability and its importance

Explain the key terms in probability and conditional probability

Identify the independent and dependent events

Explain the addition and multiplication theorems of probability

Understand the Bayes' theorem


Business Scenario

ABC manufactures light bulbs and contemplates adding a new plant in a


different state. This expansion holds the potential for increased product
output and higher profits.

However, this potential growth also brings risks. The new plant might fail to
generate sufficient profits to cover expansion and operational costs. Does
this expansion constitute a wise business move? What is the likelihood that
it will succeed?
Introduction to Probability and Its Importance
Discussion: Probability

Duration: 15 minutes
What does probability mean?
• How does probability play a role in decision-making?
• What are the key terms of probability?
Introduction to Probability

A probability is the chance or likelihood of an event occurring.

Examples:

Level of rainfall

Performance
of teams

Availability
of items

Time taken
for travel
Introduction to Probability

Probability is defined as the ratio of favorable outcomes to the total number of possible outcomes.

Mathematically, it is expressed as:


𝐹𝑎𝑣𝑜𝑟𝑎𝑏𝑙𝑒 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠
𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑖𝑡𝑦 =
𝑇𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑜𝑢𝑡𝑐𝑜𝑚𝑒𝑠

Example: Two coins are tossed simultaneously; what is the probability of getting two heads?
Favorable outcomes: {HH}
Total number of possible outcomes: Ω = {HT, TH, TT, HH}
Introduction to Probability

A probability space is a mathematical construct used to model random experiments or processes.

It consists of three components:

Sample space (Ω): The sample space, denoted by Ω, is the set of all possible outcomes
of a random experiment.

Events (A): An event is a subset of the sample space Ω. It represents a particular


outcome or a combination of outcomes that we are interested in.

Probability function (P): The probability function, denoted by P, assigns a numerical


value to each event in the sample space.
Importance of Probability

Probability is a powerful tool used to address uncertainty in planning and decision-making.

It helps us assess and forecast the outcome of a plan, be prepared, and act as the
situation and factors change.
Importance of Probability: Example

Example 1: Consider the case of a supplier who needs to decide on the optimal quantity of
items to maintain in inventory to avoid running out of stock.
Importance of Probability: Example

The supplier’s goal is to serve customers effectively so that they do not switch
to another supplier due to unavailability.

Past data indicates that the average


number of units sold is 80, but the sale
of these units is influenced by variable
factors.
Importance of Probability: Example

The supplier should stock more than 80 units.

Probability can help to statistically determine the appropriate number of units.


This approach incorporates a certain degree of uncertainty.
Importance of Probability: Example

Example 2: Pricing insurance policies

Insurance policies are priced after incorporating costs and the prospects of insurance claims.
Importance of Probability: Example

An extremely high price will deter customers from purchasing the insurance policy.

Low prices, on the other hand, will impact the financial performance of the firm.
Importance of Probability: Example

Probability can offer useful insights that help set the price when both variables are
considered and assessed.
Uses of Probability

Weather Forecasting: Probability helps to predict the weather by utilizing historical data and
probability techniques.
Uses of Probability

Health Insurance: Insurance companies use probability to determine the chances of a person's
death by studying their medical history, family history, and specific habits like smoking and
drinking.
Uses of Probability

Elections: Probability helps to predict which political party will rise to


power by closely studying the results of exit polls.
Key Terms in Probability
Key Terms in Probability

Occurrences are referred to as events, and probabilities are assigned to occurrences.

An even number will appear A card drawn at random from


when a dice is rolled. a deck of 52 cards is a spade.

Example

A resident in the
neighborhood owns a Lexus.

Often, two or more events are considered simultaneously in a study or an investigation.


Key Terms in Probability

The following are a few more key terms in probability:

Experiment: Outcome: Sample space: Probability


function:
It is a planned It is the result of an The list of all It is a function that
activity done under experiment. possible outcomes explains the
controlled settings. is called sample probability of an
space. outcome.
Relationship Between Events

In a study, the relationship between two or more events is considered.

The two important types of relationships are:

Mutually exhaustive or
Mutually exclusive
mutually inclusive
Mutually Exclusive

Events are said to be mutually exclusive if they cannot occur simultaneously.

Example:

The event that a card The event that a card


Mutually exclusive
drawn at random is a drawn at random is a
heart club
Mutually Exhaustive

Events are mutually exhaustive if at least one of the events will occur.

Example:

Rolling a six-sided dice

Event A: Getting an odd number Event B: Getting an even number


Approach of Probability

The various approaches of probability are:

Relative approach

Classical approach Subjective approach


Classical Approach

The probability of an event A, P(A), having n mutually exclusive and equally likely
outcomes with k implying outcomes is k/n.

Probability of drawing a club from a deck of 52


cards

13/52 = 1/4
Relative Approach

In the relative approach, probabilities are determined by considering the ratio of


favorable outcomes to the total number of possible outcomes.

Past data may be used instead of experimental trials.


Relative Approach

Example of relative approach:

Probability of a product being defective

Number of manufactured pieces: 1000

Number of defective pieces: 5

Probability: 0.005
Subjective Approach

Besides past experiences, the probability of events is estimated using the subjective judgment
of experts.

Probability of a customer purchasing different


brands

Subjective assessment of experts

Experts’ perception of consumer or market


research
Discussion

Duration: 15 minutes
What does probability mean?
• How does probability play a role in decision-making?
Answer: Probability plays a crucial role in decision-making by providing a
framework for assessing and quantifying uncertainty, such as risk
assessment, decision analysis, forecasting, and optimization.

• What are the key terms of probability?


Answer: Occurrences are referred to as events, and probabilities are
assigned to occurrences.
Conditional Probability
Discussion: Conditional Probability

Duration: 15 minutes
You are working in a weather forecast company, and you are supposed to
determine the weather based on the data you have.

To do so, determine the following:


• Conditional probability
• Dependent and independent events
Conditional Probability

Conditional probability refers to the probability of an event A occurring given that another
event B has occurred.

It is denoted by 𝑃(𝐴|𝐵), which is read as the probability of A given B.

Example:

For instance, when the rainfall in a particular year is low, the


probability of a normal yield of crops will also be lower.
Conditional Probability

Conditional probability and its formula explained with the help of Venn diagram:

Probability of A and B
𝑃(𝐴 ∩ 𝐵)

Conditional probability formula:

𝑃 𝐴∩𝐵
𝑃 𝐴|𝐵 =
𝑃(𝐵)

Probability that A occurs given


that B has occurred

𝑃(𝐴) 𝑃(𝐵)
Probability of A Probability of B
Calculating Conditional Probability

Example 1: Assuming that all cards are equally likely to be selected, draw one card at random
from a deck of 52 playing cards

Event A: Drawing a red card


Calculating Conditional Probability

There are 26 red cards (13 hearts and 13 diamonds) and 4 aces (one ace from each suit)
in the deck.

Event B: Drawing an ace

Only two aces are


red cards

Now, the conditional probability of drawing an ace (Event B) given that a red card (Event A) has
already been drawn is 2/26.
Calculating Conditional Probability

Example 2: A and B denote that a card drawn from a deck is a spade and that the
card is black.

The probability of A denotes that the card The probability of B denotes that the card
drawn from a deck is a spade. drawn from a deck is black.
𝑃 𝐴 = 13/52 𝑃 𝐵 = 26/52
Calculating Conditional Probability

Example 2: Calculate the probability of a card being a spade given that the card is black.

The formula of 𝑃 𝐴∩𝐵


𝑃 𝐴|𝐵 =
conditional probability: 𝑃(𝐵)

𝑃 𝐴∩𝐵
𝑃(𝐴|𝐵) =
𝑃(𝐵)
13 13 26
𝑃(𝐴 ∩ 𝐵) = = ÷
52 52 52
1
=
2
Uses of Conditional Probability

Example 1: Results of a market research survey on a new product launch

Disappointing results Favorable results


Imply a low probability of the Imply a high probability of the
product being a hit in the market product being a hit in the market
Discussion

Duration: 15 minutes
You are working for a weather forecast company, and you are supposed to
determine the weather based on the data you have. To do so, determine the
following:
• Conditional probability
Answer: The likelihood of an event depends on the occurrence of related
events. The possibility of an event is determined by incorporating
relevant information.
• Dependent and independent events
Answer: Two events are independent if the occurrence or non-occurrence of
one event does not impact the other.
Independent and Dependent Events
Independent and Dependent Events

The properties of the interaction of two or more events are classified under two types :

Independent events: Two events are considered independent if the occurrence of one event does not
affect the probability of the other event occurring.

Dependent events: Two events are considered dependent if the occurrence of one event affects
the probability of the other event occurring.
Independent Events

Example: Consider an example of rolling a fair dice

3 1
Event C: The number appearing is odd 𝑃 𝐶 = =
6 2

Event D: The number appearing is a 2 1


𝑃 𝐷 = =
multiple of 3 6 3

𝐶 𝑎𝑛𝑑 𝐷: The number appearing is 1


𝑃(𝐶 ∩ 𝐷) =
odd and a multiple of 3 6
Independent Events

By using the conditional probability formula, the influence of the occurrence of D on the
occurrence of C can be validated:

1
𝑃 𝐶∩𝐷
𝑃 𝐶|𝐷 = = 6
𝑃 𝐷 1
3

1
𝑃(𝐶|𝐷) =
2

The result shows that the occurrence of event D has not affected the probability of
the occurrence of event C. Thus, P(C|D) = P(C).
Dependent Event

Example: Draw two cards uniformly at random from a deck of 52 cards, without replacement

Event A: Drawing a king on the first


draw

4
𝑃(𝐴) =
52
Dependent Event

After the first draw, there are 51 cards left in the deck, including three kings. One king
has already been drawn.

Event B: Drawing a king on the second


draw given that one king has already
been drawn

3
𝑃(𝐵/𝐴) =
51
Dependent Event

Since the events are dependent, probability of the second event depends on the
outcome of the first draw.

4 3
𝑃(𝐴 ∩ 𝐵) = 𝑃 𝐴 ∗ 𝑃 𝐵|𝐴 = ∗
52 51
Complement of an Event

The complement of an event A (𝐴𝑐 )consists of all outcomes in the sample space that are
not part of event A.

𝒄
𝑨

P(Ac) = 1 – P(A)
Addition Theorem of Probability
Addition Theorem of Probability

The addition theorem states that if 𝐴1 ,𝐴2 ...,𝐴𝑗 …up to 𝐴𝑛 are n mutually exclusive events:

Then, the probability that at least one event of these will occur is the sum of their
probabilities, as shown below:

𝑃 𝐴1 ∪ 𝐴2 ∪ 𝐴3 ∪ … . .∪ 𝐴𝑛 = 𝑃 𝐴1 + 𝑃 𝐴2 + 𝑃 𝐴3 + ⋯ + 𝑃(𝐴𝑛 )
Addition Theorem of Probability

When A and B are two events that are not necessarily mutually exclusive, then:

𝑷 𝑨 ∪ 𝑩 = 𝑷 𝑨 + 𝑷 𝑩 − 𝑷(𝑨 ∩ 𝑩)

𝑨∪𝑩 All elements that belong to either A or B

𝑨∩𝑩 All elements that belong to both A and B


Addition Theorem: Example

A newspaper vendor delivers two newspapers, X and Y, to houses in a big city.

Newspaper X Newspaper Y
Addition Theorem: Example

80% of the houses are the vendor's customers.

80% (Houses)

60% (Paper X) 𝑩𝒐𝒕𝒉 𝑿 𝒂𝒏𝒅 𝒀 45% (Paper Y)

Determine the percentage of houses that buy both X and Y


Addition Theorem: Example

Event A: Houses that Event B: Houses that


receive paper X receive paper Y

Given:

𝑃 𝐴 = 0.6

𝑃 𝐵 = 0.45

𝑃 𝐴 ∪ 𝐵 = 0.8
Addition Theorem: Example

When A and B are two events that are not necessarily mutually exclusive, then:

𝑃 𝐴 ∪ 𝐵 = 𝑃 𝐴 + 𝑃 𝐵 − 𝑃(𝐴 ∩ 𝐵)

Substituting the values:

0.8 = 0.6 + 0.45 − 𝑃(𝐴 ∩ 𝐵)

𝑃 𝐴 ∩ 𝐵 = 0.25

The result shows that 25% of the houses receive


both newspapers.
Multiplication Theorem of Probability
Multiplication Theorem of Probability

It states that for two dependent events, A and B, the probability of A and B is equal to the probability of
𝐴/𝐵 multiplied by the probability of B.

𝑃 𝐴 ∩ 𝐵 = 𝑃 𝐴|𝐵 ∗ 𝑃 𝐵

Dependent A∩B
A B
events

B
Multiplication Theorem of Probability

When A and B are independent events, the probability of simultaneous occurrence of both A
and B is the product of the two probabilities.

𝑃 𝐴∩𝐵 = 𝑃 𝐴 ∗𝑃 𝐵

Independent
A B
events

This is true since 𝑃 𝐴|𝐵 = 𝑃(𝐴) for independent events.


Multiplication Theorem of Probability

Generally, for n independent events, the probability that all the events occur is the product
of their probabilities.

𝐴1 , 𝐴2 ,... 𝐴𝑗 …up to 𝐴𝑛 n independent events

𝑃 𝐴1 ∩ 𝐴2 ∩ 𝐴3 ∩ … . .∩ 𝐴𝑛 = 𝑃 𝐴1 ∗ 𝑃 𝐴2 ∗ 𝑃 𝐴3 ∗ ⋯ ∗ 𝑃(𝐴𝑛 )
Multiplication Theorem

Example: Components of an electronic system

An electronic system consists of four components of identical functionality.

All are independent machine components.

The system becomes dysfunctional only when all its components are dysfunctional.
The functionality of each component is independent of the other.
Multiplication Theorem: Example

The probability that a component is functional during the warranty period is independent of
the others and is 0.9.

Probability that a component is functional = 0.9

What is the probability that the system will be functional during the warranty period?
Multiplication Theorem: Example

𝐴𝑗 denotes the event that component j is functional.

𝑃 𝐴𝑗 = 0.9

j = 1 to 4

𝑃 𝐴𝑗𝑐 = 1 − 0.9 = 0.1

𝑃 𝐴𝑗𝑐 =Probability that a component j is dysfunctional.


Multiplication Theorem: Example

Probability of the system being dysfunctional

Probability that all components fail = 𝑃 𝐴1𝑐 ∗ 𝑃 𝐴𝑐2 ∗ 𝑃 𝐴𝑐3 ∗ 𝑃(𝐴𝑐4 )

= 0.1 ∗ 0.1 ∗ 0.1 ∗ 0.1 = 0.0001

The probability of the system being functional = 1- 0.0001 = 0.9999


Bayes' Theorem
Bayes' Theorem with an Example

A company is ready to launch a new product and wants to determine the probability of its
success in the market.
Bayes' Theorem with an Example

From the past data, the company knows the probabilities that a product will be:

Success Disaster Neither


Bayes' Theorem with an Example

The company also knows the probability of a favorable outcome from a market
research survey in each of the three cases.

Success Disaster Neither


Bayes' Theorem with an Example

The company would now like to know the revised probabilities of each outcome when the
market research survey has projected a favorable outcome.

Revised probability of favorable outcomes

Success Disaster Neither


Bayes' Theorem

Consider 𝐴1 , 𝐴2 ,... 𝐴𝑗 …up to 𝐴𝑛 are mutually exclusive events with known probabilities

A1 A2 Aj An
………

Consider B is another event, and the probability of 𝑃(𝐵/𝐴𝑗 ) for (j= 1 to n) is also
known
Bayes' Theorem

Bayes’ theorem states that the probability of Ak and B is the ratio of the simultaneous
probability of Ak and B to the probability of B.

𝑃(𝐵|𝐴𝑘 ) *𝑃(𝐴𝑘 ) 𝑃(𝐵 ∩ 𝐴𝑘 )


𝑃(𝐴𝑘 |𝐵) = k = 1 to n
=
σ𝑛𝑗=1 𝐵 ∩ 𝐴𝑗
𝐵
σ𝑛𝑗=1 𝑃 ∗ 𝑃(𝐴𝑗 )
𝐴𝑗

The denominator is 𝑃(𝐵)


Bayes' Theorem

The probability of 𝐴1 ,probability of 𝐴2 ,…,probability of 𝐴𝑗 until the probability of 𝐴𝑛 is called


prior probabilities.

𝑃(𝐴1 ) 𝑃(𝐴2 ) 𝑃(𝐴𝑗 ) 𝑃(𝐴𝑛 )

………… …………

The probability of 𝑃(𝐴1 |𝐵), probability of 𝑃(𝐴𝑗 |𝐵) until the probability of 𝑃(𝐴𝑛 |𝐵) is called
posterior probabilities.

𝑃(𝐴1 |𝐵) 𝑃(𝐴2 |𝐵) 𝑃(𝐴𝑗 |𝐵) 𝑃(𝐴𝑛 |𝐵)


………… …………
Bayes' Theorem with an Example

Example: Success of a new product in the market

Consider three events 𝐴1 ,𝐴2 ,and 𝐴3 with probabilities 0.6, 0.1, and 0.3.
Suppose B is another event and the probability of (𝐵|𝐴1 ) ,(𝐵|𝐴2 ) ,and (𝐵|𝐴3 ) are 0.75, 0.1, and 0.4

𝑃(𝐴1 ) 0.6 𝑃(𝐵|𝐴1 ) 0.75

𝑃(𝐴2 ) 0.1 𝑃(𝐵|𝐴2 ) 0.1

𝑃(𝐴3 ) 0.3 𝑃(𝐵|𝐴3 ) 0.4


Bayes' Theorem with an Example

Apply the formula and get the following values:

σ𝑛𝑗=1 𝑃 𝐵|𝐴𝑗 ∗ 𝑃(𝐴𝑗 )

= 0.75 ∗ 0.6 + 0.1 ∗ 0.1 + 0.4 ∗ 0.3


= 0.45 + 0.01 + 0.12
= 0.58
Bayes' Theorem with an Example

The value of revised probabilities of each outcome is given as:

𝑷(𝑨𝟏 /𝑩) 𝑷(𝑨𝟐 /𝑩) 𝑷(𝑨𝟑 /𝑩)

0.45 0.01 0.12


= = =
0.58 0.58 0.58

= 0.78 = 0.02 = 0.21


Bayes' Theorem with an Example

𝐴1 ,𝐴2 ,and 𝐴3 denote the events of the product being a success, a disaster, or neither of them. B
denotes the event of the market survey which predicted a favorable result.

Success Disaster Neither

A1 A2 A3

Prior
probabilities 0.6 0.1 0.3

Posterior
0.78 0.02 0.21
probabilities
Bayes' Theorem with an Example

The results show that the market research survey improves outcomes and serves as a guide
for decision-making.
Key Takeaways

The key concepts in probability include the classical approach, the


relative frequency approach, and the subjective approach.

The likelihood of the occurrence of an event may be revised based


on the occurrence or nonoccurrence of related events. This is
known as conditional probability.

Independent and dependent events are the forms of interaction of


two or more events.
Knowledge Check
Knowledge
Check In which approach is the probability of an event A, P(A), in n mutually exclusive and
1 equally likely outcomes with k implying the outcome k/n?

A. Classic approach

B. Relative approach

C. Relative frequency approach

D. Subjective approach
Knowledge
Check In which approach is the probability of an event A, P(A), in n mutually exclusive and
1 equally likely outcomes with k implying the outcome k/n?

A. Classic approach

B. Relative approach

C. Relative frequency approach

D. Subjective approach

The correct answer is A

In the classic approach, the probability of an event A, P(A), in n mutually exclusive and equally likely
outcomes with k implying the outcome is k/n.
Knowledge
Check
___________________ events cannot occur simultaneously.
2

A. Mutually exclusive

B. Mutually exhaustive

C. Both A and B

D. None of the above


Knowledge
Check
___________________ events cannot occur simultaneously.
2

A. Mutually exclusive

B. Mutually exhaustive

C. Both A and B

D. None of the above

The correct answer is A

Mutually exclusive events cannot occur simultaneously.


Knowledge
Check Which of the following theorems states that for two dependent events, A and B, the 𝑷(𝑨
3 ∩ 𝑩) is equal to the 𝑷(𝑨/𝑩) multiplied by the 𝑷 𝑩 ?

A. Additional theorem

B. Multiplication theorem of probability

C. Bayes' theorem

D. None of the above


Knowledge
Check Which of the following theorems states that for two dependent events, A and B, the 𝑷(𝑨
3 ∩ 𝑩) is equal to the 𝑷(𝑨/𝑩) multiplied by the 𝑷 𝑩 ?

A. Additional theorem

B. Multiplication theorem of probability

C. Bayes' theorem

D. None of the above

The correct answer is B

The multiplication theorem of probability states that for two events, A and B, the probability of A and
B is equal to the probability of A|B multiplied by the probability of B.
Thank You

You might also like