Stats10 - Chapter 5
Stats10 - Chapter 5
• What is random?
: no predictable pattern occurs and no digit
is more likely to appear than any other.
2
Randomness to Probability
• A random phenomenon
is a situation in which
we know what
outcomes could
happen, but we don't
know which particular
outcome did or will
happen.
• However, we can
calculate the probability
with which each
outcome will happen .
3
Randomness to Probability
• Let’s say there are 1000 songs in your iTunes
Library and only 5 of these songs are by Justin
Bieber. What is the probability that next time you
hit ‘shuffle’ you get a Justin Bieber song?
• A : 0.5
• B : 0.05
• C : 0.005
• D:5
4
Probability
• The probability of an event is its relative
frequency. We have two kinds of probabilities:
5
Probability
• 2. Empirical probability: relative frequencies
based on an experiment or on observations of a
real-life process.
• Ex: We listen to 100 songs on shuffle and 4
of them are Justin Bieber songs.The
empirical probability is 4/100=0.04
6
Probability
• We need both theoretical and empirical
probabilities.
• It is impossible to carry out an experiment that will
provide the exact value of a theoretical probability
: we use empirical probabilities to 1) estimate and
to 2) test theoretical probabilities.
7
1. Finding Theoretical Probabilities
8
Terminologies
• For any random phenomenon, each attempt is
called a trial and each trial generates an outcome.
• Each time you hit shuffle is a trial.
• The song that plays as a result of hitting shuffle
is an outcome.
• Sample space is the collection of all possible
outcomes of a trial
• Sample space is the entire iTunes library of
1000 songs.
• A combination of outcomes is called an event
• For example, “playing two Justin Bieber songs
in a row in shuffle” is an event.
9
Terminologies
• The trials are independent : the outcome of one trial
doesn’t influence or change the outcome of another.
10
Terminologies
Example : Die roll
11
Theoretical Probability: Properties
• Probabilities are always numbers between 0 and
1.
0 ≤ 𝑃𝑟𝑜𝑏(𝑒𝑣𝑒𝑛𝑡) ≤ 1
• If 0, the event never happens.
• If 1, the event always happens.
• Probabilities can be expressed as fractions,
decimals, or percents: ½, 0.5, 50%
𝑃𝑟𝑜𝑏 𝑆 = 1
12
Calculating probability of an event
• When the outcomes are equally likely, the
probability that a particular event A occurs is
just the number of outcomes that make up that
event A, divided by the total number of equally
likely outcomes in the sample space, S.
Number of outcomes in A
𝑃𝑟𝑜𝑏 𝐴 =
Number of all possible outcomes in S
13
Complement Rule
• The set of outcomes that are not in the event A is
called the complement of A, denoted Ac. The
probability of an event occurring is 1 minus the
probability that it does not occur.
𝑃𝑟𝑜𝑏 𝐴! = 1 − 𝑃𝑟𝑜𝑏 𝐴
or,
𝑃𝑟𝑜𝑏 𝐴 = 1 − 𝑃𝑟𝑜𝑏 𝐴!
15
Probability of multiple events
• 1. Disjoint Events (Mutually Exclusive events) : Events
that have no outcomes in common (and, thus, cannot
occur together)
• The outcome of a coin toss cannot be a head and a tail
• A student cannot fail and pass a class
• A card drawn from a deck cannot be an ace and a
queen
• 2. Combined Events
• 1) Event ‘A and B’ : Event that Event A and B
happen at the same time.
• 2) Event ‘A or B’ : Either Event A or Event B, or both
happen.
16
Probability of multiple events
• Venn Diagram for the events where 1) disjoint, 2) A
and B, 3) A or B
17
Finding Theoretical probabilities
• Example : We recorded whether the students
attended the class and also whether they pass or fail
the quiz after the class. (Event A : A student attended
the class ; Event B : A student passed the quiz )
Pass Fail Total
Attend 35 5 40
Absence 0 10 10
Total 35 15 50
18
Finding Theoretical probabilities
• Example : We recorded whether the students
attended the class and also whether they pass or fail
the quiz after the class. (Event A : A student attended
the class ; Event B : A student passed the quiz )
Pass Fail Total
Attend 35 5 40
Absence 0 10 10
Total 35 15 50
20
Addition Rule
• Find the probabilities using the addition rule.
Pass (B) Fail (Bc) Total
Attend (A) 35 5 40
Absence (Ac) 0 10 10
Total 35 15 50
23
Conditional Probability
• Note1: “Given that” vs. “And”
• Probability that a randomly selected student passed
a quiz given that the student attended the class :
Prob(Pass|Attend)
• Probability that a randomly selected student who
attended the class passed a quiz : Prob(Pass and
Attend)
24
Independence
• The occurrence of one event doesn’t influence or
change the occurrence of another.
25
Independence
• If A and B are independent,
Prob(A|B) = Prob(A)
• By definition,
Prob(A|B) = Prob(A and B) / Prob(B),
It satisfies,
Prob(A) = Prob(A and B) / Prob(B)
or
Prob(A and B) = Prob(A) * Prob(B),
if A and B are independent.
26
Independence
Pass (B) Fail (Bc) Total
Attend (A) 35 5 40
Absence (Ac) 0 10 10
Total 35 15 50
28
Application
• (Addition rule : special case) if A and B are disjoint,
Prob(A or B) = Prob(A) + Prob(B)
32
Example - Guessing at Random
• What is the probability that she gets at least one
question right?
33
Example - Guessing at Random
• What is the probability that she gets at least one question
right?
• Direct approach :
P(1 question correct or 2 questions correct or 3 questions
correct or … all questions correct)
= P(1 question correct) + P(2 questions correct) +…
+ P(all questions correct)
35
Exercise
• Suppose that we are planning a seminar on Saturday
for UCLA undergraduate students. It is known that the
probability that a randomly chosen UCLA student is on
campus on Saturday is 0.3. If a randomly chosen
student is on campus, the probability of the student
attends the seminar is 0.7. However, if a student is not
on campus, then the probability that the student
attends the seminar is 0.2.
36
Exercise
• Q1. What is the probability that a randomly chosen
UCLA student is on campus on Saturday and attends
the seminar?
39
Empirical Probabilities
• Relative frequencies based on an experiment or on
observations of a real-life process.
• Source :
• 1. Observed data : From the observations of
real-life events, we can estimate the probability.
• 2. Simulation : If we can’t find the data or the
situation is too complex for us to find the
empirical probability of some random event, we
can simulate the situation.
40
Law of Large numbers
• The Law of Large Numbers (LLN) says that the long-run
relative frequency of repeated independent events gets
closer and closer to the true relative frequency as the
number of trials increases.
• If a coin is tossed many times, the overall percentage of
heads should settle down to about 50% as the number
of tosses increases.
41
Law of Large numbers
• This is why we define probability as the long run
relative-frequency of an event.
42
Law of averages
• When tossing a fair coin, if heads comes up on
each of the first 10 toss, what do you think the
chance is that another head will come up on the
next toss?
HHHHHHHHHHHHHH?
43