SlideShare a Scribd company logo
Probability and Statistics
Week 1
Sample Space, Events, Counting Sample points, Probability of an Event
Dr. Ferdin Joe John Joseph
Join Canvas Portal
https://canvas.instructure.com/enroll/CTA4JH
2
Grade Spit
3
Attendance
10%
Mid Term
30%
Final Exam
40%
Assignments
20%
PERCENTAGE
Grade Criteria
Score Grade
85 – 100 A
75 – 84 B+
70 – 74 B
65 – 69 C+
60 – 64 C
55 – 59 D+
50 – 54 D
<50 F
4
Machine Learning
Machine Learning is an interdisciplinary field in Data Science that uses
• statistics
• probability
• algorithms
to learn from data and provide insights which can be used to build
intelligent applications.
5
From MSE - 202 Learn
6
From MSE - 202 Learn
7
Probability in Real Life
8
Probability in Real Life
9
Probability in Real Life
10
Probability in Real Life
11
Probability for Data Science
•Probability deals with predicting the likelihood of
future events, while statistics involves the
analysis of the frequency of past events.
12
Terminologies
• Sample Space
• Event
• Counting Sample Points
• Probability of an Event
13
Event
• An event is a set of outcomes of an experiment to which a probability
is assigned.
• E represents event
• P(E) is the probability that the event E occur.
• A situation where E might happen (success) or might not happen
(failure) is called a trial.
14
Event
• Tossing a coin
15
Event
• Rolling dice
16
Event
• Pulling colored ball out of the bag
17
Random Variable
• The variable that represents the outcome of an events is called a
random variable.
• Eg. Getting head or tail in tossing a coin
18
Random variable in tossing a coin
• If we toss a coin, the chances for getting head or tail is 50-50
• The probability of getting head or tail is ½ or 50%
• Random variable range between 0 and 1
19
Empirical Probability
• Also known as practical probability
• It is the number of times the event occurs divided by the total
number of incidents observed.
• If for ‘n’ trials and we observe ‘s’ successes, the probability of success
is s/n.
• Toss a coin 4 times. The outcome is H, H, H, T
• P(Head) =3/4=0.75
• P(Tail)=1/4=0.25
20
Theoretical probability
• The number of ways the particular event can occur divided by the
total number of possible outcomes.
• A head can occur once and possible outcomes are two (head, tail).
The true (theoretical) probability of a head is 1/2.
21
Exercise 1
A die is rolled, find the probability that an even number is obtained.
22
Exercise 1
A die is rolled, find the probability that an even number is obtained.
Solution:
Let us first write the sample space S of the experiment.
S = {1,2,3,4,5,6}
Let E be the event "an even number is obtained" and write it down.
E = {2,4,6}
We now use the formula of the classical probability.
P(E) = n(E) / n(S) = 3 / 6 = 1 / 2
23
Exercise 2
Two coins are tossed, find the probability that two heads are obtained.
Note: Each coin has two possible outcomes H (heads) and T (Tails).
24
Exercise 2
Two coins are tossed, find the probability that two heads are obtained.
Note: Each coin has two possible outcomes H (heads) and T (Tails).
The sample space S is given by.
S = {(H,T),(H,H),(T,H),(T,T)}
Let E be the event "two heads are obtained".
E = {(H,H)}
We use the formula of the classical probability.
P(E) = n(E) / n(S) = 1 / 4
25
Exercise 3
A card is drawn at random from a deck of cards. Find the probability of
getting the 3 of diamond.
26
Exercise 3
A card is drawn at random from a deck of cards. Find the probability of
getting the 3 of diamond.
The sample space S of the experiment in question 6 is shown below
27
Exercise 3
A card is drawn at random from a deck of cards. Find the probability of
getting the 3 of diamond.
28
Exercise 3
A card is drawn at random from a deck of cards. Find the probability of
getting the 3 of diamond.
Let E be the event "getting the 3 of diamond". An examination of the
sample space shows that there is one "3 of diamond" so that n(E) = 1
and n(S) = 52. Hence the probability of event E occurring is given by
P(E) = 1 / 52
29
Exercise 4
The blood groups of 200 people is distributed as follows:
50 have type A blood,
65 have B blood type,
70 have O blood type and
15 have type AB blood.
If a person from this group is selected at random, what is the
probability that this person has O blood type?
30
Exercise 4
We construct a table of frequencies for the the blood groups as follows
group frequency
A 50
B 65
O 70
AB 15
We use the empirical formula of the probability
P(E) = Frequency for O blood / Total frequencies
= 70 / 200 = 0.35
31
Classwork 1
What is the probability of throwing one dice and getting the number
greater than 4 ?
32
Classwork 2
The customer wants to buy a bread and a can. There are 30 pieces of
bread in the shop, including 5 from the previous day, and 20 cans with
unreadable expiration date, of which one has expired. What is the
probability that the customer will buy a fresh bread and a tin under
warranty ?
33
Classwork 3
What is the probability that if we choose a trinity from 19 boys and 12
girls, we will have :
a) three boys
b) three girls
c) two boys and one girl ?
34
35
Types of Events
• Independent
• Mutually Exclusive
36
Independent Events
• Two or more events not having control over the outcome of the
others.
37
Mutually Exclusive Events
• If two events are NOT independent, then we say that they are dependent.
• Sampling may be done with replacement or without replacement.
• With replacement: If each member of a population is replaced after it is
picked, then that member has the possibility of being chosen more than
once. When sampling is done with replacement, then events are
considered to be independent, meaning the result of the first pick will not
change the probabilities for the second pick.
• Without replacement: When sampling is done without replacement, each
member of a population may be chosen only once. In this case, the
probabilities for the second pick are affected by the result of the first pick.
The events are considered to be dependent or not independent.
38
Sampling with replacement
• Suppose you pick three cards with replacement. The first card you
pick out of the 52 cards is the
• Q of spades. You put this card back, reshuffle the cards and pick a
second card from the 52-card deck. It is the ten of clubs. You put this
card back, reshuffle the cards and pick a third card from the 52-card
deck. This time, the card is the Q of spades again. Your picks are {Q of
spades, ten of clubs, Q of spades}. You have picked the Q of spades
twice. You pick each card from the 52-card deck.
39
Sampling without replacement
• Suppose you pick three cards without replacement. The first card you
pick out of the 52 cards is the
• K of hearts. You put this card aside and pick the second card from the
51 cards remaining in the deck. It is the three of diamonds. You put
this card aside and pick the third card from the remaining 50 cards in
the deck. The third card is the J of spades. Your picks are {K of hearts,
three of diamonds, J of spades}. Because you have picked the cards
without replacement, you cannot pick the same card twice.
40
Probability Distribution
• A probability distribution is a list of all of the possible outcomes of a
random variable along with their corresponding probability values.
41
Probability usage in programming
42
Probability usage in programming
43
# generate random floating point values
from random import seed
from random import random
# seed random number generator
seed(1)
# generate random numbers between 0-1
for _ in range(10):
value = random()
print(value)
Probability usage in programming
44
# generate random integer values
from random import seed
from random import randint
# seed random number generator
seed(1)
# generate some integers
for _ in range(10):
value = randint(0, 10)
print(value)
Probability usage in programming
45
# choose a random element from a list
from random import seed
from random import choice
# seed random number generator
seed(1)
# prepare a sequence
sequence = [i for i in range(20)]
print(sequence)
# make choices from the sequence
for _ in range(5):
selection = choice(sequence)
print(selection)
Probability usage in programming
46
# randomly shuffle a sequence
from random import seed
from random import shuffle
# seed random number generator
seed(1)
# prepare a sequence
sequence = [i for i in range(20)]
print(sequence)
# randomly shuffle the sequence
shuffle(sequence)
print(sequence)
Slides Available in link below
www.slideshare.net/ferdinjoe
47
48

More Related Content

What's hot

1.1 mean, variance and standard deviation
1.1 mean, variance and standard deviation1.1 mean, variance and standard deviation
1.1 mean, variance and standard deviation
ONE Virtual Services
 
Probability of an Event.pptx
Probability of an Event.pptxProbability of an Event.pptx
Probability of an Event.pptx
Ces Joanne Fajarito
 
Basic Probability
Basic Probability Basic Probability
Basic Probability
kaurab
 
Probability(mutually exclusive events)
Probability(mutually exclusive events)Probability(mutually exclusive events)
Probability(mutually exclusive events)
Nadeem Uddin
 
Mean, variance, and standard deviation of a Discrete Random Variable
Mean, variance, and standard deviation of a Discrete Random VariableMean, variance, and standard deviation of a Discrete Random Variable
Mean, variance, and standard deviation of a Discrete Random Variable
Michael Ogoy
 
INTERPRETING MEASURE OF POSITION.pptx
INTERPRETING MEASURE OF POSITION.pptxINTERPRETING MEASURE OF POSITION.pptx
INTERPRETING MEASURE OF POSITION.pptx
HannahSheena
 
Union and intersection of events (math 10)
Union and intersection of events (math 10)Union and intersection of events (math 10)
Union and intersection of events (math 10)
Damone Odrale
 
Mean for Ungrouped Data
Mean for Ungrouped DataMean for Ungrouped Data
Mean for Ungrouped Data
Lorie Jane Letada
 
Introduction of Probability
Introduction of ProbabilityIntroduction of Probability
Introduction of Probability
rey castro
 
Lesson 1 practical research 1
Lesson 1 practical research 1Lesson 1 practical research 1
Lesson 1 practical research 1
Melody01082019
 
4th quarter-math-10
4th quarter-math-104th quarter-math-10
4th quarter-math-10
klyejester082180
 
Probability of Union of Two events
Probability of Union of Two eventsProbability of Union of Two events
Probability of Union of Two events
JAYHARYLPESALBON1
 
Statistics and probability lesson 4
Statistics and probability lesson 4Statistics and probability lesson 4
Statistics and probability lesson 4
MARIA CHRISTITA POLINAG
 
Chapter 1 random variables and probability distributions
Chapter 1   random variables and probability distributionsChapter 1   random variables and probability distributions
Chapter 1 random variables and probability distributions
Antonio F. Balatar Jr.
 
Independent and dependent events notes
Independent and dependent events notesIndependent and dependent events notes
Independent and dependent events notes
RDemolina
 
Final exam-in-practical-research-2-2nd (1)
Final exam-in-practical-research-2-2nd (1)Final exam-in-practical-research-2-2nd (1)
Final exam-in-practical-research-2-2nd (1)
Elsa Terre
 
G10 Math Q3- Week 7- Probability of Union of Two Events.ppt
G10 Math Q3- Week 7- Probability of Union of Two Events.pptG10 Math Q3- Week 7- Probability of Union of Two Events.ppt
G10 Math Q3- Week 7- Probability of Union of Two Events.ppt
CheJavier
 
CABT SHS Statistics & Probability - The Standard Normal Distribution
CABT SHS Statistics & Probability - The Standard Normal DistributionCABT SHS Statistics & Probability - The Standard Normal Distribution
CABT SHS Statistics & Probability - The Standard Normal Distribution
Gilbert Joseph Abueg
 
Discrete Probability Distributions
Discrete Probability DistributionsDiscrete Probability Distributions
Discrete Probability Distributionsmandalina landy
 
Counting Technique, Permutation, Combination
Counting Technique, Permutation, CombinationCounting Technique, Permutation, Combination
Counting Technique, Permutation, CombinationChie Pegollo
 

What's hot (20)

1.1 mean, variance and standard deviation
1.1 mean, variance and standard deviation1.1 mean, variance and standard deviation
1.1 mean, variance and standard deviation
 
Probability of an Event.pptx
Probability of an Event.pptxProbability of an Event.pptx
Probability of an Event.pptx
 
Basic Probability
Basic Probability Basic Probability
Basic Probability
 
Probability(mutually exclusive events)
Probability(mutually exclusive events)Probability(mutually exclusive events)
Probability(mutually exclusive events)
 
Mean, variance, and standard deviation of a Discrete Random Variable
Mean, variance, and standard deviation of a Discrete Random VariableMean, variance, and standard deviation of a Discrete Random Variable
Mean, variance, and standard deviation of a Discrete Random Variable
 
INTERPRETING MEASURE OF POSITION.pptx
INTERPRETING MEASURE OF POSITION.pptxINTERPRETING MEASURE OF POSITION.pptx
INTERPRETING MEASURE OF POSITION.pptx
 
Union and intersection of events (math 10)
Union and intersection of events (math 10)Union and intersection of events (math 10)
Union and intersection of events (math 10)
 
Mean for Ungrouped Data
Mean for Ungrouped DataMean for Ungrouped Data
Mean for Ungrouped Data
 
Introduction of Probability
Introduction of ProbabilityIntroduction of Probability
Introduction of Probability
 
Lesson 1 practical research 1
Lesson 1 practical research 1Lesson 1 practical research 1
Lesson 1 practical research 1
 
4th quarter-math-10
4th quarter-math-104th quarter-math-10
4th quarter-math-10
 
Probability of Union of Two events
Probability of Union of Two eventsProbability of Union of Two events
Probability of Union of Two events
 
Statistics and probability lesson 4
Statistics and probability lesson 4Statistics and probability lesson 4
Statistics and probability lesson 4
 
Chapter 1 random variables and probability distributions
Chapter 1   random variables and probability distributionsChapter 1   random variables and probability distributions
Chapter 1 random variables and probability distributions
 
Independent and dependent events notes
Independent and dependent events notesIndependent and dependent events notes
Independent and dependent events notes
 
Final exam-in-practical-research-2-2nd (1)
Final exam-in-practical-research-2-2nd (1)Final exam-in-practical-research-2-2nd (1)
Final exam-in-practical-research-2-2nd (1)
 
G10 Math Q3- Week 7- Probability of Union of Two Events.ppt
G10 Math Q3- Week 7- Probability of Union of Two Events.pptG10 Math Q3- Week 7- Probability of Union of Two Events.ppt
G10 Math Q3- Week 7- Probability of Union of Two Events.ppt
 
CABT SHS Statistics & Probability - The Standard Normal Distribution
CABT SHS Statistics & Probability - The Standard Normal DistributionCABT SHS Statistics & Probability - The Standard Normal Distribution
CABT SHS Statistics & Probability - The Standard Normal Distribution
 
Discrete Probability Distributions
Discrete Probability DistributionsDiscrete Probability Distributions
Discrete Probability Distributions
 
Counting Technique, Permutation, Combination
Counting Technique, Permutation, CombinationCounting Technique, Permutation, Combination
Counting Technique, Permutation, Combination
 

Similar to Probability and Statistics - Week 1

Probability Theory for Data Scientists
Probability Theory for Data ScientistsProbability Theory for Data Scientists
Probability Theory for Data Scientists
Ferdin Joe John Joseph PhD
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
JoseMangaJr1
 
1 - Probabilty Introduction .ppt
1 - Probabilty Introduction .ppt1 - Probabilty Introduction .ppt
1 - Probabilty Introduction .ppt
Vivek Bhartiya
 
probability
probabilityprobability
probability
Unsa Shakir
 
probability.pptx
probability.pptxprobability.pptx
probability.pptx
AqeelRahman9
 
lesson4-intrduction to probability grade10
lesson4-intrduction to probability grade10lesson4-intrduction to probability grade10
lesson4-intrduction to probability grade10
CharlesIanVArnado
 
Intro to probability
Intro to probabilityIntro to probability
Intro to probability
getyourcheaton
 
Probability
ProbabilityProbability
Probability
Atiq Rehman
 
SAMPLE SPACES and PROBABILITY (3).pptx
SAMPLE SPACES and PROBABILITY (3).pptxSAMPLE SPACES and PROBABILITY (3).pptx
SAMPLE SPACES and PROBABILITY (3).pptx
victormiralles2
 
4.1-4.2 Sample Spaces and Probability
4.1-4.2 Sample Spaces and Probability4.1-4.2 Sample Spaces and Probability
4.1-4.2 Sample Spaces and Probability
mlong24
 
PPT8.ppt
PPT8.pptPPT8.ppt
Lecture Notes MTH302 Before MTT Myers.docx
Lecture Notes MTH302 Before MTT Myers.docxLecture Notes MTH302 Before MTT Myers.docx
Lecture Notes MTH302 Before MTT Myers.docx
RaghavaReddy449756
 
PROBABILITY THEORIES.pptx
PROBABILITY THEORIES.pptxPROBABILITY THEORIES.pptx
PROBABILITY THEORIES.pptx
MarcJoshuaGorospe
 
5Enote5.ppt
5Enote5.ppt5Enote5.ppt
5Enote5.ppt
YashKumarPrasad1
 
5Enote5.ppt
5Enote5.ppt5Enote5.ppt
5Enote5.ppt
JosephMuez2
 
Chapter7ppt.pdf
Chapter7ppt.pdfChapter7ppt.pdf
Chapter7ppt.pdf
SohailBhatti21
 
Probablity
ProbablityProbablity
5. probability qt 1st tri semester
5. probability qt 1st tri semester 5. probability qt 1st tri semester
5. probability qt 1st tri semester
Karan Kukreja
 
Probability.ppt
Probability.pptProbability.ppt
Probability.ppt
UmairShahzad42
 
powerpoints probability.pptx
powerpoints probability.pptxpowerpoints probability.pptx
powerpoints probability.pptx
carrie mixto
 

Similar to Probability and Statistics - Week 1 (20)

Probability Theory for Data Scientists
Probability Theory for Data ScientistsProbability Theory for Data Scientists
Probability Theory for Data Scientists
 
Probability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter LessonsProbability Grade 10 Third Quarter Lessons
Probability Grade 10 Third Quarter Lessons
 
1 - Probabilty Introduction .ppt
1 - Probabilty Introduction .ppt1 - Probabilty Introduction .ppt
1 - Probabilty Introduction .ppt
 
probability
probabilityprobability
probability
 
probability.pptx
probability.pptxprobability.pptx
probability.pptx
 
lesson4-intrduction to probability grade10
lesson4-intrduction to probability grade10lesson4-intrduction to probability grade10
lesson4-intrduction to probability grade10
 
Intro to probability
Intro to probabilityIntro to probability
Intro to probability
 
Probability
ProbabilityProbability
Probability
 
SAMPLE SPACES and PROBABILITY (3).pptx
SAMPLE SPACES and PROBABILITY (3).pptxSAMPLE SPACES and PROBABILITY (3).pptx
SAMPLE SPACES and PROBABILITY (3).pptx
 
4.1-4.2 Sample Spaces and Probability
4.1-4.2 Sample Spaces and Probability4.1-4.2 Sample Spaces and Probability
4.1-4.2 Sample Spaces and Probability
 
PPT8.ppt
PPT8.pptPPT8.ppt
PPT8.ppt
 
Lecture Notes MTH302 Before MTT Myers.docx
Lecture Notes MTH302 Before MTT Myers.docxLecture Notes MTH302 Before MTT Myers.docx
Lecture Notes MTH302 Before MTT Myers.docx
 
PROBABILITY THEORIES.pptx
PROBABILITY THEORIES.pptxPROBABILITY THEORIES.pptx
PROBABILITY THEORIES.pptx
 
5Enote5.ppt
5Enote5.ppt5Enote5.ppt
5Enote5.ppt
 
5Enote5.ppt
5Enote5.ppt5Enote5.ppt
5Enote5.ppt
 
Chapter7ppt.pdf
Chapter7ppt.pdfChapter7ppt.pdf
Chapter7ppt.pdf
 
Probablity
ProbablityProbablity
Probablity
 
5. probability qt 1st tri semester
5. probability qt 1st tri semester 5. probability qt 1st tri semester
5. probability qt 1st tri semester
 
Probability.ppt
Probability.pptProbability.ppt
Probability.ppt
 
powerpoints probability.pptx
powerpoints probability.pptxpowerpoints probability.pptx
powerpoints probability.pptx
 

More from Ferdin Joe John Joseph PhD

Invited Talk DGTiCon 2022
Invited Talk DGTiCon 2022Invited Talk DGTiCon 2022
Invited Talk DGTiCon 2022
Ferdin Joe John Joseph PhD
 
Week 12: Cloud AI- DSA 441 Cloud Computing
Week 12: Cloud AI- DSA 441 Cloud ComputingWeek 12: Cloud AI- DSA 441 Cloud Computing
Week 12: Cloud AI- DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 11: Cloud Native- DSA 441 Cloud Computing
Week 11: Cloud Native- DSA 441 Cloud ComputingWeek 11: Cloud Native- DSA 441 Cloud Computing
Week 11: Cloud Native- DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 10: Cloud Security- DSA 441 Cloud Computing
Week 10: Cloud Security- DSA 441 Cloud ComputingWeek 10: Cloud Security- DSA 441 Cloud Computing
Week 10: Cloud Security- DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud ComputingWeek 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud ComputingWeek 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Ferdin Joe John Joseph PhD
 
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Ferdin Joe John Joseph PhD
 
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud ComputingWeek 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Ferdin Joe John Joseph PhD
 
Week 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Week 2: Virtualization and VM Ware - DSA 441 Cloud ComputingWeek 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Week 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Week 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Week 1: Introduction to Cloud Computing - DSA 441 Cloud ComputingWeek 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Week 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Ferdin Joe John Joseph PhD
 
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculumSept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Ferdin Joe John Joseph PhD
 
Hadoop in Alibaba Cloud
Hadoop in Alibaba CloudHadoop in Alibaba Cloud
Hadoop in Alibaba Cloud
Ferdin Joe John Joseph PhD
 
Cloud Computing Essentials in Alibaba Cloud
Cloud Computing Essentials in Alibaba CloudCloud Computing Essentials in Alibaba Cloud
Cloud Computing Essentials in Alibaba Cloud
Ferdin Joe John Joseph PhD
 
Transforming deep into transformers – a computer vision approach
Transforming deep into transformers – a computer vision approachTransforming deep into transformers – a computer vision approach
Transforming deep into transformers – a computer vision approach
Ferdin Joe John Joseph PhD
 
Week 11: Programming for Data Analysis
Week 11: Programming for Data AnalysisWeek 11: Programming for Data Analysis
Week 11: Programming for Data Analysis
Ferdin Joe John Joseph PhD
 
Week 10: Programming for Data Analysis
Week 10: Programming for Data AnalysisWeek 10: Programming for Data Analysis
Week 10: Programming for Data Analysis
Ferdin Joe John Joseph PhD
 
Week 9: Programming for Data Analysis
Week 9: Programming for Data AnalysisWeek 9: Programming for Data Analysis
Week 9: Programming for Data Analysis
Ferdin Joe John Joseph PhD
 
Week 8: Programming for Data Analysis
Week 8: Programming for Data AnalysisWeek 8: Programming for Data Analysis
Week 8: Programming for Data Analysis
Ferdin Joe John Joseph PhD
 

More from Ferdin Joe John Joseph PhD (20)

Invited Talk DGTiCon 2022
Invited Talk DGTiCon 2022Invited Talk DGTiCon 2022
Invited Talk DGTiCon 2022
 
Week 12: Cloud AI- DSA 441 Cloud Computing
Week 12: Cloud AI- DSA 441 Cloud ComputingWeek 12: Cloud AI- DSA 441 Cloud Computing
Week 12: Cloud AI- DSA 441 Cloud Computing
 
Week 11: Cloud Native- DSA 441 Cloud Computing
Week 11: Cloud Native- DSA 441 Cloud ComputingWeek 11: Cloud Native- DSA 441 Cloud Computing
Week 11: Cloud Native- DSA 441 Cloud Computing
 
Week 10: Cloud Security- DSA 441 Cloud Computing
Week 10: Cloud Security- DSA 441 Cloud ComputingWeek 10: Cloud Security- DSA 441 Cloud Computing
Week 10: Cloud Security- DSA 441 Cloud Computing
 
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud ComputingWeek 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
Week 9: Relational Database Service Alibaba Cloud- DSA 441 Cloud Computing
 
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud ComputingWeek 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
Week 7: Object Storage Service Alibaba Cloud- DSA 441 Cloud Computing
 
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
Week 6: Server Load Balancer and Auto Scaling Alibaba Cloud- DSA 441 Cloud Co...
 
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
Week 5: Elastic Compute Service (ECS) with Alibaba Cloud- DSA 441 Cloud Compu...
 
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud ComputingWeek 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
Week 4: Big Data and Hadoop in Alibaba Cloud - DSA 441 Cloud Computing
 
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
Week 3: Virtual Private Cloud, On Premise, IaaS, PaaS, SaaS - DSA 441 Cloud C...
 
Week 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Week 2: Virtualization and VM Ware - DSA 441 Cloud ComputingWeek 2: Virtualization and VM Ware - DSA 441 Cloud Computing
Week 2: Virtualization and VM Ware - DSA 441 Cloud Computing
 
Week 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Week 1: Introduction to Cloud Computing - DSA 441 Cloud ComputingWeek 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
Week 1: Introduction to Cloud Computing - DSA 441 Cloud Computing
 
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculumSept 6 2021 BTech Artificial Intelligence and Data Science curriculum
Sept 6 2021 BTech Artificial Intelligence and Data Science curriculum
 
Hadoop in Alibaba Cloud
Hadoop in Alibaba CloudHadoop in Alibaba Cloud
Hadoop in Alibaba Cloud
 
Cloud Computing Essentials in Alibaba Cloud
Cloud Computing Essentials in Alibaba CloudCloud Computing Essentials in Alibaba Cloud
Cloud Computing Essentials in Alibaba Cloud
 
Transforming deep into transformers – a computer vision approach
Transforming deep into transformers – a computer vision approachTransforming deep into transformers – a computer vision approach
Transforming deep into transformers – a computer vision approach
 
Week 11: Programming for Data Analysis
Week 11: Programming for Data AnalysisWeek 11: Programming for Data Analysis
Week 11: Programming for Data Analysis
 
Week 10: Programming for Data Analysis
Week 10: Programming for Data AnalysisWeek 10: Programming for Data Analysis
Week 10: Programming for Data Analysis
 
Week 9: Programming for Data Analysis
Week 9: Programming for Data AnalysisWeek 9: Programming for Data Analysis
Week 9: Programming for Data Analysis
 
Week 8: Programming for Data Analysis
Week 8: Programming for Data AnalysisWeek 8: Programming for Data Analysis
Week 8: Programming for Data Analysis
 

Recently uploaded

FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
slg6lamcq
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
balafet
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
ukgaet
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
jerlynmaetalle
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
ewymefz
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
oz8q3jxlp
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
vcaxypu
 

Recently uploaded (20)

FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
一比一原版(UniSA毕业证书)南澳大学毕业证如何办理
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
Machine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptxMachine learning and optimization techniques for electrical drives.pptx
Machine learning and optimization techniques for electrical drives.pptx
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
SOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape ReportSOCRadar Germany 2024 Threat Landscape Report
SOCRadar Germany 2024 Threat Landscape Report
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
一比一原版(UVic毕业证)维多利亚大学毕业证成绩单
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...The affect of service quality and online reviews on customer loyalty in the E...
The affect of service quality and online reviews on customer loyalty in the E...
 
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
一比一原版(UMich毕业证)密歇根大学|安娜堡分校毕业证成绩单
 
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
一比一原版(Deakin毕业证书)迪肯大学毕业证如何办理
 
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
一比一原版(ArtEZ毕业证)ArtEZ艺术学院毕业证成绩单
 

Probability and Statistics - Week 1

  • 1. Probability and Statistics Week 1 Sample Space, Events, Counting Sample points, Probability of an Event Dr. Ferdin Joe John Joseph
  • 3. Grade Spit 3 Attendance 10% Mid Term 30% Final Exam 40% Assignments 20% PERCENTAGE
  • 4. Grade Criteria Score Grade 85 – 100 A 75 – 84 B+ 70 – 74 B 65 – 69 C+ 60 – 64 C 55 – 59 D+ 50 – 54 D <50 F 4
  • 5. Machine Learning Machine Learning is an interdisciplinary field in Data Science that uses • statistics • probability • algorithms to learn from data and provide insights which can be used to build intelligent applications. 5
  • 6. From MSE - 202 Learn 6
  • 7. From MSE - 202 Learn 7
  • 12. Probability for Data Science •Probability deals with predicting the likelihood of future events, while statistics involves the analysis of the frequency of past events. 12
  • 13. Terminologies • Sample Space • Event • Counting Sample Points • Probability of an Event 13
  • 14. Event • An event is a set of outcomes of an experiment to which a probability is assigned. • E represents event • P(E) is the probability that the event E occur. • A situation where E might happen (success) or might not happen (failure) is called a trial. 14
  • 17. Event • Pulling colored ball out of the bag 17
  • 18. Random Variable • The variable that represents the outcome of an events is called a random variable. • Eg. Getting head or tail in tossing a coin 18
  • 19. Random variable in tossing a coin • If we toss a coin, the chances for getting head or tail is 50-50 • The probability of getting head or tail is ½ or 50% • Random variable range between 0 and 1 19
  • 20. Empirical Probability • Also known as practical probability • It is the number of times the event occurs divided by the total number of incidents observed. • If for ‘n’ trials and we observe ‘s’ successes, the probability of success is s/n. • Toss a coin 4 times. The outcome is H, H, H, T • P(Head) =3/4=0.75 • P(Tail)=1/4=0.25 20
  • 21. Theoretical probability • The number of ways the particular event can occur divided by the total number of possible outcomes. • A head can occur once and possible outcomes are two (head, tail). The true (theoretical) probability of a head is 1/2. 21
  • 22. Exercise 1 A die is rolled, find the probability that an even number is obtained. 22
  • 23. Exercise 1 A die is rolled, find the probability that an even number is obtained. Solution: Let us first write the sample space S of the experiment. S = {1,2,3,4,5,6} Let E be the event "an even number is obtained" and write it down. E = {2,4,6} We now use the formula of the classical probability. P(E) = n(E) / n(S) = 3 / 6 = 1 / 2 23
  • 24. Exercise 2 Two coins are tossed, find the probability that two heads are obtained. Note: Each coin has two possible outcomes H (heads) and T (Tails). 24
  • 25. Exercise 2 Two coins are tossed, find the probability that two heads are obtained. Note: Each coin has two possible outcomes H (heads) and T (Tails). The sample space S is given by. S = {(H,T),(H,H),(T,H),(T,T)} Let E be the event "two heads are obtained". E = {(H,H)} We use the formula of the classical probability. P(E) = n(E) / n(S) = 1 / 4 25
  • 26. Exercise 3 A card is drawn at random from a deck of cards. Find the probability of getting the 3 of diamond. 26
  • 27. Exercise 3 A card is drawn at random from a deck of cards. Find the probability of getting the 3 of diamond. The sample space S of the experiment in question 6 is shown below 27
  • 28. Exercise 3 A card is drawn at random from a deck of cards. Find the probability of getting the 3 of diamond. 28
  • 29. Exercise 3 A card is drawn at random from a deck of cards. Find the probability of getting the 3 of diamond. Let E be the event "getting the 3 of diamond". An examination of the sample space shows that there is one "3 of diamond" so that n(E) = 1 and n(S) = 52. Hence the probability of event E occurring is given by P(E) = 1 / 52 29
  • 30. Exercise 4 The blood groups of 200 people is distributed as follows: 50 have type A blood, 65 have B blood type, 70 have O blood type and 15 have type AB blood. If a person from this group is selected at random, what is the probability that this person has O blood type? 30
  • 31. Exercise 4 We construct a table of frequencies for the the blood groups as follows group frequency A 50 B 65 O 70 AB 15 We use the empirical formula of the probability P(E) = Frequency for O blood / Total frequencies = 70 / 200 = 0.35 31
  • 32. Classwork 1 What is the probability of throwing one dice and getting the number greater than 4 ? 32
  • 33. Classwork 2 The customer wants to buy a bread and a can. There are 30 pieces of bread in the shop, including 5 from the previous day, and 20 cans with unreadable expiration date, of which one has expired. What is the probability that the customer will buy a fresh bread and a tin under warranty ? 33
  • 34. Classwork 3 What is the probability that if we choose a trinity from 19 boys and 12 girls, we will have : a) three boys b) three girls c) two boys and one girl ? 34
  • 35. 35
  • 36. Types of Events • Independent • Mutually Exclusive 36
  • 37. Independent Events • Two or more events not having control over the outcome of the others. 37
  • 38. Mutually Exclusive Events • If two events are NOT independent, then we say that they are dependent. • Sampling may be done with replacement or without replacement. • With replacement: If each member of a population is replaced after it is picked, then that member has the possibility of being chosen more than once. When sampling is done with replacement, then events are considered to be independent, meaning the result of the first pick will not change the probabilities for the second pick. • Without replacement: When sampling is done without replacement, each member of a population may be chosen only once. In this case, the probabilities for the second pick are affected by the result of the first pick. The events are considered to be dependent or not independent. 38
  • 39. Sampling with replacement • Suppose you pick three cards with replacement. The first card you pick out of the 52 cards is the • Q of spades. You put this card back, reshuffle the cards and pick a second card from the 52-card deck. It is the ten of clubs. You put this card back, reshuffle the cards and pick a third card from the 52-card deck. This time, the card is the Q of spades again. Your picks are {Q of spades, ten of clubs, Q of spades}. You have picked the Q of spades twice. You pick each card from the 52-card deck. 39
  • 40. Sampling without replacement • Suppose you pick three cards without replacement. The first card you pick out of the 52 cards is the • K of hearts. You put this card aside and pick the second card from the 51 cards remaining in the deck. It is the three of diamonds. You put this card aside and pick the third card from the remaining 50 cards in the deck. The third card is the J of spades. Your picks are {K of hearts, three of diamonds, J of spades}. Because you have picked the cards without replacement, you cannot pick the same card twice. 40
  • 41. Probability Distribution • A probability distribution is a list of all of the possible outcomes of a random variable along with their corresponding probability values. 41
  • 42. Probability usage in programming 42
  • 43. Probability usage in programming 43 # generate random floating point values from random import seed from random import random # seed random number generator seed(1) # generate random numbers between 0-1 for _ in range(10): value = random() print(value)
  • 44. Probability usage in programming 44 # generate random integer values from random import seed from random import randint # seed random number generator seed(1) # generate some integers for _ in range(10): value = randint(0, 10) print(value)
  • 45. Probability usage in programming 45 # choose a random element from a list from random import seed from random import choice # seed random number generator seed(1) # prepare a sequence sequence = [i for i in range(20)] print(sequence) # make choices from the sequence for _ in range(5): selection = choice(sequence) print(selection)
  • 46. Probability usage in programming 46 # randomly shuffle a sequence from random import seed from random import shuffle # seed random number generator seed(1) # prepare a sequence sequence = [i for i in range(20)] print(sequence) # randomly shuffle the sequence shuffle(sequence) print(sequence)
  • 47. Slides Available in link below www.slideshare.net/ferdinjoe 47
  • 48. 48