26 August 2024

A simple fair method to ration medical resources between facilities

Based on Raffensperger, John F., Marygail K. Brauner, and R. J. Briggs, Planning Hospital Needs for Ventilators and Respiratory Therapistsin the COVID-19 Crisis. Santa Monica, CA: RAND Corporation, 2020.

In this post, I explain how to implement our method using a spreadsheet.

Medical administrators face the problem of allocating resources such as ventilators among different facilities when demands vary extremely. Administrators may be able to forecast average demands at each facility by day or week, but must still manage the variability of demand over minutes and hours. Different average demands among smaller and larger facilities complicates the allocations further. Queuing processes are non-linear, so proportional allocation methods (such as allocating based on average ventilators per patient) can result in inefficient and unfair outcomes.

To efficiently and fairly ration resources between facilities, we propose application of a classical queuing model, enabling administrators to define fairness as equal waiting times across facilities. Administrators can easily run the model in a spreadsheet or other computer system. Using the queuing model, the administrator allocates resources to equalize the wait time among facilities. Due to the non-linearity of waiting time as a function of the number of resources, equalizing wait times across facilities also minimizes total waiting time.

This method of equalizing wait times across facilities is not meant for use in prioritizing patients within a facility, nor for rationing resources between patient types, e.g., by age or socio-economic status. Our method assumes that the population of patients at one facility are clinically similar to the population of patients at other facilities.

With clinically similar patient groups, we can use a classical queuing model to allocate resources. The Erlang C formula was developed by Agner Krarup Erlang in the early 1920s to determine the number of telephone circuits required in a telephone exchange. The formula is appropriate for multi-server queues (where servers are the resources such as ventilators within a hospital), and where arrivals and service times follow Poisson distributions.

λ is the arrival rate of patients, e.g., arriving patients per hour at a hospital.

μ is the treatment time (length of stay) on a single server, e.g., average hours that a patient is on a ventilator.

N is the number of servers, e.g., ventilators at a hospital.

Poisson(N, ρ) is the probability of exactly N events occurring in a fixed interval of time when the average occurrence rate is ρ, such as λ*μ in this case.

The probability of wait is as follows:

Prob(wait > 0) = Poisson(N, λ*μ)/[Poisson(N, λ*μ) + (1λ*μ/N))∑k=0N–1 Poisson(k, λ*μ)]

As the probability of wait approaches 100%, the average queue gets longer. If the probability of wait reaches 100% or greater, patient load exceeds hospital capacity, and the queue length will explode. When the formula exceeds 100%, the reader may not find the value to have intuitive meaning, so we can restrict the calculation to a maximum of 100%:

Prob(wait > 0) = MIN(1, POISSON.DIST (N, λ*μ, FALSE) /

(POISSON.DIST (N, λ*μ, FALSE) + (1 – λ*μ/N))*POISSON.DIST (N – 1, λ*μ,TRUE)))

To build the full spreadsheet, proceed as follows:

1. Write a spreadsheet row for each facility. Each row has the facility’s current number of resources (e.g., ventilators), the average arrival rate of patients per day, and the average service time per patient (e.g., days on ventilator).

2. In each row, add a cell with the expected waiting time for each patient, using the Erlang C formula we give below.

3. Given the number of new resources to allocate across facilities, give the next available resource to the facility with the longest patient waiting time. Of course, with a new resource such as a ventilator, the facility may also need more resources of other types, e.g., respiratory therapists. The spreadsheet can calculate these other resources as well, if appropriate data (e.g., ventilators per therapist) is available.

Here is an example in Google Sheets.

28 June 2023

How to Set A Deadline On Global Warming

Friends, colleagues, I have just published GEO-X: How 10 Big Firms Can Lead Us to End Global Warming. You can get it free through July 2023 on Apple Books, https://books.apple.com/book/id6450712229.

I ask for your help in distributing it to business executives, especially to executives of environmental sustainability.

“GEO-X” examines the political obstacles to ending global warming and concludes that governments will probably never overcome them. The book describes the weaknesses of existing regulatory systems, how they slow emissions but fail to incentivize true net zero operations, much less the enormous carbon removal required to reverse global warming. The book explains the failures of the carbon removal markets, especially the moral hazard so often resulting in fraud.

To solve all of these problems simultaneously, “GEO-X” proposes a bold three-part solution.

First, a coalition of willing firms could start a Global Emissions and Offset Exchange (GEO-X) to trade emissions permits and carbon removal contracts. Participating firms would end business with non-participating firms. The result would likely be a rush to join through the global supply chain.

Second, GEO-X would strengthen the carbon removal market with contracts backed up by modern data and biological simulation. GEO-X would not pay for reducing emissions, but only for removing carbon from the air.

Third, GEO-X would clear the carbon market with a state-of-art auction mechanism which prices a hard deadline on global warming. This auction mechanism appears to be the most efficient emissions trading system ever designed.

GEO-X would not need government to start, but would benefit from government cooperation. Governments could require businesses within their jurisdiction to participate in GEO-X, accelerating global participation.

“GEO-X” calls senior business executives to tackle global warming head-on.

Get it now and send it to your boss! And please re-post to your own networks.

#climateaction #climatechange #ClimateLeadership #ClimateSolutions #ClimatePolicy #corporatesustainability #environmental #globalwarming #markets #supplychain #sustainability

23 May 2023

The Art of the Spreadsheet is now published

My new book The Art of the Spreadsheet is now available on Amazon. This high-quality full-size color paperback that will help you make much better spreadsheets. It's got some surprises in it that seem to go against the common wisdom. It also has powerful Visual Basic macros to help you audit your spreadsheets.

Look for the chapter about the Nobel Prize winner's spreadsheet!

08 May 2021

Calculator for COVID-19 population immunity, likely optimistic

I wrote a simple spreadsheet to estimate the approximate level of immunity for a given area. The inputs are the 

  • population,
  • number vaccinated,
  • number of COVID-19 cases.
The key output is the fraction of the population 18-years-and-older with some level of immunity, either from having been sick or from having at least one vaccination. 

Here's the spreadsheet:  US percent immunity.

Looks like very good news to me! The U.S. as a whole appears to be at about 80% as of this writing.

21 April 2021

A Faster Path to Ending Global Warming - and I mean Ending It

National and international negotiations to address climate change are hard. So hard, in fact, that the progress we've made in over a half-century of knowing about climate change is slight.

I've got a new publication which explains how to solve this problem: "A price on warming with a supply chain directed market," in Springer's new journal Discover Sustainability vol, 2, no. 2, Feb 2021.

I've also produced a YouTube video about this work: "A Faster Path to End Global Warming: A Price on Warming with a Supply Chain Directed Market."

Much more to come!

 

12 April 2019

Quit Fox News

If you love your family, if you love God, if you love your country, repent of watching Fox News. Now.

05 July 2018

Corporations shouldn’t have “free speech” for this one weird reason

They can’t go to jail. The government can fine them, but the government cannot take away their physical liberty.

Nor do corporations vote; a corporation is not and cannot be a citizen.

A for-profit corporation is a tool of commerce, like a butcher’s scale, a credit card, an accounts book, and an advertisement. That a corporation is more than an commercial device is a lie, a lie born out of deceit.

Because the corporation is inherently a tool of commerce, corporations should be regulated like any other commercial device. Government reasonably demands that butcher’s scales show true weight, that credit cards are charged fairly, that accounts are accurate, the banks faithfully hold their customers’ deposits and report those deposits accurately. When a business cheats with these ordinary tools of commerce, consumers rightfully expect government to prosecute the people running that business. Corporations are creatures of the market place, not of politics, and the market place must be well-regulated.

Now, companies already freely say bald-faced lies: cigarettes are good for you, coal is clean, global warming is a scam, that pollution isn’t from our plant, that pollution won’t hurt you, and the doozy “Corporations are people, too, my friend.”

If government allows corporations “free speech” on the basis of the First Amendment, then what is to stop corporations from claiming the right to say anything at the butcher scale with how much meat you are buying, with the credit card in how much you owe, and the accounts book in how much money you have on deposit? If a bank has the right to free speech to tell you whatever they want to say, then they can tell you that your bank balance is whatever they want to tell you it is. We should be surprised and offended if the butcher’s scale showed a different weight depending on the customer’s politics, or sexuality, or religion. These examples are (hopefully) obviously absurd.

Government should treat corporate lies in exactly the same way as it does a dishonest butcher’s scale. Government must require corporations to speak the truth, and to stay out of politics, for the same reason that a butcher’s scale should tell the truth and should stay out of politics. If you go into business, then you should treat everyone equally, and honestly, even if you dislike their politics, sexuality, or religion. And if you, in the course of your business, do not treat everyone equally and honestly, you should be prosecuted.

28 April 2018

I'm quitting Facebook

Friends, family, I have decided to quit Facebook. I have thinking of doing so for some time.
I'm quitting Facebook because I think its small benefits are swamped by its terrible costs. The benefits include a convenient way to interact with friends and family, a software interface that encourages sharing of thoughts and personal experience, opinion, links to other people's opinions, links to other news articles, sharing of photos. The interface is intentionally addictive. It is fun. It is nice to see what other people are thinking about. I feel like I connect with others when I use it.
The downsides of using Facebook are hidden. Here are some I have found.
And if you believe you are immune, you are deluding yourself! We soak up other people's emotions through Facebook,
http://www.pnas.org/content/111/24/8788
Now then, I ask that you to consider quitting Facebook as well. We need to stop being suckers, we need to prevent the horrible influence on our elections to the extent we can, and we need to send a signal to the technologists that they have to stop taking advantage of us. We need to take down this platform.
I do not make this decision lightly. I enjoy Facebook. I like seeing what family and friends are doing. It is fun. Nevertheless, their business model is surveillance and hyper-targeted advertising; they make money on extremism and ripoffs. I can't be part of this, and I wish you were protected from it as well.
Please have a think about it, read some articles about it, think about the effect of its downsides on society, and compare your own fun with it to these drastic downsides. Further, with some irony, I invite you to share this post with everyone you know, forward it to your friends and colleagues, send it in emails to your family. We need to take this on together.
Even though I am quitting Facebook, I very much wish to maintain contact with you. Please feel free to write me at my personal email address.

10 December 2017

The Correct Price of Bitcoin

I noticed the crazy Bitcoin bubble, and tried to think about what its price should be. I think I've come up with a model for it, based on the optimal inventory of Bitcoin for a Bitcoin user. This idea follows from the optimal inventory of cash.

The basis for this model is the idea is that we need a supply of cash for purchases over the year, perhaps our demand is d = $500/year. To take cash out of the bank, we lose the interest i, perhaps 1%,  on that money. So we are incentivized to take out only small amounts. But taking cash out of the bank has a fixed cost f, including any withdrawal fee (as from a banking machine) and the hassle of getting to the bank, perhaps $2/transaction. The fixed cost of withdrawal incentivizes us to take out large amounts.

So the two competing costs have an optimum, which we can calculate using the classic Wilson economic order quantity formula. For more background on the optimal inventory of cash, see this, which references Baumol. The economic order quantity formula is Q = (2fd/i)^0.5, where Q is the optimal withdrawal amount.  Assuming we use the cash evenly over time, we will have on average $Q/2 dollars in our pocket.

We can apply this model to Bitcoin to estimate its correct price. Assume:

  • a 3% interest rate, and 
  • a $2/transaction withdrawal fee to get Bitcoin (e.g., to convert it from $US),
  • users want to spend about $500 worth of Bitcoin per year.
Using the formula above, we find that each user would hold on average about $129 worth of Bitcoin.

Assume 20,000,000 Bitcoin users. Together, they need $129*20,000,000 = $2.59 billion Bitcoin.

With 21,000,000 Bitcoin in existence, the Bitcoin should cost $2.59 billion/21,000,000 = $123/Bitcoin.

I tried this on the amount of U.S. currency, and was off by a factor of approximately 2, which could be due to people hoarding cash. So let's multiply by 2 for hoarding. We get a price of Bitcoin of only $246.

Below is some sensitivity analysis. I think $15,000 is really high!

Low Geometric mean High
Max number bitcoin 21,000,000 15,874,508 12,000,000
Number of users 20,000,000 44,721,360 100,000,000
Interest rate/year 3% 1.7% 1%
Transaction cost $2 $2.83 $4
Demand/year/user $500 $1,414 $4,000
Optimal holding/user $129 $340 $894
Total cash needed $2,581,988,897 $15,196,713,713 $89,442,719,100
$/bitcoin $123 $957 $7,454
With hoarding, x2 $246 $1,915 $14,907

I put the calculated fields in bold.

The world has few substitutes for US dollars, because many things can be purchased only in US dollars. The world has a lot of substitutes for Bitcoin - the only people who accept only Bitcoin are thieves. And Ethereum looks like a much better cryptocurrency, with its smart contracts and higher trading rate.

And what do you get when you buy Bitcoin? You get a secret number. That's pretty much it.

This Bitcoin bubble is a zero-sum game. When you take money home, someone else is likely to lose it. A true pyramid scheme, with the Winkelvoss twins at the top. My advice? Get out while you can.

10 May 2017

New book: Smart Markets for Water Resources, by Raffensperger & Milke

Friends and colleagues, I am pleased to announce the publication of Smart Markets for Water Resources - A Manual for Implementation, which I co-authored with Mark Milke.

We worked so hard on this book! I hope that it starts a revolution in water allocation.

16 October 2016

Truth, Justice and the American Way

Google News has a new fact-check feature. Wonderful!  Technically-oriented folk might enjoy a look at the schema that someone has proposed for it.

The world so desperately needs this. This could help change the world.  Now, we just need to get the news and pseudo-news services to have scrolling fact checks at the bottom of the screen.

Here are some other comments on it from the CS Monitor, and a disturbing commentary on fact-checking from the Washington Post.

14 December 2015

Are lies justified?

NT Times has a sad article about lying, The author, a professor of philosophy, poses 10 cases in which he believes that lying is justified.

I am inclined to agree with a few of them. For rexample, #6 is, "In November of 1962, during the Cuban Missile crisis, President Kennedy gave a conference. When asked whether he had discussed any matters other than Cuban missiles with the Soviets he absolutely denied it. In fact, he had promised that the United States would remove missiles from Turkey." I don't know what else was going on, so I am inclined to let him off the hook. Still, I think that the President could have said, "I won't discuss matters of national security."

For most of the list of 10 dilemmas in the article, a little thought provides a truthful alternative. For example, "9. I am negotiating for a car with a salesperson. He asks me what the maximum I am prepared to pay is. I say $15,000. It is actually $20,000." Why not just say, "I would like to pay around $15,000"?

But the article is sad for what it implies about lying, that lying is now part of our culture, that lying is acceptable. I so wish this to be false!  I don't want to live in a nation of liars. What about the tobacco companies lying about the dangers of smoking, or the oil producers' elaborate misinformation about climate change, or Volkswagen's deception about their cars' pollution? What of those Nigerian phishing emails we get, promising us 50% of $1.2 billion? The ads that tempt our vanity, "try this one weird old trick to lose 30 pounds in a week"?  Donald Trump's statements about immigrant rapists and a fantasy two-thousand-mile-long wall to keep them out? Or shall we become a society of lies like Russia?

Prof. Dworkin! How about an article that helps people finesse their ways through complex situations with integrity?  How about a set of brain teasers, "Here are some ethical dilemmas, now find the honest way through them"?  Can you give us reasons to speak the truth, not reasons to lie?

Think about what you want from your grocer, from your employer, from your family, from your friends. You want them to be straight with you, to be honest with you, to deal with you in genuine fairness. The only way we as a society can have this is if we all choose to be honest ourselves.

07 October 2015

The Death of Fox News

Hyperbole? I hope not. We have to figure out how to prevent people from making money through lies.  The good news is that fact checking is getting widespread on the Internet. Helpers like Politifact have been around awhile (though they themselves subject to accusations of bias by openly partisan conservatives).  But some cool new tools are on the horizon.

First, Facebook is adding tools to let users flag lies. I'm often tempted to click on "Heidi Klum" (no link provided here, LOL), but I can't bring myself to click on "Santa Claus proved to be real!"  But some of us are tempted by headlines like that.  'Cause we're all different amounts gullible.

Second, and probably more usefully, Google is working on an automatic fact checker, as the Washington Post reports.  Here's Google's paper on it. Years ago, I had a similar idea, and I'm very glad to see Google making progress on it. (Google is also working on making high-quality health information available.)

Now imagine that you can download a widget that scans your (Fox) webpage or video, and checks the statements in real time. And imagine that the widget reports to you in real time which statements are false, and the running fraction of obviously false statements. If you're like me, you would lose confidence in that website or video, and tend to avoid it in the future.

I think that would be a better world.

13 June 2015

Cornell Food & Brand Lab, saving money, and open source academic journals

TreeHugger has an article about food waste. The article describes a recent academic paper done by Porpino, Parente & Wansink, "Food waste paradox: antecedents of food disposal in  low income households," Intern'l J. of Consumer Studies, 2015. Unfortunately, the journal article is behind the Wiley pay-wall. The first two authors are at the Getulio Vargas Foundation, Brazil, and the third author is at Cornell.

The TreeHugger article gets the summary right. Here's the Cornell summary. Have a look at them. But here's my take on it.

You can save money by doing bulk purchases only if you are sure you will use it all. You can save money by preparing smaller quantities, to ensure you can eat it all. You will save a lot of money by getting rid of your dogs and cats (okay, this is incendiary, hold your flames on this until I can write a fuller post, I'm just reporting my interpretation of the journal paper). You can save money if you conserve food more carefully - like closing that bread bag all the way, so it doesn't dry out.

My suggestion: drive down your food inventory to near zero occasionally, say, at least every 6 months. Eat what you have on hand. Empty out the fridge, empty out the cabinets and the pantry. Force yourself to eat up the weird stuff, the dried beans, the ancient packages of foreign noodles, that you've been ignoring. Imagine not needing to go to the grocery store for two weeks!  You'll save a ton of money, clean out the cupboards, and learn more about which foods you're actually going to use.

The TreeHugger article pointed me to the Cornell Food and Brand Lab site. Lots of great material there. In their short video, Porpino has sad eyes, as if he is unhappy about the food waste. I liked the video, and the cart-to-trash action makes the point well. Here's another interesting article by the Cornell Lab folk: whether you lose or gain weight depends on weekdays, not weekends.  Great stuff, great work. Whoa, Wansink has the same baggy eyes as Porpino!  They are obviously working overtime to bring us all this great research. Kudos, guys, keep it up.  But consider PLoS One for your next article - your lower-income Brazilian study subjects could then read it. In any case, I'll be coming back to your Lab website.

04 May 2015

On failure in diets

The Washington Post has an interesting interview with Prof. Traci Mann. In the article (and a related book, which I have not read), she describes her research about dieting.  As I understand it, she thinks that dieting will almost always end in failure.

Based on my own experience with Wagmu, I have felt for some time that dieting is fraught with problems. The interview described physical changes that I have felt myself during dieting - more attention to food, finding greater pleasure in food, lowered metabolism, difficulty in maintaining willpower. I find much to agree with.

I disagree, mildly, when I consider the use of tools for dieting.  In particular, logging one's diet has been shown to improve the efficacy of dieting.  See for example this report. I have found that when I am logging food in Wagmu, I am succeeding, and when I don't log food in Wagmu, I am failing.

Something about the process of making a plan - "this is what I'm going to eat" - seems to ease my ability in sticking to the plan. My guess is that it's (1) the a priori commitment, combined with (2) a concrete plan, and (3) knowledge that I have a nutritious diet due to Wagmu's powerful Suggest feature.  So I've made a plan, and I know exactly what to do, and I know that if I don't follow it, then it won't be as nutritious.

So I'm hoping Prof. Mann tries out Wagmu!

02 May 2015

Drag your GraphViz nodes with Inkscape!

GraphViz is a great graph layout engine, and GraphViz outputs to SVG. This allows us to edit GraphViz output in Inkscape.

Unfortunately, this editing is limited. The arcs are not "connectors" in the graphic-editing sense, so we cannot drag a node while maintaining arc connectivity.

But Inkscape does have draggable connectors. Solution: I wrote this Python script to convert GraphViz SVG output to have Inkscape-draggable connectors. Seems to work. In Inkscape, click the node to drag, not the arc. Your mileage may vary.  Open source code here.

# 2 May 2015, John F. Raffensperger.

from xml.dom import minidom

# 1. Read Graphviz.svg. This is output from Graphviz.
graphvizSVGFile= minidom.parse("graphviz_output.svg")

# 2. For each node, get id and title.
nodeTitles = {}
for s in graphvizSVGFile.getElementsByTagName('g'):
    if s.attributes['id'].value[:4] == "node":
        nodeTitles[s.getElementsByTagName('title')[0].firstChild.data] = s.attributes['id'].nodeValue

# 3. For each arc, parse the title, and match the corresponding ids of the nodes, add the ids to the arc,
edgeTitles = {}
for s in graphvizSVGFile.getElementsByTagName('g'):
    if s.attributes['id'].value[:4] == "edge":
        edgeTitle = s.getElementsByTagName('title')[0].firstChild.data
        edgeTitles [s.attributes['id'].nodeValue] = edgeTitle.split("->")
        
# 4. Add connector elements to Graphviz.svg.
# For each arc, delete the GraphViz arrow marker,
for s in graphvizSVGFile.getElementsByTagName('g'):
    if s.attributes['id'].value[:4] == "edge":
        # Remove child "polygon", which is the GraphViz arrow marker.
        for thing in s.childNodes: 
            if thing.nodeType == s.ELEMENT_NODE and thing.tagName == "polygon": 
                s.removeChild(thing) 
                break

# 5. To each edge path, add an Inkscape arrow marker in the attributes.
for s in graphvizSVGFile.getElementsByTagName('g'):
    if s.attributes['id'].value[:4] == "edge":
        for thing in s.childNodes: 
            if thing.nodeType == s.ELEMENT_NODE and thing.tagName == "path": 
                thing.setAttribute("inkscape:connector-type", "polyline")
                thing.setAttribute("inkscape:connector-curvature", "3")
                nodeID = nodeTitles[edgeTitles[s.attributes['id'].value][0]]
                thing.setAttribute("inkscape:connection-start", "#" + nodeID)
                nodeID = nodeTitles[edgeTitles[s.attributes['id'].value][1]]
                thing.setAttribute("inkscape:connection-end", "#" + nodeID)

# 6. Output should have draggable nodes in Inkscape, after ungrouping as needed.
SVGtextFile = open("inkscape_input.svg", "wb")
graphvizSVGFile.writexml(SVGtextFile)
SVGtextFile.close()
print "done"

28 December 2014

Thieves, vandals, and "The Interview"

Our house got robbed last weekend. The thieves took generic electronics - computer monitors, TV, an old laptop computer - but also the bone necklace that I made for my wife years ago. We made simple mistakes in our security arrangements, mistakes that are easily and cheaply fixed.

But I think of the poor chump who got at most a couple hundred dollars from messing up my house, who put themselves and their family's welfare at such risk for such a little bit, how pitiful he or she must be.

I had a similar reaction to the Sony hacking. The fools running North Korea are in a desperate situation of their own making, without a clue as to what to do beyond vandalizing a movie company's computers in the lamest attempt at protecting their honor.

The feeling was accentuated further when we rented "The Interview" on Youtube (I was getting stir-crazy).  It's a stupid film.  A government actually got upset about this? And bothered to react?  It makes the film into a tragedy, and not only for all the people that were injured by the vandals, but for the vandal.

Then I read that people have been viewing pirated versions of the movie. People who watch pirated movies are stealing, but in this case, they're also siding with the antagonist of the film.

10 July 2014

Comments on David Brat?

The New York Times has an interesting article on David Brat and his belief that Protestantism is good for the economy. The article give modest background on Brat and his theories, but the fascinating bits are in the readers' comments. Check it out.

19 March 2014

Putin, in another world

With his annexation of Crimea, President Putin has tragically ruptured Ukraine, made Russia much less safe while raising the threat of war to his neighbours, and cost his own people billions (see also this and this). That is the real world.

But it is not the one that Putin is living in. According to the NY Times, "Chancellor Angela Merkel of Germany told Mr. Obama by telephone on Sunday that after speaking with Mr. Putin she was not sure he was in touch with reality, people briefed on the call said. 'In another world,' she said."

Just to see how damaging his action was, consider a third reality. This wholly hypothetical world need only diverge from the current one after the departure of Prime Minister Yanukovych from Ukraine.

Russia had offered a $15 billion loan to Ukraine. Ukraine, meanwhile, was discussing an economic agreement with the European Union. Under pressure from Putin, Yanukovych rejected the EU agreement, precipitating the Euromaidan protests, and, eventually, Yanukovych's departure.

Now here is where the third reality begins. First, Putin prevents Yanukovych from entering Russia.  Better yet, Putin arrests Yanukovych and returns him to Ukraine to face justice.  Second, Putin follows through on his loan to Ukraine's government, at least part of it.  Third, he guarantees the gas supply at the current price.  Fourth, he tells Ukraine citizens to unite behind the new government.

Such action would have gained him enormous good will. With all the good will, Putin could even have asked for an international discussion on returning Crimea to Russia, and achieved his ends as a statesman rather than a thug.

So what reality is Putin really living in?  I suggest that he doesn't understand basic economics. Here's why.

Whitehouse.gov lists the Russians who have been sanctioned by the U.S.  The first person on this list is Vladislav Surkov. Wikipedia indicates that Mr. Surkov received a masters in economics. Now here's the interesting bit: Jeffrey Mankoff quotes Mr. Surkov saying,
...we are inseparably tied with Europe and must be friends with it. They are not enemies. They are simply competitors. So, it is more insulting that we are not enemies. An enemy situation is where one can be killed in a war as a hero if there is a conflict. There is something heroic and beautiful in it. And to lose in a competitive struggle means to be a loser. And this is doubly insulting, I think. [Emphasis added.]
I would expect a statement like this from a Klingon on Star Trek, not a senior government advisor, especially not one who had studied economics.

When you and I voluntarily trade, we are both better off. When Russia sells gas to Ukraine, Russia gets money and Ukrainians get warm. If Russia did not sell the gas to Ukraine, Ukrainians would be cold or have to get warm in a more expensive way.  Ukrainians save some money by avoiding the higher cost heating, and Russians gain money above the cost of extracting the gas. Those gains are the gains of trade, and both sides get something out of the deal. A competitor is someone is the same business - Ukraine gas sellers compete with Russian gas sellers. But Ukraine is a net importer of gas. Countries that trade with Russia are not competitors, but partners making themselves better off through trade.

Russia's threat to cut off gas to Ukraine is of a particularly mean form: "I will hurt you even though I will get hurt, too."

Further, another government should not be seen as a competitor, but as a partner in improving trade and the rule of law.  Government should be about regulating trade, ensuring a fair marketplace, guaranteeing rights, and ensuring justice.

Putin does not understand that no one wants to be his competitor.  Other countries want to trade with Russia. Such trade would enrich Russia and its trading partners.  But given that he does not understand the rule of law and the role of government, we should not be surprised that he does not understand basic economics.

And for you Russian-speakers, I used Google Translate to put this in Russion.

Путин, в другом мире

С его присоединения Крыма, Президент Путин трагически разрыв Украина, сделали Россию гораздо менее безопасным при одновременном повышении угрозу войны с соседями, и стоить своего народа миллиарды (см. также это и это ). То есть реальный мир.

Но это не тот, что Путин живем Согласно Нью-Йорк Таймс ", сказал канцлер Германии Ангела Меркель Обаму по телефону в воскресенье, что после разговора с Путиным она не была уверена, что он был в контакте с реальностью, люди проинформированы о вызове сказал. 'В другом мире ", сказала она."

Просто чтобы посмотреть, какой ущерб его действие было, рассмотреть третью реальность. Это совершенно гипотетический мир нужно только расходятся с текущей после ухода премьер-министра Януковича из Украины.

Россия предложила кредит на $ 15 млрд в Украину. Украина, тем временем, обсуждают экономическое соглашение с Европейским Союзом. Под давлением Путина, Янукович отверг соглашение ЕС, осаждения протесты Euromaidan , и, в конце концов, время вылета Януковича.

Теперь вот то, где начинается третий реальностью. Во-первых, Путин препятствует Януковича въезд в Россию. А еще лучше, Путин арестовывает Януковича и возвращает его в Украину, чтобы предстать перед судом. Во-вторых, Путин выполнит свое займа правительства Украины, по крайней мере его часть. В-третьих, он гарантирует подачу газа по текущей цене. В-четвертых, он говорит граждан Украины объединиться вокруг нового правительства.

Такие действия получил бы ему огромную добрую волю. При всем доброй воли, Путин может даже попросили международной дискуссии по возвращении Крыма к России, и добились своих целей как государственного деятеля, а не бандит.

Так что реальность Путин действительно живем? Я полагаю, что он не понимает, основные экономики. И вот почему.

Whitehouse.gov перечислены русских , которые были санкционированы США Первый человек в этом списке является Владислав Сурков . Википедия указывает, что г-н Сурков получил степень магистра в области экономики.Теперь вот интересный бит: Джеффри Манкофф цитирует г-н Сурков говорил ,
... Мы неразрывно связаны с Европой и должны дружить с ней. Они не враги. Они просто конкуренты.Таким образом, это более обидно, что мы не враги. Враг ситуация, когда один может быть убит в войне как героя, если есть конфликт. Существует нечто героическое и красивый в нем. И проиграть в конкурентной борьбе значит быть неудачником. И это вдвойне обидно, я думаю. [Курсив наш.]
Я ожидал бы такое заявление от клингона на Star Trek , не высокопоставленный правительственный советник, особенно не один, кто изучал экономику.

Когда вы и я добровольно торговать, мы оба лучше. Когда Россия продает газ Украине, Россия получает деньги и украинцы согреться. Если Россия не продавала газ Украине, украинцы будет холодно или должны получить тепло в более дорогой способ. Украинцы сэкономить деньги, избегая более высокую стоимость отопления, и россияне получить деньги выше стоимости отвода газа. Эти достижения являются завоевания торговли, и обе стороны получить что-то из сделки. Конкурент кто-то такой же бизнес - газовые продавцы Украина конкурировать с продавцами российского газа. Но Украина является нетто-импортером газа. Страны, которые торгуют с Россией неявляются конкурентами, но партнеры делая себя лучше за счет торговли.

России угроза отрезать газ в Украину носит особо означать форме: "Я сделаю тебе больно, даже если я получу больно, тоже."

Кроме того, другое правительство не следует рассматривать в качестве конкурента, но в качестве партнера в улучшение торговли и верховенства закона. Правительство должно быть около регулирования торговли, обеспечения справедливого рынка, обеспечения прав и обеспечения правосудия.

Путин не понимает, что никто не хочет быть его конкурентом. Другие страны хотят торговать с Россией. Такая торговля обогатит Россию и ее торговых партнеров. Но, учитывая, что он не понимает, верховенства права и роли государства, мы не должны удивляться тому, что он не понимает, основные экономики.

23 February 2014

In modest praise of Rachel Frederickson

I've written previously on Rachel Frederickson, who lost 155 pounds over about 18 weeks, for the Biggest Loser TV show. In my previous post, I calculated that she must have been exercising at least 5 hours per day.  It turns out that estimate was pretty close.

As I seem to be in a permanent diet mode myself (which is itself perhaps a good thing), I have to pay out some respect to her for her discipline.

If she did eat properly, I have to pay out even more respect.

I took my darling wife to dinner at Casablanca, Venice, CA, for Valentines Day.  I over-ate. It was fun.  Plus I over-ate the rest of the weekend. (I mean, I over-ate food during the weekend. I didn't actually eat the weekend!) Then this week, I swung the other way, eating very little, basically skipping dinner and sometimes lunch, too. This morning, I woke up and didn't feel good.  Really weak, light-headed.  I dreamed that I was in some school cafeteria and people were pinching food off my tray - "Not the shrimp! Don't take my shrimp!" LOL!  But my dream had some justice, 'cause I stole that guy's blueberries.

Goofy dreams aside, dieting can be dangerous.  If Ms. Frederickson managed her diet as well as she indicates - a steady 1,600 calories/day under medical supervision - then I have to pay out my respect to her. I think she went too far, as her BMI is below the normal range, but I hereby pay out my respect to her for her very hard work and discipline.

My difficulty of this morning, I think, has three components. First, I swung the pendulum too far, over-eating and then under-eating. Second, my diet wasn't perfectly nutritious - I haven't been using Wagmu. Third, I haven't been exercising much, so my weight loss has been badly controlled. The solution is better control: managing enough food, with the associated calories, to get our nutrition, and then enough exercise to move us in the right direction toward our health goals.

Wagmu probably does it about as well as is possible, with power operations research methods under the hood.  The problem is, like any discipline, getting oneself to actually use it.

Possible correction: this page says she lost the weight in 7 months, considerably longer than 18 weeks. But I'm still paying out the respect.

17 February 2014

The Epson XP-810 inkjet printer

I joined Consumer Reports last year, as I made a big move recently, and need to buy some stuff. I bought an Epson XP-810 printer.  It seems to print okay, but it pesters me, frequently running out of ink, often needing a "Proceed" button pushed, and whizzing back and forth many times before it's decided it's ready to park. A nuisance!

I gave away my old HP Laserjet, I think an 18-year-old device, which just kept going. But it was black and white, wouldn't do duplex, couldn't scan, etc.

The Epson won't even turn off when you press the power button!  "Do you want to close the tray?" NO!  Just go away. "Okay, remember to close the tray manually."  Maybe I should just unplug it.

06 February 2014

Energy analysis of Rachel Frederickson's win on Biggest Loser

Congratulations to Ms. Frederickson on her Biggest Loser win, and also on her successful weight loss.  I hope that she can keep it off, and focus on health.

She lost 155 pounds. That is impressive. I was curious about what she must have had to do to get there, so here is an analysis.

As far as I can tell, the show was no more than 18 weeks long. She lost 155 pounds over 18 weeks, so she lost 8.6 pounds/week. How was this possible!? Why can't *I* lose 8.6 pounds per week? Here's what I've figured (and it's DON'T TRY THIS AT HOME).

She started at 260 pounds and went to 105 pounds. The average woman (though not an obese woman) has about 36% muscle mass (http://en.wikipedia.org/wiki/Muscle). So she lost 0.36*260 = 55.8 pounds muscle and (1 - 0.36)*260 = 99.2 pounds fat.

You can lose a pound of muscle for 600 calories, and a pound of fat for 3,500 calories (http://www.myfitnesspal.com/topics/show/153704-myth-or-fact-simple-math-3500-calories-one-pound-eat).

So she had to give up 33,480 calories for the muscle and 347,200 calories for the fat: [33,480 + 347,200]/18/7 = about 3,020 calories deficit per day.

Assume her metabolism was 2,000 calories/day (mine is around 1,800). She said she ate 1,600 calories/day. Then she had to BURN about 2,600 calories through exercise EVERY DAY for 18 weeks.

My exercise database shows that, for a 150 pound person (a number somewhere between her 260 start and 105 end), the average exercise burns 460 calories per hour.

She had to work out hard for at least 5 hours per day! When I mean hard, I mean hard. This is all she did.

I guess it's possible mathematically. Stay tuned to her story to see if she can keep it off.

24 April 2013

The Ben Affleck Diet

Hello, friends. I read that Mr. Ben Affleck is showing his support for a poverty-awareness campaign. I was pleased to read that, and I am glad he is doing that.  In fact, he is going so far as to keep food and drink costs down to $1.50/day. That's impressive!  I commend him.

Many poor people can probably buy food cheaper than he can, so perhaps he's aiming for an especially low budget.  In any case, he may have trouble getting all the nutrients he needs.

So I created a diet for him with Wagmu. I found a diet that costs about $1.39. This cost is only a guesstimate, because it depends on where the supplies are bought, and whether they are bought in bulk, taxes, etc.  Here's the diet:


166.96 grams, Soy flour, full-fat, raw.
18.71 grams, Apple cider-flavored drink, powder, added vitamin C and sugar.
31.04 grams, Roe, herring.
4 grams, Fish oil, cod liver.
6.6 grams, Cereals ready-to-eat, Ralston Enriched Bran flakes.
13.34 grams, Leavening agents, baking powder, low-sodium.
42.76 grams, Mung beans, mature seeds, raw.
2.98 grams, Salt, table.
43.66 grams, Soy flour, defatted, crude protein basis (N x 6.25).
23.6 grams, #13256 Canola, soybean and sunflower oil.


Not too thrilling!  But the nutrient profile looks okay - 100% of everything:
Caveats on this diet:
(1) It's designed for only 1,400 calories. I'm dieting at the moment, and that's what Wagmu is giving me. I bet many poor people often get less than that.  But given Mr. Affleck's build and active lifestyle, he will feel hungry with this diet.
(2) I didn't put in all the amino acids.  Still one of those things I have to get around to doing, to upgrade Wagmu.
(3) Normal legal disclaimer, see your doctor first, this is only for entertainment purposes, use at your own risk, your mileage may vary, etc.

But is this fair to the poor people?  They don't have access to state-of-the-art decision support for diet. They'll be eating whatever they can get, which is unlikely to be nearly as nutritious as the food plan above. So maybe Mr. Affleck should be left to fend for himself, rather than use this carefully designed plan.  On the other hand, maybe the above diet really would convey what poor people have to eat, given its lack of palatability.

Any thoughts out there?

07 February 2013

One little thing wrong with the Fruitarian diet

Hello, friends, I've been away a bit. Had a few life changes, shifted from one continent to another, new job, new car, sold a house, bought a house. So please excuse me for the absence.

US News has an article about Ashton Kutcher's month-long fruitarian diet. Apparently, the actor was preparing for the title role in the movie Jobs, as Steve Jobs himself was a fruitarian. Tragically, Mr. Jobs died of pancreatic cancer. The US News article says that Mr. Kutcher "was hospitalized after eating only fruit for one month". From the article:
"I ended up in the hospital two days before we started shooting the movie," Kutcher told reporters at the Sundance Film Festival. "I was doubled over in pain, and my pancreas levels were completely out of whack, which was terrifying, considering everything." Jobs died in October 2011, after a long battle with pancreatic cancer. His fascination with fruitarianism helped inspire his company's name.
 Now what could be wrong with a fruitarian diet?  The US News article describes the diet like this:
Though some fruitarians are more flexible than others, the diet typically revolves around the seven basic fruit groups. These include: acid fruits (citrus, pineapples, cranberries); subacid fruits (sweet cherries, raspberries, figs); sweet fruits (bananas, melons, and grapes); nuts (hazelnuts, pistachios, cashews); seeds (sunflower, squash, pumpkin); oily fruits (avocados, coconuts, olives); and dried fruits (dates, prunes, raisins).
I typed all those foods into Wagmu, and used the powerful Suggest feature to optimize the diet, to get the best possible fruitarian diet. At my wife's suggestion, I also added tomatoes. And I cheated a bit further with  adding parsley. Below is the optimized diet. I left in foods with zero quantity - the optimization rejected those foods.

0 grams Nuts, coconut water (liquid from coconuts)
0 grams Nuts, coconut meat, raw
8.71 grams Nuts, walnuts, english
17.71 grams Seeds, sunflower seed kernels, dried
0 grams Currants, european black, raw
0 small (2-3/4" dia) Apples, raw, with skin
0 large (8" to 8-7/8" long) Bananas, raw
0 large (3-1/16" dia) Orange, raw
0 grams Pineapple, raw, all varieties
0 grams Dates, deglet noor
0 grams Dates, medjool
0 prune, pitted Plums, dried (prunes), uncooked
0 grams Cranberries, raw
0 grams Figs, raw
0 grams Nuts, hazelnuts or filberts
0 grams Nuts, pistachio nuts, raw
0 grams Nuts, cashew nuts, raw
0 grams Avocados, raw, California
0 grams Olives, ripe, canned (jumbo-super colossal)
0 fruit (2-1/8" dia) Plums, raw
0 grams Raisins, seedless
0 grams Seeds, pumpkin and squash seed kernels, roasted, without salt
0 grams Nuts, pistachio nuts, raw
0 grams Seeds, pumpkin and squash seed kernels, dried
0 grams Cranberries, raw
0 grams Honeydew melon, raw
113.41 grams Melons, cantaloupe, raw
0 grams Melons, casaba, raw
0 grams Watermelon, raw
1500 grams Tomatoes, red, ripe, raw, year round average
80.12 grams Spices, parsley, dried
4.75 grams Salt, table
34.72 grams Seeds, sunflower seed kernels, dry roasted, without salt
0.31 grams Nuts, brazilnuts, dried, unblanched

Good thing we added the tomatoes!  Wagmu Suggest increased them to the maximum of 1500 grams.  I'm not saying this is palatable. Hey, I could never be a fruitarian - no chocolate, wine or coffee!  Further more, this diet isn't really all that "fruitarian".  In any case, let's have a look at the nutrient profile:


Bad news! The optimal fruitarian diet is severely deficient in vitamin B-12 and vitamin D.  As for vitamin D, if you're a billionaire living in sunny California, you could get all your vitamin D from the sunshine. Of course, if you're broke in Minneapolis, you'll need to sort this out some other way.

But even the billionaire won't get enough vitamin B-12.  And believe me, you want to get your vitamin B-12. How can you get vitamin B-12? Take just about any one of these suggestions from the Wagmu Suggest dropdown box:

Fish oil, cod liver
Cereals ready-to-eat, GENERAL MILLS, Multi-Grain Cheerios
Beef, variety meats and by-products, kidneys, cooked, simmered
Cereals ready-to-eat, KELLOGG, KELLOGG'S ALL-BRAN WITH EXTRA FIBER
Yeast extract spread
Sardines, skinless, boneless, packed in water
#13578 Chicken liver pate
Leavening agents, baking powder, double-acting, straight phosphate
Fish, sardine, Atlantic, canned in oil, drained solids with bone
Roe, herring
Sardines with mustard sauce (mixture)
Fish, salmon, pink, canned, drained solids with bone
Leavening agents, baking powder, low-sodium
#9814 Fish moochim (Korean style), dried fish with soy sauce
Cereals ready-to-eat, KELLOGG, KELLOGG'S RAISIN BRAN
Beef, ground, 95% lean meat / 5% fat, crumbles, cooked, pan-browned
Mushrooms, portabella, exposed to ultraviolet light, grilled
Beef, ground, 90% lean meat / 10% fat, crumbles, cooked, pan-browned
#10561 Egg, yolk only, cooked
Fish, salmon, Atlantic, farmed, raw
Cheese, parmesan, grated
Fish, salmon, Atlantic, farmed, cooked, dry heat
#9162 Ground beef, meatballs, meat only, cooked, NS as to percent lean (formerly NS as to regular, lean, or extra lean)
Cheese, Mozzarella, part skim
#9150 Beef, roast, roasted, lean only eaten
Egg, whole, cooked, fried
Beef, cured, pastrami
Egg, whole, cooked, poached
#9231 Ham, fresh, cooked, lean only eaten
Beef, grass-fed, ground, raw
#9819 Marinated fish (Ceviche)
Fish, anchovy, european, canned in oil, drained solids
Crustaceans, shrimp, mixed species, cooked, moist heat
Chorizo, pork and beef
#10555 Egg, whole, fried without fat
Cheese, gouda
Cheese, provolone
#9191 Pork chop, fried, lean and fat eaten
#10554 Egg, whole, fried
Fish, cod, Atlantic, cooked, dry heat
Beef, rib eye, small end (ribs 10-12), separable lean and fat, trimmed to 0" fat, all grades, cooked, broiled
Turkey, all classes, dark meat, cooked, roasted
Cheese, mozzarella, part skim milk
#7556 Eggs on toast, parsley & Vegemite
Fish, ocean perch, Atlantic, cooked, dry heat
Cheese, blue
#9765 Lamb curry
Fast foods, hamburger, large, single patty, with condiments
#9558 Cod, baked or broiled
Beef sausage, fresh, cooked
Mollusks, clam, mixed species, canned, drained solids
Mollusks, clam, mixed species, cooked, moist heat
Veal, variety meats and by-products, liver, cooked, braised
Lamb, variety meats and by-products, liver, raw
Lamb, variety meats and by-products, liver, cooked, pan-fried
Beef, variety meats and by-products, liver, cooked, pan-fried
#9503 Beef liver, fried
Veal, variety meats and by-products, liver, cooked, pan-fried
Lamb, variety meats and by-products, kidneys, cooked, braised
Lamb, variety meats and by-products, liver, cooked, braised
Beef, variety meats and by-products, liver, cooked, braised
#9502 Beef liver, braised
Mollusks, oyster, eastern, wild, cooked, moist heat
#9664 Octopus, dried
Moose, liver, braised (Alaska Native)
Veal, variety meats and by-products, liver, raw
Beef, variety meats and by-products, liver, raw
Turkey, liver, all classes, cooked, simmered
#9704 Oysters, smoked
Cereals ready-to-eat, GENERAL MILLS, Whole Grain TOTAL
Duck, domesticated, liver, raw
Cereals ready-to-eat, GENERAL MILLS, TOTAL Corn Flakes
Goose, liver, raw
Fish, whitefish, eggs (Alaska Native)
Turkey, liver, all classes, raw
Cereals ready-to-eat, KELLOGG, KELLOGG'S ALL-BRAN COMPLETE Wheat Flakes
Clams, canned
Lamb, variety meats and by-products, kidneys, raw
#9681 Clams, steamed or boiled
Cereals ready-to-eat, KELLOGG, KELLOGG'S Complete Oat Bran Flakes
#9678 Clams, baked or broiled
#9682 Clams, smoked, in oil
Cereals ready-to-eat, KELLOGG, KELLOGG'S PRODUCT 19
#10227 Liver, beef or calves, and onions
Mollusks, clam, mixed species, raw
#9950 Liver dumpling
#9921 Clam cake or patty
#9701 Oysters, steamed
Mollusks, oyster, eastern, wild, cooked, dry heat
#9679 Clams, floured or breaded, fried
#9677 Clams, cooked, NS as to cooking method
#9699 Oysters, cooked, NS as to cooking method
Mollusks, clam, mixed species, cooked, breaded and fried
Mollusks, oyster, eastern, wild, raw
Mollusks, oyster, eastern, canned
Veal, variety meats and by-products, kidneys, cooked, braised
Mollusks, octopus, common, cooked, moist heat
Turkey, all classes, giblets, cooked, simmered, some giblet fat
#9663 Octopus, steamed
#9665 Octopus, dried, boiled

Almost any of these would help!  Our billionaire wouldn't have to eat them all.  Except for the brand-name cereals (all fortified) and one entry of mushrooms, these are all animal products. Surely we could pick something on here that we could manage to eat! There's a lot of choice. If we take one of the very last, the "Octopus, steamed", all we need is about 100 grams (the size of the hamburger patty in the small McDonald's hamburger), and you've completely sorted out your vitamin B-12 (omitting the foods with zero quantity this time):

9.21 grams Nuts, walnuts, english
64.4 grams Melons, cantaloupe, raw
1500 grams Tomatoes, red, ripe, raw, year round average
79.4 grams Spices, parsley, dried
1.8 grams Salt, table
26.05 grams Seeds, sunflower seed kernels, dry roasted, without salt
105.08 grams #9663 Octopus, steamed

Here's the old and new nutrient profiles side by side:
Without octopusWith octopus
Adding the steamed octopus sorts out the vitamin B-12 completely. This diet isn't perfect yet - a half cup of multi-grain Cheerios would help a lot.  And that still assumes we're getting that sunshine for the vitamin D.

Folks, please don't eat a "fruitarian" diet.