26
MAT 141 Chapter 7 1 Finite Mathematics MAT 141: Chapter 7 Notes Set Theory and Probability David J. Gisch Sets Definition A set is a well-defined collection of objects. We denote sets with capital letters We write sets with brackets as follows 3, 4, 5 This is referred to as roster form of a set. Any item belonging to a set is called an element or member of that set. We denote elements of a set as follows 3∈ 3, 4, 5 7∉ 3, 4, 5 Why well-defined? Give me the set of people in this room who are nice. Definition Repetitions of elements do not matter. Whether it is listed once or twice it is still a member of the set and that is all that matters. Order also does not matter in sets, unless it is used to establish a pattern. 3, 4, 5 4, 3, 5 3, 3, 3, 4, 5 5, 5, 3, 4, 4, 4 A set can also contain no elements. We call this the empty set. We denote the empty set as For example, the set of months starting with the letter z. Note that ∅, 0, 0 , all have different meanings.

Finite Mathematics MAT 141: Chapter 7 Notes - … - Chapter 7 Slides.pdf1 Finite Mathematics MAT 141: Chapter 7 Notes Set Theory and Probability David J. Gisch Sets Definition

Embed Size (px)

Citation preview

MAT 141 ‐ Chapter 7

1

Finite MathematicsMAT 141: Chapter 7 NotesSet Theory and ProbabilityDavid J. Gisch

Sets

Definition• A set is a well-defined collection of objects.▫ We denote sets with capital letters▫ We write sets with brackets as follows

3, 4, 5▫ This is referred to as roster form of a set.

• Any item belonging to a set is called an element or member of that set.▫ We denote elements of a set as follows

3 ∈ 3, 4, 57 ∉ 3, 4, 5

Why well-defined?Give me the set of people in this room who are nice.

Definition• Repetitions of elements do not matter. Whether it is

listed once or twice it is still a member of the set and that is all that matters.

• Order also does not matter in sets, unless it is used to establish a pattern.

3, 4, 5 4, 3, 5 3, 3, 3, 4, 5 5, 5, 3, 4, 4, 4

• A set can also contain no elements. We call this the empty set.▫ We denote the empty set as ∅▫ For example, the set of months starting with the letter z.▫ Note that ∅, 0, 0 , ∅ all have different meanings.

MAT 141 ‐ Chapter 7

2

Definition• The set of all things being discussed is referred to as the

universal set. We denote the universal set as set .

• For example, if we were discussing arithmetic in third grade we might use the universal set of whole numbers. In college algebra the universal set would be all real numbers.

SetsExample 7.1.1: Explain the difference for each of the following.

0

0

SetsExample 7.1.2: Write out each of the following sets in roster form.

(a) The set of all numbers between 2 and 7.

(b) The set days of the week that begin with the letter S.

(c) The set of planets in our solar system that begin with the letter C.

• Sets can also be written in set-builder notation.| ∈ 2 5

In roster form3, 4

Obviously above it doesn’t help but what about|

Definition

The set

Of things Such that

They are integers and between 2 and 5.

MAT 141 ‐ Chapter 7

3

Set-Builder NotationExample 7.1.3: Write each of the following sets in set-builder notation.

(a) 2, 4, 6, 8, 10, …

(b) 3, 2, 0, 1, 2, 3, 4

(c) 15, 16, 17, 18,… .

Set-Builder NotationExample 7.1.4: Write each of the following sets roster form.

(a) |

(b) |

Definition• Sometimes every element of set is also the element of

another set.▫ | ▫ | ▫ Here, every element of set A is also an element of set B.

• Think of a proper subset as being strictly smaller. When in doubt do not write ⊂ , write ⊆ .

SubsetsExample 7.1.5: List all of the subsets of the set 3, 4

MAT 141 ‐ Chapter 7

4

SubsetsExample 7.1.5: List all of the subsets of the set , ,

Number of SubsetsExample 7.1.5: List all of the subsets of the set , ,

Number of SubsetsExample 7.1.6: How many subsets does the following set have?

, , , 3, 2

Set Relations• Sets can be▫ Proper subsets (one is contained in the other). | |

▫ Have some overlap (called the intersection). | |

▫ Have no overlap (called disjoint sets). | |

MAT 141 ‐ Chapter 7

5

Set Relations Set Relations

Set Relations Set Relations

MAT 141 ‐ Chapter 7

6

Sets, Union, Intersection, Complement

Example 7.1.7: Use the given sets to state each of the following in roster form.

(a) ∪

(b) ∩

(c) ∪ ∅

(d) ′

(e) ′ ∩

(f) ∩ ′

, , , , , , ,, ,, ,,

Sets, Union, Intersection, Complement

Example 7.1.8: Use the given sets to state each of the following in roster form.

(a) ∪

(b) ∩

(c) B′

(d) ′ ∩ ′

(e) ∪ ′

Applications of Venn Diagrams

Venn Diagram (2 Sets)• 2 sets split the diagram up into 3-4 regions.

MAT 141 ‐ Chapter 7

7

Venn DiagramsExample 7.2.1: Write each shaded region using set notation.

Venn DiagramsExample 7.2.2: Write each shaded region using set notation.

Venn Diagram (3 Sets)• 3 sets split the diagram up into at most 8 regions.

Venn DiagramsExample 7.2.3: Write each shaded region using set notation.

MAT 141 ‐ Chapter 7

8

Venn DiagramsExample 7.2.4: Assume that A: Set of athletes, B: Set of honors students, and C: Set of Band students. Describe each of the following regions in words.

II

IV and V

I and II and III

Venn DiagramsExample 7.2.5: Write each indicated region using set notation.

II

IV and V

I and II and III

Sets, Union, Intersection, Complement

Example 7.2.6: Use the given sets to state each of the following in roster form.

(a) ∪ ∪

(b) ∩ ∩

(c) ∪ ∩

(d) ∪ ∩ ∪

(e) ∩ ′ ∩ ∪

, , , , , , , , ,, , , ,, , , ,

,

Making Venn Diagrams• Peel your way out!!!!▫ Start with the inner-most region first.▫ Go to the intersections and subtract off what you already have.▫ Go to the remainder of the sets and subtract off what you already

have.▫ Always check if any amount is unused.

• For example: Let’s say there are 20 total elements and A has 12 elements, B has 10 elements and A intersect B has 8 elements.

MAT 141 ‐ Chapter 7

9

The Number of Elements Venn DiagramsExample 7.2.7: Eight hundred students were surveyed and the results of the campus blood drive survey indicated that 490 students were willing to donate blood,340 students were willing to help serve a free breakfast to blood donors, and 120 students were willing to donate blood and serve breakfast.(a) How many students were willing to donate blood or serve

breakfast?(b) How many were willing to do neither?

Venn DiagramsExample 7.2.8: A survey of 120 college students was taken at registration. Of those surveyed, 75 students registered for a math course, 65 for an English course, and 40 for both math and English. Of those surveyed,

(a) How many registered only for a math course?

(b) How many registered only for an English course?

(c) How many registered for a math course or an English course?

(d) How many did not register for either a math course or an English course?

Venn DiagramsExample 7.2.9: Use the Venn Diagram below to answer the following.

(a) How many students read none of the publications?

(b) How many read Business Week and Fortune but not the Journal?

(c) How many read Business Week or the Journal?

(d) How many read all three?

(e) How man do not read the Journal?

MAT 141 ‐ Chapter 7

10

Venn DiagramsExample 7.2.10: A survey of 180 college men was taken to determine participation in various campus activities. Forty-three students were in fraternities, 52 participated in campus sports, and 35 participated in various campus tutorial programs. Thirteen students participated in fraternities and sports, 14 in sports and tutorial programs, and 12 in fraternities and tutorial programs. Five students participated in all three activities. Create the Venn Diagram for this scenario.

Introduction to Probability

Definitions• An experiment is an activity or occurrence with an

observable result.

• Outcomes are the most basic possible results of observations or experiments.

• The set of all possible outcomes of an experiment is called the sample space.

• An event consists of one or more outcomes that share a property of interest. Or think of an event as a subset of the sample space.

Step 1: Count the total number of possible outcomes.

Step 2: Among all the possible outcomes, count the number of ways the event of interest, E, can occur.

Step 3: Determine the probability, .

Theoretical Method for Equally Likely Outcomes

MAT 141 ‐ Chapter 7

11

Expressing Probability

The probability of an event, expressed as , is always between 0 and 1(inclusive).

A probability of 0 means the event is impossible and a probability of 1 means the event is certain.

1

0

0.5

Certain

Likely

Unlikely

50-50 Chance

Impossible

0 1

Outcomes and EventsExample 7.3.1: Assuming equal chance of having a boy or girl at birth, what is the probability of having two girls and two boys in a family of four children?

Scenarios Possible Combinations

All 4 Girls {GGGG} 3 Girls and 1 Boy

{GGGB}, {GGBG}, {GBGG}, {BGGG}

2 Girls and 2 Boys

{GGBB}, {GBGB}, {GBBG}, {BGBG}, {BBGG}, {BGGB}

1 Girl and 3 Boys

{GBBB}, {BGBB}, {BBGB}, {BBBG}

All 4 Boys {BBBB}

Of the 16 possible outcomes, 6 have the event two girls and two boys.

2 6/160.357

Listing Outcomes (Sample Space)• To help list all of the outcomes use charts and tables.▫ In the last example we used a chart.▫ You could have also used a tree diagram as shown below.

Of the 16 possible outcomes, 6 have the event two girls and two boys.

2 6/160.357

Step 1: Count the total number of possible outcomes, .

Step 2: Among all the possible outcomes, count the number of ways the event of interest, E, can occur, .

Step 3: Determine the probability, .

Theoretical Method for Equally Likely Outcomes

MAT 141 ‐ Chapter 7

12

SetsExample 7.3.2: Consider the following.

Experiment: You roll a fair six-sided die.

Outcomes: The six different numbers on the die.

Sample Space: 1, 2, 3,4,5, 6 , n S 6

Events:

You roll a 1 1 , 1You roll an even number 2, 4, 6 , 3You roll a number great than 2 3, 4, 5, 6 ,

4

SetsExample 7.3.3: Consider the following.

Experiment: Flip two coins.

Outcomes: Heads or tails on each coin.

Sample Space: , , , , n S 4

Events:

One head , , 2Both tails , 1At least one tail , , , 3

Events and Sets• Since events are sets, we can use set operations to find

unions, intersections, and complements of events.

SetsExample 7.3.4: Consider the following.

Experiment: You roll a fair six-sided die.

Outcomes: The six different numbers on the die.

Sample Space: 1, 2, 3,4,5, 6 , n S 6Events:

You roll a 1 1 , 1You roll an even number 2, 4, 6 , 3You roll a number great than 2 3, 4, 5, 6 , 4

, ,

MAT 141 ‐ Chapter 7

13

Standard Deck of Cards• We will use a standard deck of cards for several

examples as it allows to do a number of different types of questions. So become familiar with a deck of cards if you are not already.

Probability of an EventExample 7.3.5: Calculate each of the following probabilities.

(a) Rolling a die and getting an even.

(b) Drawing a card from a standard deck of cards and getting a face card.

(c) Drawing a card from a standard deck of cards and not getting a face card.

Probability of an EventExample 7.3.6: One jar contains balls numbered 1, 2, 3, and 4. A second jar contains 3 balls numbered 1, 2, and 3. An experiment consists of taking one ball form the first jar, and then taking a ball from the second.

(a) Write out the sample space

(b) Write the event of the number on the first ball being even as a set.

Example 7.3.6 Continued(c) Write the event that the sum of the numbers on the two balls is five as a set.

(d) What is the probability that the number on the first ball being even ?

(e) What is the probability that the sum of the numbers on the two balls is five?

MAT 141 ‐ Chapter 7

14

Probability of an EventExample 7.3.7: There were 2,447,864 U.S. deaths in 2002. They are listed according to cause in the following table. If a randomly selected person died in 2002, use the information to find the following probabilities.

(a) The probability that the cause of death was heart disease.

(b) The probability that the probability of death was cancer or heart disease.

Basic Concepts of Probability

Union Rule for ProbabilityRecall the union rule for sets

∪ ∩

If we divide each side by we have∪ ∩

Which then becomes∪ ∩

Probability of an EventExample 7.4.1: Calculate each of the following probabilities.

(a) Rolling a die and getting an even or a 3.

(b) Drawing a card from a standard deck of cards and getting a face card or a spade.

∪ 3 3 ∩ 3

∪ ∩

MAT 141 ‐ Chapter 7

15

Probability and Venn DiagramsYou can take any Venn diagram and turn the amounts (values) into probabilities.

Probability of an EventExample 7.4.2: A study is taken where 55% of respondents were female, 45% of the respondents agree with Bill 145-A, and 20% were female who agreed with the bill. Fill in the appropriate amounts in the Venn diagram.

(a) What percent were male?

(b) What percent were female and disagreed?

(c) What percent were male and agreed?

Probability of an EventExample 7.4.3: A study is taken where 80% of respondents were football fans, 15% of the respondents were hockey fans, and 92% liked football or hockey. Fill in the appropriate amounts in the Venn diagram.

∪ ∩

OR

∩ ∪

Probability of an EventExample 7.4.4: A study is taken where 55% of respondents were female, and 65% of the respondents agree with raising taxes. Fill in the appropriate amounts in the Venn diagram.

It turns out that you cannot complete the chart, yet.

We will soon learn how to handle this scenario.

MAT 141 ‐ Chapter 7

16

Complement of a Set• If the probability of something happening is 20%, then

the probability of it not happening is 80%.▫ In other words, 20%+80%=100%

• Recall that we signify not being in a set as ′.• So something not happening is signified by ′.

Probability of an EventExample 7.4.5: A survey of people living in Downton was taken. Let W represent the set of people who have a White parent (biologically) and L represent the set of people with a Latino parent (biologically).

(a) What is the probability that someone has a white parent but not a Latino parent?

(b) What is the probability that some has a parent that is not white?

(c) What does the middle region represent?

Odds• Odds are the ratio of the probability that a particular

event will occur to the probability that it will not occur.▫ Odds for an event E.

, OR

▫ Odds against an event E.

, OR

▫ Note that ′ 1

Calculating OddsExample 7.4.6: Calculate each of the following odds.

(a) Rolling a die and the odds of getting an even.

(b) Drawing a card from a standard deck of cards and the odds against getting a king.

(c) Drawing a card from a standard deck of cards and odds of getting a face card.

MAT 141 ‐ Chapter 7

17

Calculating OddsExample 7.4.7: Calculate each of the following odds.

(a) The probability of a player making a 3-point shot are 45%. What are the odds in favor of hitting a 3-pointer?

(b) When drawing three cards, the probability that they are all Aces is 0.02%. What are the odds against drawing 3 aces?

Calculating OddsExample 7.4.8: Calculate each of the following.

(a) The odds of losing a game if you play perfectly are 7:1. What is the probability of winning?

(b) A horse at the track is given 9:1 odds of winning. What is the associated probability of winning?

A probability distribution represents theprobabilities of all possible events.

All possible outcomes and a probability distribution for the sum when two dice are rolled are shown below.

Probability Distributions Probability Distributions• When we collect data it is useful to turn it into a

probability distribution so that we can make predictions.• In the example below shows the U.S. advertising volume

in millions of dollars by medium in 2004.

Total = $263,766

These probabilities should theoretically and to 1.0000 but

this does not always occur due to

rounding.

This is acceptable as we have rounded

out far enough for a high degree of

accuracy.

Total = .9999

MAT 141 ‐ Chapter 7

18

Empirical ProbabilityExample 7.4.9: The following example is from page 386 in your book.

Conditional Probability; Independent Events

Conditional Probability• We often have statistics such as▫ Probability of getting in a car accident during the course of a year.▫ Probability of completion of college.▫ Probability of treating cancer.

• These probabilities are good to know but are very broad in scope. What if we wanted a more detailed analysis?▫ Probability of getting in a car accident, given you are a teenager.▫ Probability of completion of college, given you are in a technical

program.▫ Probability of treating cancer, given it is malignant.

• The “given” part is an added condition and is what we mean when we say conditional probability.

Conditional Probability• The table below shows the results of 100 surveyed brokers for an

investment firm.• Of those surveyed the probability that they picked stocks that went up

are

60100 .60 60%

• Of those surveyed the probability that those who used research picked stocks that went up are (i.e. picked stock that went up given they used research)

3045 .6667 66.67%

• Adding the condition that they used research narrowed the sample space down to 45 people.

MAT 141 ‐ Chapter 7

19

Conditional ProbabilityExample 7.5.1: You flip a coin three times. What is the probability that you get all heads, given the first toss was tails?

T T T T T H T H T H T TH H H H H T H T H T H H

Conditional ProbabilityExample 7.5.2: You toss two die. What is the probability that the sum is a greater than 7, given one die was a 4?

Conditional ProbabilityExample 7.5.3: Calculate each of the following.

(a)

(b) ′

(c) ′ ′

Conditional Probability

MAT 141 ‐ Chapter 7

20

Conditional ProbabilityExample 7.5.4: At a insurance company 80% of companies have home owners insurance and 45% own fire insurance. It is also known that 36% have both. What is the probability that someone owns fire insurance, given that they own homeowners insurance?

Conditional ProbabilityExample 7.5.5: At a insurance company 80% of companies have home owners insurance and 45% own fire insurance. It is also known that 36% have both. What is the probability that someone owns fire insurance, given that they do not own homeowners insurance?

AND Probability

∩ |

Conditional ProbabilityExample 7.5.6: You flip a coin three times. What is the probability that you get one Head and the first toss was a Tails?

T T T T T H T H T H T TH H H H H T H T H T H H

MAT 141 ‐ Chapter 7

21

Conditional ProbabilityExample 7.5.7: You toss two die. What is the probability that the sum is a greater than 7 and one die was a 4?

Conditional ProbabilityExample 7.5.8: What is the probability of drawing two cards from a standard deck of cards and getting two jacks?

Conditional ProbabilityExample 7.5.9: A bag of marbles contains 3 red, 5 blue, 7 yellow, and 5 green marbles. What is the probability of drawing 3 marbles and the are yellow, green, and blue (in that order)?

And Probability: Independent Events

• Two events are independent if the outcome of one does not affect the probability of the other event.

• Two events are dependent if the outcome of one affects the probability of the other event.

∙ |

MAT 141 ‐ Chapter 7

22

AND Probability Disjoint vs. Independent• Disjoint (mutually exclusive) and Independent events

are not the same thing.▫ Mammals and Reptiles are mutually exclusive events (no

intersection)

Example 7.5.10: A zoo has 30 reptiles and 170 mammals. You randomly select two animals to be on the zoo poster. What is the probability that the first choice was a mammal and the second choice was a reptile?

Conditional Probability (Independent)Example 7.5.11: You flip a coin three times. What is the probability that you get all tails?

T T T T T H T H T H T TH H H H H T H T H T H H

Independent EventsExample 7.5.12: It is found that the probability of a hurricane hitting Florida any given year is 14% (thus the probability of not getting hit is 86%). What is the probability of getting hit by a hurricane two years in a row?

MAT 141 ‐ Chapter 7

23

Probability of an Event (Independent)Example 7.5.13: A study is taken where 55% of respondents were female, and 65% of the respondents agree with raising taxes. Fill in the appropriate amounts in the Venn diagram.

Recall that we looked at this example in Section 4 and could not tackle it at the time. Bayes' Theorem

Baye’s Theorem• Suppose we have two events E and F. Then the given

probability can be calculated using Baye’s Theorem.

Bayes' TheoremExample 7.6.1: For a fixed length of time, the probability of a worker error, event , on a certain production line is 0.1, the probability that an accident, event , will occur when there is a worker error is 0.3, and the probability that an accident will not occur when there is a worker error is 0.2. Find the probability of a worker error if there is an accident.

MAT 141 ‐ Chapter 7

24

Bayes' TheoremExample 7.6.2: For a given math class, the probability of a student getting over 90% on a test is 0.1, the probability that a student will get above 90% on homework when they get above 90% on their test is 0.92, and the probability that a student will get above 90% on homework when they do net get above 90% on their test is 0.15. Find the probability of a student a getting above 90% on a test given they did not get above 90% on their homework.

Example 7.6.2 Cont.

Medical Purpose• Bayes' theorem is largely used for medical and scientific

studies.

• Tests are not the event. We have a cancer test, separate from the event of actually having cancer.

• Tests are flawed. Tests detect things that don’t exist (false positive), and miss things that do exist (false negative).

• Tests give us test probabilities, not the real probabilities. People often consider the test results directly, without considering the errors in the tests.

• Bayes’ theorem gives you the actual probability of an event given the measured test probabilities.

Bayes' TheoremExample 7.6.3: Suppose you have cancer screening test which yields the following results.

• 1% of women have breast cancer (and therefore 99% do not).• 80% of mammograms detect breast cancer when it is there (and

therefore 20% miss it).• 9.6% of mammograms detect breast cancer when it’s not there

(and therefore 90.4% correctly return a negative result).• Put in a table, the probabilities look like this:

Suppose you get a positive test result, what is the probability that you actually have cancer?

MAT 141 ‐ Chapter 7

25

Cancer TestLet be the event that you have a positive test and let be the event you have cancer. Then the question, “What is the probability that you actually have cancer (give you had a positive test)?” becomes

|| ′

What does this mean?• So, our chance of cancer, given the test was positive, is about

7.8%.

• Interesting — a positive mammogram only means you have a 7.8% chance of cancer, rather than 80% (the supposed accuracy of the test). It might seem strange at first but it makes sense: the test gives a false positive 10% of the time, so there will be a ton of false positives in any given population. There will be so many false positives, in fact, that most of the positive test results will be wrong.

• If you take 100 people, only 1 person (1%) will have cancer. Another 10 (~9.6%) will not have cancer but will get a false positive result. Getting a positive result means you only have a roughly 1/11 chance of being the person who really has cancer (7.8% to be exact).

Other UsesOne clever application of Bayes’ Theorem is in spam filtering. We have

Event A: The message is spam.Test X: The message contains certain words (X)

• Plugged into a more readable formula:|

• Bayesian filtering allows us to predict the chance a message is really spam given the “test results” (the presence of certain words). Clearly, words like “viagra” have a higher chance of appearing in spam messages than in normal ones.

• Spam filtering based on a blacklist is flawed — it’s too restrictive and false positives are too great. But Bayesian filtering gives us a middle ground — we use probabilities. As we analyze the words in a message, we can compute the chance it is spam (rather than making a yes/no decision). If a message has a 99.9% chance of being spam, it probably is. As the filter gets trained with more and more messages, it updates the probabilities that certain words lead to spam messages. Advanced Bayesian filters can examine multiple words in a row, as another data point.

Bayes' Theorem• We have been looking at two sets and their compliments (e.g.

Cancer/No Cancer and Positive/Not positive). However, we can analyze more complicated situations with the general form of Baye’sTheorem.

For example, we could ask the probability of a certain Age, given a person is in a car accident, event . Here “Age” can be broken down into many categories such as

: 16 20: 21 30: 31 65: 66 99

MAT 141 ‐ Chapter 7

26

Bayes’s TheoremExample 7.6.4: An auto insurance company insures driers of all ages. An actuary compiles the following statistics on the companies insured drivers. A randomly selected driver that the company insures has an accident, what is the probability that they are 21-30 years old?

Bayes’s TheoremExample 7.6.5: A bank finds that the relationship between mortgage defaults and the size of the down payment is given in the following table.

(a) If a default occurs, what is the probability that is on a mortgage with a 5% down payment?

(b) If a default occurs, what is the probability that is on a mortgage with a 10% down payment?

(c) If a default occurs, what is the probability that is on a mortgage with a 20% down payment?

(d) If a default occurs, what is the probability that is on a mortgage with a 25% down payment?