Simulating Supply and Demand

Simulating Supply and Demand



– [Instructor] In this
video, we're gonna start talking about markets. We'll start from scratch
with one buyer and one seller and eventually build up to
a simulation of a market with many buyers and many sellers. And then, hey, why not, we'll
risk getting a bit political by examining the market we've built to understand some basic arguments for why markets are good on their own and some arguments for why they sometimes need intervention. Okay, in the market we're going to build, the blue blobs will offer
to sell, what else, rockets. And the orange blobs will buy the rockets, assuming the price is right. A seller blob places a
certain value on a rocket which we'll show with this vertical bar. This value comes from some combination of the cost of obtaining the
rocket in the first place and perhaps how much the seller would enjoy keeping the rocket for itself. It would gladly sell a rocket for a price above this value if it can, but at a price below this number, it would prefer just to keep the rocket. This blue bar effectively sets a minimum price for the rocket. And similarly, a buyer has a maximum price of what it would be willing to pay. It would love to pay less if possible, but it's just not worth it to pay more. If this buyer and sell get together, they could end up making a transaction for any price between
this maximum and minimum and they'd both be pretty happy about it. To put some concrete numbers on this, let's say the buyer's maximum is $40 and the seller's minimum is $20. And then let's say they end up transacting in the middle at $30. The rocket is worth $40 to the buyer, but it only had to pay
$30, so it comes out ahead in the interaction by $10. The seller would have
sold for as little as $20, but it got $30, 10 more than it needed, so it was worthwhile for both of them. If you wanted to quantify
how worthwhile it was, you could say that they
each gained $10 of value. To toss some economics lingo
at you, this is called surplus. It's a measure of how
worthwhile the trade was. And it's worth pausing
here to appreciate this. The concept of value is a
bit slippery and subjective, but we just figured a way to quantify it by comparing possible alternatives. Anyway, these blobs have developed a wonderful business relationship, but now what happens if
we add another buyer? This buyer is going to have
a different price limit than the other buyer. Let's just say it's a little bit lower, so this second orange blob likes rockets, but a little bit less
than that first one did or maybe it has a bit less money, or maybe it has other things it would like to spend its money on. Whatever the reasons deep in its heart, it's willing to pay just a little bit less than the other buyer. And we're actually gonna
simulate this situation to see what happens, so let's
go over the simulation rules. Each day the sellers will set up shop, offering a rocket for a certain price, and then in a randomly determined order, the buyers will approach the sellers and buy the rockets if they're
satisfied with the price. The buyers and sellers
have their absolute limits, but each day, they'll have
some different price in mind that they expect to get. Just like real people, they
want to get a good deal. For example, our original
buyer is theoretically willing to pay up to $40, but it's gotten used to the price of $30, so if this seller suddenly demanded 35, the buyer wouldn't accept that price, at least not right away. The day continues until
every rocket has been sold or until all the remaining
buyers have refused to buy from all the remaining sellers. Though, at the end of the day, they are willing to accept
a slightly worse price if they have to, but only slightly. And then after the day ends,
the blobs take some time to reflect and adjust
their expected prices for the next day. They get more aggressive with their prices if they made a transaction, and they get a little bit less
aggressive if they didn't. Essentially, just like real people, the blobs are trying to get
the best price they can, adjusting their expectations as they go. Now that we have all the
rules for this simulation, let's start by seeing what happens with just our original buyer and seller. And we'll keep track of the price limits, expected prices, and the
surplus each day over here. Okay, so with just these
two, nothing really happens. They keep trying to get a better price, but since there's just the two of them, neither of them has an advantage and they keep setting the same
price over and over again. But now, what if we add that second buyer with the lower maximum price? What do you expect to happen? The price of rockets
ends up creeping upward. Every single day, at
least one of the buyers doesn't get to take home a rocket, so that buyer ends up raising
the price it's willing to pay, but the sellers almost
always able to make a deal with one of the buyers,
so they also end up raising their expected price. This continues until
the price is at or above one of the buyer's absolute limits. And after that, it's basically back to the one-on-one situation. The fact that the two buyers are competing for the one rocket results
in them paying more. And an important thing to notice here is that most of the surplus
generated with each transaction ends up going to the seller. When the buyers compete,
it's good for the sellers. All right, so what if
we have a new situation where we add two more sellers,
so now we have three total. And just like with the buyers, the sellers vary in how much they fundamentally value the rockets. One of these two new sellers
with have a higher price limit than the original seller. Maybe it's just not as efficient in making or obtaining the rockets. And the other sell will be the opposite with a lower price limit. Now that there's three
sellers and two buyers, what do you think will happen here? Okay, you might have seen this coming. Now that we have three
sellers and only two buyers, there's always at least one
seller who can't make a sale, so they end up lowering
their asking price. And the two buyers can
almost always make a deal, so they also end up lowering their price. And eventually, the
price fallss far enough to where one of the sellers
just can't keep competing. Here again, it's important to notice where the surplus is going. This time, the buyers
get most of the surplus. When sellers compete,
it's good for buyers. Now comes an interesting question. If we add one more buyer which has a lower maximum price than the other two, so we now have three of each, what do you expect to happen? And actually, before we hit go here, there's starting to kind
of be a lot of blobs, so let's reorganize things a bit and show the buyers
and sellers separately. All right. So the interesting thing here is that even though there are three
sellers and three buyers, we end up in a situation where only two rockets are sold each day. This is because not every pair of buyers and sellers can make a deal. The buyer with the lowest price limit and the seller with
the highest price limit could never be satisfied
by the same price. If we artificially set the price up high, all three sellers will be in the game, but only two or fewer buyers
will be willing to buy, so the three sellers will keep competing until the price gets
too low for one of them and then there will be two
buyers and two sellers. On the other hand, if
we set the price low, all three buyers will then compete until the price gets too
high for one of them. The price of the rockets will be balanced or in equilibrium at some price where the number of buyers and sellers willing to transact at
that price is equal. To put this in economics language, it's the price where the quantity supplied is equal to the quantity demanded. This same phenomenon happens with lots and lots of buyers and sellers. By mixing randomly and
adjusting their prices based on their own experience, the blobs together end up settling on a stable price and quantity. And when we talk about large markets with thousands or millions
or more participants, it's more convenient to just draw curves to show the price limits
of the buyers and sellers. The curve showing the
price limit of the sellers is called the supply curve. The curve showing the
price limits of the buyers is called the demand curve. An equilibrium price and quantity is where the two curves cross. Okay, so we've hit a milestone. We've built a market and
saw how supply and demand combine to determine an
equilibrium price and quantity. Now that we have this market model, we can start to get down to
what economics is really about, which is arguing about
what the model means for how we should organize
things in the real world. This is an everlasting discussion and the specifics are different depending on which market or industry in the real world they're talking about, so I'm not about to try to make any sweeping conclusions here. But it is worth outlining
the broad-strokes arguments at play so we don't have
to start from scratch every time we wanna argue about economics. So what's good about this
market model we made? Well, first, as we already talked about, it organizes itself,
so that's pretty nice, but there's a deeper good thing about it, which we can see if we look at the amount of surplus generated. Since it might be a newish term, it's worth saying again that the surplus is a measure of worthwhile
the transactions are. It turns out that at the
equilibrium price and quantity, the market generates the
maximum possible surplus. This won't be a
mathematically rigorous proof, but a way I intuitively make sense of this is by noticing that if the
next buyer and the next seller made a transaction, the
surplus in that case would actually be negative. At that point, the buyer
just isn't willing to pay what the seller needs. The flip side of this
is another good thing. The buyers and sellers that don't end up participating in the rocket market can go spend their time and
money on something else, since their participation
in this particular market is actually counterproductive. Bringing these arguments together, we have a system that results in the maximum possible surplus and determines the right
number of participants. This is what people when they
say markets are efficient. This efficiency makes it all the more amazing and valuable that
is happens automatically. And just to throw one more term at you, you might refer to the
invisible hand at the market. When people say invisible hand, they're just referring to the fact that everything happens automatically. All right, so that's the basic argument that a free market is good on its own, now what about arguments
that markets need regulation? Well, first, we can ask
whether an idealized market, like the one we just made,
is actually a good model of a given real world market. The answer here depends a lot on which market you're talking about, but there are some
common important factors. In general, for all those good things we said about markets to be true, there needs to be many buyers and sellers who can freely switch who they buy from and who they sell to and are
able to exchange voluntarily, they're not forced to go
through with the deal, they can walk away if they want, and who have good information
about the prices and products so they know when to switch or walk away. Some real markets are actually
pretty close to this ideal, but others can be quite far. For the second kind of
argument for regulation, we can ask whether maximizing surplus, the way we defined it earlier,
is actually the right goal. Remember that when we defined
surplus as a measure of value, we were only comparing alternatives
for one blob at a time. It's very possible that
this society of blobs could decide to measure value in a way that looks at all of the blobs at once. Again, the exact arguments will depend on the market in
question, but for example, in markets like food,
labor, and healthcare, a government might take some action to allow more buyers and/or
sellers to participate and get some individual
surplus for themselves, even if that means less total
surplus in the whole system. Without endorsing any
particular government program, I think it's reasonable to say that there could be some value in making sure that everyone can eat, earn money, and get the medical attention they need. But, hey, that's up to the blobs. So again, this was a bit of a whirlwind, and there is, of course, a
lot more that could be said, but I hope I made the case that markets aren't
fundamentally good or bad. They're a tool and just like any tool, they're the most helpful
when we understand them well and when we're thoughtful
about how and when to use them. So that's it for the main
message of this video, but I do want to briefly
mention a real world industry where the role of markets
is especially confusing, which is educational videos distributed freely over the internet. I don't claim to know how
all that works in detail, but by liking, subscribing, sharing, or by supporting directly on Patreon, you can send signals about
the quantity demanded, which will, in turn, affect
the quantity supplied in the long run. In any case, thanks for
watching till the end.

Author:

31 thoughts on “Simulating Supply and Demand”

  • Guido Campostrini says:

    I don't know if you are good in statistics or in every measurable things, but i really enjoyed each of your videos

  • Christian Swensen says:

    The failure of the "regulated market" is that the "invisible hand" is ALWAYS better at maximizing efficiency than any individual or committee. Not a little bit better, but immeasurably better, even assuming benevolence.
    …but the people who aspire to make these decisions are NEVER benevolent, and so their interference in the market ALWAYS causes dramatic decreases in efficiency.
    It is pretty easy to see the impact that more free and less free markets have had on levels of poverty over history. While we've never seen any large scale of a truly free market, and even totalitarian governments can't completely stomp out free trade, the trends of free markets to raise people's standard of living is unchallenged — just like the trend of managed markets tending to destroy economies and impose poverty and famine, even where there was previously plenty.

  • This supply demand curve doesn't make logical sense to me. Why wold the price of an item increase as the quantity increases? Wouldn't the important thing determining the price be the marginal costs associated with each individual rocket? I don't see any reason why the cost to make your 10,000th rocket is higher than the cost to make your 1st assuming the manufacturer properly expands the business.

  • Another thing about markets is that they are easily manipulated by capital. Capital operates on the long term and naturally coordinates with its competition. Consumers operate on immediate satisfaction and do not organize whatsoever. Therefore, Capital will always maneuver to the point where surplus is MAXIMIZED for them, while consumers will trade freely until their surplus is completely eliminated. Markets therefore naturally tend to this state, which is a monopoly with discriminatory pricing.

    According to supply and demand theory, all profits should run to zero in a competitive market, but there is a reason that does not happen anymore. Capital understands that competitive markets are not advantageous to them, so they simply do not allow competitive markets to exist.

    In other words, the problem with supply and demand is that it assumes that all blobs are stupid and myopic, but in reality, some humans are very saavy and driven to dominate others by any means necessary.

  • Time to scroll down and read the dumb comments about how capitalism doesn't work by idiots and how we should all swap to socialism despite capitalism objectively being better.

  • @7:50 didn't you misrepresent the colors?
    You said "The curve showing the price limits of the sellers is the supply curve" yet you drew the orange curve, which should be the buyers' curve. Could you explain this a little beter?

  • saverio sassetti says:

    you should set a limit to how long a seller blob can go without making sales and how much income a buyer blob has and try crashing the rocket blob market.

  • Pegen4K ohne 4K says:

    Ok, thx, this was a repeat of school stuff. But this is a ideal model which is far away to be show the real world, in which not everyone is rational and be infuence by other factors

    (prosperity, advertising,
    physically violents etc.).

  • Simply Curious says:

    While 3Blue1Brown focuses on pure mathematics, Eugene Physics focues on, well, physics, it seems you have a uniquely entertaining and insightful way of putting the more 'realistic', (I don't know the word to put) ideas.

  • For some reason this is not as easy for my brain as the competing for food creatures. Even though it's almost the same concept.

  • Dragoon Duneman says:

    problem with your model is that the blobs doesnt have to eat or live to survive… so really to those that couldnt sell … mean that they cant eat and to those that couldnt buy cant eat. Now another Issue that you have with your model is that you assume that the buyer has unlimited money and the seller has unlimited supply but this is also false… if We were to use your model one could agrue is that the blob have no need to participate in the market and thus has no need for income or buy the rocket…. To buy something is to have a need for something. So this example would not even work not even in the slightest… now if you were to take all the buyer and seller and have them each to participate in a given role that each one of them has a value to sell and buy … might paint a different story.

Leave a Reply

Your email address will not be published. Required fields are marked *