馃攳
Simulating Supply and Demand - YouTube
Channel: Primer
[0]
- [Instructor] In this
video, we're gonna start
[1]
talking about markets.
[3]
We'll start from scratch
with one buyer and one seller
[6]
and eventually build up to
a simulation of a market
[8]
with many buyers and many sellers.
[10]
And then, hey, why not, we'll
risk getting a bit political
[13]
by examining the market we've built
[15]
to understand some basic arguments
[17]
for why markets are good on their own
[19]
and some arguments for why
[21]
they sometimes need intervention.
[26]
Okay, in the market we're going to build,
[28]
the blue blobs will offer
to sell, what else, rockets.
[32]
And the orange blobs will buy the rockets,
[34]
assuming the price is right.
[36]
A seller blob places a
certain value on a rocket
[39]
which we'll show with this vertical bar.
[41]
This value comes from some combination
[43]
of the cost of obtaining the
rocket in the first place
[46]
and perhaps how much the seller
[48]
would enjoy keeping the rocket for itself.
[50]
It would gladly sell a rocket for a price
[52]
above this value if it can,
[54]
but at a price below this number,
[56]
it would prefer just to keep the rocket.
[59]
This blue bar effectively sets
[60]
a minimum price for the rocket.
[62]
And similarly, a buyer has a maximum price
[65]
of what it would be willing to pay.
[66]
It would love to pay less if possible,
[68]
but it's just not worth it to pay more.
[72]
If this buyer and sell get together,
[73]
they could end up making a transaction
[75]
for any price between
this maximum and minimum
[77]
and they'd both be pretty happy about it.
[80]
To put some concrete numbers on this,
[81]
let's say the buyer's maximum is $40
[84]
and the seller's minimum is $20.
[86]
And then let's say they end up transacting
[88]
in the middle at $30.
[90]
The rocket is worth $40 to the buyer,
[93]
but it only had to pay
$30, so it comes out ahead
[96]
in the interaction by $10.
[99]
The seller would have
sold for as little as $20,
[101]
but it got $30, 10 more than it needed,
[104]
so it was worthwhile for both of them.
[106]
If you wanted to quantify
how worthwhile it was,
[109]
you could say that they
each gained $10 of value.
[112]
To toss some economics lingo
at you, this is called surplus.
[116]
It's a measure of how
worthwhile the trade was.
[119]
And it's worth pausing
here to appreciate this.
[122]
The concept of value is a
bit slippery and subjective,
[125]
but we just figured a way to quantify it
[127]
by comparing possible alternatives.
[130]
Anyway, these blobs have developed
[132]
a wonderful business relationship,
[134]
but now what happens if
we add another buyer?
[137]
This buyer is going to have
a different price limit
[139]
than the other buyer.
[140]
Let's just say it's a little bit lower,
[142]
so this second orange blob likes rockets,
[145]
but a little bit less
than that first one did
[147]
or maybe it has a bit less money,
[149]
or maybe it has other things
[150]
it would like to spend its money on.
[152]
Whatever the reasons deep in its heart,
[154]
it's willing to pay just a little bit less
[156]
than the other buyer.
[157]
And we're actually gonna
simulate this situation
[159]
to see what happens, so let's
go over the simulation rules.
[162]
Each day the sellers will set up shop,
[164]
offering a rocket for a certain price,
[167]
and then in a randomly determined order,
[169]
the buyers will approach the sellers
[171]
and buy the rockets if they're
satisfied with the price.
[174]
The buyers and sellers
have their absolute limits,
[177]
but each day, they'll have
some different price in mind
[179]
that they expect to get.
[181]
Just like real people, they
want to get a good deal.
[184]
For example, our original
buyer is theoretically
[187]
willing to pay up to $40,
[188]
but it's gotten used to the price of $30,
[191]
so if this seller suddenly demanded 35,
[193]
the buyer wouldn't accept that price,
[195]
at least not right away.
[197]
The day continues until
every rocket has been sold
[201]
or until all the remaining
buyers have refused
[203]
to buy from all the remaining sellers.
[205]
Though, at the end of the day,
[206]
they are willing to accept
a slightly worse price
[208]
if they have to, but only slightly.
[211]
And then after the day ends,
the blobs take some time
[214]
to reflect and adjust
their expected prices
[216]
for the next day.
[218]
They get more aggressive with their prices
[219]
if they made a transaction,
[221]
and they get a little bit less
aggressive if they didn't.
[224]
Essentially, just like real people,
[226]
the blobs are trying to get
the best price they can,
[228]
adjusting their expectations as they go.
[231]
Now that we have all the
rules for this simulation,
[233]
let's start by seeing what happens
[234]
with just our original buyer and seller.
[237]
And we'll keep track of the price limits,
[238]
expected prices, and the
surplus each day over here.
[245]
Okay, so with just these
two, nothing really happens.
[248]
They keep trying to get a better price,
[249]
but since there's just the two of them,
[251]
neither of them has an advantage
[253]
and they keep setting the same
price over and over again.
[256]
But now, what if we add that second buyer
[258]
with the lower maximum price?
[260]
What do you expect to happen?
[265]
The price of rockets
ends up creeping upward.
[268]
Every single day, at
least one of the buyers
[271]
doesn't get to take home a rocket,
[272]
so that buyer ends up raising
the price it's willing to pay,
[275]
but the sellers almost
always able to make a deal
[277]
with one of the buyers,
so they also end up
[279]
raising their expected price.
[281]
This continues until
the price is at or above
[284]
one of the buyer's absolute limits.
[286]
And after that, it's basically back
[287]
to the one-on-one situation.
[289]
The fact that the two buyers are competing
[290]
for the one rocket results
in them paying more.
[294]
And an important thing to notice here
[295]
is that most of the surplus
generated with each transaction
[298]
ends up going to the seller.
[300]
When the buyers compete,
it's good for the sellers.
[304]
All right, so what if
we have a new situation
[306]
where we add two more sellers,
so now we have three total.
[309]
And just like with the buyers,
[310]
the sellers vary in how much
[312]
they fundamentally value the rockets.
[314]
One of these two new sellers
with have a higher price limit
[317]
than the original seller.
[318]
Maybe it's just not as efficient
[320]
in making or obtaining the rockets.
[322]
And the other sell will be the opposite
[324]
with a lower price limit.
[326]
Now that there's three
sellers and two buyers,
[328]
what do you think will happen here?
[338]
Okay, you might have seen this coming.
[340]
Now that we have three
sellers and only two buyers,
[342]
there's always at least one
seller who can't make a sale,
[345]
so they end up lowering
their asking price.
[348]
And the two buyers can
almost always make a deal,
[350]
so they also end up lowering their price.
[353]
And eventually, the
price fallss far enough
[355]
to where one of the sellers
just can't keep competing.
[358]
Here again, it's important to notice
[359]
where the surplus is going.
[361]
This time, the buyers
get most of the surplus.
[363]
When sellers compete,
it's good for buyers.
[367]
Now comes an interesting question.
[369]
If we add one more buyer which has
[371]
a lower maximum price than the other two,
[372]
so we now have three of each,
[374]
what do you expect to happen?
[376]
And actually, before we hit go here,
[378]
there's starting to kind
of be a lot of blobs,
[379]
so let's reorganize things a bit
[381]
and show the buyers
and sellers separately.
[384]
All right.
[394]
So the interesting thing here is that
[396]
even though there are three
sellers and three buyers,
[398]
we end up in a situation where only
[400]
two rockets are sold each day.
[402]
This is because not every pair
[404]
of buyers and sellers can make a deal.
[406]
The buyer with the lowest price limit
[408]
and the seller with
the highest price limit
[410]
could never be satisfied
by the same price.
[413]
If we artificially set the price up high,
[415]
all three sellers will be in the game,
[417]
but only two or fewer buyers
will be willing to buy,
[421]
so the three sellers will keep competing
[423]
until the price gets
too low for one of them
[425]
and then there will be two
buyers and two sellers.
[428]
On the other hand, if
we set the price low,
[430]
all three buyers will then compete
[432]
until the price gets too
high for one of them.
[435]
The price of the rockets will be balanced
[437]
or in equilibrium at some price
[439]
where the number of buyers and sellers
[441]
willing to transact at
that price is equal.
[444]
To put this in economics language,
[445]
it's the price where the quantity supplied
[447]
is equal to the quantity demanded.
[450]
This same phenomenon happens with
[452]
lots and lots of buyers and sellers.
[454]
By mixing randomly and
adjusting their prices
[456]
based on their own experience,
[457]
the blobs together end up settling
[459]
on a stable price and quantity.
[462]
And when we talk about large markets
[464]
with thousands or millions
or more participants,
[466]
it's more convenient to just draw curves
[468]
to show the price limits
of the buyers and sellers.
[471]
The curve showing the
price limit of the sellers
[473]
is called the supply curve.
[475]
The curve showing the
price limits of the buyers
[477]
is called the demand curve.
[479]
An equilibrium price and quantity
[480]
is where the two curves cross.
[483]
Okay, so we've hit a milestone.
[486]
We've built a market and
saw how supply and demand
[488]
combine to determine an
equilibrium price and quantity.
[492]
Now that we have this market model,
[493]
we can start to get down to
what economics is really about,
[496]
which is arguing about
what the model means
[499]
for how we should organize
things in the real world.
[502]
This is an everlasting discussion
[504]
and the specifics are different
[506]
depending on which market or industry
[507]
in the real world they're talking about,
[509]
so I'm not about to try to make
[510]
any sweeping conclusions here.
[512]
But it is worth outlining
the broad-strokes arguments
[514]
at play so we don't have
to start from scratch
[517]
every time we wanna argue about economics.
[520]
So what's good about this
market model we made?
[523]
Well, first, as we already talked about,
[525]
it organizes itself,
so that's pretty nice,
[528]
but there's a deeper good thing about it,
[530]
which we can see if we look at
[531]
the amount of surplus generated.
[534]
Since it might be a newish term,
[535]
it's worth saying again that the surplus
[537]
is a measure of worthwhile
the transactions are.
[540]
It turns out that at the
equilibrium price and quantity,
[543]
the market generates the
maximum possible surplus.
[547]
This won't be a
mathematically rigorous proof,
[549]
but a way I intuitively make sense of this
[551]
is by noticing that if the
next buyer and the next seller
[554]
made a transaction, the
surplus in that case
[556]
would actually be negative.
[558]
At that point, the buyer
just isn't willing to pay
[561]
what the seller needs.
[563]
The flip side of this
is another good thing.
[565]
The buyers and sellers that don't end up
[566]
participating in the rocket market
[568]
can go spend their time and
money on something else,
[570]
since their participation
in this particular market
[573]
is actually counterproductive.
[576]
Bringing these arguments together,
[577]
we have a system that results
[578]
in the maximum possible surplus
[580]
and determines the right
number of participants.
[583]
This is what people when they
say markets are efficient.
[586]
This efficiency makes it all the more
[588]
amazing and valuable that
is happens automatically.
[591]
And just to throw one more term at you,
[593]
you might refer to the
invisible hand at the market.
[596]
When people say invisible hand,
[598]
they're just referring to the fact
[599]
that everything happens automatically.
[601]
All right, so that's the basic argument
[603]
that a free market is good on its own,
[605]
now what about arguments
that markets need regulation?
[609]
Well, first, we can ask
whether an idealized market,
[612]
like the one we just made,
is actually a good model
[614]
of a given real world market.
[617]
The answer here depends a lot on
[618]
which market you're talking about,
[619]
but there are some
common important factors.
[622]
In general, for all those good things
[623]
we said about markets to be true,
[625]
there needs to be many buyers and sellers
[628]
who can freely switch who they buy from
[630]
and who they sell to and are
able to exchange voluntarily,
[633]
they're not forced to go
through with the deal,
[635]
they can walk away if they want,
[637]
and who have good information
about the prices and products
[640]
so they know when to switch or walk away.
[642]
Some real markets are actually
pretty close to this ideal,
[644]
but others can be quite far.
[648]
For the second kind of
argument for regulation,
[650]
we can ask whether maximizing surplus,
[652]
the way we defined it earlier,
is actually the right goal.
[656]
Remember that when we defined
surplus as a measure of value,
[659]
we were only comparing alternatives
for one blob at a time.
[663]
It's very possible that
this society of blobs
[665]
could decide to measure value in a way
[667]
that looks at all of the blobs at once.
[669]
Again, the exact arguments will depend
[671]
on the market in
question, but for example,
[673]
in markets like food,
labor, and healthcare,
[676]
a government might take some action
[677]
to allow more buyers and/or
sellers to participate
[680]
and get some individual
surplus for themselves,
[683]
even if that means less total
surplus in the whole system.
[686]
Without endorsing any
particular government program,
[689]
I think it's reasonable to say that
[690]
there could be some value in making sure
[692]
that everyone can eat, earn money,
[693]
and get the medical attention they need.
[696]
But, hey, that's up to the blobs.
[698]
So again, this was a bit of a whirlwind,
[700]
and there is, of course, a
lot more that could be said,
[703]
but I hope I made the case
[704]
that markets aren't
fundamentally good or bad.
[707]
They're a tool and just like any tool,
[709]
they're the most helpful
when we understand them well
[711]
and when we're thoughtful
about how and when to use them.
[714]
So that's it for the main
message of this video,
[717]
but I do want to briefly
mention a real world industry
[720]
where the role of markets
is especially confusing,
[723]
which is educational videos
[724]
distributed freely over the internet.
[727]
I don't claim to know how
all that works in detail,
[729]
but by liking, subscribing, sharing,
[731]
or by supporting directly on Patreon,
[733]
you can send signals about
the quantity demanded,
[736]
which will, in turn, affect
the quantity supplied
[738]
in the long run.
[739]
In any case, thanks for
watching till the end.
Most Recent Videos:
You can go back to the homepage right here: Homepage





