Showing posts with label Causal Models. Show all posts
Showing posts with label Causal Models. Show all posts

Monday, April 19, 2010

Causal Models (Part 1): Constructing a Causal Model



This post is part of my series on Steve Sloman's book Causal Models. For an index, see here.

Over the next few posts, I will be going through Chapter 4 of Sloman's book. In this chapter, Sloman introduces the causal model framework that is currently in vogue with computer scientists and statisticians. Sloman's presentation of this is based on the more comprehensive version provided by Judea Pearl.

The causal model framework provides an abstract language for representing causal systems. It is a graphical probabilistic model. In other words, it allows us to model a causal system even if we are ignorant or uncertain about the likelihood of something happening. In doing so, it relies on Bayesian network theory.

In this part I will simply sketch the main components of this modeling framework. Fuller consideration of the implications will have to wait.


1. The Three Parts to a Causal Model
Scientific modeling is all about representation. In other words, about depicting one state of affairs or event in terms of something else. For example, the Hodgkin-Huxley model of the action potential (discussed here) represents the flow of electrical current across the membrane of a neuron in a mathematical equation.

A causal model has three main components. First, there is the causal system that you want to represent. Second, there is a set of probability distributions that represent this causal system. And finally, there is the graph that represents both the causal system and the associated probability distribution.

The basic schematic for all causal models is illustrated below. The arrows are to indicate what is represented by what.


It is difficult to make sense of this in the abstract, so let's consider an example. Fire is a causal system. It includes oxygen, an energy source, and sparks, all of which contribute to produce the entity or event we call "fire".

Fire can be represented by a set of probability distributions. First, there is the marginal probability of the fire occurring, i.e. Pr(Fire) in the absence of other conditions. We can assume that this probability is low. Second, there is the conditional probability of the fire, i.e. the probability of the fire given certain conditions. So, for example, the probability of fire given the presence of oxygen, sparks and an energy source is high; the probability of the fire given sparks, an energy source but no oxygen is low; and so on.

Fire can also be represented as a causal graph. This is a simple box and arrow diagram showing the causal relations between oxygen, sparks, energy sources and fire. In this instance, the three conditions jointly contribute to the production of fire. 

This gives us the following model.



2. Independence
It is possible to derive conditional probabilities for virtually everything. For example, I could work out the probability of my laptop exploding given the presence of a full moon. I would probably find that the probability of my laptop exploding is unchanged by the presence of the full moon. In other words that the marginal probability of the exploding laptop is equal to the conditional probability. This implies that the events are independent.

Independence is one of the most important pieces of information we can have when constructing causal models. It allows us to make the graph and the probability distributions much simpler.


3. Structural Equations
Even relatively simple causal systems, like the fire system outlined above, can have complex sets of probability distributions associated with them.

For instance, when I first introduced the notion of conditional probability in relation to the fire-system I only listed a couple of examples. I should have listed the probability of fire given all possible states of the three conditions (oxygen, sparks and energy sources). This would be as follows:

  • Pr(Fire | sparks, oxygen, energy source) = High
  • Pr(Fire | sparks, oxygen, no energy source) = 0
  • Pr(Fire | sparks, no oxygen, energy source) = 0
  • Pr(Fire | sparks, no oxygen, no energy source) = 0
  • Pr(Fire | no sparks, oxygen, energy source) = very low
  • Pr(Fire | no sparks, oxygen, no energy source) = 0
  • Pr(Fire | no sparks, no oxygen, energy source) = 0
  • Pr(Fire | no sparks, no oxygen, no energy source) = 0

Even this is a simplification. It assumes that the conditions come in just two states "present" or "absent". In reality, they could assume a range of values.

If this level of complexity is present in a relatively simple example like fire, imagine the amplification of complexity when modeling a complex causal system like cancer. This would involve many variables (lifestyle factors, genetic factors) with many possible values.

To overcome this complexity, modelers use structural equations. These represent the functional relationships between the elements of the causal mechanism (illustrated by the graph) in a single equation instead of a list of probability distributions. The structural equation for the fire-system is the following:
  • Fire = f(spark, oxygen, energy source)
The f denotes a conjunction, i.e. all three conditions must be present for fire to occur. This version of the equation does not include probabilities. To do so would simply require the inclusion of an additional variable called "error" or "noise". This would represent randomness and thereby make the equation probabilistic.

That's it for now, in the next part we will tease apart the probabilistic nature of the causal modeling framework.

Monday, April 12, 2010

What is a Cause? (Part 2) Crossing the Desert



This post is part of my series on Steve Sloman's book Causal Models. For an index, see here.

I am currently working my way through Chapter 3 of Sloman's book which offers a basic introduction to the concept of causation. At the close of Part 1, causation was defined in terms of counterfactual dependence. In this part we will cover some of the problems with this definition.


1. Crossing the Desert
The problems facing the counterfactual definition are well illustrated by a famous thought experiment. I have encountered many versions of this but here I will stick with Sloman's version.

A Sheik, with a well-stocked harem, is setting out on a journey across the desert. Obviously, deserts are not always the most congenial of environments, so he needs to take some precautions. In particular, he needs to ensure he has plenty of fresh water in his water canteen.

Unbeknownst to him, all is not well in the harem. His wife and one of his mistresses are independently plotting his demise. The wife poisons the water in his canteen, while the mistress punctures the canteen so that the water slowly leaks out.

The Sheik sets out on the journey. After a few miles he feels parched. He unscrews the cap on his canteen and finds, much to his displeasure, that it is empty. He soon dies of dehydration.

Question: who caused the Sheik's death, the wife or the mistress?


2. The Mistress...Duh
The answer seems obvious to most: the mistress clearly caused the death of the Sheik. After all, he dies from dehydration not poisoning.

But this answer poses certain problems for our counterfactual definition of causation. The counterfactual definition envisages a "but for" relationship between cause and effect. Applying this to the case at hand, this entails that we must be able to say "but for the actions of the mistress the Sheik would not have died".

This statement is clearly untrue when applied to the scenario above. If the mistress had not punctured the canteen, the Sheik would still have died.

Our definition must be expanded to cover scenarios of this sort. The expansion must allow our definition to be sensitive to what actually happens while at the same time retaining the "possible worlds" aspect of causation.

This is a difficult task. Are there any solutions?


3. Mackie and the INUS
As a matter of fact there are. Perhaps the most famous attempt to deal with problem cases of this sort is that of JL Mackie. Sloman gives a quick summary of Mackie's definition, although he recommends reading the original.

It should also be noted that Sloman's book is not really about these philosophical puzzles so his discussion of Mackie is an aside.

Mackie argued that a "cause" is really only one element in a larger entity, namely a "sufficient set". The sufficient set consists of all the conditions that led to an effect. In the case of the Sheik's dehydration, the sufficient set would include: the biological needs of the human body; the physical environment of the desert; the Sheik's intention to cross the desert and the mistress's actions.

The sufficient set is not, by itself, necessary for producing an effect. This is obvious in the example given: we know that the sufficient set just described was not necessary for bringing about the Sheik's death; he could also have died from poisoning.

Mackie argued that a "cause" is actually an INUS, which is "An Insufficient but Necessary element of an Unnecessary but Sufficient set". Quite a tongue-twister, I'm sure you'll agree.

What singles out the mistress's actions as the true cause of the Sheik's death is that they are an INUS: the puncturing of the canteen is one (I) of the critical elements (N) in one (U) of the large set of conditions that led to the Sheik's death (S).

The poisoned water was not an INUS because the sufficient set that would have involved the Sheik drinking the water did not obtain.


4. Causal Graphs
Sloman's approach to causation involves the use of causal graphs. These are simple "box-and-arrow" diagrams where the boxes represent events and the arrows represent causal relations. He defines a cause as anything that can be represented as an arrow in a causal graph.

If that sounds philosophically suspicious (defining cause in terms of causal arrows?) that's because it is. Sloman acknowledges this but argues it is okay because the framework can explain how human beings use causal knowledge.

The causal graph approach actually suggests a simple answer to the Crossing the Desert thought experiment. There is a potential causal pathway leading from the wife's actions to the sheik's death; there is also a potential causal pathway leading from the mistress's actions to the sheik's death. However, the mistress's causal pathway interrupts or displaces the wife's causal pathway. This is illustrated below.


This approach to causation is developed to a much higher degree of sophistication in Chapter 4 of Sloman's book. We will be looking at that in due course.


5. Other Types of Invariant
Sloman closes chapter 3 by looking at how broad our theory of causation should be. He notes that a theory that explains everything explains nothing. There is then a fear that the theory of causal modeling outlined in his book could be explanatorily empty.

Sloman tries to head-off this criticism by looking at the concept of invariance. In chapter 2, Sloman had argued that causation is a type of invariance. In this chapter 3 he notes that it is not the only type of invariance. And since the theory he develops does not cover all types of invariance it is not, prima facie, explanatorily empty.

Other types of invariance would include part-whole relations, class-subclass relationships. These types of invariance are covered by set theory. This theory deals with a variety of logical relationships but it does not deal with the logic of causal intervention (as we shall see).

Likewise, probability theory covers other types of invariance (frequencies etc.) and overlaps considerably with causation theory. However, they are not equivalent. This is because probabilities can be applied to correlations and, as we saw in Part 1, correlation is not causation.

In the next entry in this series I will look at Chapter 4 of Sloman's book.

What is a Cause? (Part 1) The Counterfactual Approach


This post is part of my series on Steve Sloman's book Causal Models. For an index, see here.

Over the next two posts I will run through the concepts introduced and discussed in Chapter 3 of the book. The chapter offers a very basic counterfactual definition of causation and then mentions some problems with this definition. 

To some extent the chapter is little more than a gentle warm-up, preparing the reader for the more detailed model of causation that follows in Chapters 4 and 5. That said, it offers a reasonably succinct introduction to some classic issues in the philosophy of causation.

Part One will set out the main features of the counterfactual definition; Part Two will cover the problem cases.


1. Event-Event Causation
Sloman begins by noting that the most common vocabulary of causation is that of event-event causation. In other words, in talking about causation most people are talking about how one event or state of affairs (smoking cigarettes) leads to another event or state of affairs (addiction or cancer).

There are more exotic forms of causation discussed in the literature. Perhaps most famously there is the notion of agent-causation. The idea here is that agents (or persons or souls if you like) cause events in a unique way. This idea is popular among some in the free will debate.

My own feeling is that there is no coherent concept of agent-causation, but one would need to swim through a sea of philosophical verbiage to make the point. There is no point in doing that here.


2. Experiments: Identifying Causes
After that brief introduction, Sloman moves on to consider how we identify causation. He does by noting the first law of psychology: correlation is not causation.

A correlational study merely identifies when two variables happen to go together. In this sense, a correlational study is merely descriptive: it has no deeper explanatory significance.

For example, a correlational study might find that those possessing two X chromosomes are more likely to have long hair. Does this mean that having two X chromosomes causes long-hairedness, or vice versa? Of course not, the fact that long-hair and two X chromosomes go together is likely the result of some third factor (cultural norms).

To work out whether one event causes another we need to do more than describe events; we need to perform an experiment.

The simplest form of experiment deals with two variables: an independent variable (IV) and the dependent variable (DV). We will have some hunch that there is a causal link between the IV and the DV. The goal of the experiment is to see whether this hunch is correct.

In the experiment, the value of the IV is manipulated and the change in the value of the DV is recorded. If the manipulation of the IV consistently results in a variation of the DV, we can infer a causal link. Although we should always be cautious in making such inferences. 


To give an example, suppose we wish to know whether punishing our children (e.g. taking away pocket money and/or grounding them) changes their behaviour. To do this we need to vary the amount of punishment and record the resulting changes (if any) in the behaviour.

Of course, good experimental design is more complicated than this example suggests. As Sloman notes, a good experiment must do two things:
  1. It must use a manipulation technique that is precise. In other words, it must make sure that other potential causes are not being manipulated at the same time.
  2. It must use the right statistical tools to detect the effect. In particular, it must ensure that the difference in the value of the DV is not due to random chance.

3. Counterfactual Dependence
One important feature of the experimental method is its ability to compare two or more possible worlds. In one world the value of the IV and the DV are at one level, and in another world they are at a different level.

This is crucial because the most popular definition of causation is counterfactual in nature. So to infer causation, it is not enough to just say that one event follows or precedes another. You must also be able to say that, in another world, if the first event had not occurred then neither would the second. This is known as counterfactual dependence and is illustrated (poorly) below.



To sum up: a causal statement is not a mere description of the actual world; it is a statement about two (or more) possible worlds simultaneously.

That's enough for now. In the next post we will deal with one classic problem facing the counterfactual definition of causation.