
Revenue Management for Meth Dealers in Flint (Fiction) - sdoering
http://analyticsmadeskeezy.com/2012/10/08/revenue-management-for-meth-dealers-in-flint/
======
guylhem
Who said microeconomics was not useful :-)

For those who are not used to that, it's a very simple linear regression,
followed by an estimated demand equation, which you then turn into profit by
multiplying each side by prices.

To find the local optimal, you look for the spot where the 1st derivate
cancels (and the second is negative, unless you have a quadratic equation like
that)

It's an example so well though and so simple that it should be in economics
textbook, so that students see how to make more money with a simple
application of sound principles.

(if the excel spredsheet was turned into an online collection, using say OLS
to calculate the estimators, Victor would have had a SAAS pricing software
instead of entering the stuff manually on his laptop! ain't that cool ?)

~~~
ljd
You would indeed have a rough draft of price optimization software.

Also, you could use our[0] more refined SAAS Pricing Software that takes more
factors like time into consideration.

I know the HN crowd will like to know that the entire price optimization
system is exposed through a REST API with code samples on github.

[0]<https://ventata.com>

------
ChuckMcM
I find the idea of putting together what is nominally dry economic analysis
with a colorful story about drug dealers an interesting technique for making
it more fun to read.

I'm guessing that guys who run state wide drug businesses do not show
spreadsheets of their business to blogging economists :-)

~~~
jeffasinger
I'd think that it would be advantageous for most of them to not keep
spreadsheets.

~~~
andrewljohnson
I imagine the highest level of drug dealers use not just spreadsheets, but
probably things like QuickBooks.

~~~
JonnieCache
They typically use these things called "prestigious accounting firms" and
"major international banks."

[http://www.theglobeandmail.com/report-on-
business/internatio...](http://www.theglobeandmail.com/report-on-
business/international-business/hsbc-to-pay-record-19-billion-fine-in-us-
money-laundering-case/article6189108/)

------
ljd
_"But it’s been confined to enterprises like airlines, car rental companies,
and hotels implementing crap like Teradata and Oracle. This field has not been
democratized, so it’s kindof gone unnoticed in the big data conversation."_

This is precisely what we do.

Please check out, <https://ventata.com/> if you are interested in a price
optimization REST API.

Our average customer is a small to medium sized business selling goods through
eCommerce.

~~~
JonnieCache
You should partner with <http://spreecommerce.com> and sell an integration
into the spree backend. They're good people, hit them up on irc.

------
jaytaylor
Site has already been knocked over..

Here is the Google cache:
[http://webcache.googleusercontent.com/search?q=cache:rXK-
EEu...](http://webcache.googleusercontent.com/search?q=cache:rXK-
EEuT_B8J:analyticsmadeskeezy.com/2012/10/08/revenue-management-for-meth-
dealers-in-flint/+&cd=1&hl=en&ct=clnk&gl=us)

------
jcnnghm
This is ok if costs are fixed, but if costs aren't fixed you should maximize
profit, not revenue. Drugs, in particular, don't have fixed costs because they
can be bought in greater quantities at lower per-unit cost as demand
increases; there are strong economies of scale.

~~~
alttab
With meth, you don't really need to import it. I would think the cost of meth
is more fixed than other drugs.

~~~
maxerickson
It plays out at a slight remove:

<http://www.pbs.org/wgbh/pages/frontline/meth/etc/cron.html>

The part I think is pertinent here is that there is little illicit manufacture
of ephedrine and pseudoephedrine (so the availability of meth varies with the
availability of them).

~~~
kyllo
This is why drug stores are required to alert law enforcement if they notice
anyone trying to buy a large amount of Sudafed, or trying to buy a small
amount very frequently. So now there are people whose jobs are to drive around
to every drugstore in the town, buying small amounts of Sudafed at each one,
so as not to raise any suspicion.

------
meerita
I saw a documentary, not so long ago from one city in Napoli, where it were
the biggest drug dealing in Europe, the drug dealers do it all in the walls,
most of them didn't know how to sum properly. They made so much money that
kind of errors were normal.

------
kaptain
There were two parts I didn't understand: One, how was the equation for
revenue derived? Is it common knowledge that Revenue, as a function of price,
is equivalent to your demand times your price? This wasn't obvious to me.
Second, how is R^2 derived?

~~~
icegreentea
If you're in excel, R^2 values is just a couple check boxes away.

The actual math is: If you have a scatter of data (x, y), then you can get a
measure of the variability of your data by taking the sum of squares of (y -
avg(y)) for all your data points. Call this V

Further, if your doing say a simple linear regression, then for every x, you
can have an f(x) which is suppose to be an 'estimate' of y. So then for all
our given data points, we can find an error, which is basically the distance
of y from the fitted line (y-f(x) basically). Then we can take the sum of
squares of those errors get what is sometimes called our residual sum of
squares. Call this W.

The R^2 value is defined as 1 - (R/W). So we can see that for very good fits
of data, R^2 will be near 1, and for poor fits of data, R^2 will be near 0.

Edit: I guess to throw another bit at you. Often in microeconomics, you assume
that as long as you can meet a demand at a certain price, then you will in
fact sell however much is demanded at that price. So as an lemonade stand, if
there is a demand for 100 cups of lemonade at 50 cents a cup, and you have 100
cups of lemonade and are also willing to sell at 50 cents a cup, then you WILL
sell 100 cups. In which case, the revenue = price * demand kind of falls out
by itself.

------
kanamekun
That revenue optimization curve looks almost exactly like the Laffer curve,
used to optimize tax revenue:
<http://en.wikipedia.org/wiki/Laffer_curve#Justifications>

------
cypherpunks01
Has someone made a HN bot that automatically caches pages before they reach
the front page, and offers the page snapshot if the page goes offline via
userscript?

------
codesuela
Personally I would've paid for the coke in cash instead of making myself
accomplice to a federal felony :)

great read anyway.

~~~
efnx
I'm not so sure giving a criminal advice is a felony. I'm no lawyer though.
Seems like as long as he doesn't sell coke, he's in the clear.

~~~
patrickk
You do realise this story is completely made up, using colourful narratives to
illustrate the problems he's talking about?

<http://analyticsmadeskeezy.com/what-the-hell-is-this-blog/>

~~~
efnx
I did, and I was speaking about the character. :)

------
joshka
from the sheet: price per g = $100, demand 52kg, revenue $520,000 $100 _52_
1000 = $5,200,000 Perhaps he's selling 5.2kg/month, not 52kg?

