WEBVTT

00:00:01.520 --> 00:00:03.890
The following content is
provided under a Creative

00:00:03.890 --> 00:00:05.280
Commons license.

00:00:05.280 --> 00:00:07.520
Your support will help
MIT OpenCourseWare

00:00:07.520 --> 00:00:11.610
continue to offer high-quality
educational resources for free.

00:00:11.610 --> 00:00:14.150
To make a donation or to
view additional materials

00:00:14.150 --> 00:00:18.080
from hundreds of MIT courses,
visit MIT OpenCourseWare

00:00:18.080 --> 00:00:19.320
at ocw.mit.edu.

00:00:24.440 --> 00:00:27.500
WILLIAM GREEN, JR: All
right, let's get going.

00:00:27.500 --> 00:00:32.490
So today, I'll say a few
more words about PDEs,

00:00:32.490 --> 00:00:34.490
and then we'll leave
that topic for a while.

00:00:34.490 --> 00:00:36.156
I think I'll actually
come back and have

00:00:36.156 --> 00:00:39.530
a little lecture about that
right before Thanksgiving,

00:00:39.530 --> 00:00:42.140
for those of you still around.

00:00:42.140 --> 00:00:44.110
And then we'll start
talking about probability,

00:00:44.110 --> 00:00:47.000
and then that will lead
into several lectures

00:00:47.000 --> 00:00:50.930
about models versus data,
which is a very important topic

00:00:50.930 --> 00:00:54.080
for all of you who either
plan to generate data

00:00:54.080 --> 00:00:57.290
or plan to generate models
during your stay here,

00:00:57.290 --> 00:00:59.689
which probably is everybody.

00:00:59.689 --> 00:01:01.230
So we'll talk about
that for a while.

00:01:03.830 --> 00:01:06.765
So PDEs.

00:01:06.765 --> 00:01:09.530
I guess the first comment is,
homework 7, have any of you

00:01:09.530 --> 00:01:10.608
looked at this yet?

00:01:10.608 --> 00:01:11.922
AUDIENCE: [INTERPOSING VOICES]

00:01:11.922 --> 00:01:13.372
[LAUGHTER]

00:01:13.372 --> 00:01:14.871
WILLIAM GREEN, JR:
Not a single one.

00:01:14.871 --> 00:01:16.344
AUDIENCE: [INAUDIBLE]

00:01:16.344 --> 00:01:19.781
[LAUGHTER]

00:01:22.250 --> 00:01:24.870
WILLIAM GREEN, JR: So
homework 7 is the same problem

00:01:24.870 --> 00:01:29.280
that Kristin showed in class
in the demo for COMSOL,

00:01:29.280 --> 00:01:30.880
and I want you to
solve it both ways.

00:01:30.880 --> 00:01:33.270
So solve it with
COMSOL and then solve

00:01:33.270 --> 00:01:35.770
it writing your own
finite volume code.

00:01:35.770 --> 00:01:39.350
And I want to warn you.

00:01:39.350 --> 00:01:43.380
This problem has a
characteristic length

00:01:43.380 --> 00:01:50.950
that's way smaller than the
dimensions of the problem.

00:01:50.950 --> 00:01:54.270
And so in principle,
you might need

00:01:54.270 --> 00:01:57.510
to use an incredibly
fine mesh to resolve

00:01:57.510 --> 00:01:59.540
the gradients in the problem.

00:01:59.540 --> 00:02:03.600
So just remember, in case
you haven't looked at it,

00:02:03.600 --> 00:02:05.670
the problem is we
have a drug patch.

00:02:05.670 --> 00:02:07.770
It has some concentration
of the drug.

00:02:07.770 --> 00:02:11.960
The drug is diffusing slowly
out of the patch into the flow,

00:02:11.960 --> 00:02:15.720
and we have some
flow here like that.

00:02:15.720 --> 00:02:18.342
And the characteristic
length is at the--

00:02:18.342 --> 00:02:20.950
this is a velocity
boundary layer.

00:02:20.950 --> 00:02:23.670
So the velocity
in the x-direction

00:02:23.670 --> 00:02:33.520
is equal to y times
something, dv dy, I guess.

00:02:33.520 --> 00:02:37.590
This is some number, and
so this has units of--

00:02:40.180 --> 00:02:45.780
what is that-- per second,
so like a strain rate, OK?

00:02:45.780 --> 00:02:51.210
And the diffusion here is
controlled by diffusivity D,

00:02:51.210 --> 00:02:55.690
and that has units of, say,
centimeter squared per second.

00:02:55.690 --> 00:03:04.710
And so the D over
dvx dy, this thing

00:03:04.710 --> 00:03:10.350
gives a characteristic
length squared,

00:03:10.350 --> 00:03:13.840
which is sort of the natural
length scale of this problem.

00:03:13.840 --> 00:03:17.182
And the problem is that
for the drug molecule,

00:03:17.182 --> 00:03:18.015
it's a big molecule.

00:03:18.015 --> 00:03:20.390
It has a very small diffusivity.

00:03:20.390 --> 00:03:23.740
And so therefore, this
is a really tiny ratio,

00:03:23.740 --> 00:03:25.750
and so the L is very small.

00:03:25.750 --> 00:03:29.400
And similarly, if you
look at it from the point

00:03:29.400 --> 00:03:31.800
of view in the x-direction,
the Peclet number

00:03:31.800 --> 00:03:33.417
is really gigantic.

00:03:33.417 --> 00:03:36.000
And so both of those will tell
you that you have to watch out,

00:03:36.000 --> 00:03:38.125
there might be very sharp
gradients in the problem.

00:03:38.125 --> 00:03:41.400
And if you just think of it
physically, right over here

00:03:41.400 --> 00:03:44.189
we think the concentration's
0, somewhere over here.

00:03:44.189 --> 00:03:46.230
And all of a sudden right
here, the concentration

00:03:46.230 --> 00:03:48.600
is going to be close to the
concentration in the patch.

00:03:48.600 --> 00:03:49.980
So there's almost
a discontinuity

00:03:49.980 --> 00:03:51.730
in the concentration.

00:03:51.730 --> 00:03:55.032
So there's a really sharp
gradient on the upstream edge.

00:03:55.032 --> 00:03:57.240
And then something funky is
going to happen down here

00:03:57.240 --> 00:03:58.070
at the end of the patch, too.

00:03:58.070 --> 00:04:00.660
It won't be quite as abrupt,
but could be pretty strange.

00:04:03.210 --> 00:04:04.370
All right, so you got it?

00:04:04.370 --> 00:04:04.870
OK.

00:04:07.546 --> 00:04:09.420
And in the problem, we
want you to figure out

00:04:09.420 --> 00:04:12.590
the drug diffusing all the
way over to here somewhere,

00:04:12.590 --> 00:04:14.010
way far over there.

00:04:14.010 --> 00:04:17.670
And so you may need quite a few
mesh points in the y-direction

00:04:17.670 --> 00:04:19.330
as well.

00:04:19.330 --> 00:04:19.829
All right.

00:04:19.829 --> 00:04:24.690
And this kind of problem, this
is a very simple case, right?

00:04:24.690 --> 00:04:26.970
There's no reactions.

00:04:26.970 --> 00:04:28.725
The velocity's just
in one direction,

00:04:28.725 --> 00:04:30.414
and this is not
a very hard case.

00:04:30.414 --> 00:04:31.830
But you'll see
it's actually still

00:04:31.830 --> 00:04:33.910
pretty tricky to get
the right solution.

00:04:33.910 --> 00:04:36.660
So don't just believe
what the code tells you.

00:04:36.660 --> 00:04:38.580
Just run COMSOL and just--

00:04:38.580 --> 00:04:40.860
don't believe it's
showing the truth.

00:04:40.860 --> 00:04:43.770
And don't believe you just
write down some finite volumes

00:04:43.770 --> 00:04:45.045
that you'll get the truth.

00:04:45.045 --> 00:04:47.170
So mess around with it and
try to convince yourself

00:04:47.170 --> 00:04:48.090
it's really converged,
and you really

00:04:48.090 --> 00:04:49.423
have the real physical solution.

00:04:51.532 --> 00:04:52.990
Because we expect
a sharp gradient,

00:04:52.990 --> 00:04:54.660
say, in the upstream
edge, you might

00:04:54.660 --> 00:04:58.590
want to play with using a
finer mesh in the x-direction

00:04:58.590 --> 00:05:02.350
here than you would down here,
because down here presumably

00:05:02.350 --> 00:05:04.560
the gradients in x-direction
are much smaller.

00:05:04.560 --> 00:05:08.490
So you don't have to use
square finite volumes.

00:05:08.490 --> 00:05:09.960
You could use rectangles.

00:05:09.960 --> 00:05:11.005
Yes?

00:05:11.005 --> 00:05:12.380
AUDIENCE: I don't
understand what

00:05:12.380 --> 00:05:15.736
you have written [INAUDIBLE]
as vx equal y dvx dy.

00:05:15.736 --> 00:05:16.736
WILLIAM GREEN, JR: Yeah.

00:05:16.736 --> 00:05:18.680
AUDIENCE: So what--

00:05:18.680 --> 00:05:21.096
WILLIAM GREEN, JR: So that's
because the velocity-- the vx

00:05:21.096 --> 00:05:27.490
is 0 at the wall, and the
velocity increases with y.

00:05:27.490 --> 00:05:30.770
So vx increases the
further you get from y.

00:05:30.770 --> 00:05:34.870
This is y equals 0,
always going up that way.

00:05:34.870 --> 00:05:37.930
As you can increase the
height, the flow gets faster.

00:05:37.930 --> 00:05:40.330
And that's typical, because
you have a no-slip boundary

00:05:40.330 --> 00:05:43.330
condition at the wall, right?

00:05:43.330 --> 00:05:46.681
Is that OK, or did I
misunderstand your question?

00:05:46.681 --> 00:05:49.680
Is that good?

00:05:49.680 --> 00:05:50.180
OK?

00:05:50.180 --> 00:05:51.950
AUDIENCE: So y is a constant.

00:05:51.950 --> 00:05:53.270
WILLIAM GREEN, JR: Yeah,
in this particular problem

00:05:53.270 --> 00:05:55.720
this is just a number that
we tell you in the problem.

00:05:55.720 --> 00:05:58.539
AUDIENCE: [INAUDIBLE]

00:05:58.539 --> 00:05:59.580
WILLIAM GREEN, JR: Right.

00:05:59.580 --> 00:06:01.246
If you had a flow in
a cylindrical pipe,

00:06:01.246 --> 00:06:02.260
it wouldn't be--

00:06:02.260 --> 00:06:03.140
wouldn't be a number.

00:06:03.140 --> 00:06:06.807
Be more complicated,
yeah, all right?

00:06:06.807 --> 00:06:09.390
So this is-- I mean, again, this
is like the simplest you got.

00:06:09.390 --> 00:06:11.099
It's only 2D.

00:06:11.099 --> 00:06:11.890
It's really simple.

00:06:11.890 --> 00:06:13.465
But you're going to see
here that even here you

00:06:13.465 --> 00:06:14.631
could have a lot of trouble.

00:06:14.631 --> 00:06:16.360
And if you just don't
think about it--

00:06:16.360 --> 00:06:17.560
the computer will
give you an answer.

00:06:17.560 --> 00:06:19.680
Whatever-- you put in some
finite difference equations

00:06:19.680 --> 00:06:21.429
or finite element
equations, finite volume

00:06:21.429 --> 00:06:23.542
equations, fsolve,
whatever, it's

00:06:23.542 --> 00:06:25.250
going to solve and
give you some numbers.

00:06:25.250 --> 00:06:26.350
It doesn't mean it
has any relation

00:06:26.350 --> 00:06:27.350
to the physical reality.

00:06:27.350 --> 00:06:29.860
So this is a problem
to really pay attention

00:06:29.860 --> 00:06:33.230
to whether you're
really converged.

00:06:33.230 --> 00:06:35.142
All right.

00:06:35.142 --> 00:06:39.330
And so what I suggest you
do in this problem is go

00:06:39.330 --> 00:06:42.415
through a sequence
where you vary--

00:06:42.415 --> 00:06:45.040
the real problem wants you to do
this all the way out to-- this

00:06:45.040 --> 00:06:47.237
is 1 centimeter.

00:06:47.237 --> 00:06:49.320
But I suggest you instead
solve a simpler problem,

00:06:49.320 --> 00:06:51.194
where you put the--
here's a simpler problem.

00:06:54.490 --> 00:07:02.330
Put your boundary right
here, really close, and then

00:07:02.330 --> 00:07:03.470
solve that problem.

00:07:03.470 --> 00:07:07.650
You won't need as many
mesh points across

00:07:07.650 --> 00:07:09.150
to get from here to here.

00:07:09.150 --> 00:07:10.140
And this should be--

00:07:10.140 --> 00:07:12.420
this is-- suppose
you choose this

00:07:12.420 --> 00:07:16.420
is c equal 0 boundary
condition for this wall,

00:07:16.420 --> 00:07:19.840
then this should
be an upper bound.

00:07:19.840 --> 00:07:22.540
Because if you put an
absorbing layer here,

00:07:22.540 --> 00:07:25.930
it should drive the
diffusion faster, right?

00:07:25.930 --> 00:07:30.356
So as you increase
this distance--

00:07:30.356 --> 00:07:32.260
let's call it little h--

00:07:32.260 --> 00:07:34.697
as you increase
little h, you should

00:07:34.697 --> 00:07:36.280
converge to the true
solution that you

00:07:36.280 --> 00:07:39.252
want sort of from above.

00:07:39.252 --> 00:07:41.641
Does that makes sense?

00:07:41.641 --> 00:07:43.072
Yeah?

00:07:43.072 --> 00:07:45.230
Is this OK?

00:07:45.230 --> 00:07:46.730
All right.

00:07:46.730 --> 00:07:50.330
And similarly, you
can vary the mesh,

00:07:50.330 --> 00:07:53.666
how big your boxes are,
say, in delta x and delta y.

00:07:53.666 --> 00:07:55.040
And again, for
each of those, you

00:07:55.040 --> 00:07:58.070
could think about how
should things converge.

00:07:58.070 --> 00:07:59.690
And so look and see
if it's actually

00:07:59.690 --> 00:08:02.516
converging the way you think
it should be converging, right?

00:08:06.460 --> 00:08:08.589
Any more questions about this?

00:08:08.589 --> 00:08:10.630
OK, so this problem might--
this homework problem

00:08:10.630 --> 00:08:13.119
might look like a
MATLAB coding problem.

00:08:13.119 --> 00:08:14.910
It has MATLAB coding,
but it's not really--

00:08:14.910 --> 00:08:16.237
that's not really what it is.

00:08:16.237 --> 00:08:17.070
It's really like a--

00:08:17.070 --> 00:08:20.113
it's a conceptual problem
about what you're doing.

00:08:20.113 --> 00:08:22.879
All right.

00:08:22.879 --> 00:08:26.020
All right, in this problem, I
want you to use finite volumes.

00:08:26.020 --> 00:08:28.020
So let's talk about finite
volumes for a minute.

00:08:28.020 --> 00:08:33.890
So finite volumes is to imagine
that we have little control

00:08:33.890 --> 00:08:38.880
volumes, and each one of them
has a little propeller in it,

00:08:38.880 --> 00:08:43.200
stirs it up, like little CSTRs.

00:08:43.200 --> 00:08:45.670
And so we do it just like you
did back in your intro ChemE

00:08:45.670 --> 00:08:48.820
class and mass/energy
balances a million years ago.

00:08:48.820 --> 00:08:51.640
You know that you have
some flow coming in here,

00:08:51.640 --> 00:08:54.120
and maybe some flow
going out there.

00:08:54.120 --> 00:08:56.895
And maybe you have
some flux come in here

00:08:56.895 --> 00:08:59.370
and maybe something out there.

00:08:59.370 --> 00:09:02.400
And you can add up all the
flows in and all the flows out,

00:09:02.400 --> 00:09:05.350
and then that--

00:09:05.350 --> 00:09:08.750
the net of all
these fluxes has got

00:09:08.750 --> 00:09:10.560
to be equal to the accumulation.

00:09:10.560 --> 00:09:12.480
And if we're doing a
steady-state problem,

00:09:12.480 --> 00:09:15.600
then there's no time derivative,
so the accumulation term

00:09:15.600 --> 00:09:16.662
should be 0.

00:09:16.662 --> 00:09:18.120
And you did a lot
of these problems

00:09:18.120 --> 00:09:19.920
a long time ago, right?

00:09:19.920 --> 00:09:21.296
OK, so you just do it like that.

00:09:21.296 --> 00:09:23.920
The only problem is now we have
a million of these little boxes

00:09:23.920 --> 00:09:25.003
all coupled to each other.

00:09:25.003 --> 00:09:27.290
So you get one
equation for each box.

00:09:27.290 --> 00:09:30.189
And in this problem,
we're going to--

00:09:30.189 --> 00:09:31.980
when you do this method,
what people assume

00:09:31.980 --> 00:09:33.646
is that you have a
uniform concentration

00:09:33.646 --> 00:09:35.100
sort of across
here or the number

00:09:35.100 --> 00:09:37.740
you use as the average of
the concentration in the cell

00:09:37.740 --> 00:09:38.830
as [INAUDIBLE].

00:09:38.830 --> 00:09:42.959
And so it's not really
exactly realistic.

00:09:42.959 --> 00:09:44.500
So that's where the
approximation is.

00:09:44.500 --> 00:09:45.720
What you're doing
at the boundaries

00:09:45.720 --> 00:09:47.550
is very realistic, because
you're actually computing

00:09:47.550 --> 00:09:48.930
the fluxes across
control volumes

00:09:48.930 --> 00:09:50.880
is exactly the way
you should do it.

00:09:50.880 --> 00:09:55.320
So there's different methods,
right, finite element,

00:09:55.320 --> 00:09:57.204
finite difference,
finite volume.

00:09:57.204 --> 00:09:58.620
The nice thing
about finite volume

00:09:58.620 --> 00:10:00.660
is you're really
treating exactly what's

00:10:00.660 --> 00:10:04.750
happening across the boundaries
of the mesh area, the mesh

00:10:04.750 --> 00:10:06.079
volume.

00:10:06.079 --> 00:10:08.120
And we'll find that a lot
of ChemE problems, this

00:10:08.120 --> 00:10:09.369
is how people prefer to do it.

00:10:13.380 --> 00:10:17.610
And because you're treating
the fluxes exactly,

00:10:17.610 --> 00:10:26.522
if you have your mesh
volume sitting on the wall

00:10:26.522 --> 00:10:28.022
or on top of the
drug patch, suppose

00:10:28.022 --> 00:10:32.380
if we're sitting right on
top of the drug patch here.

00:10:32.380 --> 00:10:34.600
Then if you're sitting--

00:10:34.600 --> 00:10:35.650
first, let's do a wall.

00:10:35.650 --> 00:10:37.730
Suppose you're sitting
on an impermeable wall,

00:10:37.730 --> 00:10:46.360
then we just know that the flux
here will be 0 if it's a wall.

00:10:46.360 --> 00:10:47.450
So that's easy.

00:10:47.450 --> 00:10:48.247
No flux here.

00:10:48.247 --> 00:10:50.330
So we only have to worry
about this one, this one,

00:10:50.330 --> 00:10:51.750
and this one.

00:10:51.750 --> 00:10:54.280
That one's not doing anything.

00:10:54.280 --> 00:10:57.170
This case, if you say in the
drug patch there is a flux,

00:10:57.170 --> 00:10:59.350
stuff's coming in
and you'll need

00:10:59.350 --> 00:11:02.180
to figure out how to write
that boundary condition.

00:11:02.180 --> 00:11:06.100
So the boundary condition as
written is that C, the drug,

00:11:06.100 --> 00:11:11.200
is equal to some number, C
drug, whatever is in the patch.

00:11:11.200 --> 00:11:14.270
But that's not so
easy to impose here.

00:11:14.270 --> 00:11:16.010
And so there's two
ways to look at it.

00:11:16.010 --> 00:11:20.110
One way is people compute
this flux by considering--

00:11:23.225 --> 00:11:26.451
suppose I know this
is C drug here.

00:11:26.451 --> 00:11:28.340
I'm trying to really
figure out what's

00:11:28.340 --> 00:11:31.200
the average concentration here.

00:11:31.200 --> 00:11:33.470
And so one way to
compute this is

00:11:33.470 --> 00:11:43.020
to say it's the diffusivity
times C drug minus C

00:11:43.020 --> 00:11:50.620
the middle over delta y over 2.

00:11:50.620 --> 00:11:52.350
That would be the flux.

00:11:52.350 --> 00:11:54.060
So that's one way to look at it.

00:11:54.060 --> 00:11:57.830
Another way people
look at it is they draw

00:11:57.830 --> 00:11:59.998
what they call a ghost volume.

00:12:03.140 --> 00:12:06.980
And so here, here's my C
that I care about, C middle.

00:12:12.310 --> 00:12:13.296
Here's C ghost.

00:12:17.120 --> 00:12:18.680
And here is the
line between them.

00:12:18.680 --> 00:12:20.450
Now, I can use the
same equation here

00:12:20.450 --> 00:12:22.640
that they would
have used before.

00:12:22.640 --> 00:12:25.730
But I don't know what C
ghost is, because there's

00:12:25.730 --> 00:12:26.520
no real cell here.

00:12:26.520 --> 00:12:27.590
This is below the patch.

00:12:27.590 --> 00:12:30.350
Here's the patch.

00:12:30.350 --> 00:12:32.660
But imagine the patch is
not there for a second,

00:12:32.660 --> 00:12:35.660
and I write down the same
equation I would have here.

00:12:35.660 --> 00:12:41.730
And the flux diffusively would
have been D C ghost minus C

00:12:41.730 --> 00:12:46.440
middle over delta y.

00:12:46.440 --> 00:12:49.220
That's what you would have
written as the diffusive flux.

00:12:49.220 --> 00:12:51.285
And I don't know
what C ghost is.

00:12:51.285 --> 00:12:52.660
So now, I have to
think about how

00:12:52.660 --> 00:12:55.040
do I estimate what C ghost is.

00:12:55.040 --> 00:12:59.420
I can say, well, let's
do a linear interpolation

00:12:59.420 --> 00:13:02.420
from this concentration
to that concentration.

00:13:02.420 --> 00:13:10.520
So let's say that the C
boundary is equal to C

00:13:10.520 --> 00:13:15.120
ghost, the average of these
two, plus C mid over 2.

00:13:17.695 --> 00:13:19.820
That's what we got if we
did a linear interpolation

00:13:19.820 --> 00:13:22.324
between these two guys to
figure out what it is here.

00:13:22.324 --> 00:13:23.490
But here we know what it is.

00:13:23.490 --> 00:13:25.350
We know what a C boundary is.

00:13:25.350 --> 00:13:27.620
That's the concentration
of the drug patch

00:13:27.620 --> 00:13:29.676
so that we can solve
for what c ghost is.

00:13:29.676 --> 00:13:32.160
AUDIENCE: How do you
know what C middle is?

00:13:32.160 --> 00:13:34.512
WILLIAM GREEN, JR: C
middle is the unknown.

00:13:34.512 --> 00:13:35.970
That's what we're
going to compute.

00:13:35.970 --> 00:13:38.428
We just want an equation that
involves C middle, because we

00:13:38.428 --> 00:13:39.595
have c middle as an unknown.

00:13:39.595 --> 00:13:41.344
We need an equation
the involves C middle,

00:13:41.344 --> 00:13:42.585
just like we would for--

00:13:42.585 --> 00:13:43.260
if we have a--

00:13:46.874 --> 00:13:50.050
If we have finite volume that
is in the interior somewhere,

00:13:50.050 --> 00:13:53.790
we have c of this
grid point, Cij.

00:13:53.790 --> 00:13:55.691
We just want equations
that involve Cij.

00:13:55.691 --> 00:13:57.690
But we need an equation
that somehow connects it

00:13:57.690 --> 00:13:58.620
to the boundary conditions.

00:13:58.620 --> 00:13:59.120
Yeah.

00:13:59.120 --> 00:14:01.710
AUDIENCE: When would you
use that second [INAUDIBLE]

00:14:01.710 --> 00:14:04.959
if you know C
boundary [INAUDIBLE]??

00:14:04.959 --> 00:14:06.000
WILLIAM GREEN, JR: Right.

00:14:06.000 --> 00:14:08.610
And actually, I think if you
do it this way, in this case,

00:14:08.610 --> 00:14:10.361
you get the same formula.

00:14:10.361 --> 00:14:11.360
You're running out of C.

00:14:11.360 --> 00:14:15.168
AUDIENCE: So when would
you use the C ghost?

00:14:15.168 --> 00:14:18.230
WILLIAM GREEN, JR:
The C ghost thing is

00:14:18.230 --> 00:14:22.020
handy when these conditions--

00:14:22.020 --> 00:14:24.477
actually, in the finite
volumes, this is it.

00:14:24.477 --> 00:14:25.810
I don't think you need to do it.

00:14:25.810 --> 00:14:27.260
Maybe if you had a flow,
velocity flow here.

00:14:27.260 --> 00:14:27.500
I don't know.

00:14:27.500 --> 00:14:28.500
But you won't in a wall.

00:14:28.500 --> 00:14:33.780
So I don't know if, in the
finite difference method,

00:14:33.780 --> 00:14:37.140
you can use those ghost points
as well to do the flux gutter

00:14:37.140 --> 00:14:37.916
conditions.

00:14:37.916 --> 00:14:39.540
And that's often
useful to do the ghost

00:14:39.540 --> 00:14:42.710
thing for if you have a
symmetry-imposed flux boundary

00:14:42.710 --> 00:14:44.471
condition.

00:14:44.471 --> 00:14:44.970
Yeah.

00:14:44.970 --> 00:14:48.456
AUDIENCE: [INAUDIBLE]

00:14:50.362 --> 00:14:51.820
WILLIAM GREEN, JR:
That's the flux.

00:14:51.820 --> 00:14:53.528
The flux is coming
from across this wall.

00:14:53.528 --> 00:14:55.660
And we'll have to add
that with the flux coming

00:14:55.660 --> 00:14:57.320
this way and the
flux coming this way

00:14:57.320 --> 00:15:00.580
and the flux coming this way
to get our total flux, which

00:15:00.580 --> 00:15:07.923
is going to net out to 0
instead of C. Is that all right?

00:15:07.923 --> 00:15:10.190
But the other ones, you
all know how to write them?

00:15:10.190 --> 00:15:12.225
They're just velocity flows.

00:15:12.225 --> 00:15:14.250
The nice thing about
the finite volume method

00:15:14.250 --> 00:15:22.560
is that when you're trying
to consider the velocity,

00:15:22.560 --> 00:15:25.865
the velocity that matters is
actually the velocity here.

00:15:25.865 --> 00:15:29.940
It's the flux that couples the
two finite values together.

00:15:29.940 --> 00:15:31.860
So your velocity is
being evaluated halfway

00:15:31.860 --> 00:15:36.180
between the two
mesh point centers.

00:15:36.180 --> 00:15:38.760
This turns out to make the
whole procedure more numerically

00:15:38.760 --> 00:15:41.250
stable.

00:15:41.250 --> 00:15:44.400
You compute the flux
by, say, the difference

00:15:44.400 --> 00:15:46.130
between these two.

00:15:46.130 --> 00:15:50.660
And you're implicitly evaluating
right at halfway between.

00:15:50.660 --> 00:15:53.000
Other methods, like
finite difference,

00:15:53.000 --> 00:15:56.240
you're trying to get
the velocity or the flux

00:15:56.240 --> 00:15:59.700
at the same point here.

00:15:59.700 --> 00:16:01.305
And it doesn't really
make much sense,

00:16:01.305 --> 00:16:03.930
from the point of view of trying
to compute how much material's

00:16:03.930 --> 00:16:07.210
close to here, to use
the velocity right there.

00:16:07.210 --> 00:16:10.770
And so when you work out
equations, and particularly

00:16:10.770 --> 00:16:13.365
the equations that
involve pressure,

00:16:13.365 --> 00:16:17.340
so suppose you try to discretize
the Navier-Stokes equations

00:16:17.340 --> 00:16:20.470
and you have a pressure gradient
that's driving the flow,

00:16:20.470 --> 00:16:22.820
then you have to figure
out where are you

00:16:22.820 --> 00:16:25.165
going to evaluate the pressures
and where are you going

00:16:25.165 --> 00:16:26.120
to evaluate the velocities.

00:16:26.120 --> 00:16:28.286
And when you try to evaluate
them at the same point,

00:16:28.286 --> 00:16:31.090
it turns out that you get
numerically unstable problems.

00:16:31.090 --> 00:16:33.010
But if you do it by this
funny volume method,

00:16:33.010 --> 00:16:34.385
then it just works
out naturally.

00:16:34.385 --> 00:16:35.810
It's fine.

00:16:35.810 --> 00:16:37.490
And then you need
special methods,

00:16:37.490 --> 00:16:39.554
if you're going to try
to do it where you have

00:16:39.554 --> 00:16:41.970
the velocity of the mesh at
the same point as the pressure

00:16:41.970 --> 00:16:42.990
mesh.

00:16:42.990 --> 00:16:44.460
You'll notice in most of
the problems we give you,

00:16:44.460 --> 00:16:45.585
we just leave pressure out.

00:16:45.585 --> 00:16:48.420
We try to rewrite the equations
so no pressure ever appears.

00:16:48.420 --> 00:16:50.003
And that's because
pressure in general

00:16:50.003 --> 00:16:55.080
is a problem, because you can
have acoustic waves physically.

00:16:55.080 --> 00:16:57.647
And if you do the equations,
which allow for acoustic waves,

00:16:57.647 --> 00:16:59.730
you'll get them in the
numerical solution as well.

00:16:59.730 --> 00:17:01.380
But usually, we don't
care about that.

00:17:01.380 --> 00:17:04.770
So you have sound waves
racing around your solution,

00:17:04.770 --> 00:17:06.849
and that causes a lot
of trouble numerically.

00:17:06.849 --> 00:17:09.060
So a lot of times, people
rewrite the equations

00:17:09.060 --> 00:17:12.984
to try to remove the
pressure from the equation.

00:17:12.984 --> 00:17:14.900
So you write down the
Navier-Stokes equations.

00:17:14.900 --> 00:17:16.807
You guys did this transport.

00:17:16.807 --> 00:17:19.140
Maybe you'll study that today
in the class, in the test.

00:17:19.140 --> 00:17:19.681
I don't know.

00:17:19.681 --> 00:17:22.790
Anyway, there's a pressure term
if you just write naturally.

00:17:22.790 --> 00:17:25.910
But oftentimes, you can remove
that by an equation of state,

00:17:25.910 --> 00:17:26.780
for example.

00:17:26.780 --> 00:17:28.470
And then you can get rid of it.

00:17:28.470 --> 00:17:31.932
And that turns out to be better
from the numerical solution.

00:17:31.932 --> 00:17:33.380
All right.

00:17:33.380 --> 00:17:33.880
Yes.

00:17:33.880 --> 00:17:35.060
AUDIENCE: I have a question.

00:17:35.060 --> 00:17:37.410
So you said that
for this problem,

00:17:37.410 --> 00:17:39.165
[INAUDIBLE] was very small.

00:17:39.165 --> 00:17:44.667
So that means that these finite
volume cells [INAUDIBLE] you

00:17:44.667 --> 00:17:45.950
have to do a lot of them.

00:17:45.950 --> 00:17:49.648
[INAUDIBLE] gets around this
by having a variable volume.

00:17:49.648 --> 00:17:52.681
Do we have to address
this on that lab that

00:17:52.681 --> 00:17:55.396
have some variable volume?

00:17:55.396 --> 00:17:57.190
WILLIAM GREEN, JR:
OK, so from the point

00:17:57.190 --> 00:18:00.570
of view of writing a
code, it's a lot easier

00:18:00.570 --> 00:18:03.720
to write it with fixed
mesh because all equations

00:18:03.720 --> 00:18:05.200
look exactly the same.

00:18:05.200 --> 00:18:08.320
So I suggest you start that way.

00:18:08.320 --> 00:18:13.160
And what you do, if you use
a very small value of each,

00:18:13.160 --> 00:18:16.090
then I think you'll be
able solve it, no problem.

00:18:16.090 --> 00:18:18.260
You'll have enough mesh.

00:18:18.260 --> 00:18:21.390
Then, once you
figure out how to do

00:18:21.390 --> 00:18:23.340
that, now you might
be able to see,

00:18:23.340 --> 00:18:25.116
OK, can my solver solve this?

00:18:25.116 --> 00:18:27.240
And then that gets into
another question, actually.

00:18:27.240 --> 00:18:29.910
What solver are
you going to use?

00:18:29.910 --> 00:18:34.760
So any ideas about this problem?

00:18:34.760 --> 00:18:37.170
AUDIENCE: [INAUDIBLE]

00:18:37.170 --> 00:18:40.380
WILLIAM GREEN, JR: So you could
use fsolve But I'm telling you,

00:18:40.380 --> 00:18:41.480
you're going to have to
use a lot of mesh points.

00:18:41.480 --> 00:18:42.740
That means that fsolve's
going to have to solve

00:18:42.740 --> 00:18:43.698
for a lot of variables.

00:18:43.698 --> 00:18:45.770
AUDIENCE:

00:18:45.770 --> 00:18:47.800
WILLIAM GREEN, JR:
Backslash it might be.

00:18:47.800 --> 00:18:52.920
So the key thing, the nice
thing about this problem

00:18:52.920 --> 00:18:56.030
is it's a linear
differential equation.

00:18:56.030 --> 00:18:59.040
There's no nonlinear term today.

00:18:59.040 --> 00:19:01.670
So when you rewrite
the equations

00:19:01.670 --> 00:19:04.290
of the finite volumes,
it's all going

00:19:04.290 --> 00:19:07.890
to be linear in the unknowns.

00:19:07.890 --> 00:19:10.260
And what else is nice about
this problem, when you use

00:19:10.260 --> 00:19:12.720
local finite volumes as your--

00:19:12.720 --> 00:19:14.340
It's going to be super-sparse.

00:19:14.340 --> 00:19:17.922
So the matrix that comes in
is going to be really sparse.

00:19:17.922 --> 00:19:20.130
And so you'll want to use
some method that can handle

00:19:20.130 --> 00:19:23.610
gigantic sparse matrices.

00:19:23.610 --> 00:19:25.226
So you wrote a code
like that earlier,

00:19:25.226 --> 00:19:26.600
so that would be
one possibility.

00:19:26.600 --> 00:19:29.550
If you know how to use
the right flags in MATLAB

00:19:29.550 --> 00:19:32.559
to help their built-in
solvers handle sparsity,

00:19:32.559 --> 00:19:33.600
then that should be good.

00:19:33.600 --> 00:19:35.558
If you just ask it to
solve it by dense method,

00:19:35.558 --> 00:19:37.340
by, like, LEU or
something, you're

00:19:37.340 --> 00:19:38.923
going to have lot
trouble, once you've

00:19:38.923 --> 00:19:41.040
put your mesh points in there.

00:19:41.040 --> 00:19:42.240
But you can just experiment.

00:19:42.240 --> 00:19:43.260
Try bigger and bigger matrices.

00:19:43.260 --> 00:19:45.265
And then at some point,
if you have backslash,

00:19:45.265 --> 00:19:48.530
it will give you a warning or
something, unless you tell it

00:19:48.530 --> 00:19:51.842
that you're sparse.

00:19:51.842 --> 00:19:53.674
All right?

00:19:53.674 --> 00:19:56.100
Any more questions
that about this?

00:19:56.100 --> 00:19:58.350
How would people solve it
do you think professionally?

00:19:58.350 --> 00:20:01.747
Suppose I was doing a problem
like this in 3D instead of 2D.

00:20:01.747 --> 00:20:02.830
How would people solve it?

00:20:02.830 --> 00:20:03.955
What solver would they use?

00:20:03.955 --> 00:20:05.881
AUDIENCE: [INAUDIBLE]

00:20:05.881 --> 00:20:07.130
WILLIAM GREEN, JR: Not fsolve.

00:20:07.130 --> 00:20:07.745
No.

00:20:07.745 --> 00:20:09.417
AUDIENCE: [INAUDIBLE] gradient.

00:20:09.417 --> 00:20:12.000
WILLIAM GREEN, JR: Yeah, so they
would use conjugate gradient.

00:20:12.000 --> 00:20:18.410
So probably-- I think it's
called this, BiCGSTAB.

00:20:18.410 --> 00:20:19.940
That's the program
that we would use

00:20:19.940 --> 00:20:23.570
if you have a really, really
gigantic sparse matrix.

00:20:23.570 --> 00:20:25.370
So that's the
conjugate gradient.

00:20:25.370 --> 00:20:29.459
And Professor Swan talked
about, the advantage

00:20:29.459 --> 00:20:31.250
of that is you never
have to actually store

00:20:31.250 --> 00:20:33.050
the whole matrix.

00:20:33.050 --> 00:20:35.390
You only need to evaluate
the matrix elements,

00:20:35.390 --> 00:20:36.914
and then you can
throw them away.

00:20:36.914 --> 00:20:38.580
And so if you have a
very sparse matrix,

00:20:38.580 --> 00:20:40.360
that's pretty cheap to do.

00:20:40.360 --> 00:20:42.507
So it's a really good code.

00:20:42.507 --> 00:20:44.340
I think in this 2D
problem, you can probably

00:20:44.340 --> 00:20:45.270
get away with other solvers.

00:20:45.270 --> 00:20:45.960
You don't have to use this.

00:20:45.960 --> 00:20:47.418
But this is a
definite possibility.

00:20:47.418 --> 00:20:49.560
This is a built-in
MATLAB program as well.

00:20:49.560 --> 00:20:53.310
Be warned, though, this
is an iterative solver.

00:20:53.310 --> 00:20:56.005
It's not just going
to be one solve, boom.

00:20:56.005 --> 00:20:57.130
And It might have troubles.

00:20:59.660 --> 00:21:04.330
So you might want to go with
the other ones, but anyway.

00:21:04.330 --> 00:21:05.540
May I ask you a question?

00:21:05.540 --> 00:21:07.081
How about, do you
need initial guess?

00:21:12.133 --> 00:21:12.930
What do you think?

00:21:12.930 --> 00:21:13.702
AUDIENCE: Depends.

00:21:13.702 --> 00:21:15.410
WILLIAM GREEN, JR:
Depends on the solver.

00:21:15.410 --> 00:21:16.960
So if you solve
it with backslash,

00:21:16.960 --> 00:21:19.070
do you need an initial guess?

00:21:19.070 --> 00:21:22.610
If you can solve it with fsolve,
do you have to initial guess?

00:21:22.610 --> 00:21:24.230
If you can solve
it via BiCGSTAB,

00:21:24.230 --> 00:21:26.532
do you have to
use initial guess?

00:21:26.532 --> 00:21:29.328
AUDIENCE: Yes.

00:21:29.328 --> 00:21:30.871
WILLIAM GREEN, JR: Yes.

00:21:30.871 --> 00:21:31.370
OK.

00:21:31.370 --> 00:21:33.510
So then you have to think
about how you really

00:21:33.510 --> 00:21:34.676
get your initial guess, too.

00:21:34.676 --> 00:21:39.010
So this is things
to think about.

00:21:39.010 --> 00:21:39.510
All right.

00:21:43.680 --> 00:21:45.730
What else to tell you about?

00:21:45.730 --> 00:21:50.120
One last thing about
PDEs, and we'll

00:21:50.120 --> 00:21:54.020
come back to this later, so
far we haven't done really

00:21:54.020 --> 00:21:56.330
anything that's
very time-dependent.

00:21:56.330 --> 00:22:00.290
But a lot of real world PDEs
have a time dependent in them.

00:22:00.290 --> 00:22:02.160
And there's is a very
important concept,

00:22:02.160 --> 00:22:03.470
a thing called the CFL number.

00:22:06.230 --> 00:22:09.230
And this is named
after a 1928 paper,

00:22:09.230 --> 00:22:10.730
and I'll write the
guys' names down.

00:22:21.090 --> 00:22:23.700
And what they showed
was that, if you're

00:22:23.700 --> 00:22:27.300
trying to solve the
PDE system, where

00:22:27.300 --> 00:22:32.470
you're discretizing
in both x and time,

00:22:32.470 --> 00:22:35.820
that you have a number
that they defined

00:22:35.820 --> 00:22:39.630
as delta t times the
velocity and the extraction

00:22:39.630 --> 00:22:41.920
divided by delta x.

00:22:41.920 --> 00:22:43.810
So that's a
dimensionless number.

00:22:43.810 --> 00:22:46.560
So that's a CFL number.

00:22:46.560 --> 00:22:47.940
You see a lot of
papers that will

00:22:47.940 --> 00:22:49.800
say what CFL number they used.

00:22:49.800 --> 00:22:52.620
What that means is the ratio
of their time mesh compared

00:22:52.620 --> 00:22:54.850
to their space mesh.

00:22:54.850 --> 00:23:00.020
And conceptually, let's think
about what's happening here.

00:23:00.020 --> 00:23:02.020
So suppose we have
a flow flowing

00:23:02.020 --> 00:23:06.610
in an upwards direction,
and we have a bunch

00:23:06.610 --> 00:23:08.794
of little finite volumes.

00:23:11.960 --> 00:23:14.780
So we've discretized
the delta x already.

00:23:14.780 --> 00:23:18.250
And this is x.

00:23:18.250 --> 00:23:20.770
And there's a flow here.

00:23:20.770 --> 00:23:23.207
And I've already
decided, somehow,

00:23:23.207 --> 00:23:24.540
what length scale I want to use.

00:23:24.540 --> 00:23:26.150
So I've decided my delta x.

00:23:26.150 --> 00:23:29.430
And now, I'm trying to figure
out what delta t I should use.

00:23:29.430 --> 00:23:32.180
Now, from the point of
view of saving CPU time

00:23:32.180 --> 00:23:34.670
I want the delta to be
as giant as possible,

00:23:34.670 --> 00:23:37.400
because I want to be able
to zoom along or predict

00:23:37.400 --> 00:23:40.350
for long periods of time what's
going to happen in my system.

00:23:40.350 --> 00:23:42.009
But if I make delta
t really large,

00:23:42.009 --> 00:23:43.300
let's think about what happens.

00:23:43.300 --> 00:23:51.980
Suppose I choose delta t to be
10 times delta x divided by u.

00:23:51.980 --> 00:23:53.940
So it means that in
my one time step,

00:23:53.940 --> 00:23:57.289
I have some guess or
some current value

00:23:57.289 --> 00:23:59.330
of the concentrations in
all these finite values.

00:24:01.840 --> 00:24:08.960
And then I wait through
a time step that's

00:24:08.960 --> 00:24:12.320
10 times delta x over ux.

00:24:12.320 --> 00:24:14.830
So I had some stuff
that was here.

00:24:14.830 --> 00:24:18.320
Where is that going
to be 10 times later?

00:24:18.320 --> 00:24:20.877
10 time steps later.

00:24:20.877 --> 00:24:21.710
10 blocks up, right?

00:24:21.710 --> 00:24:26.140
So it's going to be, like,
way up here somewhere.

00:24:26.140 --> 00:24:29.680
And so what's going
to happen there

00:24:29.680 --> 00:24:34.980
is that my numerical methods
are all computing stuff locally

00:24:34.980 --> 00:24:36.860
from the spatial derivatives.

00:24:36.860 --> 00:24:39.860
But it's crazy if,
between my time steps,

00:24:39.860 --> 00:24:42.140
this stuff completely
left the picture.

00:24:42.140 --> 00:24:44.726
It's already convected all
the way off the screen.

00:24:44.726 --> 00:24:46.850
And some new stuff, which
was way down here before,

00:24:46.850 --> 00:24:48.624
is now the stuff that's here.

00:24:48.624 --> 00:24:50.880
Should be there
if I was physical.

00:24:50.880 --> 00:24:54.120
Numerically, who knows what will
happen if you try to do this.

00:24:54.120 --> 00:24:56.130
But it won't be good.

00:24:56.130 --> 00:24:59.040
So the condition
is that you need

00:24:59.040 --> 00:25:03.060
this number to be less than
1, or same order of magnitude

00:25:03.060 --> 00:25:06.081
as 1, and you try to make
this much bigger than 1,

00:25:06.081 --> 00:25:08.080
then you're doing something
crazy because you're

00:25:08.080 --> 00:25:13.210
convecting stuff over
multiple mesh points.

00:25:13.210 --> 00:25:16.649
And so that turns out to be a
very serious limitation if you

00:25:16.649 --> 00:25:18.190
try to do simulations
for, let's say,

00:25:18.190 --> 00:25:21.070
a reacting flow for a
long period of time,

00:25:21.070 --> 00:25:23.480
because you might have to
use a really tiny delta t.

00:25:23.480 --> 00:25:27.010
And then people have developed
all different fancy methods

00:25:27.010 --> 00:25:28.720
to try to get around that.

00:25:28.720 --> 00:25:32.170
But if you just do the
obvious things to do,

00:25:32.170 --> 00:25:33.805
you'll always run
into this limitation.

00:25:33.805 --> 00:25:37.970
Then you need to choose
the time steps small.

00:25:37.970 --> 00:25:43.190
And also, it's bad, because as
you make delta x smaller, which

00:25:43.190 --> 00:25:45.780
improves your accuracy,
You'll have to make

00:25:45.780 --> 00:25:47.720
your delta t's smaller, too.

00:25:47.720 --> 00:25:50.690
But of course, making delta x
smaller increases your CPU time

00:25:50.690 --> 00:25:53.360
because you have more
finite volumes to compute.

00:25:53.360 --> 00:25:55.040
And then you'll also have to
make double t smaller, which

00:25:55.040 --> 00:25:55.910
means you'll have to do
more time steps, too.

00:25:55.910 --> 00:25:58.040
So it's even like
a double whammy.

00:25:58.040 --> 00:26:01.400
So getting more accuracy is
going to really cost you badly.

00:26:01.400 --> 00:26:05.520
And so this another reason
why people used to always

00:26:05.520 --> 00:26:06.862
refer to color fluid dynamics.

00:26:06.862 --> 00:26:08.820
You can make a pretty
picture, but it might not

00:26:08.820 --> 00:26:09.935
be physical at all.

00:26:09.935 --> 00:26:12.060
Because you can make it
solve equations that maybe,

00:26:12.060 --> 00:26:13.470
for example, didn't
impose this, then

00:26:13.470 --> 00:26:14.970
who knows what kind of
crazy stuff you'll get.

00:26:14.970 --> 00:26:16.050
You'll got something.

00:26:16.050 --> 00:26:18.000
It'll compute something,
but it may have no relation

00:26:18.000 --> 00:26:18.833
to the real problem.

00:26:23.104 --> 00:26:24.770
I think that's all I
was say about PDEs.

00:26:24.770 --> 00:26:26.811
Are there any questions
about PDEs before I start

00:26:26.811 --> 00:26:28.128
talking about probability?

00:26:30.811 --> 00:26:31.810
You got it totally down.

00:26:31.810 --> 00:26:34.018
I'm looking forward to some
really awesome solutions.

00:26:34.018 --> 00:26:34.887
How about that?

00:26:44.940 --> 00:26:46.090
Just one last comment.

00:26:46.090 --> 00:26:48.550
If you decide you wanted
to do adaptive meshing

00:26:48.550 --> 00:26:53.380
and you want to
change your mesh size,

00:26:53.380 --> 00:26:56.369
you can choose measures
like this if you want.

00:26:56.369 --> 00:26:57.910
And you can even do
things like this,

00:26:57.910 --> 00:26:58.940
where you have a
bigger mesh, and then

00:26:58.940 --> 00:27:00.731
maybe have two smaller
meshes underneath it

00:27:00.731 --> 00:27:03.040
in the next trial.

00:27:03.040 --> 00:27:05.120
So you can just have
stuff flowing here,

00:27:05.120 --> 00:27:08.557
stuff flowing here
stuff flowing there.

00:27:08.557 --> 00:27:10.390
So you can do all kinds
of crazy stuff like.

00:27:10.390 --> 00:27:13.870
This can really help improve the
accuracy of the solution a lot.

00:27:13.870 --> 00:27:16.300
But it's, I would say,
very prone to bugs.

00:27:16.300 --> 00:27:18.220
So if you do this,
be really careful

00:27:18.220 --> 00:27:19.240
and don't do it too
often, I would say.

00:27:19.240 --> 00:27:20.260
You might have a
few boundaries where

00:27:20.260 --> 00:27:22.870
you do something funky like
that to change that mesh size.

00:27:22.870 --> 00:27:24.480
But don't go crazy with it.

00:27:24.480 --> 00:27:25.650
[INAUDIBLE] is smart.

00:27:25.650 --> 00:27:27.900
It has a really nice way of
doing the meshing for you.

00:27:27.900 --> 00:27:32.170
So that's its advantage, that
somebody very carefully coded

00:27:32.170 --> 00:27:34.660
how to handle this kind of
stuff in a general case.

00:27:34.660 --> 00:27:36.160
But if you guys are doing
it for the first time,

00:27:36.160 --> 00:27:37.260
it might not be so good.

00:27:41.330 --> 00:27:42.590
So that's enough of PDEs.

00:27:42.590 --> 00:27:45.040
Let's talk about probability.

00:28:09.040 --> 00:28:13.750
So probability is everywhere,
except in undergraduate ChemE

00:28:13.750 --> 00:28:14.500
homework problems.

00:28:17.200 --> 00:28:20.142
So when you do problems
as an undergraduate,

00:28:20.142 --> 00:28:21.600
they always had
some nice solution.

00:28:21.600 --> 00:28:25.050
It was 2 pi, it was 3.0.

00:28:25.050 --> 00:28:27.580
Everything was, like,
deterministic, is definite.

00:28:27.580 --> 00:28:29.182
The grader could go through.

00:28:29.182 --> 00:28:30.265
Oh, no, you're off by 0.1.

00:28:30.265 --> 00:28:33.820
It couldn't possibly be right.

00:28:33.820 --> 00:28:35.050
That's, like, not reality.

00:28:35.050 --> 00:28:37.300
So any time you actually
make a measurement,

00:28:37.300 --> 00:28:38.855
you always had
measurement noise.

00:28:38.855 --> 00:28:40.480
And if you try to
repeat a measurement,

00:28:40.480 --> 00:28:42.340
you don't get the same
result. So that's,

00:28:42.340 --> 00:28:45.630
like, completely different
than an undergraduate problem.

00:28:45.630 --> 00:28:47.120
But this is the reality.

00:28:47.120 --> 00:28:51.480
So the reality is the world is,
like, not so nice as you think.

00:28:51.480 --> 00:28:53.191
But actually, it's
even more fundamental.

00:28:53.191 --> 00:28:54.690
It's nothing about--
I mean, there's

00:28:54.690 --> 00:28:56.440
one problem about how
good an experimental

00:28:56.440 --> 00:28:59.550
those people are, and
how fancy an apparatus

00:28:59.550 --> 00:29:03.240
you bought that can make
things exactly reproducible.

00:29:03.240 --> 00:29:06.720
But even if you do that
perfectly, the equations we

00:29:06.720 --> 00:29:10.590
use really don't correspond
to the real physical reality.

00:29:10.590 --> 00:29:12.765
So we always use the
continuum equations.

00:29:12.765 --> 00:29:16.680
You guys probably are studying
them a lot in 1040 and 1050,

00:29:16.680 --> 00:29:19.314
especially 1050, I guess.

00:29:19.314 --> 00:29:20.730
But those equations
are really all

00:29:20.730 --> 00:29:24.330
derived from averages
over ensembles

00:29:24.330 --> 00:29:26.190
or little finite
volumes or something

00:29:26.190 --> 00:29:29.760
if you look at the
derivation of the equations.

00:29:29.760 --> 00:29:33.830
And reality is that the
world is full of molecules.

00:29:33.830 --> 00:29:38.160
And so they're all
wiggling around.

00:29:38.160 --> 00:29:39.930
And if you look in a
little finite volume,

00:29:39.930 --> 00:29:41.280
you look right now,
you'll see that there's

00:29:41.280 --> 00:29:42.520
27 molecules in there.

00:29:42.520 --> 00:29:44.690
If you look a second
later, there might be 28.

00:29:44.690 --> 00:29:46.770
Then a little later, maybe 26.

00:29:46.770 --> 00:29:49.770
It's always fluctuating around.

00:29:49.770 --> 00:29:52.860
But according to our average
equations that we use,

00:29:52.860 --> 00:29:56.805
like in the Navier-Stokes
equations, it always 27.3.

00:29:56.805 --> 00:29:58.680
But of course, there's
not 0.3 of a molecule.

00:29:58.680 --> 00:30:00.980
So, I mean, explicitly,
it's the average

00:30:00.980 --> 00:30:03.750
is what we're computing,
and the reality

00:30:03.750 --> 00:30:06.520
is fluctuating around the edges.

00:30:06.520 --> 00:30:08.250
Same thing in thermo.

00:30:08.250 --> 00:30:11.490
We say that such-and-such has
a certain amount of energy.

00:30:11.490 --> 00:30:14.970
But you guys have some
[INAUDIBLE] already, yes?

00:30:14.970 --> 00:30:17.250
So you saw that's not true?

00:30:17.250 --> 00:30:19.180
So really, all that's
saying is that's, like,

00:30:19.180 --> 00:30:20.660
the probability, the average.

00:30:20.660 --> 00:30:24.112
If you've had many,
many ensembles that

00:30:24.112 --> 00:30:26.070
were exactly the same
and you average them all,

00:30:26.070 --> 00:30:28.194
you get some number and
that's your average energy.

00:30:28.194 --> 00:30:30.105
But for any actual
realization, it

00:30:30.105 --> 00:30:31.730
has some different
value of the energy.

00:30:35.380 --> 00:30:37.680
And it's even worse than that.

00:30:37.680 --> 00:30:40.362
That's because we have
a lot of particles.

00:30:40.362 --> 00:30:42.570
You can even go down to,
like, the microscopic level,

00:30:42.570 --> 00:30:44.629
where you have one molecule.

00:30:44.629 --> 00:30:46.670
And you calculate things
about that, it turns out

00:30:46.670 --> 00:30:48.340
you have to use the
Schrodinger equation for that.

00:30:48.340 --> 00:30:49.480
And the Schrodinger
equation explicitly

00:30:49.480 --> 00:30:50.725
only gives you
probability densities.

00:30:50.725 --> 00:30:52.270
So it just tells
you the probability

00:30:52.270 --> 00:30:53.800
the molecule might be
somewhere, the electron

00:30:53.800 --> 00:30:56.110
might be somewhere, the
energy might be something.

00:30:56.110 --> 00:30:58.240
But it's not actually
whether it really is.

00:30:58.240 --> 00:31:00.430
It's just saying a
probability distribution.

00:31:00.430 --> 00:31:02.638
And every time you do the
experiment on the molecule,

00:31:02.638 --> 00:31:04.090
you get a different result.

00:31:04.090 --> 00:31:07.190
Now, this is super-annoying,
but it's the way life is.

00:31:07.190 --> 00:31:09.190
Einstein got so annoyed,
he has a famous saying,

00:31:09.190 --> 00:31:10.606
and it's "God does
not play dice."

00:31:10.606 --> 00:31:13.250
He was, like, just completely
annoyed at these equations.

00:31:13.250 --> 00:31:16.300
But it's the way it is.

00:31:16.300 --> 00:31:20.980
So the reality is that things,
all we know about, really,

00:31:20.980 --> 00:31:22.500
are probability distributions.

00:31:22.500 --> 00:31:24.730
In most of our
work, in our lives,

00:31:24.730 --> 00:31:27.799
we always talk about, like,
the mean or the median.

00:31:27.799 --> 00:31:29.590
And we're talking as
if it's a real number.

00:31:29.590 --> 00:31:32.470
But really, it's always
some distribution.

00:31:32.470 --> 00:31:34.840
So it's time, I guess,
you're in graduate school,

00:31:34.840 --> 00:31:36.680
it's time to, like,
face up to this.

00:31:36.680 --> 00:31:38.138
And that's what
we're going to talk

00:31:38.138 --> 00:31:39.826
about for the next week or two.

00:31:43.695 --> 00:31:46.774
AUDIENCE: [INAUDIBLE]

00:31:46.774 --> 00:31:48.190
WILLIAM GREEN, JR:
This also makes

00:31:48.190 --> 00:31:49.270
it makes you wonder
what you're doing

00:31:49.270 --> 00:31:50.600
when you make a measurement.

00:31:50.600 --> 00:31:53.769
So if you make a measurement,
first of all, the fact

00:31:53.769 --> 00:31:55.560
that when you measure
something repeatedly,

00:31:55.560 --> 00:31:58.270
you're not going to get the
same number, that's alarming.

00:31:58.270 --> 00:32:00.640
Because I want to
say I'm 5 foot 9",

00:32:00.640 --> 00:32:03.305
this should be pretty
common, I'm always 5 foot 9".

00:32:03.305 --> 00:32:05.680
But actually, if you measure
me multiple times, sometimes

00:32:05.680 --> 00:32:07.870
you'll get 5' 9 and 1/4"
Some people will get 5'

00:32:07.870 --> 00:32:13.450
8 and 3/4" So it might make
you worry, did I change?

00:32:13.450 --> 00:32:17.620
Did I grow between
the measurements?

00:32:17.620 --> 00:32:19.300
So that's one issue.

00:32:23.680 --> 00:32:31.035
Because our experiments
are not repeatable

00:32:31.035 --> 00:32:32.660
and we get different
numbers every time

00:32:32.660 --> 00:32:35.414
we make a measurement,
then we have a big problem.

00:32:35.414 --> 00:32:36.830
Somebody says,
well, I really want

00:32:36.830 --> 00:32:38.720
to know how tall
Professor Green is.

00:32:38.720 --> 00:32:41.299
I've always wondered,
how tall is he?

00:32:41.299 --> 00:32:43.090
And everybody's told
me a different number.

00:32:43.090 --> 00:32:44.465
And when you go
measure it again,

00:32:44.465 --> 00:32:45.860
you get a different
number again.

00:32:45.860 --> 00:32:48.380
What's going on?

00:32:48.380 --> 00:32:49.970
And so you'll have
to then-- then we

00:32:49.970 --> 00:32:51.740
have, like, a
concept that there is

00:32:51.740 --> 00:32:54.170
a true height of Professor
Green and we just

00:32:54.170 --> 00:32:56.160
don't know what it is.

00:32:56.160 --> 00:32:57.950
And then we'll try
maybe to make repeated

00:32:57.950 --> 00:33:01.637
measurements of my height, and
then maybe take the average.

00:33:01.637 --> 00:33:03.220
That would be the
obvious thing to do.

00:33:03.220 --> 00:33:04.952
And we take the average
and report that.

00:33:04.952 --> 00:33:06.910
We'll tell the boss,
we'll lie to him, say, oh,

00:33:06.910 --> 00:33:08.395
Professor Green's 5 foot 9".

00:33:08.395 --> 00:33:10.520
When really, we never
actually measured 5' foot 9".

00:33:10.520 --> 00:33:14.355
Every time we measured, it was
5' 9 and 1/8", 5' 8 and 3/4".

00:33:14.355 --> 00:33:15.980
Every time, it was
something different.

00:33:15.980 --> 00:33:17.470
But we just say, OK, it's 5' 9".

00:33:17.470 --> 00:33:19.400
And the boss, he doesn't want to
know about all this complexity,

00:33:19.400 --> 00:33:20.733
anyway, so he just believes you.

00:33:20.733 --> 00:33:22.460
So it takes your average number.

00:33:22.460 --> 00:33:27.290
But you know that you're not
really sure I'm exactly 5' 9"

00:33:27.290 --> 00:33:30.560
And so you have a
probability distribution,

00:33:30.560 --> 00:33:32.280
and you're doing
your best guess.

00:33:32.280 --> 00:33:34.310
And in fact, if you're
honest to your boss,

00:33:34.310 --> 00:33:35.170
you'll give him an error bar.

00:33:35.170 --> 00:33:37.211
You'll say he's 5' 9",
plus or minus 1/2 an inch.

00:33:39.980 --> 00:33:41.657
And that way, what
you're saying is

00:33:41.657 --> 00:33:43.865
you're pretty sure the true
height of Professor Green

00:33:43.865 --> 00:33:44.990
is somewhere in that range.

00:33:47.340 --> 00:33:48.630
Is this OK?

00:33:48.630 --> 00:33:49.260
Yeah.

00:33:49.260 --> 00:33:52.760
Now it might be that I'm
actually changing height.

00:33:52.760 --> 00:33:55.010
I get a good night's rest,
I lie down for a long time.

00:33:55.010 --> 00:33:55.820
Maybe when I stretch
out a little bit.

00:33:55.820 --> 00:33:58.195
When I stand up in front of
lecture here for a long time,

00:33:58.195 --> 00:33:59.005
I'm shrinking.

00:33:59.005 --> 00:34:00.380
My vertebrae are
being compressed

00:34:00.380 --> 00:34:01.421
by standing here so long.

00:34:01.421 --> 00:34:03.680
So it's, like, a
combination of things.

00:34:03.680 --> 00:34:05.870
One is your measurement
system is not perfect,

00:34:05.870 --> 00:34:09.040
and one is that I actually
might be fluctuating.

00:34:09.040 --> 00:34:10.800
I had a big breakfast,
I'm growing.

00:34:13.310 --> 00:34:14.859
So is it true with everything?

00:34:14.859 --> 00:34:16.400
Every experiment
you do is like this,

00:34:16.400 --> 00:34:19.639
that there is a real fluctuation
of the real, physical apparatus

00:34:19.639 --> 00:34:22.340
of the thing that you're trying
to measure because mostly,

00:34:22.340 --> 00:34:24.340
things we're trying to
measure have fluctuations

00:34:24.340 --> 00:34:25.159
intrinsically.

00:34:25.159 --> 00:34:28.570
And then on top of that,
your measurement device

00:34:28.570 --> 00:34:30.590
is fluctuating, which
means-- and then

00:34:30.590 --> 00:34:32.298
the combination is
what you're measuring.

00:34:32.298 --> 00:34:35.270
It gives you fluctuation.

00:34:35.270 --> 00:34:36.949
If you have a very
nice instrument,

00:34:36.949 --> 00:34:38.719
the fluctuation
of your instrument

00:34:38.719 --> 00:34:41.239
is smaller than the
fluctuation in the real system

00:34:41.239 --> 00:34:42.830
and you'll go down to the limit.

00:34:42.830 --> 00:34:44.000
Anybody with a really
good instrument

00:34:44.000 --> 00:34:45.920
should measure approximately the
same probability distribution,

00:34:45.920 --> 00:34:47.544
which is actually
the real fluctuation.

00:34:47.544 --> 00:34:48.760
My height, for example.

00:34:48.760 --> 00:34:50.385
So if you bought a
laser interferometer

00:34:50.385 --> 00:34:53.389
and mounted a mirror on my
head, and measured my height

00:34:53.389 --> 00:34:55.130
to the wavelength
of light, you're

00:34:55.130 --> 00:34:57.080
pretty sure that
it's pretty good.

00:34:57.080 --> 00:34:58.880
It's within a
wavelength of light.

00:34:58.880 --> 00:35:00.796
So the error bar there
is just due to the fact

00:35:00.796 --> 00:35:02.620
that I slouch sometimes.

00:35:02.620 --> 00:35:03.450
Is that OK?

00:35:07.300 --> 00:35:09.650
So let's talk about some basic
things about probability.

00:35:09.650 --> 00:35:13.850
So we're always saying there's
a probability of an event.

00:35:19.710 --> 00:35:21.500
And so we want to give a number.

00:35:21.500 --> 00:35:23.570
So for example,
I'm flipping coins.

00:35:23.570 --> 00:35:26.360
I flip a penny, it
could be heads or tails.

00:35:26.360 --> 00:35:31.902
I'll say the
probability of heads

00:35:31.902 --> 00:35:35.950
is approximately equal to 1/2.

00:35:35.950 --> 00:35:42.230
So I flipped the coin, and if
you flip the coin 100 times,

00:35:42.230 --> 00:35:43.880
you might expect
to see 50 heads.

00:35:43.880 --> 00:35:47.600
Now, it could be 49 heads,
it could be 51 heads.

00:35:47.600 --> 00:35:50.060
So you have to worry about,
like, exactly how precisely you

00:35:50.060 --> 00:35:50.560
know it.

00:35:50.560 --> 00:35:52.750
But you think it's
something like a half.

00:35:52.750 --> 00:35:55.700
Now, just to warn
you, I actually

00:35:55.700 --> 00:35:58.830
didn't specify any more
significant figures here,

00:35:58.830 --> 00:36:00.750
and it might be really
hard to figure out what

00:36:00.750 --> 00:36:02.312
those significant figures are.

00:36:02.312 --> 00:36:04.270
And this is related to
the measurement problem.

00:36:04.270 --> 00:36:07.620
So we think that a coin
has about a 50/50 chance

00:36:07.620 --> 00:36:08.880
of being heads or tails.

00:36:08.880 --> 00:36:10.700
But if you really
wanted to prove it,

00:36:10.700 --> 00:36:13.090
that might be really hard to do.

00:36:13.090 --> 00:36:15.268
You can have joint
probabilities.

00:36:20.890 --> 00:36:27.640
So suppose I have a
penny and I have a dime.

00:36:27.640 --> 00:36:30.430
And I try to think, if I flipped
them both, what could happen?

00:36:30.430 --> 00:36:33.194
I could have that they
both come up heads.

00:36:33.194 --> 00:36:35.360
I could have this guy come
up heads, this guy tails.

00:36:35.360 --> 00:36:38.470
This guy tails,
this heads, tails.

00:36:38.470 --> 00:36:40.504
So there's, like, four
possible outcomes,

00:36:40.504 --> 00:36:42.420
and we think they all
have about approximately

00:36:42.420 --> 00:36:43.815
equal probabilities.

00:36:43.815 --> 00:36:45.940
So the probability of any
of these things happening

00:36:45.940 --> 00:36:46.773
should be about 1/4.

00:36:49.900 --> 00:36:59.560
So you can write the probability
of event 1 and event 2.

00:37:02.320 --> 00:37:04.330
So this would be, for
example, the probability

00:37:04.330 --> 00:37:08.180
that I got heads for
penny and heads for dime,

00:37:08.180 --> 00:37:09.850
and I think that
this is about 1/4.

00:37:19.276 --> 00:37:32.802
Now, I could also say
the probability of heads,

00:37:32.802 --> 00:37:37.620
and heads is equal to
the probability of heads

00:37:37.620 --> 00:37:45.090
for the penny times the
probability of heads

00:37:45.090 --> 00:37:53.090
for the dime if I got
heads for the penny.

00:37:53.090 --> 00:37:58.860
Now, if these two coin flips
are completely uncorrelated,

00:37:58.860 --> 00:38:02.310
then the probability of heads on
the dime and heads on the penny

00:38:02.310 --> 00:38:02.830
is the same.

00:38:02.830 --> 00:38:04.955
It's just the probability
of the heads on the dime.

00:38:04.955 --> 00:38:06.390
So they don't matter.

00:38:06.390 --> 00:38:09.992
But many things that we'll
study are correlated.

00:38:09.992 --> 00:38:11.700
That the probability
of something happens

00:38:11.700 --> 00:38:13.650
depends on whether
something else happened.

00:38:17.320 --> 00:38:19.780
So this kind of expression
is very important.

00:38:19.780 --> 00:38:21.080
Now, this is just an equality.

00:38:21.080 --> 00:38:24.070
It's like a definition
of what these are, right?

00:38:24.070 --> 00:38:26.320
And I'll just notice you
can write that the other way

00:38:26.320 --> 00:38:26.830
around.

00:38:26.830 --> 00:38:31.550
So it's the probability
of heads on the dime

00:38:31.550 --> 00:38:34.780
times the probability
of heads on the penny.

00:38:41.486 --> 00:38:43.950
This is OK?

00:38:43.950 --> 00:38:46.250
So these two guys are
equal to each other,

00:38:46.250 --> 00:38:48.860
and you can rearrange that
equation any way you want.

00:38:48.860 --> 00:38:50.570
And we'll come back
to a very famous way

00:38:50.570 --> 00:38:51.611
to rewrite that equation.

00:38:51.611 --> 00:38:54.320
It's called Bayes'
theorem, and that turns out

00:38:54.320 --> 00:38:57.486
to be really important in
model versus data comparisons.

00:39:02.450 --> 00:39:07.100
Instead of doing AND, do OR.

00:39:07.100 --> 00:39:10.420
So maybe you can say, then,
what's the probability

00:39:10.420 --> 00:39:13.350
that I see at least one head?

00:39:19.240 --> 00:39:22.910
So I flip my two coins, and
I have the probability of,

00:39:22.910 --> 00:39:24.382
I see at least one head.

00:39:28.520 --> 00:39:30.935
So we know we intuitively
the answer is 3/4.

00:39:33.500 --> 00:39:36.260
But let's try to think of where
does that really come from.

00:39:41.340 --> 00:39:42.684
So--

00:39:42.684 --> 00:39:44.492
[HIGH-PITCHED SOUND]

00:39:44.492 --> 00:39:45.400
What is that?

00:39:50.874 --> 00:39:51.870
Sorry.

00:39:51.870 --> 00:39:54.900
Really threw me there.

00:39:54.900 --> 00:39:57.400
So probability of
at least one head,

00:39:57.400 --> 00:40:02.685
it's not equal to the
probability of head

00:40:02.685 --> 00:40:07.656
for the penny plus the
probability of head

00:40:07.656 --> 00:40:13.130
for the dime, because we
know this is really 3/4,

00:40:13.130 --> 00:40:15.220
and this is 1/2, this is 1/2.

00:40:15.220 --> 00:40:19.190
You add them up, 1/2 plus
1/2 does not equal to 3/4.

00:40:19.190 --> 00:40:22.890
So be careful.

00:40:22.890 --> 00:40:26.000
There's a lot of things you can
say quickly that are not true.

00:40:28.940 --> 00:40:33.230
So anyway, you really have
to consider the whole thing.

00:40:33.230 --> 00:40:36.304
And in the best case,
if you can enumerate

00:40:36.304 --> 00:40:38.720
what's going to happen, it's
very simple to add up things.

00:40:38.720 --> 00:40:41.380
Otherwise, you have to be
very careful with the algebra

00:40:41.380 --> 00:40:43.506
to make sure you add
all things correctly.

00:40:52.840 --> 00:40:55.000
Let's see at least what
this should be equal to.

00:40:55.000 --> 00:40:56.890
So this should be equal
to the probability

00:40:56.890 --> 00:41:03.900
that a head on a penny
times the probability

00:41:03.900 --> 00:41:18.570
that I have head for the dime
if I had a head for the penny

00:41:18.570 --> 00:41:23.696
plus probability of
the tail for the dime

00:41:23.696 --> 00:41:30.244
or for the penny plus
the probability that I

00:41:30.244 --> 00:41:39.450
have for the dime and then
times something like this, too.

00:41:44.050 --> 00:41:46.810
And in a case like
this, where I'm summing

00:41:46.810 --> 00:41:48.070
over all of the possibilities.

00:41:48.070 --> 00:41:49.540
So in this case,
I'm either going

00:41:49.540 --> 00:41:50.740
to get a head for the dime
or a tail for the dime.

00:41:50.740 --> 00:41:52.281
It's not going to
balance on its end.

00:41:52.281 --> 00:41:54.760
I'm assuming that
that chance is 0.

00:41:54.760 --> 00:42:00.636
Then these two things
just add up to 1.

00:42:00.636 --> 00:42:03.044
Is that all right?

00:42:03.044 --> 00:42:04.960
It's really saying the
probability of the dime

00:42:04.960 --> 00:42:09.590
will do something if I
have a head for the penny.

00:42:09.590 --> 00:42:11.580
Is this all right?

00:42:11.580 --> 00:42:14.610
So you want to practice doing
little algebra things like this

00:42:14.610 --> 00:42:16.068
to make sure you
know how to do it.

00:42:20.500 --> 00:42:21.000
Yes?

00:42:21.000 --> 00:42:21.200
No?

00:42:21.200 --> 00:42:21.700
Maybe?

00:42:28.240 --> 00:42:30.518
Let's see what
else I've got here.

00:42:49.748 --> 00:42:50.724
AUDIENCE: Professor.

00:42:50.724 --> 00:42:51.640
WILLIAM GREEN, JR: Yes

00:42:51.640 --> 00:42:54.340
AUDIENCE: What you
just wrote, [INAUDIBLE]

00:42:54.340 --> 00:42:56.381
WILLIAM GREEN, JR: Yeah,
what's the correct thing

00:42:56.381 --> 00:42:57.232
to write in here?

00:43:06.940 --> 00:43:07.940
What is the right thing?

00:43:12.833 --> 00:43:13.499
AUDIENCE: Tails.

00:43:32.300 --> 00:43:33.300
WILLIAM GREEN, JR: Yeah.

00:43:33.300 --> 00:43:34.130
So it's tricky.

00:43:34.130 --> 00:43:34.630
Yeah.

00:43:34.630 --> 00:43:40.521
AUDIENCE: The
probability [INAUDIBLE]

00:43:40.521 --> 00:43:42.270
WILLIAM GREEN, JR:
Yeah, it's the easy way

00:43:42.270 --> 00:43:44.320
to do it, for this case.

00:43:44.320 --> 00:43:46.367
And so there's, like, a lot of--

00:43:46.367 --> 00:43:48.700
for some cases, it might be
easier to write it this way.

00:43:48.700 --> 00:43:50.074
In some cases,
write it that way.

00:43:50.074 --> 00:43:54.060
It depends on how many
different options there are.

00:43:54.060 --> 00:43:58.665
So anyway, I'm just trying to
warn you by writing this out.

00:43:58.665 --> 00:44:00.540
It's like, you might
write down stuff quickly

00:44:00.540 --> 00:44:01.920
without thinking about it.

00:44:01.920 --> 00:44:03.360
And it's easy to double count.

00:44:03.360 --> 00:44:05.850
Like for example, if you
put the other term in here,

00:44:05.850 --> 00:44:06.850
you double count.

00:44:06.850 --> 00:44:10.890
Because you already
have, they had head,

00:44:10.890 --> 00:44:12.640
you already had
the head case here.

00:44:21.830 --> 00:44:25.515
Yeah, maybe-- Did I write the--

00:44:25.515 --> 00:44:27.890
I'll just write the base
theorem down the way you usually

00:44:27.890 --> 00:44:29.370
see it.

00:44:29.370 --> 00:44:31.520
So this is the
general expression,

00:44:31.520 --> 00:44:33.470
which is always true.

00:44:33.470 --> 00:44:43.970
The base theorem way to write it
is the probability of A given B

00:44:43.970 --> 00:44:53.714
is equal to the probability of
B given A times the probability

00:44:53.714 --> 00:44:59.490
of A over the probability of B.

00:44:59.490 --> 00:45:06.724
And that's just
rearranging this equality.

00:45:06.724 --> 00:45:07.390
Rearrange again.

00:45:09.970 --> 00:45:14.007
And we'll come back to
this with the situation

00:45:14.007 --> 00:45:16.090
that's like, what's the
probability that Professor

00:45:16.090 --> 00:45:20.440
Green is 5' 9", given
our measurements,

00:45:20.440 --> 00:45:23.650
is related to the probability
that if Professor Green was 5'

00:45:23.650 --> 00:45:27.300
9", we would have made
the measurements we got.

00:45:27.300 --> 00:45:30.510
So this is like that way
to invert that statement.

00:45:39.780 --> 00:45:47.355
And if the thing that's
here is exclusive,

00:45:47.355 --> 00:45:49.690
it means there's, like,
many possible things that

00:45:49.690 --> 00:45:50.934
could happen.

00:45:50.934 --> 00:45:53.240
This is the probability
that one of them happened.

00:45:53.240 --> 00:45:54.660
There's a lot of other things
that could have happened.

00:45:54.660 --> 00:45:56.090
For instance, like heads
and tails, it's either heads

00:45:56.090 --> 00:45:56.700
or it's tails.

00:45:56.700 --> 00:45:57.610
It's exclusive.

00:45:57.610 --> 00:46:06.730
If it's like that, you could
rewrite that probability of B

00:46:06.730 --> 00:46:19.150
is equal to probability of
Aj, probability of B given Aj

00:46:19.150 --> 00:46:21.940
summed over j.

00:46:21.940 --> 00:46:25.210
This is something,
whatever A measurement

00:46:25.210 --> 00:46:29.700
it is, if it ends up with
B, that's probability B.

00:46:29.700 --> 00:46:31.910
Is that all right?

00:46:31.910 --> 00:46:34.650
So you can put that into
the denominator here.

00:46:34.650 --> 00:46:36.440
You can substitute
that in so you

00:46:36.440 --> 00:46:41.633
can rewrite this as
probability of Ai

00:46:41.633 --> 00:46:50.142
given B is equal to the
probability of B given Ai

00:46:50.142 --> 00:46:54.600
times the probability
of Ai divided

00:46:54.600 --> 00:47:06.722
by the sum of the probability
of Aj [INAUDIBLE] Aj.

00:47:11.710 --> 00:47:14.112
And this is the form that
you'll normally see based here.

00:47:20.870 --> 00:47:23.370
A lot of times, we have a
continuous variable instead

00:47:23.370 --> 00:47:25.910
of discrete events like this.

00:47:25.910 --> 00:47:28.320
And so then we talk about
probability distributions.

00:47:31.240 --> 00:47:33.980
And so instead of
having a sum there,

00:47:33.980 --> 00:47:36.310
we might have an integral.

00:47:36.310 --> 00:47:42.400
And this is a topic that also is
quite confusing to many people.

00:47:46.060 --> 00:47:51.956
So suppose I had a
Maxwell-Boltzmann distribution.

00:47:51.956 --> 00:47:56.710
And I have, like, the
probability density

00:47:56.710 --> 00:48:00.420
of having a certain velocity
in the extraction instead

00:48:00.420 --> 00:48:02.440
of the particle.

00:48:02.440 --> 00:48:05.760
And so that's going
to be something like e

00:48:05.760 --> 00:48:12.834
to the negative 1/2 mvx squared
over keT divided by something.

00:48:15.663 --> 00:48:17.246
And maybe it actually
is [INAUDIBLE]..

00:48:17.246 --> 00:48:18.080
I'm not sure.

00:48:18.080 --> 00:48:19.730
Maybe there's a vx here.

00:48:19.730 --> 00:48:20.900
Something like that.

00:48:20.900 --> 00:48:22.435
So you have an
expression that you

00:48:22.435 --> 00:48:24.470
get for [INAUDIBLE] for
probability density.

00:48:24.470 --> 00:48:25.970
Now, what does this mean?

00:48:25.970 --> 00:48:28.550
We want this thing
to be the integral

00:48:28.550 --> 00:48:34.377
of P of vx dvx over from
negative infinity to infinity.

00:48:34.377 --> 00:48:35.710
We want this to equal something.

00:48:35.710 --> 00:48:37.910
What do we want this to equal?

00:48:37.910 --> 00:48:39.120
1.

00:48:39.120 --> 00:48:42.176
So that means that the
units of this, this

00:48:42.176 --> 00:48:44.709
is units of
centimeters per second,

00:48:44.709 --> 00:48:45.750
what's the units of this?

00:48:45.750 --> 00:48:49.630
AUDIENCE: [INAUDIBLE]

00:48:51.120 --> 00:48:53.370
WILLIAM GREEN, JR: Centimeters
per second now minus 1.

00:48:53.370 --> 00:48:57.860
It's, like, it's
per the unit to this

00:48:57.860 --> 00:49:00.190
to get a dimensionless
number there.

00:49:00.190 --> 00:49:05.506
So this has units of
seconds per centimeter,

00:49:05.506 --> 00:49:07.880
which probably none of you
thought until I just said that

00:49:07.880 --> 00:49:09.550
to you.

00:49:09.550 --> 00:49:14.030
So probability
densities are tricky,

00:49:14.030 --> 00:49:17.679
and they always have to
be multiplied by a delta.

00:49:17.679 --> 00:49:19.220
When I talk about
this, I really need

00:49:19.220 --> 00:49:23.190
to talk about P of vx, delta vx.

00:49:23.190 --> 00:49:25.670
I need to have something
here to make this look

00:49:25.670 --> 00:49:27.470
like a probability again.

00:49:27.470 --> 00:49:29.390
And so the issue is
that the probability

00:49:29.390 --> 00:49:32.354
that the velocity is exactly
something is, like, 0.

00:49:32.354 --> 00:49:33.770
It's really the
probability that's

00:49:33.770 --> 00:49:37.630
in a certain range,
plus or minus something.

00:49:37.630 --> 00:49:39.145
Then you get a
nonzero probability.

00:49:43.372 --> 00:49:44.830
There's another
quantity you'll see

00:49:44.830 --> 00:49:49.030
a lot called the cumulative
probability distribution.

00:49:49.030 --> 00:49:50.460
Let's see, what letter do I use?

00:49:53.880 --> 00:49:56.650
Call it F. And this would
be like the integral

00:49:56.650 --> 00:50:03.634
from negative infinity to
vx prime, or vx of P over vx

00:50:03.634 --> 00:50:07.330
prime, dvx prime.

00:50:07.330 --> 00:50:09.880
And this is the probability
that the particle

00:50:09.880 --> 00:50:11.830
has vx less than something.

00:50:11.830 --> 00:50:19.492
So this is F is equal to
the probability that vx--

00:50:19.492 --> 00:50:21.620
let's call this vx star--

00:50:21.620 --> 00:50:26.520
vx is less than or
equal to vx star.

00:50:26.520 --> 00:50:28.520
And that can be quite
an important property.

00:50:28.520 --> 00:50:32.236
So for example, you're
designing a supersonic nozzle.

00:50:32.236 --> 00:50:34.110
You want to know what
gas molecules are going

00:50:34.110 --> 00:50:36.152
to come out at a certain speed.

00:50:36.152 --> 00:50:37.860
You really need to
know that probability.

00:50:37.860 --> 00:50:40.565
How many of them are going to
be bigger than that speed, how

00:50:40.565 --> 00:50:43.320
many less than that speed?

00:50:43.320 --> 00:50:47.562
So these are two different ways
to express a similar thing.

00:50:47.562 --> 00:50:49.020
This is, like, the
probably that it

00:50:49.020 --> 00:50:51.550
does have that speed
within a certain range.

00:50:51.550 --> 00:50:54.240
This is the probability that
it has anything less than

00:50:54.240 --> 00:50:55.680
or equal to that speed.

00:50:55.680 --> 00:50:58.020
And in a completely different
way, this is an integral.

00:50:58.020 --> 00:51:02.640
This has units of dimensionless.

00:51:02.640 --> 00:51:06.400
This has units of per velocity.

00:51:06.400 --> 00:51:07.950
All right?

00:51:07.950 --> 00:51:10.860
All right, we'll pick up
more of this on Monday.