Sign In | Subscribe
Start learning today, and be successful in your academic & professional career. Start Today!
Loading video...
This is a quick preview of the lesson. For full access, please Log In or Sign up.
For more information, please see full course syllabus of Probability
  • Discussion

  • Study Guides

  • Download Lecture Slides

  • Table of Contents

  • Transcription

Bookmark and Share
Lecture Comments (2)

1 answer

Last reply by: Dr. William Murray
Mon Jun 23, 2014 7:25 PM

Post by Sitora Muhamedova on June 21, 2014

I am a bit confuse because in the beginning of the course you had similar equation but a different way to get it.

you had:
P(A∩B) = P(A)*P(B)


is it since we are doing probability? Little explanation would help a lot.

Thank you

Inclusion & Exclusion

Download Quick Notes

Inclusion & Exclusion

Lecture Slides are screen-captured images of important points in the lecture. Students can download and print out these lecture slide images to do practice problems as well as take notes while watching the lecture.

  • Intro 0:00
  • Inclusion/Exclusion: Two Events 0:09
    • Inclusion/Exclusion: Two Events
  • Inclusion/Exclusion: Three Events 2:30
    • Inclusion/Exclusion: Three Events
  • Example I: Inclusion & Exclusion 6:24
  • Example II: Inclusion & Exclusion 11:01
  • Example III: Inclusion & Exclusion 18:41
  • Example IV: Inclusion & Exclusion 28:24
  • Example V: Inclusion & Exclusion 39:33

Transcription: Inclusion & Exclusion

Hello, welcome back to the probability lectures here on www.educator.com, my name is Will Murray.0000

Today, we are going to talk about the rule of inclusion and exclusion.0005

The rule of inclusion, exclusion is a way of counting the union of two or more events.0010

Let me show you what is going on here.0018

I'm just going to show you the version of inclusion, exclusion of two events first.0022

Then I’m going to show you the merging with three events in a moment.0027

The idea here is that you got two events here and I will call them in red and blue circles here.0030

We are trying to count the union in there.0038

I’m going to call these events A and B.0041

I’m trying to account the combined area between A and B.0044

The rule of inclusion/exclusion says that if you want to count the union of A and B,0049

what you do is you count A separately by itself and then you count B separately by itself.0056

If you do that, what you have done is you have counted everything in A.0062

You will count all this area right here and then you count everything in B.0067

You have counted all this red area right here.0071

The problem is that you have over counted the stuff that is common between A and B.0075

You have over counted all this stuff in the middle here, the intersection of A and B.0081

To fix that, you subtract that off.0086

That is where we get this last term in the formula.0089

You subtract off the intersection of A and B.0093

That is the rule of inclusion/exclusion for two events.0097

This is also useful if you solve it the other way around, if you solve for the intersection instead of the union.0100

If you just take this same rule and you move the intersections to the other side and0107

move the union over to the right hand side, then you get a parallel rule 0112

which tells us that you can count the intersection of A and B by first counting A + B, and then by subtracting off the union.0117

It is basically the same rule but you swap the rules of intersections and unions.0130

That is the inclusion/exclusion rule for two events.0136

We will see some examples in the problems later on where you get some practice counting those things.0139

First, we want to go ahead and look at the inclusion/exclusion rule for three events.0145

That one is a little more complicated.0152

I will draw more complicated picture here because we are going to have three different events going on.0154

We will try to count all three.0161

There is my A, there is my B, they have to be the same size which is good because mine are not.0164

There is my C.0174

We are trying to count the union of the three events.0176

We are trying to count the area that is covered by all three circles here.0179

First, we count all the area inside A.0183

That is all that area right there, all the blue areas.0187

That is what is going on here with the A right there.0191

Then, we count all the area inside B.0195

Let me shade that in red.0197

We count all that area right there, that is the B.0201

I will color the area for C in green.0205

We count all that area in green here.0211

That is where that term comes from.0216

If you look, we have over counted a lot of the area in here.0218

We have counted a lot in this area more than once.0222

First of all, we look at the common area between A and B, the intersection of A and B.0225

That is A intersect B right there.0232

It looks like we counted it twice.0235

We counted it once in red and once in green.0238

We have to subtract it off.0241

I'm going to show you that subtraction term right here.0243

That is where we subtract off the intersection of A and B.0247

And then A intersect C over here is colored both blue and green, that also got counted twice.0250

I will subtract that area off right here A intersect C.0261

And then a similar thing happens where B intersects C, is this area right here.0265

The red and green areas, that is B intersect C.0271

That counted twice so I will subtract that off.0273

It gets a little more complicated because there is one area in the middle which I color in yellow.0279

This area right here, this area in the middle.0286

I will see if I can describe that in yellow.0290

That is A intersect B intersect C.0303

What happened was that originally got counted 3 separate times and it got counted in A, 0313

it got counted in B, it got counted in C.0319

But then, it got subtracted off three separate times.0322

When we subtracted off A intersect B and A intersect C, B intersect C.0326

We kind of counted it three times and then we subtracted it off three times.0329

The result that it got counted 0 times.0336

That area did not get counted at all in the final analysis.0339

What we have to do is add that area back in and that is where this final term comes for the inclusion/exclusion formula.0343

A intersect B intersect C, we have to add it back in one more time to make sure it is counted exactly once in the final formula.0351

Our formula, ultimately, if you want to count A union B union C, what you do is you count A, B, and C separately0360

and you subtract off each of their intersections and then you have to add back in the intersection of all three.0369

It is a bit complicated, that formula, we will see some practice in the exercises.0375

Let us go ahead and try some examples out.0382

First example here is, we are at a small college and apparently, there are 150 freshmen here taking English 0385

and 120 freshmen at this college are taking Math.0392

There might be some overlap, in fact it tells us that there are 90 freshmen taking both classes.0396

The question is how many are taking at least one of English and Math?0402

How many freshmen will there be taking at least one of English and Math?0406

To solve this, I'm going to set up some events here.0411

I’m going to say A is the freshmen taking English.0414

I will just write English for short here.0418

B is the freshmen taking Math.0422

We want to count how many are taking at least one of the two which is the union of the two sets, 0428

because it is all the people taking English or Math or both.0435

What we want to count here is A union B.0438

That is straightforward application of our inclusion/exclusion formula. 0445

Let me remind you what that was.0450

The way you count A union B is you count A and then you count B.0452

And now you have over counted the intersection so you want to subtract off the intersection - A intersect B.0456

In this case, all the numbers are just given to us right here in the problem.0463

The number of people taking English was 150.0466

The number of people taking math is 120.0471

The number of people taking both of them, that is the intersection is 90.0475

We have 270 - 90 and that simplifies down to 180 freshman here are taking either English or Math or both of them.0481

The other way to look at this is to draw one of our Venn diagrams and then fill in the numbers on each of these.0493

We have a certain number of people taking English.0503

A certain number of people taking Math.0506

There is English right there and there is Math.0509

We have a certain number people taking both of them.0513

Let me fill in the people taking both of them first.0515

There are 90 people taking both of them.0518

There is a 150 taking English.0522

We already accounted for many in the overlap.0525

There must be 60 more of them just taking English but not Math.0527

In math, we got 90 that we already accounted for in the overlap but 120 totals.0532

There must be 30 out here just taking Math.0539

If you try to figure out how many there are taking either one or both, it would be 60 + 90 + 30.0542

And of course that gives you the same number we got as 180 students taking either one.0551

Let me recap quickly how we got those answers.0560

We set up events for the students taking English and math and then0564

we just use our straightforward inclusion/exclusion for two events.0567

The number of people in A union B is number in A + number in B - the number in both A and B which is the intersection.0572

Those numbers come straight out of the stem of the problem and we add them up and we get 180.0580

This was a little pictorial way to illustrate it and figure out directly if we break down 0586

how many students are taking both, that is 90 taking both and then the 60 really came from doing 150 – 90,0592

because there are 150 taking English and we know that 90 of them are already accounted for taking Math.0601

This 30, in a similar fashion came from 120 - 90 because there are 120 taking Math0608

but we know that we already accounted for 90 of them also taking English.0617

That tells us exactly how many students are in each group and we can add those up 0623

to find the total number of students taking English or Math.0628

Now, I want you to hang onto these numbers for the next example because in the next example, 0632

we are going to stay at the same small college and we still have the same number of people taking English and Math.0636

We are going to add in a third subject which is History and 0645

we are going to have to use our inclusion/exclusion formula for three events.0647

We will use the same number so make sure you understand these numbers before you move on to example 2.0653

In example 2, we are at the same college that we were in for example 1.0663

If you have not just watched the video for example 1, go back and watch that one first because 0667

I'm going to keep using the same numbers that we figure out for example 1 in example 2, at the same college.0672

We are going to use the same events as well.0679

A is the event of a student taking English and B is the event of a student taking Math.0682

And now we are introducing a third event, C is the event of a student taking history.0694

And let us see, we are trying to find out how many are taking at least one of the three?0701

That would be the union of our three events.0708

We are going to count that.0712

We are going to use some of the numbers from example 1.0714

Remember to get the numbers from example 1.0716

I'm going to write out the formula for inclusion/exclusion for three events.0718

That is A union B union C.0724

It was this complicated formula.0728

It is the number things in A + the number of things in B + the number of things in C.0730

Then, you have to subtract off all the intersection.0737

A intersect B - A intersect C - B intersect C.0739

As we saw on one of the beginning slides in this lecture, just a couple of slides ago.0747

They have to add back in the intersection of all three of them, A intersect B intersect C.0752

I want to go through and fill in all those numbers.0761

Some of these were given to us in the first example, example 1.0763

Go back and check those numbers, if you do not know where these come from.0768

The number of people taking English was 158, we are told that in example 1.0771

Remember, the people taking math was 120 and now we are told that the same college right here, 0776

100 people are taking history.0782

Remember, people taking both English and Math, we found that out in the previous problem was 90.0785

A intersect C is English and History.0792

We are told that that is 80 people taking both English and History.0796

Let me subtract off 80 there.0804

And then, math and history is 75.0806

And A intersect B intersect C is the people taking all three Math, English and History.0810

We are told that there are 60 people taking all three classes.0819

I’m going to add that 60 back in.0822

It is just a quick matter of adding up the arithmetic and if you do, 0825

I think I already checked these numbers 270, 370, 280, 200, 125 + 60 is 185.0831

That is how many students are taking all three classes.0848

We are also asked how many are taking only history?0852

I think the easiest way to figure that out is by drawing a diagram.0855

Let me draw a diagram of all three classes represented there, math, English, and history.0861

We will see if we can figure out just exactly how many students go in each different category there.0868

I have got a group of students taking English, a group of students taking math, and a group of students taking history.0877

There is my English group, there is my math group, and there is my history group.0890

They are perfect circles but that is alright.0894

I want to find whatever numbers I can now and I know that 60 are taking all three classes.0896

I will write it from the inside out here.0901

I know that 60 people are taking all three classes.0904

I know from the previous example, from example 1, that there were 90 students taking both English and math.0908

And we already accounted for 60 of them.0917

That means that 30 students left over here in the English and math.0919

In English and history, there are 80 students total.0923

We already accounted for 60 of them so there must be 20 here that are taking English and history but not math.0927

For math and history, we got 75 total.0934

60 of them are also taking English that means 15 of them are taking math and history but not English.0938

Let me go ahead and figure and fill in the others.0944

For English, I see that I already got 110 accounted for but there is a 150 English students total.0947

It must be 40 more outside here.0957

From math, I see I got 90 + 15, a 105 total but there were 120 people taking Math.0960

There must be 15 left over.0966

And for history, I see that I got 20 + 60 + 15 that is 80 + 15.0969

95 students total.0975

It said that 100 freshmen are taking history.0978

I have accounted for 95 of them.0984

That must mean that there is 5 extra students left over here.0985

I think the question said, how many are taking only history?0990

The answer to that is that 5 students are taking history but not math or English.0994

That is coming from that 5, right there.1007

Let me remind you how we get everything here.1019

We got three events here, we got English, math, and history.1021

We are using our inclusion/exclusion rule for three events.1024

And that is the formula that we had on one of the earlier slides for the inclusion/exclusion rule for three events, A union B union C.1028

You add the individual events, you subtract off the intersections, and then you add back in the three way intersection.1036

And I just fill then all the numbers.1044

Some of these numbers I got from example 1 because it was the same example.1046

Then, I filled in the new numbers that we are given here in example 2.1051

And I add them up and I got 185.1056

Another way to do that is to set up this diagram here and setup circles for English, math and history1058

and figure out what the numbers of students are in each of these categories.1066

To do that, you really want to work from the inside out.1072

We start the 60 students in all three, and then we work our way out into figure out 1074

how many students are in each intersection, and we get those by subtracting.1080

For example, this 20 came from the fact that there were 80 students taking English and history.1083

We already accounted for 60 of them taking all three classes.1091

That 20 was 80 -60.1097

We have figured out this 30 right here and this 15 right here.1100

By doing some more subtraction, we figure out that there are 40 students just taking English,1104

15 students just taking Math, and 5 students just taking history which was the answer to the second part of the problem there.1109

For example 3, we are going to keep going in a college setting but this time we are going to look at student ID numbers.1123

In this particular small college, they range from 000 to 999 which really means there is1129

a thousand numbers available because 1 through 999 and then one more for 000.1134

The question is how many of these numbers have at least 1-3 and at least 1-4 in them?1141

I want to set up some events to solve this.1148

Let me go ahead and describe my events here.1150

A is going to be the set of all numbers that have at least 1-3 in them.1154

B will be the set of numbers that have at least 1-4 in them.1167

By the way, some notation that I'm using here that you might not seem is this colon equals notation.1177

Colon equals just means, when I'm defining a set.1184

That means A is defined to be, whatever is appearing on the right.1188

Defined to be whatever is appearing on the right.1198

That is what that colon equals notation means.1203

It is a notation that I borrowed from the Computer Sciences.1206

It is very useful when you are programming to say this variable is defined to be some value.1209

That is why I mean by that colon equals.1214

If you do not like it, you can just use and equal sign and it essentially means the same thing.1217

Let me keep going here.1225

We are going to use inclusion/exclusion here and we are going to try to count A intersect B.1226

We have been asked to find the number of ids that have at least 1-3 and at least 1-4.1235

That really means we are going to count A intersect B.1243

But inclusion/exclusion say we can count that if we can find A by itself and B by itself, and A union B.1247

Each one of those is a little problem here.1255

Let us try to count each one of those.1257

A by itself, how many numbers have at least 1-3 in them?1259

The easiest way to count that is to count the complement.1266

It is 1000 numbers total - the numbers with no 3’s in them.1269

Let us think about how many numbers have no 3’s in them.1286

That means you are trying to build a three digit number and you are allowed to use any digit you like 1291

except you cannot use the digit 3.1297

You got three digits here, if you cannot use the digit 3 and you have really only got 9 choices left, 1300

0-9 except the 3 for each of these possibilities.1307

There are 9 possibilities here, 9 possibilities for the second digit and 9 possibilities for the third digit.1312

This is, in total, 1000 – 9³.1320

We are throwing out all the numbers that do not have any 3's in them,1327

leaving us exactly the numbers that have at least 1-3 in them.1332

9³ is 729, this is 1000 – 729.1336

That is, 1000 – 729 is 271.1344

For B, what is all the numbers that have at least 1 -4?1352

Exactly the same reasoning applies, just instead of kicking out all the ones with the 3 in them, 1357

we are going to kick out the ones with 4 in them.1364

To count those, we have 9 digits available because we kicked out the 4, instead of kicking out the 3.1368

That is going work out exactly the same way.1373

1000 – 9³ and again that is going to work out to 271.1376

Since, I would like to know calculate A intersect B, the preliminary step to doing that is to calculate A union B,1384

which means the number of ids that have at least 1-3 or at least 1-4 or both.1394

That is what we have to try to count.1418

That is quite difficult to count directly.1420

It is hard to count the number of ids that have at least 1-3 or at least 1-4.1423

The easy way to count it is to work backwards and start with 1000 numbers total and subtract off the complement of that set,1428

which is all the numbers that have no 3’s and no 4’s.1437

Let us try to count all the numbers with no 3’s and no 4’s.1454

That is kind of similar to what we get above.1458

We have a three digit number, we have all the digits available to us except there are no 3’s and no 4’s.1460

There is 8 possibilities for each digit, 8 times 8 times 8.1468

This is 1000 -8³.1473

8³, if you know your powers of 2 very well turn out to be 512.1478

1000 -512 and that is 488.1483

Finally, we are in a position to use our formula for inclusion/exclusion.1494

We are trying to count A intersect B.1497

We want the numbers that have a 3 and have a 4 in them.1499

Inclusion/exclusion says you add up all the a's, all the b’s, and then you subtract off the union.1503

That was our second formula for inclusion/exclusion back on the very first slide of this lecture.1513

You can go back and check that out.1519

In this case, we have 271.1520

Let me make that a little more obvious, what I’m writing there. 1525

271 + 271 – 488.1528

271 + 271 is 5420 – 488, that is 42 + 12 which is 54.1536

That is the number of student ID numbers that will have both a 3 and a 4 in them.1551

They have at least 1-3 and 1-4 in them.1558

That is our answer.1562

Let me just highlight the key steps there.1565

First thing here was to set up some events.1567

We set up, we define an event A to be all the numbers with at least 1-3.1570

Event B is all the numbers with at least 1-4.1576

We are planning to use this inclusion/exclusion formula.1579

We want to count the and of something which means we want to count an intersection.1584

Our inclusion/exclusion formula for an intersection says that you have to add up the individual sets and then subtract off the union.1590

I have got to count all the things in the individual sets and in the union.1597

To find the individual sets, A is all the numbers with at least 1-3.1602

It is quite tricky to count directly but it is easy to count the complement of that.1607

That is what we are doing here.1611

We are counting all the things with no 3’s in them.1613

That is really a complement there.1616

To get the number with no 3’s, you are building a number out of the 9 remaining digits, 0 through 9 but you cannot use a 3.1620

There are 9 choices for each decimal place and that is why we got 9³ there.1628

1000 -9³ simplifies down to 271.1635

These are all the numbers that have at least 1-4.1639

That is exactly the same reasoning, you are building a number out of 3 digits but you are not allowed to use 4.1641

You end up with 271 again.1647

A union B is all the numbers that have at least 1-3 or at least 1-4.1651

Again, that is quite a difficult thing to count directly but you can count the compliment.1658

The compliment means that you would have no 3’s and no 4’s.1663

That is A union B complement right there.1668

That means you are trying to build a number using all the digits except no 3’s and no 4’s.1672

You are allowed to use 8 digits here, 8 digits here, 8 digits here, and you end up with 8³ numbers.1678

I will subtract that from 1000 because that was the complement of what we want.1685

You end up with 488.1689

And that is just a matter of dropping those numbers into our inclusion/exclusion formula 1691

and simplifying down to 54 student ID numbers is our final answer there.1696

Example 4, we have to figure out how many whole numbers between 1 and 1000 are divisible by 2, 3, or 5?1707

Again, this is going to be inclusion/exclusion.1715

We are going to have three events here.1717

Let me go ahead and define what the events are.1719

A is going to be the set of all numbers that are divisible by 2.1721

Remember that notation with a colon equals, that means define to be.1734

B is defined to be the set of all numbers divisible by 3.1738

C is the set of all numbers divisible by 5.1748

We are going to use inclusion/exclusion.1752

We are trying to find the union of three events here because we want all the numbers that are divisible by at least 1 of 2, 3, or 5.1754

You see or, you know you are counting union, A union B union C.1773

Let me go ahead and write out the formula for the inclusion/exclusion formula for the union of three events.1781

We discover this in the second slide of this topic.1787

You can go back and check that out, if you do not remember it.1791

It is everything in A + everything in B + everything in C.1793

And I have to subtract off the intersections.1803

A intersect B - A intersects C - B intersect C.1813

And now you have to add in the intersection of all three, A intersect B intersect C.1816

Now, we have to think how big each of these sets are.1825

A is the set of numbers divisible by 2.1830

How many numbers between 1 and 1000 are divisible by 2?1833

Since, every other number is divisible by 2, the size of A is 1000 ÷ 2 which is 500.1837

There is 500 numbers that are divisible by 2, 500 even numbers.1852

How many are divisible by 3?1856

It is essential 1000 ÷ 3 but that is not a whole number.1858

What happens is it does not quite work because we have multiples of 3 every third number.1866

But then at the end, we just get some extra numbers that do not give us anything.1871

I’m going to round that down.1876

This is the floor function notation.1879

It just means I'm running it down to 999/3 and the reason I pick 999 is because it is a multiple of 3.1881

That gives me 333 numbers divisible by 3.1892

C is divisible by 5, how many numbers are divisible by 5?1900

1000/5 and that is a whole number, that is just 200, + 200 here.1905

A intersect B is where it starts to get interesting because A intersect B means, it is divisible by 2 and it is divisible by 3.1913

Since 2 and 3 are relatively prime, if it is divisible by both of them, A intersect B really means that is divisible by 6.1922

If it is divisible by both 2 and 3 then it is divisible by 6.1937

It is a multiple of 6.1941

How many numbers between 1 and 1000 are divisible by 6?1942

Every 6th number is divisible by 6.1946

You really have to look at 1000 ÷ 6.1950

That is not a whole number.1954

I’m going to use this 4 notation to round down.1955

The largest number below 1000 that is divisible by 6 is 996.1960

We can kind of throw out everything after 996 and just see how many multiples of 6 there are between 1 and 996.1966

If we divide that by 6, 996/6 turns out to be 166.1974

That is how many numbers there are between 1 and 1000 that are divisible by 6.1983

That is what it means to be divisible by 2 and by 3.1988

We are going to subtract of 166 here.1994

For A intersect C, that is divisible by 2 and divisible by 5.1999

If it is divisible by two and by 5 then you are divisible by 10.2005

We are going to ask how many multiples of 10 are there between 1 and 1000?2014

And of course, there are 1000 ÷ 10.2019

I do not have to round that down since it is a whole number.2024

There is 100 of those, -100.2026

Finally, for B intersect C, that is not finally.2031

I’m running out of space here.2034

Let me carve out some space down here for myself.2039

For B intersect C, it would be the set of numbers that are divisible by both 3 and 5.2043

Those are being divisible by 15.2056

I have to figure out how many numbers between 1 and 1000 are divisible by 15?2059

Again, it is just all the multiples of 15.2064

It is every 15th number.2066

It is 1000/15 except that is not a whole number.2068

We are going to throw out the last few numbers and I’m going to round down.2075

When I cut it off at the last multiple of 15 before 1000 which is 990.2078

990 ÷ 15 and that turns out be, 90 ÷ 15 is 6, 900 ÷ 15 is 60.2085

That is 66 there for B intersect C.2096

Finally, A intersect B intersect C, that means you are divisible by 2 and 3 and 5, 2102

which means you are divisible by the least common multiple of 2 and 3 and 5 which is 30.2110

I want to find out how many numbers there are between about 1 and 1000 that are divisible by 30.2126

Essentially, I just divide 1000 by 30.2131

But again, it is not a whole number.2133

I’m going to round down this one sided bracket notation.2135

It is the floor function, it means you round down because you are cutting off any numbers 2139

at the end that would not be divisible by 30.2144

The last multiple of 30 before 14000 is also 990.2146

Let me throw away all the numbers between 990 and 1000.2153

I will just keep the ones up through 990.2156

990 ÷ 30 is 33.2161

That is the set of numbers divisible by 2, 3, and 5.2165

I want to add at the end here, 33.2170

Now, it is just a matter of doing the arithmetic.2175

500 + 333 + 200 is 1033 - 166 -100 -66 + 33.2178

1033 + 33 -66 give us an even 1000 - 100 is 900 -166 is 734.2198

That is our answer there.2212

That is the number of whole numbers between 1 and 1000 that would be divisible by 2 or 3 or 5, 2214

or some combination of those prime numbers.2223

That is our answer, let me show you again the steps we followed there.2229

We first set up three events there.2233

A is the stuff divisible by 2.2235

B is the stuff divisible by 3.2238

C is the stuff divisible by 5.2241

I’m going to use the formula for inclusion/exclusion for 3 events to find all the numbers 2243

that are divisible by at least one of those things.2250

I’m counting a union there.2254

I’m counting all the stuff in A + all the stuff in B + all the stuff in C.2256

Let me remind you how we counted that.2261

A is all the multiples of 2.2264

To see how many multiples of 2 there are, you just divide 1000 by 2 and you get 500.2266

That is where that 500 came from.2272

B is the multiples of 3.2274

1000/3 does not go quite evenly, you have to round down to 333.2276

C is 1000/5, the multiples of 5, there are 200 of them.2283

A intersect B, you are looking at multiples of 2 and 3 because it is an intersection, it is N.2288

If it is divisible by 2 and 3, then it is divisible by 6.2295

We have to find the multiples of 6.2300

We look at 1000 ÷ 6 which is not a whole number.2303

Throw out all the numbers at the very end which are not visible by 6 anyway.2307

And we just look at the last multiple of 6 is 996, divide that by 6 and get 166 multiples of 6 there.2311

Similarly, A and C means divisible by 2 and 5, you are divisible by 10.2319

Every 10th number is divisible by 10, there is 100 of them.2325

B and C divisible by 3 and 5, these are divisible by 15.2330

1000/15, once you round down is 66.2335

That is where that 66 come from.2338

A intersect B intersect C means you are divisible by all three numbers, 2, 3, and 5, which makes you divisible by 30.2341

1000/30, we are going to throw out all the numbers at the end that are not multiples of 30.2350

We will just stop at 990, the last multiple of 30.2356

And then counting up to there, we get 990/30 is 33.2359

That is just a matter of simplifying the numbers down and doing the arithmetic and coming up with our answer of 734 numbers.2364

In our final example here, we are going out to a busy restaurant.2375

They are serving 200 customers that night.2379

I'm looking at it from restaurants point of view.2382

125 of their customers ordered appetizers and 110 ordered desserts.2385

170 of those customers ordered at least one of an appetizer and or a dessert.2391

The question is how many ordered both appetizers and desserts?2399

Quickly, I need to set up some events here.2403

My colon equals, remember, means to find the B.2408

I’m just cutting it for short and say A is the set of all people who ordered an appetizer.2410

I can remember how to spell appetizer, it would help.2419

B is the set of all the people that ordered dessert.2424

And we are asked how many ordered both?2430

Both means we are looking for people who ordered an appetizer and a dessert.2434

That is the intersection.2438

We are trying to calculate how many people ordered both?2440

Our original rule for inclusion/exclusion on two events, if you go back and look at the very first slide in this lecture, 2445

we had the formula A intersect B.2452

The number of things in A intersect B is the number of things in A + the number of things in B - the number of things in the union.2455

We can calculate all of these directly from the problem stem.2465

A is the number of people who had appetizers and it tells us that is 125.2469

It tells us that up here.2474

B is the number people who ordered desserts, there are 110 of them.2476

But 170 people ordered at least one, that is the union right there.2480

At least one means a union.2485

We are going to subtract off 170 in here.2487

Let us just do the arithmetic.2491

We get 235 -170 is 65 people.2493

We must have had 65 people ordering both an appetizer and desert at this particular restaurant.2501

Ordered both, that means they are in the intersection of A and B.2510

They are in both A and B.2515

That was probably easier than some of the other problems here.2519

Let me make sure that all the steps are really clear.2523

First thing do is to set up events A and B, people who ordered appetizer, people who ordered dessert.2525

And then we are asked how many people ordered both which means we are counting an intersection.2531

We are going to count an intersection.2536

We are going to use the formula for inclusion/exclusion that we had back in the very first slide.2539

You count the individual events and then you subtract off the union.2544

And we know the size of those because it is given to us in the stem of the problem.2549

125 ordered appetizers, 110 ordered desserts, and 170 ordered at least one.2553

That is the union right there, it is the 170.2560

We just run the arithmetic here and we end up with 65 people ordering both appetizers and desserts.2563

65 people in the intersection there.2572

Interesting point about this problem is that this 200 customers total in the restaurant appears to be a red herring.2575

It does not appear to be relevant at all to solving the problem.2583

You do not always have to use every number in the problem to get your answer.2587

Often the way, problems in homework exercises are set up.2592

You use every number but it is not always true.2596

Sometimes there is some red herring information there.2598

That wraps up our lecture on inclusion/exclusion.2602

I hope you will stick around for some more lectures.2606

We got some good stuff coming up on independence and on Bayes' rule in the next couple of lectures.2608

These are the probability lecture series here on www.educator.com.2614

My name is Will Murray, thank you for watching, bye.2618