Proposition 1.1 De Moargan’s Laws

Download Report

Transcript Proposition 1.1 De Moargan’s Laws

2
Probability
Copyright © Cengage Learning. All rights reserved.
http://mikeess-trip.blogspot.com/2011/06/gambling.html
Probability: Definitions
• Random Experiment (RE)
– Any action or process whose outcome is
subject to uncertainty
• Sample Space (S)
– The set of all possible outcomes of the RE
Sample Space
What is the sample space of the following:
a) if I roll one 4-sided die?
b) if I roll two 4-sided dice?
c) if I toss a coin until the first head appears?
d) length of a bolt
Probability: Definitions (cont.)
• Outcome
– One of the possible results from a RE
• Event
– Any collection (subset) of outcomes
contained in the sample space
• Types of Events
– Simple: the event has one outcome
– Compound: the event has more than one
outcome
Events – Simple or Compound
Are the following events considering a 4-sided
die simple or compound?
a) Let E1 be the event of rolling a 3 on the die.
b) Let E2 be the event of rolling a number
greater than 2 on a die.
c) Let E3 be the event of rolling a 5 on the die.
d) Let E4 be the event of rolling an odd number.
Events – Simple or Compound (cont)
Are the following events considering tossing a
coin until the first head appears simple or
compound?
a) Let A be the event that it takes exactly 2
tosses.
b) Let B be the event that it takes less than two
tosses.
c) Let C be the event of making less than 2 or
greater than 5 tosses.
d) Let D be the event that it takes more than 3
tosses.
Set Theory
• Complement, A’
• Union (A U B)
• Intersection (A ∩ B)
• Null Event, 
• Mutually Exclusive
(disjoint)
Set Theory: Examples
1) Rolling a 4-sided die. Let A = {1,2}, B = {2,3}
a) A U B b) A ∩ B c) A’
d) Are A and B mutually exclusive?
2) Drawing a card from a deck of cards, A = red
card, B = black card
a) Are A and B mutually exclusive?
3) Tossing a coin until the first head
A = {TH} B = {H,TH,TTH] C = {TH,TTH,TTTTH}
D = {TTTH,TTTTH,TTTTTH,…}
a) A U B U C b) B ∩ C c) C ∩ D d) B’
e) A ∩ (B U C)
f) (B ∩ C) U A
Probability: Axioms
1. For any event A, P(A) ≥ 0
2. P(S) = 1
3. If A1, A2, … is an countably infinite
collection of disjoint events, then
∞
𝑃 𝐴1 ∪ 𝐴2 ∪ ⋯ =
𝑃(𝐴𝑖 )
𝑖=1
Probability: Propositions
• P() = 0
• If A1, A2, …, An is a finite collection of
disjoint events, then
𝑛
𝑃 𝐴1 ∪ 𝐴2 ∪ ⋯ ∪ 𝐴𝑛 =
𝑃(𝐴𝑖 )
𝑖=1
• For any event A, P(A) = 1 – P(A’)
Example: Roll two 4-sided dice. What is the
probability that the sum of the two dice is
greater than 2?
Probability: Propositions 2
• For any event A, P(A) ≤ 1
• For any two events A1 and A2,
P(A1 U A2) = P(A1) + P(A2) – P(A1 ∩ A2)
Example: A card is drawn from a well-shuffled
deck of cards. What is the probability that the
card is an ace or a diamond?
Interpreting Probability
Let A be the event that a package sent within
the state of California for 2nd day delivery
actually arrives within one day.
Equally Likely Outcomes
1) Rolling two 4-sided dice. What is the
probability that a 1 will be rolled on the red
die?
2) Draw one card from a deck of cards.
a) What is the probability of drawing a King?
b) What is the probability of drawing a heart?
3) A song is chosen at random from a person’s
mp3 player. If there are 10 alternative, 5 blues,
7 jazz and 25 rock songs on the player, what is
the probability that a rock song is played?
Counting Techniques
ordered
With replacement
Without replacement
unordered
Product Rule
Requirements: ordered, with replacement
Example: How many pairs are there when you
roll a 4-sided die and a 3-sided die?
Calculation: If the first element of an ordered
k-tuple can be selected in n1 ways, the
second element in n2 ways up to the kth
element in nk ways, then there are 𝑛1 𝑛2 ⋯ 𝑛𝑘
possible k-tuples.
Product Rule: Examples
1) How many pairs are there when you roll a 4sided die and a 3-sided die?
2) How many pairs are possible for the
following situation: Roll a 4-sided die with a
result of n. Then roll a 2n-sided die. [This can
not be done via the product rule.]
3) How many different possibilities are there
when you rolls a 4-sided die, a 3-sided die
and a 10-sided die?
Counting Techniques
With replacement
Without replacement
ordered
unordered
Product Rule
(multiplication,
tree diagrams)
Permutation
Requirements: ordered, without replacement
Example: How many different ways can we draw
4 cards from the 13 spades in the deck of
cards without replacement?
Calculation: 𝑃𝑘,𝑛 =
𝑛!
𝑛−𝑘 !
Permutation: Examples
1) How many different ways can we draw 4
cards from the 13 spades in the deck of cards
without replacement?
2) In a horse race consisting of 10 horses, how
many different ways are there to choose the
horses that finish first, second and third?
3) If there are 20 students in a club, how many
unique ways can the president, vice
president, secretary and treasurer be
elected?
Counting Techniques
With replacement
ordered
unordered
Product Rule
(multiplication,
tree diagrams)
Permutation
𝑛!
𝑃𝑘,𝑛 =
Without replacement
𝑛−𝑘 !
Combination
Requirements: unordered, without replacement
Example: How many ways can I choose 3 of the
6 different type of dark red dice?
Calculation:
𝑛
𝑘
= 𝐶𝑘,𝑛 =
𝑛!
𝑘! 𝑛−𝑘 !
Combination
1) How many ways can I choose 3 of the 6
different type of dark red dice?
2) In a horse race consisting of 10 horses, how
many different ways are there to choose the
horses that finish in the money?
3) If there are 20 students in a club, how many
unique ways can you choose for four
students to go to a conference?
Counting Techniques
ordered
Product Rule
(multiplication,
With replacement
tree diagrams)
unordered
Permutation
Combination
𝑛
𝑛!
= 𝐶𝑘,𝑛 =
𝑃𝑘,𝑛 =
Without replacement
𝑛−𝑘 ! 𝑘
𝑛!
𝑘! 𝑛 − 𝑘 !
Probability - Counting
I have 10 dice in the back, 6 dark red, 1 red and
3 white. What is the probability that the 3 dice
are:
a) 1 white and 2 dark red?
b) all red?
Counting - Procedure
1. Construct the sample space where each
outcome is equally likely to happen.
2. Determine the event of interest.
3. Count the outcomes of the event and the
total number of outcomes.
4. Find the probability by: 𝑃 𝐴 =
𝑁(𝐴)
𝑁
Examples for Counting Techniques
1. Roll two 8-sided dice. What is the probability that
the sum of the two numbers is 5? (0.0625)
2. Draw two cards from a suit of 13 cards (say
diamonds), what is the probability that the sum of
the two cards is even? (A = 1, J = 11, Q = 12, K =
13)? (0.462)
3. The IRS decides that it will audit the returns of 3
people from a group of 18. If 8 of the people are
women, what is the probability that all 3 of people
audited are women? (0.0686)
4. Arizona places consist of three digits followed by
three letters. What is the probability that a
particular license plate doesn’t have any repeating
digits or letters? (0.639)
Conditional Probability
1) If we draw a card from a deck of 52 cards,
what is the probability of getting a heart?
a) Assuming that the card is not a club, what
is the probability of getting a heart?
General Multiplication Rule
Suppose that 8 good and 2 defective fuses have
been mixed up. To find the defective fuses we
need to test them one-by-one, at random.
Once we test a fuse, we set it aside.
What is the probability that we find both of the
defective fuses in the first two tests?
What is the probability that the first tested fuse
is good out of 3 fuses and the last two tested
are defective?
Example Bayes’ Law: Coins/Balls
Flip a coin. If the coin is a head, draw a ball from
a bag with 2 white and 2 black balls. If the coin
is a tail, draw a ball from a bag with 1 white
and 2 black balls. If the drawn ball is white,
what is the probability that the coin was a
head?
Example Bayes’ Law: Test for Rare
Disease Test
Suppose we know that 0.1% of the total
population has Dercum’s disease. If a person
has the disease, the test will successfully
detect it with 95% accuracy, and doesn’t
detect it 5% of the time. If a person does not
have the disease, the test will be incorrect 1%
of the time. What is the probability that when
the test shows a person has Dercum’s disease,
the person really has the disease?
Example Bayes’ Law: Light Bulbs
A store stocks light bulbs from three suppliers.
Suppliers A, B, and C supply 10%, 20%, and
70% of the bulbs, respectively. It has been
determined that company A’s bulbs are 1%
defective while company B’s are 3% defective
and company C’s are 4 % defective. If a bulb is
selected at random and found to be defective,
what is the probability that it came from
supplier B?
Example: Independence (1)
1. Deal two cards without replacement
A = 1st card is a heart
B = 2nd card is a heart
C = 2nd card is a club.
a) Are A and B independent?
b) Are A and C independent?
2. Repeat 1) with replacement.
Example: Independence (2)
All components in a the network function
independently. The probabilities of success
are as follows: P(A) = 0.9, P(B) = 0.92, P(C) =
0.8, P(D) = 0.95. What is the probability that
the network will fail?
Mutually Exclusive vs. Independent
In each situation, are the following two events
a) mutually exclusive and/or b) independent?
1) Draw 1 card from a deck
A = card is a heart B = card is not a heart
2) Toss 2 coins
A = Coin 1 is a head B = Coin 2 is a head
3) Roll two 4-sided dice.
A = red die is 2
B = sum of the dice is 3