Friday, July 13, 2012

Maybe worse than impossible

kw: programming, computer science

A couple of decades ago I was working on a program to simulate the way oil fills up a "reservoir", really an impermeable surface with some shape that could trap oil as it trickled upward. A colleague and I tried out scheme after scheme, mainly based on how hard each one was to write into computer code. Of course the easiest one to write elicited my colleagues comment, "Boy, that is pretty bogus." He meant that whether it worked or not, it was a very inefficient way to proceed. We eventually found a pretty efficient method. Other projects throughout the years have been, sometimes a search for efficiency, and sometimes a frantic scramble to avoid too much bogosity.

Definition: Bogosity in computer programming is the inverse of efficiency. Where "bogus" usually means "fake", to a programmer it means a bad way to do something, one that will make the computer take too long. But we need to see just how bad "bad" can be. The standard programmer's example is sorting, so I'll use it.

Sorting data has received huge amounts of attention from thousands of bright people because it is needed so frequently, and is very slow unless clever methods are employed. Sorting bogosity is easy. The (almost) easiest method is one you can do by hand, and it matches the way people typically operate when sorting a small number of things, such as lining up a dozen rocks from smallest to largest. This easy method is called the Bubble Sort:
  • Line up the rocks and look through them for the largest. Put it at the end of the line.
  • Look for the largest among those that remain. Put it next to the other one.
  • Repeat.
We can do this rather quickly because we can compare several items at once by eye. But in a computer, it must be done by comparing them pairwise. So a computer would have to use a few extra steps:
  • Load numbers representing the "size" of the rocks (such as weight. That means weigh them first).
  • Compare the first two numbers. If the first is bigger than the second, swap them.
  • Compare the next two numbers, and so forth, swapping as needed, until you get to the end of the list.
  • At that point, the last storage location contains the largest number.
  • Start over, but stop one short of the end. Now you have two numbers in order.
  • Repeat until you have made 11 passes through an ever-shortening list of numbers.
For 12 rocks, the program made 11 comparisons, then 10, and so forth, for a total of 66. That's OK for a dozen items, but what about sorting a deck of 52 cards? Once you determine which order the suits go in (whether to sort by suits or by numbers within suits), you have to make 1,326 comparisons. That is a lot for a human, though it is pretty quick for a computer. But computer programs need to do a good job even if sorting tens of thousands of items. For 10,000 items, the bubble sort takes almost 50 million comparisons.

A different kind of sort works better. I'll describe one variation of the Shell Sort. It takes fewer comparisons, but uses some extra space. First, for 12 rocks:
  • Line up the rocks as before.
  • Compare the first two. In a nearby space put the smaller one on the left and the larger one on the right.
  • Compare the next two from the original line. Put them in order nearby.
  • Continue until you have 6 sorted pairs.
  • Now take the leftmost rock from the first pair and compare it to the leftmost rock from the second pair. Put the smaller rock at the left end of a new line. It is the smallest rock of the four.
  • From whichever pair that smaller rock came from, pick up the other rock. Compare it with the one you are still holding.
  • Put the smaller one next to the first, smallest rock.
  • Pick up the fourth rock.
  • Compare it with the one you are still holding. Put these two rocks in order next to the first two. Now you have four sorted rocks.
  • Continue with the next pair of pairs.
  • Continue with the third pair of pairs. Now you have three lines of four sorted rocks.
  • These were merge operations. Perform a merge operation on the first two lines of four. This results in a line of eight sorted rocks, and the other line of four is still there.
  • Merge the line of 8 and the line of 4.
If you were counting comparisons, there were 33. You went through the rocks four times instead of 11. Half the effort, at the cost of a little more complexity of planning. To sort 52 cards this way, you'd wind up making 253 comparisons. That is about 19% of the original effort to sort the deck. The general formula for comparisons is N Log/2(N), so sorting 10,000 items takes about 133,000 comparisons, or 1/376th the effort!

There are clever variations of the shell sort that reduce overhead a little, but that is basically the most efficient sort method. But we were talking about bogosity here. The bubble sort is quite "bogus" compared to the shell sort, which is what my friend meant. Is more bogosity possible?

Certainly. For example, if you play Klondike solitaire with the cards, you are only going to win about one time in four if you don't cheat, so each game you play will have some number of comparisons that is less than 1,326, unless you win, but the comparisons are accompanied by "overhead": stack moves and dealing and so forth that greatly lengthen the time to produce a sorted deck even if you win the first game. A typical "sort" might take four games of average length about 700 or nearly 3,000 total comparisons.

Let's declare that the bubble sort has a bogosity of 1. Then a series of games of Klondike
that leads to a win would have a bogosity of 2. Other solitaire games will also be 2's, though they vary a little in how frequently you win without cheating.

This is not nearly as bogus as it gets: I don't know what number to give it, maybe 100, but there is a "sort" that has maximum bogosity, so far as I know. We can call it the Bogo Sort:
  • Throw the cards across the room.
  • Pick them up and flip the face-down ones face up.
  • Look through the deck to see if they are in order.
  • If not, repeat. (Even if only one card is out of place! No cheating by moving it)
The average number of times you'd have to repeat this operation to achieve a sorted deck is a number with 68 digits (roughly 4E+67). If you could "throw-pick up-check" once per minute, it would take about 1E+62 years (That is a hundred trillion trillion trillion trillion trillion or so). Now that is real bogosity.

Thursday, July 12, 2012

The first big scientific collaboration

kw: book reviews, nonfiction, science, astronomy, planets

During the early decades of the Eighteenth Century, several factors came together. The philosophical and scientific ideals of the European Enlightenment were loosening the nationalistic and political ties that "natural philosophers" felt toward their countries, even as political tensions mounted; the great empires of England, France, and Russia were settling down (though squabbling) and global transportation was now possible; advances in astronomical calculations had led to a great ability (with much laborious paperwork) to predict the positions of the planets and moons of the solar system; the achromatic telescope objective, invented in 1730, became affordable in useful sizes (up to about 50 cm diameter); and a hortatory essay by Edmond Halley, published in 1716, was being circulated.

That essay predicted the first of a pair of transits of Venus across the Sun on June 6, 1761, and called upon astronomers everywhere to observe it from as many places as possible around the globe, so as to obtain measurements that would permit more accurate determination of the scale of the solar system. Thus, the few years prior to 1761 saw a series of discussions, proposals, and requests by scientists for funding (from their various governments and other patrons), that led to astronomical expeditions from South Africa to Newfoundland, and from Siberia to India.

The events that led up to the heroic expeditions in 1761 and 1769 (for the second transit of the pair), the observations themselves, and the aftermath, are ably chronicled for us in Chasing Venus: The Race to Measure the Heavens, by Andrea Wulf. The men who "chased Venus" to all corners of the Earth were up against incredible odds. Not all succeeded. Some died. Some managed to transport half a ton or a ton of instruments to their remote targets, only to be clouded in and miss the entire transit.

In the First World, we think nothing of hopping in the car and driving several miles in a few minutes to buy groceries, or perhaps dozens of miles in an hour or less to try out a new restaurant. With a little more preparation, we travel by jet to "civilized" locales on six continents (getting to Antarctica is still a bit of an ordeal). Some years ago, I found that returning from my in-laws' home in Japan, to our own home in Oklahoma, took just under 24 hours, and we thought of that as a difficult trip.

During the heyday of the British Empire, a fast sailing ship could travel between 40 and 60 miles per day. If you were lucky enough to sail straight through without encountering any storms, you could cross the Atlantic in about two months. Land travel in areas without good roads (nearly anywhere outside a major city) was slower than that; 5-10 miles daily was typical. Getting from France to Tobolsk, in Siberia, took an astronomer named Chappe about a year in 1761; getting to California in 1769 took even longer, and he died there after making his observations.

I was quite interested to find that one pair of observers, who observed the 1761 transit from the Cape of Good Hope at the tip of Africa, was Charles Mason and Jeremiah Dixon. They observed the 1769 transit also, but from different locations. In between, they spent a few years in America surveying the boundary between Pennsylvania and Maryland, now called the Mason-Dixon line.

What makes a transit of Venus so special? It is one of the rarest of predictable phenomena. A pair of transits will occur eight years apart, minus about 3 days, but the next pair will occur more than a century later. The period from pair to pair alternates between 113.5 years and 129.5 years, for a total cycle of 243 years. A transit is also an excellent opportunity to take measurements to establish the solar parallax. This parameter is the difference in angle (properly, the half angle) between observations of the Sun from exactly opposite edges of the Earth; knowing the size of the Earth, one can then compute the Sun's distance.

Why aren't the transits more frequent? The orbit of Venus is at an angle of about 3.4° to that of Earth. Eight Earth years are just slightly longer than 13 Venus years. Thus, when the Earth crosses the plane of Venus's orbit, Venus usually isn't anywhere nearby. These crossings aren't exactly opposite one another because Earth's orbit is a little bit elliptical (The orbit of Venus is the most nearly circular of all the planets). So while conjunctions occur a couple times yearly, they are usually not transits.

In 1761 Europe was in the midst of the Seven Years' War. The astronomers sailed across the earth at the risk of their lives. Amazingly, none were lost to hostilities. In 1769, that war was over, but tensions remained. Getting Chappe to Baja California was a political nightmare for the French Academy…and for him. He had to travel under guard on a Spanish ship. Those who traveled to the frozen North, whether in Siberia or northern Scandinavia, had to go when travel was physically possible, in winter when the rivers were iced over. It is amazing that plump, well-fed astronomers did so, and generally prevailed. In the south, in 1769, Tahiti was the target of an expedition led by James Cook, who became the first European to visit Hawaii in 1778. The entire trip took three years. Southern observations in general were hampered by the lack of land in the southern Pacific Ocean.

It was necessary to observe the transit, and time it accurately, from locations as far-flung as possible, so that many partial parallaxes could be combined into a composite, theoretical equatorial parallax. This required measuring the longitude, and the exact moment of local (not statutory) noon, using tall case clocks and observations of the position of the Moon against reference stars, and doing hours and hours of calculations.

From this amazing body of work, the results in 1761 were a little disappointing. One of the biggest problems was that Venus has an atmosphere, which refracted sunlight, making it very tricky to determine exactly when a transit began or ended. One had to time the first moment of ingress, then the first moment light could be seen between the rear edge of Venus and the outer edge of the Sun a few minutes later; then the reverse sequence as the planet approached the other edge of the Sun and slid off the disk six hours later. Venus's atmosphere led to confusing phenomena such as the black drop effect, and to variations in the timing by ten seconds or more, sometimes much more, from observer to observer. As a result, the scatter of calculated values for the parallax ranged from 8.28 to 10.6 arc seconds. That led to a distance range of 77 to 99 million miles. Not very accurate.

1761 had been a practice run, many decided. They would do better in 1769. They did, with three times as many observers in about twice as many places. Although the weather was cloudier than it had been eight years before, larger numbers of better observations were performed. The "best value" as judged by the most competent astronomers was 8.78 arc seconds, which compares well with the value we accept today of 8.794. That, and a less accurate value for Earth's size, led to a distance about 1% too long, a tremendous achievement for the time.

The cosecant of 8.78 arc seconds is 23492.6; multiplying by the radius of Earth (3,960 miles) we get just over 93 million; the average distance to the Sun that we accept these days is 92.96 million miles. The distance calculated in 1769 was actually 93.73 million, based on a slightly larger value for the Earth's radius. So the angular measurement of the Solar parallax was actually in error by only 0.15%.

By 1772, most of the scientists had returned home, the results had been published, and life was settling back to normal. But a seed had been planted. Ms Wulf traces modern "big science" such as the Large Hadron Collider and the great observatories, both on Earth and in orbit, to this first global collaboration between scientists from a number of countries. One could say, though nations may war, among scientists peace prevails, as it must for civilization to continue.

Wednesday, July 11, 2012

Convergent thinking monogram

kw: places

Many years ago I created a few logos for various purposes. One was an interlaced L and V, to be used as a monogram. Imagine my surprise when I happened to visit Lee Vining, California on my way to Tioga Pass (the back way to Yosemite) – there on the hillside above the town was an LV monogram in just the same configuration!

That was some years back. I looked the place up in Google Earth and found the monogram is still there. It gives me a bit of extra fondness for Lee Vining, and for the unknown person who had an idea similar to mine, though I never found out if they "got there" first.

Tuesday, July 10, 2012

A preeminent teacher of teachers

kw: book reviews, nonfiction, medicine, missionaries, biographies

How much can we do for our Savior?
  How much for our dear fellow man?
The way to do more than we're able
Is Jesus within to enable;
  Thus we can do more than we can.

This lovely hymn by Albert B. Simpson expresses an amazing fact. With God's help, we can surpass the limits we place upon ourselves, and do "more than we can". I wonder if it is possible to do more than what Dr. Glenn W. Geelhoed has done in more than forty years of medical missions. One thing he knew he could not do, he could not condense tens of thousands of pages of his notes and diaries into a compact book without taking a huge amount of time away from his passion, which is serving "any patients, anywhere, as long as they are unable to pay." So he got a co-author.

Dr. Geelhoed and Patricia Edmonds are co-authors of Gifts From the Poor: What the World's Patients Taught One Doctor About Healing. It is a good collaboration. I read through the book almost as rapidly as I do a good novel, but learned much more than I could from any novel.

In contrast to many medical missionaries who focus their efforts on a single country, or region, or place—often living there for years or decades—, Dr. G, as he is often called, goes everywhere that few others go: South Sudan, central Congo, Ecuador, remote provinces in the Philippines, or the Himalayas, for example. He doesn't go alone. He takes along other physicians, medical students, and people who might like to be medical students…and warns one and all that they will be expected to live among the people they serve, not in a fancy compound with running water and reliable electricity. Those who will assist in (or learn) surgery are advised to bring a battery powered headlamp. When you are halfway through a hernia repair and the lights go out, you can't stop and wait for them to go back on.

For a man who has single-handedly accomplished more than the average large clinic, we might presume he has the right to a certain feeling of pride or self-worth. While he does have a stubborn streak (part of his professional equipment, in my estimation!), his singular characteristic is humility. Thus the title of the book. From his patients he has learned more than he could ever teach: thriving amidst deprivation, strength through suffering, communication where there is no shared language, and a multitude of clever ways around the barriers we usually permit to thwart us.

Whenever he arrives in a place, his entourage quickly multiplies. Around the bed or table or operating platform, to those he has brought along will be added a few local people who are learning how to carry on when he has gone. He disdains the notion of dropping from the sky, performing opaque miracles, and vanishing without a trace. The world's "bottom billion" have seen too much of that already. He prefers to leave behind a cadre of folks who know how to suture a wound, perform a lumbar puncture (if anesthetics are available), fix a hernia or goiter, and deliver a baby by C-section; people who know not just that this or that antibiotic may help, but why, and how much to use; doctors (if possible) or trained helpers who can continue to improve the lives of their fellows.

This he does with the 30-40% of his time that is spent "on the road". What of the rest? He is on faculty at George Washington University, a position not without responsibilities. He lectures, both at GWU and increasingly elsewhere. He stays in shape (he has run marathons on all seven continents, Antarctica included). He hunts, though usually "on location" to help feed the people. Much time is spent planning and arranging the next trip (or the next three or four). And he does devote time to family.

Nobody is good at everything. As it turned out, "family man" was pretty low on his list of skills. His marriage failed when his two sons were young, and he raised one while having only limited access to the other. Now that they are grown (and in their 40s) he is closer to them both, and to his grandchildren. But at age seventy he has yet to slow down, though running a marathon takes an hour or two longer than it used to. What he is best at is teaching. Not just teaching skills, but teaching attitudes, and above all, teaching teaching. This Bible reference ought to be in the book, because it describes him exactly:
The things which thou hast heard from me among many witnesses, the same commit thou to faithful men, who shall be able to teach others also. –2 Timothy 2:2, ASV
Except, he teaches both men and women. He practices transformative teaching. You must get out of your comfort zone to learn. He'll get people so far out of their comfort zone they learn as they learn how to learn even faster and better!

He has received a number of awards, and he is rightly proud of them, but he is proudest of the people he has met around the world, particularly among those "bottom billion", who have given him the gifts from the poor, the gift of receiving and trusting him before they knew he could be trusted; the gift of hospitality in their poverty; the gift of remembering well what they were shown; and most of all the gift of loving and smiling in spite of their deprivation and loss.

Monday, July 09, 2012

Food fads: true, false and two kinds of maybe

kw: book reviews, nonfiction, nutrition

Finally, a genuinely useful book about nutrition, with a kind of "Mythbusters" approach to the subject: Coffee is Good for You: From Vitamin C and Organic Foods to Low-Carb and Detox Diets, the Truth About Diet and Nutrition Claims by Robert J. Davis, PhD. Dr. Davis is well equipped to tackle nutrition beliefs, as a science journalist and author of The Healthy Skeptic. By the way, coffee is good for you, in moderation, of course.

The book has 65 small chapters of a few pages each, in 10 sections. At the head of each we find a title, and a little icon displays where the title belief fits on the Truth Scale: Yes, No, Half True or Inconclusive. In an introductory section he explains several levels of supporting evidence, with the blinded clinical trial being the "gold standard", with the caveat that one must determine who paid for the clinical trial. "Studies" that embody a conflict of interest have no more weight than raw anecdotes, and perhaps less. He is careful to explain the level of support that exists for each of the 65 items.

The one I found most surprising was "Milk is Necessary for Strong Bones", with the icon "No" attached. As I read, I understood. Outside the Euro-American West, more than 2/3 of people over the age of five cannot drink milk. Lactose intolerance is the normal condition of juvenile and adult humans. I knew this, and I have a Japanese wife, one of about 30% of those Asians who can drink milk, and she does, daily. But my in-laws had never drunk milk since they were weaned. It is not the Japanese habit. What was their source of calcium and Vitamin D? Calcium came from tofu and frequent fish meals, where they usually eat the bones (Japanese eat smaller fish than Americans usually do). Vitamin D came from sun exposure. Sunscreen is practically unknown in Japan, at least prior to 2000 or so. They walked almost everywhere, so they got plenty of sunlight. Even in their mid-80s, they had strong bones. Other cultures outside the West have a variety of sources of Ca and D. And those "studies" that support milk drinking, such as the "Got Milk" ads? All funded by the dairy industry.

A number of the beliefs that got a "Yes" were really more in a "Yes, but" category. For example, Vitamin C really can affect how frequently you get a cold and how long it lasts. The catch is, too much C will loosen your stools (not always a bad thing) or cause indigestion (uncomfortable but seldom a danger). And it takes "too much" to reduce the number of colds you catch; also, the shortening is by a day at most. Not worth it for most of us.

Probably the most controversial area, whichever side you might be on, is diets, either for better health or for weight loss. The Mediterranean Diet gets a definite "Good for you", but detoxifying diets get a resounding "No." In fact, they usually do more harm than good. The irony is, the Med Diet should really be called "The Diet of Mediterranean Residents Fifty Years Ago." Most southern Europeans now eat a more American diet, and are experiencing increased obesity, diabetes type 2, and heart disease.

Probably the best advice about keeping yourself healthy and trim is something I heard last night from Chris on ABC's Extreme Makeover, Weight Loss Edition: Vary your workouts, because once your body is used to your current workout, the workout gets less effective; and something I was told by a friend who is a personal trainer: No diet plan works twice, because your body learns to cope with it and defeats you if you try it again. So the best plan is no plan, except the "table push" exercise, which is to take a small serving and to push yourself away from the table before you finish it. Period.

The funniest item is about the Caveman Diet. The author puts it in the Half True category, but warns that nobody really knows what our distant ancestors ate (He doesn't go on to say, the best evidence we have is from the "last meal" found in Ötzi the Ice Man's stomach, several dozen kinds of plant foods and just a little meat). He also recounts a cartoon from the New Yorker in which one cave man tells another, "Our air is clean, our water is pure, we all get plenty of exercise, everything we eat is organic and free-range, and yet nobody lives past thirty."

This is a useful book to keep as a reference, particularly to re-check in coming years as medicine and nutritional science march on. It is also a good read, to read right through, and take note of the particular food habits that might help you improve your own well being.

Saturday, July 07, 2012

Declared dead, or made dead?

kw: book reviews, nonfiction, medicine, organ transplants, ethics

There were 28,114 organ transplant operations in the US in 2010. In that year, the gross income of the "organ transplant industry" was about $20 billion. That is more than $700,000 per transplant. In 2011, 6,669 people died who were waiting for a transplant. Had organs been available for every one of them, it would have generated an additional $4.7 billion in revenue. When that kind of change is on the line, many people's ethical compass can become quite skewed. For a bit more detail, see note 29 on page 328 of The Undead: Organ Harvesting, the Ice-Water Test, Beating-Heart Cadavers—How Medicine is Blurring the Line Between Life and Death by Dick Teresi.

This book is a splash of fresh-off-the-glacier ice water in the face of anyone considering being an organ donor. Did you ever watch the 1978 movie Coma, or read the book (1973)? At the time, it was fiction. Very little of it is fiction any more. Only one of the book's premises is still not fulfilled: there is no widespread practice of over-anesthetizing people into a coma to make their bodies available for "harvest". Note that I wrote "widespread"; there have been a few such cases, but they went nearly unreported. There is increasing sentiment among transplant proponents to make this also come true!

Actually, anesthesiologists are a major group that works for more restraint in organ harvesting practices. Author Teresi interviewed a number of them who told of being ordered not to apply anesthetic to "brain dead" patients, even though they were showing signs of agony as they were dissected and their organs removed. It is widely thought by transplant doctors that anesthetic will damage the organs in some way, making them less likely to "take" in their new hosts. This has not been shown to be true, but evidence is very scanty, precisely because so few transplant harvesting dissections have been done with anesthesia!

The book is very thorough, and thoroughly researched. It took over a decade. On a subject of this importance, you don't want to hurry. The author is reporting the facts as they have been presented to him. He is not anti-transplant, but some doctors evidently think he is. He has garnered rather furious reactions from a few. He has been accused of homicide by proxy, for any people he might discourage from being an organ donor. And it is a fact that when someone who could donate dies without having any organs "used", three or four people will probably die as a result. But they will die anyway, just perhaps a little later.

The opening section of the book covers this matter at length. The death rate hasn't changed in thousands of years: one per person. Medicine has two parts. One is improving wellness so that the years you have are better years. The other is attempts to delay death. A life "saved" is actually a death postponed. Death-postponing medicine is a Tetris game. You might zap block after block for a long time, but sooner or later one is going to make it to the bottom row, and "Bing!", the game is over.

A friend of mine had a kidney transplant about ten years ago. He was told that a kidney lasts ten to twenty years, but sooner or later the anti-rejection drugs can't keep up with the immune system and the kidney is rejected and dies. Then it is back on dialysis while awaiting another kidney that "matches". Actually, modern drugs can make just about any organ "match". You just go to the back of the line and wait until your name comes to the top. It takes 7-10 years, unless you are somebody important enough to get preferred treatment, but that's beyond our scope here.

Do you know what "brain dead" means? If you do, please let everybody know, because you are the only one! The laws that (very badly) regulate a doctor who will declare someone dead have been changed again and again, primarily to make it easier and quicker to change the legal status of a person from "living" to "dead" and get the body into the hands of the transplant team. The situation is so confusing that the studies which have been done to determine whether guidelines are being properly followed have found that the "compliance rate" is only 35%. Nearly two-thirds of death declarations are made prematurely or on the basis of insufficient testing. At one point the author wrote, "Whether you are judged to be living or dead depends on which doctor gets to you first." (p 45) He goes on, "I had hoped to write about the science of death determination. But the denial of death affects scientists, too…" There is no science of death determination!

The author relates visiting his father, who was in the ICU. He had a brief conversation with him. His father asked a question and responded clearly to the answer. A young doctor came in, interrupted, and took the author into the hall, to tell him not to be fooled by random noises, "Your father is in a coma and will not recover." As he stood, aghast, an older doctor came over and told him that is how young neurologists are trained. Guess which doctor I would have immediately ordered barred from further contact with the patient? The author doesn't say what he did about it.

The first big change came in 1968, when thirteen Harvard men gathered behind closed doors and hashed out a definition of "brain death" that has since superseded the old definition of death as "heart stopped, can't reliably restart it". Be it known that simpler (easier to apply) definitions have been implemented since then, step by step. Nowadays, the doctors want the heart to be in good working order, and they want it to keep the organs in good, transplantable condition. So when a patient has sufficient brain injury that they are unresponsive to the four or five typical tests (such as squirting ice water on your eardrum; if you have any awareness at all, you'll jerk and shout), your death is "pronounced" and the transplant team is notified. If the heart is having difficulty breathing, machinery is used to keep it going. Usually within minutes, unless your family very, very strenuously intervenes, your "operation" begins.

Do you think determining brain death ought to require some kind of objective test, such as monitoring blood flow to the cortex, or using an EEG? So does almost everybody except the transplant team. Where some wise person has forced an EEG to be used, about ten percent of the time the brain was active. There was just some problem with the brain stem. Past experience has shown that such persons can gradually recover, at least to some extent, and usually don't wish to die just yet.

Then there are NDEs, near-death experiences. There are thousands of such cases. In some, there was no EEG for many minutes, but after recovery the patient reported seeing or hearing things that happened during the "flat line" time. They were "brain dead", but clearly it was not a permanent condition, and they were somehow aware in spite of being legally dead. There are mysteries here that the doctors are very far from plumbing.

Laws are still being changed. In Washington, D.C. and a few other places, a declaration of "terminally ill" is enough to get you at least partially dissected, before your family is notified. And, more and more ICU's are effectively becoming places where early attempts at restoration are followed by "warehousing" until death can be pronounced. Frequently, most medical treatment is withheld at this stage, to quote: "In 1988, 51% of ICU patients died because medical treatment was withheld. By 1993, that number had shot up to 90%." (p242) If you take more than four or five days to recover in the ICU, you, too, could be the target of this kind of medical murder. Sure, some folks get "terminal enough" that it makes sense to pull the plug, but the difference between 51% and 90%, in just five years, is mostly related to a increasing pressure to find transplant donors.

A few bad apples spoil things for everyone. It seems the transplant industry has succeeded in attracting more than its share of bad apples. Doctors have angrily told the author that people are going to die because of his book. People may tell me the same thing over this review. I look at it this way, why should I support continued bad behavior? Put your house in order, and I'll support you. I am philosophically in favor of organ donation, but the current medical climate has turned the philosophy on its ear.

My driver's license indicates that I am a donor; I don't recall whether I actually said Yes or No or if I was even asked. I think the same applies to many of you. When you are getting a driver's license, if they ask about organ donation at all, it is done quickly, usually when you are distracted signing your name or filling in a form. Do you remember giving consent? Neither does my wife. She and I will probably get new licenses that say "No", very soon. Changes must be made in the organ transplant system before I will agree to be involved in any way.

Do you know which doctors get the highest pay? Transplant surgeons. $400,000 per year or more (that is their net, after they have paid their staff and so forth). Nurses, hospitals, and a host of others are paid large amounts for their participation. But it is illegal for the organ donor or the heirs to receive any money. They usually get stuck with large hospital bills for any unsuccessful attempts that were made to save the person's life! A week in the ICU can cost $100,000. I suggest the following:
  • Mandate the use of both EEG and blood flow monitors to determine if the cortex is living or dead. Current tests only check certain brain stem functions, and poorly at that.
  • Do not allow any member of the transplant team access to the patient until after the attending physician has pronounced death. That includes a "transplant team friendly" nurse, a frequent occurrence that ought to stop.
  • Reduce the amount paid for transplant surgery to about 25% of current amounts.
  • Require the donor's estate to be paid the same amount as the transplant surgeon(s), for the total of all operations involving this person's organs.
  • Wipe off the books all medical costs accrued by the patient. Charge them to someone else if you must.
The monetary provisions above are controversial. While they may lead to conflict of interest within your family, they will greatly reduce conflict of interest among the doctors and hospitals. Who do you trust more, your kids or your doctor? If you don't trust your kids, you need help beyond the scope of this essay.

Meantime, what can we do?
  • Make a living will, or advance directive, or whatever it is called where you live. Carefully think through every provision. This is not a one-hour job! Make sure all your relatives have a copy (even the faraway ones; you may get sick on a visit), and, of course, every doctor you are employing. Carry a copy when you travel.
  • If you wish to be a donor, you would do well to get politically involved and work towards getting the five provisions above enacted into law. You don't want to be the one who isn't quite as dead as they thought you were, when the knife goes in. More importantly, get your spouse, parents, children and other relatives on the same page with you, so they will defend you adequately if needed, to prevent premature harvest.
  • If you prefer not to donate, make sure there is no "red heart" or other indication on your driver's license that you are a donor. Have you ever looked? If it is there, get a new license, and state specifically that you DO NOT want to be a donor. It also might be a good idea to get a tattoo, preferably in the middle of the chest, in inch-high red letters, "NOT an Organ Donor!!". Show it to your relatives. Show it to your doctors. Make sure they all understand that your relatives will sue the butt off anyone who dissects you anyway.
I sure wish life were simpler.

Fun in the sun and maybe in traction

kw: tv shows

I am not in a serious mood today. I've watched about half of the showings of ABC's Wipeout since it began airing just before July 2008. It is just the right mix of slapstick and, well, slapstick to help me while away an hour when I need some mindless entertainment. I got curious about where it is produced, and found a link with an address (25975 Sand Canyon Road, Canyon Country, CA 91351). Plopping this into Google Earth I find this:
The actual production site is about half set and half logistical space. At the time this image was taken, July 15, 2011, they were clearly remodeling the set for the next season, which was probably recorded in the fall months. In this area west of Magic Mountain (not the amusement park, which was moved to Ventura years ago, but the actual mountain), summer gets pretty hot.

The three linked pools at the right make up the initial qualifier. There are three pools, a circle and two rectangles, in which the second- and third-level qualifiers can be constructed (they don't use all three at once, typically). The unfinished bone-shaped pool at the left is the Wipeout Zone, clearly undergoing a major overhaul at the time.

As much as I like water sports, I have no desire to try out for the show. I'm a bit older than their to-date-oldest competitor, and more easily bruised than when I was half this age. On the short list of "things I might do for $50,000", Wipeout is not included!

Friday, July 06, 2012

Rechecking autism prevalence

kw: autism, statistics

This morning I heard an ad I have heard many times, in which Curt Schilling ends by saying, "The chances of having a son with autism: one in 110." I decided to look into it. My sources for the statistical information below are this publication by C.J. Newschaffer et al and this Wikipedia article.


The public perception of autism was greatly improved by Dustin Hoffman's portrayal of a high-functioning autistic man in The Rain Man. The character of Raymond was based on Kim Peek, who died in 2009. However, not many autistic persons have genius-level abilities of memory or calculation. Kim Peek is an example of an autistic savant, and he was somewhere in the middle of the "autistic spectrum".


The autistic spectrum comprises three defined syndromes:
  • Classical Autism describes people who cannot form relationships, may never recognize other people, and communicate poorly or not at all.
  • PDD-NOS, Pervasive Developmental Disorder Not Otherwise Specified, is a wide-ranging slush bucket of syndromes that include some, but not all, characteristics of classical autism. Some cases are more profoundly affected than others, and many or most instances of autistic savants are found here.
  • Asperger Syndrome is the highest-functioning type. A few AS persons are savants, but the syndrome as a whole describes people who are very focused on one or a few interests, may become very expert in those interests, are able to converse and form relationships, but have certain autistic behaviors.
I know three men with Asperger syndrome. One in particular is a young man who went to high school with my son. He and I were assigned to collect tickets for a football game. He is extremely interested in weather, and when he learned I had lived in Oklahoma, he quizzed me extensively about my experiences of powerful thunderstorms and tornadoes. My son said he is the school weatherman, always glad to provide a forecast, though perhaps in greater detail than you have time for. Unlike people with classical autism, he could look you in the eye.


I also know two young men who are profoundly autistic. One is the son of a couple who belong to the local Mensa chapter. He is barely able to recognize his parents, cannot speak, and the slightest frustration causes him to roar like an animal. It seems his mother can guide his behavior a little, in that he understands a few of the words she says. His perception of English is probably below that of a house pet.


In spite of several decades of study, the actual incidence of these disorders is only poorly known:
  • Autism: 1 or 2 per 1,000. The average of a number of studies is near 1.7 per 1,000.
  • PDD-NOS: 3.7 per 1,000.
  • Asperger: About 0.6 per 1,000.
These add up to very nearly 6 per 1,000, or 1 out of 167. There is an added fact. Across the spectrum, males outnumber females 4.3 to 1. In my reading I didn't get a clear feeling whether one of the three areas hits females harder or less hard than males, in proportion, so I just analyzed these data based on the 4.3:1 figure for all. I find that the totals for the entire spectrum are 1/440 for girls and 1/103 for boys. The ad with Curt Schilling is correct in this regard, as it specifically says "son". The spectrum splits up this way:
  • Autism: 28%, or 1/1580 for girls and 1/370 for boys.
  • PDD-NOS: 62% or 1/710 for girls and 1/165 for boys.
  • Asperger: 10% or 1/4,400 for girls and 1/1,030 for boys.
If there is a silver lining in this dark cloud of affliction, it is that nearly 3/4 of children on the autism spectrum will be able to relate to others at a useful level. The tragedy is that of 4.1 million babies born yearly in the U.S., nearly 25,000 will be afflicted with an autistic spectrum disorder, and nearly 6,900 of them will be classically autistic and require lifelong care.

Thursday, July 05, 2012

Probing a doctor's view

kw: medicine, diagnostic procedures, philosophy

I recently spoke at some length with a close friend who is an orthopedic surgeon. At one point he complained about "over regulation", using this example: He is legally barred from purchasing an upright, weight-bearing scanner (CT or MRI) to use in conjunction with his practice. While I sympathize with his frustration, I agree with the ban. As we talked, I was thinking, "What part of 'conflict of interest' do you not understand?" Perhaps I should have been blunt enough to state it out loud.

I already knew the important facts of the matter. A perusal of records has shown that where the patients of orthopedic specialists have convenient access to such imaging devices, but outside the doctor's facility, there is a certain level of referral for such tests, but where the imaging device is available on the premises, the rate such tests are performed is about double. Patient outcomes were not affected to any significant degree. That is, the higher rate of imaging didn't result in an improvement in patient recovery. The primary difference was the level of remuneration to doctors who did or did not own the imaging scanner. It may be that the more ethical doctors who do own such equipment are using it at the same low rate; if so, then the less ethical ones must be scanning nearly every limb that is brought through the door!

Most doctors are good and ethical, but not all. It is a pity that the activities of a few "bad eggs" has led to legislation that affects them all, but that is part and parcel of the regulation of a civil society. Most of us will never need the locks on our doors, but nearly all of us lock our doors because of a few criminals. My friend stated that doctors ought to be allowed to regulate their affairs, "just like everybody else." I stated that this is not so, that most business activities are regulated, and for good reason. Those areas where self-regulation has been allowed are hotbeds of unethical and even criminal activity, including the banking establishments that are largely responsible for the crash of 2008 and the ensuing recession. Too bad so few of them were jailed.

I have two things that I look for when I must come under the care of a new doctor. Firstly, what schools are his or her degrees from? Better schools are the best indicator of a better doctor. Secondly, how many drug company "trinkets" do I see around? An office packed with things bearing advertisements, such as pens, note pads, anatomical posters, and even, sometimes, the TV on the wall, are a bad sign. So is a closet well-stocked with "samples", though you'll only find this out if the doctor writes you a prescription and hands you a packet or two "for the first few days."

So many things are made so convenient. Vigilance is needed to avoid feeling beholden to the purveyors of those "trinkets". Better the practice of a very, very few doctors, to turn away the drug company reps at the door and accept nothing from them, not even a pen. Even more vigilance is needed by patients (I prefer being called a customer!). And when I find a doctor who, the best I can determine, is worthy of my trust, I treasure him or her.

Wednesday, July 04, 2012

Another species brought into the fold

kw: book reviews, science fiction, fantasy, mysteries, humor

When the book opens with a report detailing the goblins' cult of unggue, followed by a vignette involving Sam Vimes's wife and son, you can be sure they are central to the plot. Interestingly, though early on a hermit named Stump is introduced, he is a bit player at best. Tobacco smuggling is more central to the plot, and provides the title, Snuff, by Terry Pratchett. The actual contents of the tobacco barrels, however, include some lethal recreational drugs.

For anyone unfamiliar with Discworld (a trademarked name), it is the setting of more than thirty novels by Pratchett, a disc-shaped planet that does indeed rest upon the backs of immense elephants standing on a turtle, as Hindu mythology would have it. At the center of the disk is the festering metropolis of Ankh-Morpork, and all is ruled over by the tyrant Lord Vetinari, while the city police force (the Watch) is governed by Commander Samuel Vimes.

In this novel, Vimes is taken out of his element, literally and figuratively, by the combined machinations of his wife, Lady Sybil Ramkin, heir to a large country estate, and Lord Vetinari, who does indeed have a heart in there somewhere. While "on holiday" in the countryside, Sam Vimes manages to return at least in part to "his element" when a sudden murder leads to the uncovering of a number of more significant crimes. So significant, they lead to a shift in the social order.

In earlier novels, Vimes has had a hand in bringing various species into function as members of the Watch: vampires, a werewolf or two, trolls, golems, dwarves and zombies. This book centers on goblins and the ages-old prejudices against them. Goblins are legally animals and treated like vermin. As it happens, Vimes is host to an unlikely entity, which he thinks of as a kind of demon, a gift from the king of dwarves, called the Summoning Dark. He can see in darkness and understand the languages of the underground creatures, including goblins. Goblins, though considered ugly and stinky (where have we heard that before?) have the loveliest names, and one goblin girl is named Tears of a Mushroom. I will forebear to describe how she wins the hearts of a populace. She, sponsored by the Lady Sybil, and trained by a novelist, is central to a change in the social order and the conferring of rights upon the goblins.

And what of unggue? Is it pronounced UN-gyoo or un-G'WAY? Probably the latter. Unggue pots are small vessels the goblins make to keep their fingernails, snot and certain other parts shed from their bodies. These shed parts and the pots are central to their religion. The pots also have certain magical qualities, and the beauty of the pots has led to some amount of raiding and theft by humans (there are strong parallels here to the past treatment of the Navajos for their art).

The action and dialog are conveyed in a style all Pratchett's own, an admixture of understatement and sly misdirection, frequently quite hilarious. I have long considered Asimov the master of dialog, and for sheer volume of good material, he is unsurpassed, but I now consider Pratchett's writing, at its best, rises higher, particularly in dialog that delights, surprises and amuses all at once.

Tuesday, July 03, 2012

Closer or opener?

kw: salesmanship

My wife has been looking for a new car for a few months. She had a list of things she wanted, and it seemed no car in our price range had everything. One conflict was the combination of manual transmission and cruise control. Several cars we test drove did have both, but the one car that met all the other requirements (Toyota Corolla) did not; we could get a manual transmission in the L model, but not cruise control, or automatic transmission with cruise, but not manual, in the LE model. The S model has both manual and cruise but is $2,000 more, and the LE is not far behind.

At one dealership, which we visited twice, they simply said, "That's the way it is." We had test driven an S model and an LE (automatic) there, but not an L because they didn't have one on hand with manual transmission. My wife was not thrilled with the S model. The transmission was pretty tight and, being the sport model, its ride was stiff. So I called around and found a dealer that did have a manual L model on hand.

The salesman at the dealer #2 let us both drive the car, then we talked. My wife really liked the car we had driven. The salesman said perhaps we could get an aftermarket cruise control installed. He had already cut the price $500 when we said we'd be paying cash (#1 hadn't said a word about a cash discount). As it happened, the price for an aftermarket cruise control was $499, so he said it was effectively that we could get it put in for free, and he would take care of everything. We had timing issues related to our trade-in, but he worked that out also. We asked to drive the car once more, and talked it over privately during that drive. We decided to get that car, went back in and bought it.

Salesman #1 is a door closer. He has certain options, and you have to get one of them or no deal. No deal was what he got. Salesman #2 is a door opener. He got us what we wanted, at a reasonable price, and simply provided excellent service. Folks, the openers of the world have the advantage. Why buy from a door closer?

Monday, July 02, 2012

Like the river, you can't step in twice

kw: book reviews, nonfiction, essays, words, english language

I am not one of the twitterati. I do not have a Twitter account. I have trouble enough keeping up with FaceBook and this blog! As it happens, twittersphere is the 100th word in The Story of English in 100 Words by David Crystal. He chose it to exemplify the continued liveliness of English, or "the Englishes" if you accept that certain patois and pidgins have become new English languages (a Chinese friend who had lived in Malaysia explained it to me: Malay pidgin is English words strung together using Chinese grammar. Thus, "Long time no see" is an exact translation of a Chinese phrase into the corresponding English words. Remember that the next time you read a product brochure written in Chinglish.).

The language alternately called Old English or Anglo-Saxon arose in the late Fifth and early Sixth Century, an amalgam of the tongues spoken by the Germanic Angle, Saxon and Jute invaders who pretty much took over the island that now holds England, Scotland and Wales. To this day, nearly 80% of everyday English words are of Germanic origin. Of course, if you count scientific and technical words, you get a larger proportion of Latin and Greek terms, but less than 30% of the population is scientifically or technically trained, so you can hardly call them "everyday".

True to this origin, Professor Crystal's compendium begins with a Fifth Century word, roe. The word referred to the roe-deer, not to fish eggs. That came much later, via another word of similar sound. Very few words of such ancient lineage survive, however. The book's second selection is from the Eighth Century. By my count, the author spread his collection over the centuries thus:
  • 5: 1
  • 8: 2
  • 9: 5
  • 10: 5
  • 11: 2
  • 12: 1
  • 13: 9
  • 14: 9
  • 15: 2
  • 16: 8 (The century of Shakespeare)
  • 17: 13 (The century of the King James Bible)
  • 18: 4
  • 19: 13
  • 20: 21
  • 21: 5
I pride myself on a comprehensive knowledge of the language (that is, a large vocabulary), but a few of the words were unknown to me: bodgery (16th, since replaced by "bungling"), mipela (19th, from a Papuan pidgin; the intensive plural of "me"), doobry (early 20th, akin to "whatzits"), and bagonize (late 20th, waiting at baggage claim). In many of the essays, a dozen or more, perhaps 50-100, words that in some way relate are also mentioned. Thus doobry is accompanied by doodad, doofer, dooshanks, and also doohickey, doojigger, and then whatchacallit, whatchamacallit, thingy, thingummy, jigmaree, and a good many others. All just to say, "I don't know what to call it, but I know what I am looking for".

If you dig into almost any word's origin and history, you'll find surprises. The common epithet "Dude!" just means what "guy" meant a decade or so ago, but it referred to a cowboy wannabe when I was a child, and to a dandy (today we'd say "metrosexual") when the word first appeared in 1883. Like many new coinages, once it caught on, it spawned a number of related words and phrases such as duded up. The author mentions the short tenure of the female forms dudine and dudess. Here I can happily add to the author's knowledge: the proper female form, when used at all, is dudette (at least for now!).

Word play is a fruitful source of new words. Brunch is a portmanteau word, packing two meanings into one word (as Humpty Dumpty explained to Alice). Dally (from "delay") spun off dilly-dally by reduplication, which led to a host of words bearing a similar rhythm. And then there are attempts to deal with ambiguity. The pronoun "you" is both singular and plural. In the American South, y'all and a number of variants arose originally as a plural "you". The trouble is, it soon became equally ambiguous, and at least around Houston when I lived there 35 years ago, y'all just meant "you, singular", and all y'all or all-a-you-all was the plural form. And they really did say "Y'all come back now, hear?", no matter how many people were saying goodbye.

Leaving out the millions of terms such as Homo sapiens or Tyrannosaurus rex or E. coli (who knows how to pronounce "Escherichia" anyway?) that refer to specific biological species, there are still about a million words of English. Summarizing them in 100 exemplars is no small task. The good professor has done a masterful survey of the ways that words were coined and cobbled together, and dragged, cajoled and kidnapped into the English language, to form the very living tongue spoken, in numerous variants and dialects, by a third of the peoples of the Earth.

Friday, June 29, 2012

Statistics wars

kw: book reviews, nonfiction, mathematics, statistics, history

It is curious. As long as there have been formal, mathematical methods, they have been seen as the epitome of intelligence. This, in spite of the fact that modern amounts of computer power have helped us see that machinery can easily do what our own "wetware" struggles with, yet things we take for granted are usually what our computer machinery has yet to do well.

Nobody could ever get a BS degree in Walking to the Corner Store to Buy Milk. Yet, millions of hours of effort and billions of dollars have been spent to develop a robotic device with the ability to perform this simple task, so far without clear success. On the other hand, you might have a BS or even MS in mathematics, and find that you need to check your work using Mathematica, to be certain you haven't dropped a minus sign or parenthesis somewhere.

I had six years of college- and grad-school-level math (calculus, differential equations, advanced physics analytics, and statistics). I recall that every math professor said, hundreds of times, after showing us how to set up a system of equations, "Now it is all just turning the crank." Maybe so, but "turning the crank" was something even the most obsessive of us—frequently me, yet I didn't always get an A—could not reliably do. It might take all night, also, but even on a generic IBM PC AT-class machine running in Turbo mode at 10 MHz (that is 1/300 the speed of today's processors), with the first edition of Mathematica, we could set up those same equations and get the crank turned for us in ten seconds or less.

That branch of mathematics called statistics is, today, a double enterprise. The more familiar discipline of hypothesis testing is based on gathering enough data to make a standard test such as the t-test or F-test produce a result with a range narrow enough to reject an alternative hypothesis, usually the Null hypothesis. Maybe you take the next twelve light bulbs from the factory floor, put them in sockets, and turn them on. You set up some kind of machinery to record when each one burns out. With incandescent, 100-watt bulbs, this could take several months; with CFL's or LED's it could take years. Regardless, once the last bulb burns out, you can calculate a distribution function, figure its average value, and state with a certain measure of confidence that most of the bulbs will burn for, say, 1000 hours. By the time this information makes it to the retail package, it simply reads, "Lasts 1000 hours!"

Here is another kind of statistics. You have kept track of many such tests over many years. The tests are now a quality control exercise. You know pretty well what kind of distribution function there is. For light bulbs, this function is rather broad, so a "1000 hour" bulb has a 10% chance of burning out after only 500 hours or less, and a 10% chance of lasting at least 1350 hours. A few bulbs have been known to hang in there for more than 2000 hours, which is why a complete test usually takes almost three months.

But you know the shape of the function. With this knowledge, you take twelve bulbs as usual, and start the test. After one month (720 hours), three of them have burned out, and you know the times. You probably have enough information to decide whether the current batch of bulbs is worthy of the "1000 hours!" designation. In some cases, you might have to wait for a fourth bulb to burn out to be sure. You now have a QC test that gives you the result you need in 4-6 weeks rather than 10-12. And you have some leftover bulbs with some life in them.

That is one kind of Bayesian analysis. Another is this. You or your significant other, being of appropriate age (over 40, or 50, depending on whom you believe) go to the breast center for a mammogram. Suppose three days later a phone call comes, "There is a suspicious shadow. Please consult your physician." What are the odds that you actually have cancer?

Analyze it this way.
  • The test catches 80% of cases of genuine cancer.
  • Of 10,000 women who have mammograms, 40 have cancer.
  • Thus 32 of those 40 will receive that daunting phone call.
  • The test has a "suspicious shadow" or other indication that might indicate cancer just over 10% of the time, whether there is cancer or not.
  • The actual number is 1,028 per 10,000. The 32 real cancers are among them (Remember, 8 cancers have been missed).
  • That leaves 996 women who do not have cancer, but can't be sure. They got the same phone call.
  • 32/1,028 = 0.031. That is 3.1%.
It is up to you to decide if you want to do nothing and hope you are among the 97% who have no cancer. Many women opt to undergo further testing and further expense. But for every genuine case of cancer caught, 31 women who were perfectly well were subjected to fear, and probably pain (biopsies).

This mammography example is presented in greater detail in an appendix to The Theory That Would Not Die: How Bayes' Rule Cracked the Enigma Code, Hunted Down Russian Submarines & Emerged Triumphant From Two Centuries of Controversy, by Sharon Bertsch McGrayne. The light bulb analysis is not; I got it from experiences in a prior career.

Bayes' Rule is simple. When you update your initial belief with current information, you get a new and improved belief. In other words, it is a statistical method that incorporates feedback.

Here is an example from my father. Though he was in Corps of Engineers for most of WWII, he was a gunnery officer for part of a year. Suppose you have a mortar squad with a dozen mortars, and your task is to demolish an enemy bunker a mile or two distant. Mortars are fired above a 45° angle, so they go a mile or more up on their way to the target. You don't know the winds "up there". How do you determine your "windage", and its variability? One way is to fire all 12 mortars using the range sighted in by your spotter, at the visual azimuth angle, and see how much you miss. The center of your impact pattern gives you the average windage, and the scatter gives you the gustiness figure. That'll work, but you can do it with three shells.

You aim all three "on target", but fire them a couple of seconds apart. A second round of three, if needed, and adjusted for the average "miss", should allow you to correct for average windage. The scatter tells you how variable the winds are, and you compensate by adding some divergence to your aiming when you fire all 12, which will ensure that some of the mortar rounds strike in the most effective locations. The bottom line is, this will get the job done with the smallest number of mortar rounds.

The book is a delightful history of Bayes' Rule and the people who used it. A presentation of the Rule got into print only after Thomas Bayes died, and became much better known years later due to publications by Pierre Simon Laplace. There are some who think the Rule should be named for Laplace, but there is already a large collection of methods called Laplacians that are used to simplify the solution of differential equations. We can let Bayes have this one.

The singular fact is the nearly two centuries of determined opposition Bayesian methods endured. For about six generations, "frequentists" (roughly, those who rely only on methods that require no prior estimates) made the name Bayes into a dirty word, in professional statistical circles at least. Yet among those with real jobs to do, making an informed guess and then refining it was the only way to solve their problems. In a sense, there was the ivory tower, denigrating the methods that almost everyone else was using to great effect!

This was particularly the case in military circles. Code-breaking and decipherment is a Bayesian process. The "Enigma" machines used by the Germans and others for encoding messages were based on a pre-war commercial product. So the English and others were able to build machines that duplicated them, and then "try stuff". Encoding and decoding was laborious, even with the machines' help, so they worked with snippets. When a trial turned a snippet into something nearly intelligible, they could tweak and tweak until they were ready to decode the entire message the snippet came from. It must be said that the laziness of signals officers made their job easier; it seems that shifting an encoding wheel just one position makes a whole new code, but of course that is the first thing a decoder is going to try.

The manifold uses of Bayes' Rule unfold in story after story, of hunts for lost submarines (on which The Hunt for Red October by Tom Clancy is based), of figuring out how big the critical mass is for an atomic bomb, and of weather forecasting—all in the days before computers. Once computers became ubiquitous, and especially after 1980 or so, software that made Bayesian inference practical for larger and larger problems suddenly brought the Rule into the limelight. Coupled with Markov chaining and Monte Carlo methods, it is the only practical way to solve many kinds of problems.

Have you ever built and used a Decision Tree? That is a Bayesian process. You have to have at least a guess about the values of a number of things, and their chance (probability) of occurrence. Once you populate the tree, you just "turn the crank", there are programs that can do this for you. Here is one example of a decision tree worked out by hand:

Once the numbers have been calculated, the largest composite value on the right will indicate which decisions must be taken to achieve this optimal result.

A most exciting area, still in early days, is machine learning. Bayesian learning is behind the self-driving vehicles that recently won DARPA prizes for driving in the desert and driving in a city; it is behind the data store, and particularly the data relationships it contained, that enabled the Watson supercomputer to win at Jeopardy. It is also behind Google Translate and the "you might also like" suggestions Amazon makes when you search for a particular book.

Finally, think how you learn something new. You were not born knowing that the letter "B" is pronounced "bee" and is made by a certain way of grunting as you pop your lips apart. As an infant, you heard it again and again, and played around with your mouth until you got a sound that matched "pretty well" what you heard. Meanwhile, inside, to avoid tying up too much valuable gray matter, your brain was remembering motions that "satisfied" you more and forgetting those that didn't. Before long, it could prune away the experience of learning (and you have indeed forgotten it), and just keep a tiny bit of brain machinery that is very good at pronouncing a "B". Bayesian inference is the way we learn.

Thursday, June 28, 2012

Will meat eating go out of style?

kw: food, meats, carnivorousness, vegetarianism

I have been thinking about future food supplies. Not long ago I re-read portions of E. O. Wilson's 2002 book The Future of Life. He wrote,
"If everyone agreed to become vegetarian, leaving little or nothing for livestock, the present 1.4 billion hectares would support about 10 billion people."
 A number of authorities report that world "arable land" totaled 1.38 billion hectares in 2008. This article, which I consider most reliable, reports 1.365 billion as of 2005. This is less than the land under cultivation, however, because "arable" counts only land that doesn't need irrigation. All cultivated land totaled 1.73 billion hectares in 2005. Still, all the figures are in a range that is unlikely to change much unless huge breakthroughs are made in land usage effectiveness.

Just over 30% of the cultivated land is used for livestock, about 0.52 billion hectares. This includes land that grows crops which are fed to livestock. It leaves 1.2 billion hectares to produce all the vegetable foods for the world population of seven billion persons. That resource produces:
  • 57 million metric tons (MTm) of beef
  • 104 MTm of pork, ham and other swine meats
  • 87 MTm of chicken meat
  • 13 MTm of other fowl
  • 700 MTm of milk (all kinds)
  • 64 MTm of eggs
The sum of the meats is 261 MTm. The "Western" diet utilizes about 115 kg of meats per person. Just in the US and Europe, then (1.05 billion), total meat consumption amounts to 121 MTm yearly, or nearly half the world total (46%).


As world prosperity rises, larger numbers will want better diets. Suppose meat consumption in the West could be reduced by 20%, and four billion people in Asia and Africa were to demand an increase of meat availability to that level (90 kg per person per year), could we produce it?

Five billion times 90 kg = 450 MTm per year. 450/261 = 1.72, a 72% increase. If we assume an equivalent increase in the demand for milk and eggs (less likely for reasons we will get to soon), it would require either a 72% increase in land devoted to livestock production—from 0.52 billion Ha to 0.89 billion Ha—or an equivalent increase in livestock productivity per hectare. Neither is likely.

By 2025, just 13 years from now, there are expected to be eight billion of us. Just to feed that extra billion, assuming the current distribution of diet, will require either a 14% increase in average productivity, or a 14% increase in cultivated acreage. This is also unlikely.

Several factors complicate such an analysis. Firstly, few adult Asians can drink cow or buffalo milk because of lactose intolerance. Their "milk" of choice is soy milk. The leftover soy roughage is fed to livestock, though it needs to be mixed in with more palatable fare, or the animals won't eat it. Secondly, increasing amounts of "cultivated" land are being turned over to ethanol production for motor fuel. This will simply have to come to an end within the next couple of decades, or riots will ensue. Thirdly (and finally for this discussion), it takes 2-3 kg of vegetable feed to produce one kg of chicken meat, but 10-12 kg to produce a kg of beef. Pork is in the middle at 3.5-4. I foresee a continuing trend away from cattle to other animals. Beef will become a rare "premium" treat.

I didn't mention seafood anywhere above. While a there is a little on-land aquaculture, most fish- and prawn-farming is done at sea, so it doesn't impact the amount of arable or cultivable land, and is presently a small portion of total seafood consumption; most seafood is wild caught. But this is as good a time as any to state that fish catches have been decreasing for years, and are likely to drop by half in the next 10-20 years. That will increase the pressure on meats and on sea- and land-based aquaculture.

This brings me back to the Wilson quote. Sometime between 2050 and 2100 AD, world population could rise to nine billion, then ten billion. There is a lot of hope, with little justification, that population will level off between nine and 9.5 billion prior to 2100. Suppose it does: there will still be no way to afford using so much land for livestock.

There will always be marginal grasslands where grazing animals are the best way to turn sunlight into calories, and there will be byproducts like extracted soy meal that people won't eat. The conclusion I must draw from my rough calculations is that everyone except a few of the wealthiest individuals will be eating much less animal food than at present. Fashionable item in future trousseaux: a vegetarian cookbook.

Wednesday, June 27, 2012

Remember "Lead, Follow or Get Out of the Way"?

kw: leadership

Tipped off by a friend, I read an article titled Few follow the leader these days, by David Brooks. He writes of "just authority", and the quandaries surrounding it. His closing words are:
I don't know if America has a leadership problem; it certainly has a followership problem. Vast majorities of Americans don't trust their institutions. That's not mostly because our institutions perform much worse than they did in 1925 and 1955, when they were widely trusted. It's mostly because more people are cynical and like to pretend that they are better than everything else around them. Vanity has more to do with rising distrust than anything else.
In his memoir, "At Ease," Eisenhower delivered the following advice: "Always try to associate yourself with and learn as much as you can from those who know more than you do, who do better than you, who see more clearly than you." Ike slowly mastered the art of leadership by becoming a superb apprentice.
To have good leaders you have to have good followers — able to recognize just authority, admire it, be grateful for it and emulate it.

His premises are questionable. In 1925, national leadership, both political and commercial, was becoming increasingly corrupt, which led to the crash of 1929 and the Depression. The people's trust had been ill-founded. Hoover's bungling then led to a level of cynicism very similar to what we see today. President F.D. Roosevelt had to first re-establish trustworthy leadership before he was able to lead effectively. He was a patrician, but was willing to interact directly with the populace in a way prior presidents had seldom done, with his "fireside chats" for example. In the 1950s, D.D. Eisenhower began his presidency with sufficient moral authority to remake this country, and as a result, American leadership did indeed perform better than the political gridlock that has characterized the 1990s and early 2000s, and through today.

Secondly, President Eisenhower's advice is well taken, but doesn't match the attitude of Mr. Brooks, who clearly thinks us stupid people ought to just follow our "betters". Considering the weaseling related to the current quarrel between a House committee and Eric Holder, there is no way I would consider Mr. Holder or his boss as one of my "betters."

Finally, good leaders, such as either of the Roosevelts, or Eisenhower, emulate good and honest leadership, so that the populace can clearly recognize their qualities and admire them. Joseph de Maistre wrote, "In a democracy, people get the leaders they deserve." Considering how close most national elections are, this is actually only half true; about 51% get the leaders they thought they wanted and the other 49% feel put-upon, unless the elected leader can win over the people by being the good and just leader he or she claimed to be during the campaign.

But when the President's "approval rating" drops below 40% and that of Congress drops to 20% or less, the fault does not lie with the "followers." The great majority of the national "leaders" currently "serving" think of themselves as an elite, and mostly have no way to connect to their constituents with the humility that FDR displayed.

America has a followership problem because it has a leadership problem. If you want to know why, just ask Ed Rendell, author of A Nation of Wusses.

Tuesday, June 26, 2012

Stripping the myths of meaning

kw: book reviews, mythology

I have come to realize I am at best an average writer. I am most comfortable with the essay format, so this blog is well suited to my slender skills. When I have had to write longer works, such as a thesis or dissertation, the greatest task was the narrative and transitions, because without them my writing resembles a strung-together list of bullet points.

As part of my early education, I read Edith Hamilton's Mythology. It remains the classic work on the primary myths, and her other nine books, for those interested, bring out many of the tales left out of that volume, plus they introduce certain of the early Hebrew and Christian stories.

In a new volume, scholar Philip Freeman brings together summaries of most of the Greek and Roman myths, rewritten for a modern audience: Oh My Gods: A Modern Retelling of Greek and Roman Myths. While he clearly loves the classic stories, I think he has misread the audience. While it is true that modern readers have little patience, they clearly appreciate well crafted narrative and characterization; witness the Harry Potter phenomenon or the marathon of reading required by the twelve volumes of the Left Behind series.

Oh My Gods would probably work better as a multi-volume work (five at least). What we have is writing pretty much as I would probably produce: a series of strung together bullet points, almost like reading a bunch of PowerPoint presentations. The emotional power is wrung out of the stories by the brisk point-by-point style. It's a pity. These ancient archetypes reveal a lot about how our insides work, if told well. While it is perhaps unfair to match Freeman with Hamilton, that's what he is up against. Many of Hamilton's books are still in print. Just get them.

Monday, June 25, 2012

Do you say Yuck when you mean Grrr?

kw: book reviews, nonfiction, psychology, emotions

"Nobody loves me, everybody hates me, I'm going out and eat worms," my mother used to sing to me when I was peevish. When I was little, it shocked me into silence. Later, I secretly liked it. Eventually, I ignored it. I have never knowingly eaten worms. I have eaten dog. In my mid twenties, one of my housemates was Cuban. He made us a delicious stew one day, then announced it was dog meat. We were a tough bunch of guys, I guess. Nobody hurled. We were mainly curious, where did he get it? From a black-market Vietnamese market in downtown Los Angeles, he told us.

Try this as an experiment. Clean your sink out real well beforehand, then make sure others are watching as you wash some grapes. Let one drop into the sink, seemingly by accident, then pick it out and eat it. How do they react? (This is assuming that you are capable of nonchalantly popping a grape into your mouth that you have just plucked from the sink.) What is it about a kitchen sink that immediately transforms food into toxic waste?

Did you ever stumble across a couple making love in a public place, like a little-frequented corner of a park? How did you react? Some people might stay and watch, but most folks tend to flee in confusion. It's strange, because some large number of Americans are paying a total of $15 billion yearly to watch sex videos online. That's quite a bit more than the total take of Hollywood movies! But the really curious point is that so many people would describe public sex as "disgusting." Really? Does it really engender the same feelings as if you were told you'd just eaten dog meat, or earthworm crunchies? or were offered the grape just plucked from the sink?

All this and more are discussed in entertaining and enlightening fashion in That's Disgusting: Unraveling the Mysteries of Repulsion, by Rachel Herz. As I did above, Ms Herz begins by discussing food. One of her examples is natto, a slimy fermented soy paste that the Japanese (my wife included) just love. To me it is the only thing more disgusting than okra, except when the okra is in a good gumbo. I think gumbo was invented in self-defense, as a way to make okra useful in some fashion.

But food is only the beginning. I recall a cartoon showing a woman gardening, when a wisp of her hair is blown into her mouth. She uses a dirt-covered hand to get the hair out. Is hair really more dangerous to your health than garden soil? I have seen both girls and boys (who had long enough hair) chew on the end of a lock of hair, contemplatively, while reading. Then there are smells. If I tell you that the smell of Gorgonzola cheese is produced by the same bacteria that make feet smelly, can you still eat it? How do you react to the sudden smell of a long-unwashed person (maybe just returned from a camping trip)? Context is everything. In one context, the smell of a used undershirt is horrid, but in another it is a real turn-on, particularly if you are in love with the wearer of the shirt.

For four years, we have had continual news of the problems in the banking and mortgage sectors that brought about the current recession (Oh, you thought it was over?). One highlight was the downfall of Bernie Madoff, who made off with a ton of other people's money. What do people say? Frequently, it is "How disgusting!" Really, disgusting? Are the antics of Madoff or of two larcenous Treasury secretaries and a gaggle of felonious bankers really going to make you vomit? I doubt it. More likely, you have entertained fantasies of joining NRA and ferreting out their addresses…

What is genuine disgust really for? When you taste something bitter, you make a certain face as you spit it out. When you smell old gym socks, you make the same face, of you are older than about six. Perhaps when you surprise a loving couple in the park, you also make the same face as you flee. And seeing a baby eat a fly on America's Funniest Home Videos? Same face.

As the author informs us, only our reaction to bitter tastes is innate. Children react to bitter tastes, but as the video of the fly-eating baby shows us, other kinds of disgust have to be learned. We learn from those around us as we grow up. Disgust is part of our cultural equipment. The innate disgust reactions keep us from ingesting poisons. The learned reactions keep us from ingesting a wider array of potentially damaging substances.

Early in the book we find a Disgust Scale questionnaire. The average score is 40, and I scored a 46. I don't know the variance of the scoring, so I may be pretty close to ordinary, or I may be flamingly sensitive, but "ordinary" is more likely. The author states that our sensitivity to disgust usually decreases with age. I am pretty sure that is true for me. In one particular, though, I know I haven't changed. I still can't watch when I get an injection or have blood drawn. I am just too squeamish and afraid I might faint. But is that really disgust?

Of the six emotional expressions (happiness, sadness, anger, fear, surprise and disgust), only disgust is primarily a learned response. Bitter tastes elicit it, but all other "disgust triggers" are culturally learned. Much work on brain activity has shown that disgust is closely allied to both anger and fear. However, certain people, notably those with Huntington's Disease, cannot experience disgust, though they react appropriately to fear- or anger-inducing stimuli. Further, because we react with disgust to disgust in others, it is closely related to empathy. The author writes, "I have come to believe that disgust is about empathizing with yourself."

The root of disgust is an aversion to disease or damage. Perhaps it is the most recently evolved addition to our immune system. When we empathetically wrinkle our nose upon hearing "Yuck!" or seeing someone jerk away from a bad taste or smell, we are learning to avoid things that others have found dangerous. Disgust is a rather slow reaction. It takes processing, whether conscious or not. Fear is quick. Anything that looks vaguely like an attacking predator makes us jump right now! But we have to think a bit before using Purell or washing off the vegetables.

The author writes about desensitization to fear triggers such as spiders and harmless snakes. A similar process seems at work in "learned tastes" such as smelly cheeses or the more "pissy" beers (all beers disgust me, but then I don't drink alcohol any more), or even natto. It turns out that there is a large gray area in every cultural tradition. Some things are very taboo here but permitted there; others are eagerly sought out in one culture but cause disgust in another. It seems, beyond our innate aversion to bitterness (which we can also overcome to some extent), that there is almost nothing that is always a disgust trigger for every culture.

I think I'll take a step beyond the author, and conclude that disgust is more political than hygienic. There is a second way to learn disgust: to have first learned to hate "them," and then to find out what "they" eat or do that is "different." Do they eat the Frobjus fruit? Then we must never eat it! It must be truly awful or evil, just because "they" like it. Recall the big-endian and little-endian wars of Jonathan Swift's Lilliputians. Egg eating habits were a proxy for their ethnic prejudices. Think over how many characteristics of a "different" ethnic group you may find disgusting, at least a little bit. Maybe some kinds of food, maybe a smell (based on food), maybe a music preference. What is their basis? Usually, it is a codified preference that arose simply from cultural drift or from the necessity of using what a certain part of the world had to offer.

For example, lots of people in the culture I grew up in prefer a beef-and-potatoes diet. In some tropical areas, the staples are pork and taro; elsewhere, chicken and cornmeal. Nearly every culture has a preferred meat and a preferred starch. My wife's seaside cousins grew up eating fish and tofu with rice; tofu is the preferred protein source in Japan when you can't afford animal protein. I am surprised how many of my Western acquaintances profess to "hate" tofu, even while it is becoming more popular in the West. I happen to relish tofu. A further observation is that disdain for tofu seems to accompany a poorly-hidden dislike of Asians. I won't get into how being a couple of mixed race has narrowed our circle of potential friends…

Look in the mirror. What disgusts you? Are your reactions sensible? In many cases they are. In others, they could be holding you back from fulfilling experiences.

Saturday, June 23, 2012

JCP gets it right

kw: observations, apparel

Two and a half years ago I posted about a printed label inside undershirts, that got scratchy with use. For reference, here is the closeup image of the thick, cracked ink in one of my shirts after being worn about 100 times:

The ink shows obvious cracks, and it is thick and rubbery. When it cracks, it curls a little, making lots of sharp edges. As I wrote, I responded by wearing these shirts inside out. They are under a dress shirt anyway, so they don't show.

I did not report at the time, but the shirt is from J.C. Penney. I didn't want to embarrass them. But I am happy to note the name now, because a year or so later, they changed the ink in this brand of shirt. I have been wearing the new ones right side out (label side in), with no irritation.

In the image below, also after about 100 wearings, though the ink is noticeably wearing, it is rubbing off rather than cracking. It is much thinner than the old ink, and I can't feel it on the shirt.

I don't know whether the changed location of manufacture (Canada instead of the UAE) had anything to do with the change in ink formulation. I hope the primary reason was that JCP folks were wearing their own products and noticed the shortcoming.

Regardless how it came about, bravo to J.C. Penney.

Friday, June 22, 2012

High but not the highest

kw: sports

I don't watch sports much, except for the Olympics. But, having lived in Oklahoma prior to moving to the East Coast, I had to watch last night's NBA finals game. Of course, I was rooting for the Thunder, but in the past, I've been for the Heat, even over the 76ers (I don't dare tell my neighbors).

This game was a defenseman's nightmare, an almost pure offensive duel. And I have to hand it to Miami, they played with a steady level of intensity that shows in the scores. As I recall, by quarters, they went 30-59-90-121. This overwhelmed Oklahoma, which had about four points less per quarter, with the final score 121-106.

Ordinarily, particularly at the playoffs level, a score of 106 is a winning score. Not this time. I say, though, hats off to the Thunder, for scoring 106 against the Heat! I wondered, how close was this to a playoff record? It didn't take long to find out, not close at all. The highest combined score was in 1992, when Portland beat Phoenix, 153-151. I makes me wonder how many miles the players ran, back and forth!

Curiously, I recall from my childhood hearing on the radio about a basketball game that was the first in which a team scored above 100. I've tried to find out more about it, but no Google search I have been able to craft has gotten me past the thousands of sites that tout Wilt Chamberlain's 100-point individual effort in 1962. Oh, well. This is the first game I've watched in which a team scored more than 120.

Thursday, June 21, 2012

Is there reality to near death experiences?

kw: musings, near-death experiences, beliefs

Getting ready to review the book Heaven is for Real, which I reviewed yesterday, I did a lot of extra reading about NDE's. As you might imagine, there is a very wide spectrum of beliefs about what these extraordinary events might mean, or perhaps several spectra. One spectrum is from complete credulity ("They have to be real") to total rejection ("They are all hallucinations"). Another is based on one's own belief system, from "They support my faith" or "They strengthen my faith" to "They are meaningless" or even "They are a delusion by wicked spirits".

Strangely, reading NDE accounts, I didn't find any people who said, in effect, "Yeah, I saw this and heard that and so forth, but it doesn't mean anything to me." Also, quite a number of folks said it wasn't like dreaming, but seemed a much more concrete experience that led to vivid memories.

There are various lists of the common elements of NDE's. The core experience seems to consist of these few elements:
  1. Transport to a different place, sometimes "taken" by other persons or entities, sometimes more "automatic", like involuntary flight.
  2. Some kind of life review, perhaps having one's life events shown on a screen, or read from a book, or being questioned by an entity who may or may not be sympathetic.
  3. A turn in the action, often a kind of interruption, with the understanding that return to the former existence is required.
  4. Transport back and reviving.
The transport in item 1 is most often flight through a kind of tunnel, perhaps with a light at the end, among Westerners, while Asians and many Africans more often report passing over some kind of landscape. The transport in item 4 is usually more abrupt, and may be a simple thrusting "downward" or "back".

Many, particularly in the West, report meeting deceased relatives or acquaintances. Others report that all the entities they met were "angels" or some other nonhuman beings. Here interpretation is most prevalent; a person's cultural background determines what the accompanying beings will be called.

The life review might be long or short, comforting or frightening, and seems to have little to do with one's religion. A guilty-feeling Christian or Hindu or whatever is more likely to have an unpleasant experience than a more secure believer. I sought out accounts from a variety of cultures and religions. There is little to generalize, but I did discern a few trends:
  1. Christians are most likely to report that they visited "heaven" or "paradise".
  2. Jews from a strictly conservative background tend to report the most detailed life reviews, and one case that I read was long and detailed and very unpleasant and scary.
  3. Jews from more mystical backgrounds are more likely to report a "garden of Eden" experience.
  4. Hindus and Buddhists seldom report a heavenly experience, because the life review takes place before admission to a place they can see nearby. They usually report being sent back before they get a look inside. Buddhist NDE's appear to be quite rare.
  5. Muslims almost uniformly consider NDE's as hallucinations, stating, "If you revived, you weren't dead, and only the dead can go to paradise, so you didn't go to paradise." However, there are a few reports of Muslims who had a very strong, heavenly and pleasant experience, who converted to Christianity after reviving.
  6. I did not find any reports from people whose background was Shinto or Bah'ai.
I looked and looked, but did not find any records of people changing religions after an NDE, except for those few Muslim reports. Rather, people who had been weakly religious before became more pious in their own religion as a result, while those who were already quite diligent were more likely to exhort others than before.

So do NDE's actually have anything to do with God? I tend to think that NDE's are primarily hallucinatory. A few cases, such as that of Colton Burpo, have aspects that make them seem more genuine, just as there are a few cases of visions or revelatory dreams that seem more genuine (as opposed to a great many reported visions and dreams that are most likely theologically meaningless or even deceptive). As a believer in God, of necessity I believe in divine revelation. But I also believe that genuine revelation is very rare. If all NDE's are given by God for His purpose, it would make sense that they contain a consistent message. Generally, they don't.