>>For our last problem let’s consider a firm that manufactures integrated circuits
or chips based on extensive testing of a sample of a thousand chips. The firm finds that the
defect rate is ten percent. So ten percent of chips are defective. The firm then examines
its inspectors’ abilities to differentiate between defective and non-defective chips,
finding that the inspectors typically had a five percent error rate on both defective
and non-defective chips. The company’s main objective is to reduce the probability of
shipping defective chips. Okay, so we want to find what’s the probability that the
firm ships a defective chip, okay? So let’s name some events here. And I promise there’s
a probability in there somewhere. Okay, but we’re going to have to work with it to get
it out. The first event we should define is let’s call that event D and that is the
event that a particular chip is defective. Okay, and we know what that probability is,
we’ll get to that in a second. Let’s define another event, event I. And event I is going
to be that the inspector said the chip was defective. Okay, so note those are two different
things. The defec- the chip is defective or it’s not on its own. And then there’s
an inspector who tries to observe the chip and determine whether it’s defective or
not. Okay, so those are two very different things. This exists in nature; this is some
ability of a person to, to try to determine if this event is occurring. Okay, that’s
essentially how we consider it. Okay, it’s a little confusing but those are two very
different things. And note the inspector has some kind of error rate on determining whether
these chips are defective or not, okay. And so that’s actually a conditional probability,
which we’ll see in a second. So what is it we know about the problem? We know the
probability of finding a defective chip. Okay, we said that ten percent of those one thousand
chips were defective. So the probability of a defective chip is point one okay? Therefore,
the probability of D compliment would be point nine, okay? One minus this gives us the compliment
of a defective chip. And note here we’re assuming that a chip is either defective or
not. Okay? Defective and not defective are mutually exclusive. A chip can’t be both
defective and not defective at the same time. And they’re collectively exhausted. Let’s
assume there are only two categories, defective and not. Okay, so therefore those two probabilities
are going to sum to one. What else do we know? We know how good the inspector is when the
chip is defective. And when a chip is not defective. Okay, so let’s name a few of
these. Okay, we were specifically given the error rate when a chip is defective, what
is the error rate by the inspector when a chip is defective. So what would a, what would
an error be here? If it’s defective the inspector would make an error if the inspector
said it was not defective. Okay, we defined I as the inspector said that the chip was
defective so they would be making an error if it was defective and they said that it
wasn’t, okay? That’s the error. And that error occurs five percent of the time. Okay,
given that it’s defective what’s the probability that the inspector said it was not defective?
Point oh five, five percent error. That must mean that this probability is point nine five,
okay? The compliment of this, one minus this gives us this. Okay, the condition event stays
the same, we can take the compliment of this event and those two would sum to one. Okay,
so now we know how good is the inspector when the chip is defective. If the chip is defective
the inspector said it was ninety-five percent of the time. Okay, also we know when a chip
is not defective. What does the inspector say? Okay, so given that the chip is not defective,
what’s the probability that the inspector said it was not defective? Okay, given the
chip was not defective, what’s the probability that the inspector said that it was? Okay,
this is an error. It’s not defective. The inspector said that it was defective. That’s
an error, that happens five percent of the time. Okay? Remember, there was a five percent
error rate on both defective and not defective chips. Okay, so this is a five percent error
rate therefore the compliment of this must give us this, point nine five. Okay, so now
we know how good is the inspector at doing his or her job and they’re god ninety-five
percent of the time. And we know in general what’s the probability of having a defective
or not defective chip in the first place. And so what we want to know is given that
the inspector said a chip was not defective, what’s the probability that it really is?
Okay, so our main objective as a company is to reduce the probability of shipping defective
chips. We are not going to ship a chip if the inspector said it’s defective, we’re
only going to ship out a chip if the inspector said that it’s not. Okay, so the inspector
says that it’s not defective, what’s the probability that it really is? Okay, this
is the probability that we want to find. And we want to reduce that probability if we can.
Okay. Reducing the probability of shipping a defective chip. We’re shipping it out
because the inspector said it was okay, this is not the same probability as this. Or any
of these, right? Here this says how good the inspector is. This says given that we got
a chip that the inspector says is okay, what’s the probability that it’s really defective?
Okay, it’s not this, it’s something different. We have a set, a completely different set
of information here that we do, than we do here. Okay, and how do we solve a problem
like this? We can observe this, we can’t observe this directly. How do we solve that
kind of problem? With Baye’s theorem. Okay, remember what Baye’s theorem was? The probability
of A given B is equal to the probability of B given A, times the probability of A divided
by the probability of B. Baye’s theorem, we can observe this, this and this. We can
observe this directly but we can calculate it based on what we can observe. Okay? So
this is using this kind of notation, we can calculate this down here as the probability
of I compliment given D times the probability times the probability of D divided by the
probability of I compliment, okay? Good, so now let’s let’s put all of this stuff
in there, we have a lot of this already. Actually, so we have this: the probability of I compliment
given D. That’s over here. The probability of D is up here, but we don’t have this
exactly but we can calculate it based on some of our probability rules, okay? So let’s
go back to this general case up here. We said this, that the probability of A is equal to
the probability of A intersect B1, plus the probability of A intersect B2, where B1 and
B2 are mutually exclusive and collectively exhaustive. So there’s sample space that’s
made up entirely of B1 and B2 and A overlaps that. So let’s do this, here’s our entire
sample space, here’s B1 over here, here’s B2. And here’s this event A. Okay, so what
is the probability of A, well it’s the intersection of A and B1 and it’s plus the intersection
of A and B2. Okay, that’s the probability of A. And we also said that, using some of
our probability rules that this could be written in a little bit different way. We could say
that that is the probability of A given B1 times the probability of B1, plus the probability
of A given B2, times the probability of B2. Okay? So this by definition is this thing,
four events that are not independent of each other, okay? So with this idea in mind, with
this thing we can find this okay? Because we have conditional probabilities and marginal
probabilities that will help us find this. So that’s going to be the probability of
I compliment given D times the probability of D, divided by, let’s just implement this
down here, the probability of I compliment given D times the probability of D plus the
probability of I compliment given D compliment times the probability of D compliment Okay,
we said D and D compliment were mutually exclusive and collectively exhaustive. Okay, so this
will give us I compliment. This is exciting! This is exciting, I can feel it. So let’s
do this, let’s do the numerator. I compliment given D, point oh five. Probability of D,
point one, divided by, I compliment given D, point oh five, probability of D, point
one, plus the probability of I compliment given D compliment and that’s here, that’s
point nine five. Times the probability of D compliment, that’s point nine. So we’ve
got this. Okay, we’ve got now, what’s the probability that given the inspector said
it was okay that the chip is really defective, as it turns out, that probability is point
zero zero five eight. Okay? Point zero zero five eight, that’s a pretty small probability.
What’s the probability that given that the inspector said it was okay that it’s actually
defective? What’s the probability that we’re shipping out a defective chip? It’s a pretty
small probability. And why is that? Well one, the inspectors are pretty good at their job,
not perfect, but pretty good. And the probability that we have a defective chip in the first
place is pretty small, okay? That combined together using Baye’s theorem gives us a
pretty small probability that we’re shipping out defective chips.