0% found this document useful (0 votes)
5 views20 pages

Understanding Probability in Data Science

The document discusses the importance of probability in data science, emphasizing its role in modeling uncertainty and making informed predictions. It covers fundamental concepts such as experiments, outcomes, sample space, and various types of probability, along with rules for calculating probabilities. Additionally, it illustrates practical applications of probability in decision-making through examples related to student performance and dice rolls.

Uploaded by

jhaa009971
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views20 pages

Understanding Probability in Data Science

The document discusses the importance of probability in data science, emphasizing its role in modeling uncertainty and making informed predictions. It covers fundamental concepts such as experiments, outcomes, sample space, and various types of probability, along with rules for calculating probabilities. Additionally, it illustrates practical applications of probability in decision-making through examples related to student performance and dice rolls.

Uploaded by

jhaa009971
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Introduction to

Probability
Dr. Ankit Yadav
Assistant Professor
Department of Information Technology,
Delhi Technological University
Email: ankityadav@[Link]
Website: [Link]
Why Study Probability in Data Science?
“Probability provides a mathematical framework to deal with
uncertainty in data that is often incomplete, noisy, or influenced by
random factors.”

Probability helps to:


• Model uncertainty.
• Interpret data patterns.
• Estimate likelihoods for decision-making under incomplete
information.

Dr. Ankit Yadav (Dept. of IT, DTU)


Why Study Probability in Data Science?
• Data Science → Finds patterns and relationships from data.
• Probability → Quantifies the uncertainty of those patterns and
expresses them as likelihoods for future events.

• Example - Predicting whether a customer will buy a product after


seeing an online ad.
• Prediction without probability – Yes, the customer will buy OR No, the
customer will not buy.
• Prediction with probability – There is 80% chance that the customer will buy
this product.

Dr. Ankit Yadav (Dept. of IT, DTU)


Why Study Probability in Data Science?
• Predictions without probability gives Yes/No outcomes. Such
outcomes do not help in prioritizing actions.
• Predictions with probability gives the likelihood of an outcome.

Dr. Ankit Yadav (Dept. of IT, DTU)


Why Study Probability in Data Science?
Given: Number of hours Student ID Hours Studied Pass/Fail
studied by 10 students and S1 2 Fail
their pass or fail status.
S2 3 Fail
S3 4 Pass
Check if a new student who S4 4 Fail
studies for 4 hours will pass S5 5 Pass
or not?
S6 5 Pass
S7 6 Pass
S8 6 Pass
S9 6 Fail
S10of IT, DTU)
Dr. Ankit Yadav (Dept. 3 Fail
Why Study Probability in Data Science?
Prediction without Student ID Hours Studied Pass/Fail
probability S1 2 Fail
S2 3 Fail
Some students who studied S3 4 Pass
for 4 hours passed, so this S4 4 Fail
new student may also pass. S5 5 Pass
S6 5 Pass
S7 6 Pass
S8 6 Pass
S9 6 Fail
S10of IT, DTU)
Dr. Ankit Yadav (Dept. 3 Fail
Why Study Probability in Data Science?
Prediction with probability Student ID Hours Studied Pass/Fail
S1 2 Fail
• No of students who studied S2 3 Fail
for 4 hours = 2 S3 4 Pass
• No of students who studied S4 4 Fail
for 4 hours and passed = 1 S5 5 Pass
• Probability = 1/2 = 50% S6 5 Pass
There is 50% chance that S7 6 Pass
student may pass. S8 6 Pass
S9 6 Fail
S10of IT, DTU)
Dr. Ankit Yadav (Dept. 3 Fail
Why Study Probability in Data Science?
Prediction with probability Student ID Hours Studied Pass/Fail
S1 2 Fail
If student studies for 5 hours: S2 3 Fail
Pass Probability = 2/2 = 100% S3 4 Pass
S4 4 Fail
S5 5 Pass
By studying 5 hours instead of
4, the probability of passing is S6 5 Pass
100%. S7 6 Pass
S8 6 Pass
S9 6 Fail
S10of IT, DTU)
Dr. Ankit Yadav (Dept. 3 Fail
Definitions
• Experiment - A process with well-defined outcomes
• Example 1 – The tossing of a coin. Outcome can be heads or tails.
• Example 2 – The rolling of a dice. Outcomes – 1,2,3,4,5,6
• Example 3 – Drawing a card from a deck of cards – Outcome is any one of the
52 cards.
• Outcome – A possible result of an experiment (e.g., "Heads").
• Example 1 – Getting a “tails” when a coin is tossed.
• Example 2 - Getting a “5” when a dice is rolled.
• Example 3 – Getting an “ace” card, when drawn from a deck of card

Dr. Ankit Yadav (Dept. of IT, DTU)


Definitions
• Sample Space (S) – Set of all possible outcomes.
• For an experiment of a coin toss, the S = {Heads, Tails}
• For an experiment of a rolled dice, the S = {1,2,3,4,5,6}
• Event (E) – Any subset of the sample space.
• For a coin toss, E could be “getting heads”
• For a dice roll, E could be “getting 4” or “getting odd number”
• An event could be a SUBSET of S, NOT just any one outcome from S.

Dr. Ankit Yadav (Dept. of IT, DTU)


Definitions
• Equally Likely Events – All outcomes have the same probability (fair
dice, fair coin)
• Mutually Exclusive Events – Events that cannot occur simultaneously.
• Rolling a 2 and rolling a 5 on a single dice throw.
• Exhaustive Events – Together they cover the entire sample space.
• Rolling a dice to get an even number AND rolling a dice to get an odd number

Dr. Ankit Yadav (Dept. of IT, DTU)


Definitions
• Independent Events - Two events are independent if the occurrence
of one does not affect the probability of the other.
• Example - Tossing a coin and rolling a die
• Dependent Events - Two events are dependent if the occurrence of
one changes the probability of the other.
• Example – Drawing two red balls from a bag of 5 red balls and 4 blue balls.
Drawing the first ball as a red ball will change the probability of drawing a
second red ball from the bag.

Dr. Ankit Yadav (Dept. of IT, DTU)


What is Probability?

Dr. Ankit Yadav (Dept. of IT, DTU)


What is Probability?
Question: When a fair dice is rolled, what is the probability of getting
an odd number?

All possible outcomes = 1,2,3,4,5,6 = 6 possibilities


Favourable outcomes – 1,3,5 = 3 favourable possibilities
P(odd) = 3/6 = 0.5

Dr. Ankit Yadav (Dept. of IT, DTU)


Types of Probability
• Classical Probability – based on equally likely outcomes
• What is the probability of getting a “heads” if a fair coin is tossed?
• Empirical or Experimental Probability – based on past data or
experiments
• A coin was tossed 10 times and got 7 heads. Find the probability of the heads
obtained.
• Subjective Probability – based on personal judgement or belief
• What is the probability of India winning the cricket world cup according to
Sachin Tendulkar?

Dr. Ankit Yadav (Dept. of IT, DTU)


Key Difference Between Classical and
Experimental Probability
• Classical Probability assumes perfect fairness and infinite trials →
gives an exact value (0.5 for Head)
• Experimental Probability reflects what really happened in your trials.
It may differ from 0.5, especially with fewer tosses. As the number of
tosses increases, experimental probability tends to get closer to
classical probability (Law of Large Numbers).

Dr. Ankit Yadav (Dept. of IT, DTU)


Rules of Probability
• Complement Rule - 𝑃 𝐸ത = 1 − 𝑃 𝐸
• If 𝑃 𝑅𝑎𝑖𝑛 = 0.3 then 𝑃 𝑁𝑜 𝑅𝑎𝑖𝑛 = 1 − 0.3 = 0.7
• Addition Rule (General case) - 𝑃 𝐴 ∪ 𝐵 = 𝑃 𝐴 + 𝑃 𝐵 − 𝑃 𝐴 ∩ 𝐵
• Here, 𝑃 𝐴 ∪ 𝐵 = probability of A OR B
• Here, 𝑃 𝐴 ∩ 𝐵 = probability of A AND B
• Example, one card is drawn from a deck of cards, find the probability of card
being King or Hearts
• 𝑃 𝐾𝑖𝑛𝑔 ∪ 𝐻𝑒𝑎𝑟𝑡𝑠 = 𝑃 𝐾𝑖𝑛𝑔 + 𝑃 𝐻𝑒𝑎𝑟𝑡𝑠 − 𝑃 𝐾𝑖𝑛𝑔 ∩ 𝐻𝑒𝑎𝑟𝑡𝑠
• = 4/52 + 13/52 – 1/52 = 16/52 = 4/13

Dr. Ankit Yadav (Dept. of IT, DTU)


Rules of Probability
• Addition Rule (for Mutually Exclusive Events)
• Addition Rule for mutually exclusive events - 𝑃 𝐸𝑖𝑡ℎ𝑒𝑟 𝐴 𝑜𝑟 𝐵 𝑏𝑢𝑡 𝑛𝑜𝑡 𝑏𝑜𝑡ℎ
• For mutually exclusive events, 𝑃 𝐴 ∩ 𝐵 = 0
• Hence, 𝑃 𝐴 ∪ 𝐵 = 𝑃 𝐴 + 𝑃 𝐵
• 𝑃 𝐾𝑖𝑛𝑔 ∪ 𝐴𝑐𝑒 = 𝑃 𝐾𝑖𝑛𝑔 + 𝑃 𝐴𝑐𝑒 − 𝑃 𝐾𝑖𝑛𝑔 ∩ 𝐴𝑐𝑒
• = 4/52 + 4/52 – 0 = 8/52 = 2/13

Dr. Ankit Yadav (Dept. of IT, DTU)


Rules of Probability
• Multiplication Rule (for Independent Events)
• Example : Toss a coin and roll a fair die. Find the 𝑃 𝐻𝑒𝑎𝑑 𝑎𝑛𝑑 𝐺𝑒𝑡𝑡𝑖𝑛𝑔 𝑎 6
1
• 𝑃 𝐻𝑒𝑎𝑑 =
2
1
• 𝑃 𝐺𝑒𝑡𝑡𝑖𝑛𝑔 𝑎 6 =
6
1 1 1
• Since the events are independent, 𝑃 𝐻𝑒𝑎𝑑 𝑎𝑛𝑑 𝐺𝑒𝑡𝑡𝑖𝑛𝑔 𝑎 6 = × =
2 6 12

Dr. Ankit Yadav (Dept. of IT, DTU)


Rules of Probability
• Multiplication Rule (for Dependent Events)
• Example : A bag has 5 red balls and 3 blue balls. Two balls are drawn without
replacement. Find 𝑃 𝐵𝑜𝑡ℎ 𝑏𝑎𝑙𝑙𝑠 𝑎𝑟𝑒 𝑟𝑒𝑑
5
• 𝑃 𝐹𝑖𝑟𝑠𝑡 𝑏𝑎𝑙𝑙 𝑖𝑠 𝑟𝑒𝑑 =
8
4
• 𝑃 𝑆𝑒𝑐𝑜𝑛𝑑 𝑏𝑎𝑙𝑙 𝑖𝑠 𝑟𝑒𝑑 =
7
5 4 20 5
• Since the events are dependent, 𝑃 𝐵𝑜𝑡ℎ 𝑏𝑎𝑙𝑙𝑠 𝑎𝑟𝑒 𝑟𝑒𝑑 = × = =
8 7 56 14

Dr. Ankit Yadav (Dept. of IT, DTU)

You might also like