Object Oriented Programming and Objectivist Epistemology

I have just started reading Ayn Rand’s Introduction to Objectivist Epistemology and chanced upon this very interesting paper by Adam Reed. Prof. Reed writes about models of causation and the exact architectural parallel between Rand’s epistemology and object oriented programming. I am very busy with work right now and ITOE is a difficult read but this is definitely something to explore once I am done with it.

Probability – 2

In a comment on my previous post arguing that probability is arbitrary, Stephen Bourque wrote 

Probability is an empirical measurement of an ensemble of events. It means: Given a set of N independent events, the probability of a specific event is, to a degree of certainty, the number of times the specific event occurred divided by the total N, as N becomes large. By “a degree of certainty,” it is meant simply that the uncertainty in the measurement can be made smaller and smaller by increasing N. (Since this is an inductive process, it has the characteristics of induction, including the requirement of objectively determining when N is large enough to achieve certainty of the probability measure.)

Let me work out the math to calculate the degree of certainty. Consider a coin tossed N times. Suppose that M tosses resulted in a ‘heads’ (H) outcome. To simplify the math (by keeping it in the discrete domain), suppose I know that the coin has been designed to have a ”true” heads probability ‘r’ for a single toss of either ’p’ or ‘q’. Let HM,N denote the event of obtaining M heads from N tosses. Let P(A/B) denote the conditional probability of A given B.

Using Bayes’ theorem,
P(r = p / HM,N) = P(HM,N / r = p) P(r = p) /

[P(HM,N / r = p) P(r = p) + P(HM,N / r = q) P(r = q)]

with

P(HM,N / r = p) = NCM rM(1-r)N-M

and

P(HM,N / r = q) = NCM qM(1-q)N-M

If one knows P(r = p), the probability of the true probability being p, one can calculate P(r = p / HM,N), the degree of certainty for the probability estimate of r = p given the empirical data. The problem is that to calculate the degree of certainty of a probability estimate based on empirical data, one needs another probability number. To take a concrete example, suppose I know that my coin has a ‘true’ probability of either 0.3 or 0.4 for a single toss. I toss the coin 100 times and get 33 heads, so that N = 100, M = 33, p = 0.3, q = 0.4. If I use P(r = 0.3) to be 0.5, then the degree of certainty works out to be 69.7 %. The problem is that the value of 0.5 for P(r = 0.3) is still arbitrary. It has no basis in empirical data.

One can extend this to the continuous domain, where r may take any value between 0 and 1. To get a degree of certainty measure, one will need a prior probability distribution for the “true” probability and this distribution will have to be arbitrary. Just as I used a value of 0.5 in my concrete example, one may take this distribution to be the uniform distribution. I have not worked out the math for this case, but it should be easy to do so.

Anyway, it turns out that as one increases the values of N and M proportionately, the degree of certainty for the probability estimate r = M / N, rises to 100% very fast irrespective of the arbitrarily chosen prior probabilities. Practically, this is a very useful feature and this is what Stephen refers to when he writes that the uncertainty in the measurement can be made smaller and smaller by increasing N. But does it change the epistemological status of probability calculations? I don’t think so. As long as N is finite – that is, always - the degree of certainty is arbitrary. At some level, probability calculations always depend on an arbitrary choice of equal likelihood. To see this, just consider Bayes’ theorem above. It uses a weighted average where the weights are prior (or unconditional) probabilities. These unconditional probabilities are usually themselves estimated with other empirical data. Regardless, the calculation of an average assumes an equality of significance of the numbers being averaged. My position is that this assumption of equality is an arbitrary assumption. By using more and more empirical data, one can drive this assumption deeper and deeper, but unless one develops a physical theory – a cause and effect relationship – one cannot get rid of it.

Probability

I have struggled with the concept of probability for a long time. Not with the maths but with the meaning. Does a probability number really mean anything at all? And if so, what? Recently, I have reached a definite position on this. Here it is.

In a metaphysical sense, it seems clear that the probability number is meaningless. Or, more accurately, that it is not a property of the event in question at all (I am using the word ‘event’ loosely to refer to anything for which a probability may be calculated). An event either occurs or does not occur. No fractions are possible. Probability therefore must be a measure of a person’s state of knowledge of the factors that determine the event in question. That is, probability is an epistemological concept rather than a metaphysical one. It originates because of the need to make choices in the face of incomplete knowledge. This is clear since probability is used not just for future events but also for past ones. A classic example of this is the use of medical tests in conjunction with statistical analyses to arrive at a probability of a patient’s having a particular disease. In reality, either the person has the disease or not. The probability assigned to the possibility of disease is merely a tool used to decide whether further investigation is warranted.

This seems to suggest that probability is a subjective rather than an objective. But the precise math used to calculate probabilities suggests otherwise. Is probability subjective or objective? To answer this, it would be useful to look at what the words subjective and objective mean. In a comment on an old post, Burgess Laughlin wrote (and I agree):

“Objective,” in my philosophy (Objectivism), has two meanings. First, in metaphysics, it means existing independent of consciousness. The redundant phrase “objective reality” captures this meaning. Second, in epistemology, “objective” refers to knowledge that is drawn (inferred) logically from facts of reality. (See “Objectivity,” The Ayn Rand Lexicon.)

Subjective, as I use the word, refers to judgements or responses that cannot be traced back to facts of reality or the thought processes of the subject (A typical example is emotions).

Probability is not objective in the metaphysical sense. In fact, without consciousness, it would not exist at all. It is also not objective in the epistemological sense since it arises only in cases where the subject does not have complete knowledge of the facts of reality. And the fact that there are precise mathematical rules to calculate probabilities means that probability is not subjective either. If probability is neither objective nor subjective, what is it? Consider the case of a coin being tossed. Lacking any knowledge of the composition and weight distribution of the coin, the velocity with which it was tossed, the composition of air, the nature of the ground etc, the probability of a particular side showing up is taken to be 0.5. Where did this number come from? It is quite clear that this choice is purely arbitrary. The entire math of probability is based on a simple principle applied consistently. Given multiple possibilities and a complete lack of quantitative knowledge of relevant causes, each possibility has an equal probability. Clearly this is arbitrary, but it is the best one can do. And applied consistently, it provides a very precise framework for quantifying a lack of knowledge. It allows quantification of that which we do not even know!

Anyone who is familiar with Rand’s philosophy should note that my use of ‘arbitrary’ is different from (though related to and inspired from) Rand’s use of the word in the classification of the epistemological status of statements as true, false or arbitrary. To apply the principle of equal likelihood, one already needs to have identified all the possibilities. This means that probability cannot be applied to arbitrary (in Rand’s sense) assertions. What about the truth status of a statement involving probability? Such a statement can be demonstrated to be true (or false) subject to the equal likelihood principle. Without the principle, it is arbitrary (in Rand’s sense).

I think this classification – objective, subjective and arbitrary – might be useful in several other areas of math as well. For example (I need to think more about this though), it can be applied to Euclid’s axioms (in geometry). These axioms could be described as arbitrary and theorems could then be considered as true subject to the axioms.

In my next post, I will try to relate my position to statistics and randomness.

Passivity

I was listening to a radio programme with a host (epithet loveguru) who in between songs, takes questions on matters “related to the heart” and heard this conversation (translated from Hindi)

A girl: I had a proposal for marriage. I liked the guy but our kundalis didn’t match. Now I have another proposal where the kundalis match. I like the new guy too. I am confused. [In a typical Indian arranged marriage, a family puts forward a proposal to another family, astrological records are matched and the couple gets to meet a few times before deciding]

loveguru: I can’t understand your problem. Why do you need to think so much? For whatever reason your earlier relationship didn’t progress. Now you have a new opportunity. Take it and move on.

Note the second-handedness involved in asking a total stranger for advice on deeply personal matters. And note the complete passivity being preached. This passivity is pervasive in Indian culture. In a comment on an earlier post, Burgess Laughlin wrote

…The Times article refers to “fatalism.” If fatalism is indeed widespread in India, what is its source? A particular religion?

I have still not identified the source of this passivity or fatalism beyond the concept of karma. But this is a concrete instance and I thought I should record it for future reference.

Book Review: Superfreakonomics

I had some spare time at an airport, and happened to pick up Superfreakonomics by Steven Levitt and Stephen Dubner. I haven’t read Freakonomics (I do plan to now) and didn’t know what to expect. I found the book to be an interesting read. It covers a wide range of topics – too many to list - but does so in an engaging and often witty way. The variety in topics makes this a particularly difficult book to review and I will not make any attempt to cover or even mention most of the contents.

Chapter 1 deals with prostitution. The authors write

Since time immemorial and all over the world, men have wanted more sex than they could get for free. So what inevitably emerges is a supply of women who, for the right price, are willing to satisfy this demand.

Interesting. I hadn’t encountered this description before. A few pages further down, the authors note that the prostitute’s wage has fallen drastically over time and attribute it to the change in sexual mores that has resulted in “competition for the prostitute” – any woman who is willing to have sex with a man for free. The authors write

If prostitution were a typical industry, it might have hired lobbyists to fight against the encroachment of premarital sex. They would have pushed to have premarital sex criminalized or, at the very least, heavily taxed.

That is just hilarious. I wonder if the social conservatives (in India and abroad) who preach abstinence, oppose the mixing of the sexes etc. realize that they are promoting prostitution.

Chapter 3 – titled Unbelievable stories about apathy and altruism – was the one I found most interesting. The authors describe experiments conducted by economists in the 80s to measure altruism. The typical experiment involved two players, one of whom was given a sum of money with the choice to keep all of it or give any part of it to the other player. Players gave 20% of their money on average. The experimenters took this as proof of altruism. The authors then describe experiments by John List. List conducted the same experiment – called the Dictator game – with some variants. In the first variant, the player given the money ($20) was given the choice to give the other player any part of it or take $1 from the other player. Only half the number of people who had given money in the original version now gave money. In the second variant, the player making the decision was told that the other player was also given the same amount of money. The choice offered was to take the entire amount from the other player or to give any portion of her own money. In this variant, only 10% of the players gave money while more than 40% took all of the other player’s money. In the final variant, both players had to work for their money with the choice being the same as in the previous variant. In this variant two-thirds of the players neither gave nor took any money while 28% took the other player’s money. The authors note “It [the final variant of the experiment] suggests that when a person comes into some money honestly and believes that another person has done the same, she neither gives away what she earned nor takes what doesn’t belong to her.”

It should be obvious that any of the experimenters could have tried the twists that List used. In fact, without such twists, the experiments look quite weak. Yet they did not do so over a period of two decades. That indicates that the experiments’ motivation was a desire to find proof for hard-wired altruism rather a simple scientific enquiry.

After discussing a few factors that might influence the outcomes of such experiments such as selection bias – the people who volunteer to play along are more likely to be cooperative, the effect of scrutiny and the absence of a real-world context, the authors write

If John List’s research proves anything, it’s that a question like “Are people innately altruistic?” is the wrong kind of question to ask. People aren’t “good” or “bad”. People are people, and they respond to incentives. They can nearly always be manipulated – for good or ill – if only you find the right levers.
So are human beings capable of generous, selfless, even heroic behavior? Absolutely. Are they also capable of heartless acts of apathy? Absolutely.

I disagree with the authors but that is a subject for another post. Meanwhile, there several interesting questions worth considering. Were the experimenters really measuring altruism (or its lack, in the case of List) at all? Do such experimental results justify conclusions of the form that the experimenters drew – human beings are hardwired for altruism? If not, what would be required to establish (or reject) ahypothesis that a certain kind of behavior is hardwired?

Chapters 4 describes how several problems that were once thought of as difficult or unsurmountable have been solved very effectively at a low cost. As one instance, the authors write of how the simple practice of doctors disinfecting their hands before treating patients saved innumerable lives. It seems awful that doctors were/are responsible for easily avoidable deaths. It seems even more awful that doctors resisted and still resist policies that require them to wash/disinfect their hands. My reaction was – how could they be so negligent when the cost (potentially lost human lives) is so high? A little reflection shows that such negligence is not uncommon at all in any profession. Washing hands is after all a boring, time consuming act and its consequences (prevention of infection) are not apparant at all by their very nature. A parallel example from the field of software is writing tests – also a boring, time-consuming act whose consequences are not apparant. Is the cost of not writing tests as high as the cost of not washing hands? Again, it is doesn’t seems so, but in a world where the use of software is all-pervasive, it might even be higher. This is a good lesson in looking beyond the obvious.

Chapter 5 is about global warming and how there might be a cheap and simple solution to the problem – injecting sulphur compounds into the upper atmosphere. But don’t expect anyone to try it (or be allowed to try it). I find the whole issue of global warming extremely boring – I don’t think I have a single post on it here. But I suspect that the contents of this one chapter – less than a fifth of the book – will dominate most reactions to this book.

Overall, the book is a collection of a large number of interesting and thought-provoking analyses and anecdotes and the attitude of the authors is refreshingly healthy.

Religion and timezones

Several (most?) Hindus engage in ritual fasts to propitiate various gods. Apparantly (via my sister), when they travel abroad, they have a problem. They don’t know when to start or stop their fasts. What timezone do Hindu gods live in?

Ayn Rand’s contradictory life?

Via Muse Free, I came across this article in the NY Times by Adam Kirsch. From the article

When Bennett Cerf, a head of Random House, begged her to cut Galt’s speech, Rand replied with what Heller calls “a comment that became publishing legend”: “Would you cut the Bible?” …
In fact, any editor certainly would cut the Bible, if an agent submitted it as a new work of fiction. But Cerf offered Rand an alternative: if she gave up 7 cents per copy in royalties, she could have the extra paper needed to print Galt’s oration. That she agreed is a sign of the great contradiction that haunts her writing and especially her life. Politically, Rand was committed to the idea that capitalism is the best form of social organization invented or conceivable…
Yet while Rand took to wearing a dollar-sign pin to advertise her love of capitalism, Heller makes clear that the author had no real affection for dollars themselves. Giving up her royalties to preserve her vision is something that no genuine capitalist, and few popular novelists, would have done. It is the act of an intellectual, of someone who believes that ideas matter more than lucre.

Anyone who has read and bothered to understand The Fountainhead should remember the scene where Howard Roark refuses a contract for a building to protect the integrity of his vision when that contract is the only thing that can save him from bankruptcy. When asked “Do you have to be quite so fanatical and selfless about it?” Roark replies “That was the most selfish thing you’ve ever seen a man do.”

Perhaps Kirsch missed it or perhaps he just took it as an unbelievable part of the plot. ”The plotting and characterization in her books may be vulgar and unbelievable, just as one would expect from the middling Holly­wood screenwriter she once was.” Either way he has no conception of what Rand meant by selfishness or capitalism. Kirsch should read this excerpt from The Fountainhead

“Dominique,” he said softly, reasonably, “that’s it. Now I know. I know what’s been the matter all the time.”
“Has anything been the matter?”
“Wait. This is terribly important. Dominique, you’ve never said, not once, what you thought. Not about anything. You’ve never expressed a desire. Not of any kind.”
“What’s wrong about that?”
“But it’s…it’s like death. You’re not real. You’re only a body. Look, Dominique, you don’t know it, I’ll try to explain. You understand what death is? When a body can’t move any more, when it has no…no will, no meaning. You understand? Nothing. The absolute nothing. Well, your body moves–but that’s all. The other, the thing inside you, your–oh, don’t misunderstand me, I’m not talking religion, but there’s no other word for it, so I’ll say: your soul–your soul doesn’t exist. No will, no meaning. There’s no real you any more.”
“What’s the real me?” she asked. For the first time, she looked attentive; not compassionate; but, at least, attentive.
“What’s the real anyone?” he said, encouraged. “It’s not just the body. It’s…it’s the soul.”
“What is the soul?”
“It’s–you. The thing inside you.”
“The thing that thinks and values and makes decisions?”
“Yes! Yes, that’s it. And the thing that feels. You’ve–you’ve given it up.”
“So there are two things that one can’t give up: One’s thoughts and one’s desires?”
“Yes! Oh, you do understand! So you see, you’re like a corpse to everybody around you. A kind of walking death. That’s worse than any active crime. It’s…”
“Negation?”
“Yes. Just blank negation. You’re not here. You’ve never been here. If you’d tell me that the curtains in this room are ghastly and if you’d rip them off and put up some you like–something of you would be real, here, in this room. But you never have. You’ve never told the cook what dessert you liked for dinner.
You’re not here, Dominique. You’re not alive. Where’s your I?”
“Where’s yours, Peter?” she asked quietly.
He sat still, his eyes wide. She knew that his thoughts, in this moment, were clear and immediate like visual perception, that the act of thinking was an act of seeing a procession of years behind him.
“It’s not true,” he said at last, his voice hollow. “It’s not true.”
“What is not true?”
“What you said.”
“I’ve said nothing. I asked you a question.”
His eyes were begging her to speak, to deny. She rose, stood before him, and the taut erectness of her body was a sign of life, the life he had missed and begged for, a positive quality of purpose, but the quality of a judge.
“You’re beginning to see, aren’t you, Peter? Shall I make it clearer. You’ve never wanted me to be real. You never wanted anyone to be. But you didn’t want to show it. You wanted an act to help your act–a beautiful, complicated act, all twists, trimmings and words. All words. You didn’t like what I said about Vincent Knowlton. You liked it when I said the same thing under cover of virtuous sentiments. You didn’t want me to believe. You only wanted me to convince you that I believed. My real soul, Peter? It’s real only when it’s independent–you’ve discovered that, haven’t you? It’s real only when it chooses curtains and desserts–you’re right about that–curtains, desserts and religions, Peter, and the shapes of buildings. But you’ve never wanted that. You wanted a mirror. People want nothing but mirrors around them. To reflect them while they’re reflecting too. You know, like the senseless infinity you get from two mirrors facing each other across a narrow passage. Usually in the more vulgar kind of hotels. Reflections of reflections and echoes of echoes. No beginning and no end. No center and no purpose. I gave you what
you wanted. I became what you are, what your friends are, what most of humanity is so busy being–only with the trimmings. I didn’t go around spouting book reviews to hide my emptiness of judgment–I said I
had no judgment. I didn’t borrow designs to hide my creative impotence–I created nothing. I didn’t say that equality is a noble conception and unity the chief goal of mankind–I just agreed with everybody.
You call it death, Peter? That kind of death–I’ve imposed it on you and on everyone around us. But you–you haven’t done that. People are comfortable with you, they like you, they enjoy your presence. You’ve spared them the blank death. Because you’ve imposed it–on yourself.”

But then, Kirsch probably won’t understand it anyway.

And while I am at it, consider this from Kirsch’s article

Rand’s particular intellectual contribution, the thing that makes her so popular and so American, is the way she managed to mass market elitism — to convince so many people, especially young people, that they could be geniuses without being in any concrete way distinguished. Or, rather, that they could distinguish themselves by the ardor of their commitment to Rand’s teaching. The very form of her novels makes the same point: they are as cartoonish and sexed-up as any best seller, yet they are constantly suggesting that the reader who appreciates them is one of the elect.

Mass market elitism? Talk about contradictions. Elitism, by definition, cannot have a mass market. Yet, Kirsch is desperate to label Rand’s ideas as elitist. Why?

Computability and Free Will

In this post I will draw on a proof from Roger Penrose’s book Shadows of the mind that I think is important to the free will issue. The proof goes like this.

Consider an algorithm that takes a single positive integer as an input. Depending on the input and the algorithm itself, either the algorithm terminates in a finite time or it does not. In the first case the algorithm is said to stop.

Define a mapping from the set of natural numbers to the set of algorithms (of the kind above). A1, A2, A3 … Let Ai(n) denote the ith such algorithm operating on the input n.

Let B be an algorithm that also takes a single input, such that B(n) stops if it determines that An(n) does not stop. Since B is an algorithm of the same class of algorithms (taking a single input), it exists at some location in the list of As. Let B = Am. That is, Am(n) stops if An(n) does not stop

Consider the operation of B (= Am) with the input m. B(m) = Am(m) stops if Am(m) does not stop. That is, the task of B(m) is to stop if it is able to determine that it itself does not stop. If B(m) stops, we have a contradiction. Therefore B(m) does not stop. Therefore B is unable to determine that its own operation on the input m does not stop.

Now suppose that B represents all human understanding of algorithms that can be expressed as an algorithm. All of this algorithmic understanding is unable to detemine that B(m) does not stop. But we as humans are able to determine that B(m) does not stop.

Therefore atleast some aspect of human understanding is non-algorithmic. (Or in other words, the human mind can solve some problems that are not computable)

Penrose intended this proof (which parallels Godel’s proof of the incompleteness theorem) to debunk the claims of strong AI (artificial intelligence) that the human mind works by just “running” a higly evolved and complex algorithm. He explicitly steered clear of taking any position on the issue of determinism. And with good reason. Computability is not the same as determinism. A non-computable process can still be fully deterministic.

Most people who deny free will do so because they cannot reconcile free will with present day science. But Penrose’s proof conclusively demonstrates that present-day science (all the physical theories widely accepted in physics today are computable)  is incapable of explaining human understanding. It is not just that present day science does not have a theory of the mind. It cannot have a theory of the mind even in principle. Penrose argues that we need a non-computable theory in physics.

While this is not a proof of free will (without a scientific breakthrough, I don’t see how the existence of free will can be proved), it destroys the most common arguement against free will – the success of present day science (physics in particular).

Mises on The Free-Will Controversy

From Chapter 5 of Mises’ Theory and History,

Man chooses between modes of action incompatible with one another. Such decisions, says the free-will doctrine, are basically undetermined and uncaused; they are not the inevitable outcome of antecedent conditions. They are rather the display of man’s inmost disposition, the manifestation of his indelible moral freedom. This moral liberty is the essential characteristic of man, raising him to a unique position in the universe.

Determinists reject this doctrine as illusory. Man, they say, deceives himself in believing that he chooses. Something unknown to the individual directs his will. He thinks that he weighs in his mind the pros and cons of the alternatives left to his choice and then makes a decision. He fails to realize that the antecedent state of things enjoins on him a definite line of conduct and that there is no means to elude this pressure. Man does not act, he is acted upon.

Both doctrines neglect to pay due attention to the role of ideas. The choices a man makes are determined by the ideas that he adopts.

This is quite close to my own position but with a very important qualification. The choices a man makes are determined by the ideas he adopts provided he chooses to think. Mises denies that choice.

What the sciences of human action must reject is not determinism but the positivistic and panphysicalistic distortion of determinism. They stress the fact that ideas determine human action and that at least in the present state of human science it is impossible to reduce the emergence and the transformation of ideas to physical, chemical, or biological factors. It is this impossibility that constitutes the autonomy of the sciences of human action. Perhaps natural science will one day be in a position to describe the physical, chemical, and biological events. which in the body of the man Newton necessarily and inevitably produced the theory of gravitation. In the meantime, we must be content with the study of the history of ideas as a part of the sciences of human action.

The sciences of human action by no means reject determinism. The objective of history is to bring out in full relief the factors that were operative in producing a definite event. History is entirely guided by the category of cause and effect. In retrospect, there is no question of contingency. The notion of contingency as employed in dealing with human action always refers to man’s uncertainty about the future and the limitations of the specific historical understanding of future events. It refers to a limitation of the human search for knowledge, not to a condition of the universe or of some of its parts.

Having denied the choice to think, Mises treats determinism and causality as equivalent and rejects the notion of contingency for past actions. It will be interesting to see where this takes him in later chapters. One consequence is already apparant though - on his view of morality. A determinist cannot logically be a moralist and indeed Mises is not. Like Taleb, he denies the possibility of a normative science. In earlier chapters, Mises writes that the only possible judgement of human action is whether a particular means leads to a particular end. Ends cannot be judged. Adopting utilitarianism, he goes on to write about justice: “The ultimate yardstick of justice is conduciveness to the preservation of social cooperation. Conduct suited to preserve social cooperation is just, conduct detrimental to the preservation of society is unjust.”

Just goes to show how important the foundational branches of philosophy are.

Tradeoffs as Debt

From the latest post in Rico Mariani’s series on the history of Visual Studio

Debt is a great way to think about trade-offs: every time you make a choice that isn’t right in the long term, any short-cut, accumulates some debt.  Any bug you choose to defer, that’s debt.  Some debt you should write-off, that fix just isn’t happening, some you should address, but always you should be aware that you’ll have to deal with it sooner or later, and it may as well be sooner.