WEBVTT 1 00:00:45.840 --> 00:00:49.110 David Stephens, Prof: Okay, good morning, we're at the half hour, so I'm gonna… 2 00:00:49.620 --> 00:00:51.969 David Stephens, Prof: Make a start, even though, 3 00:00:52.910 --> 00:00:55.230 David Stephens, Prof: The number of participants is a bit… 4 00:00:55.610 --> 00:01:02.790 David Stephens, Prof: lower than the number of people that have signed up. But anyway, we'll keep going for the moment. People can sign on in the next few minutes. 5 00:01:03.090 --> 00:01:17.890 David Stephens, Prof: Okay, so this is the module on using Causal graphs in epidemiological research. My name's Dave Stevens, I'm professor in the Department of Mathematics and Statistics in McGill University, Montreal. 6 00:01:18.230 --> 00:01:22.910 David Stephens, Prof: So, here in the eastern time zone, it's just coming up to 11.30. 7 00:01:23.360 --> 00:01:29.499 David Stephens, Prof: And, so this is, a module that is… 8 00:01:29.740 --> 00:01:36.970 David Stephens, Prof: Intending to give an introduction to… Use of graphical modeling in 9 00:01:37.520 --> 00:01:48.889 David Stephens, Prof: Epidemiological research, to give you an idea of the roles that causal graphs can play in planning of statistical analyses. 10 00:01:49.430 --> 00:02:05.909 David Stephens, Prof: And, this kind of formulation is quite common in epidemiological research, biostatistics, public health research. And what I wanted to do is to put together a little module to explain some of the terminology, some of the concepts. 11 00:02:06.030 --> 00:02:16.870 David Stephens, Prof: And to show how… This material can really inspire, or help, or at least aid, real, real-world analyses. 12 00:02:17.530 --> 00:02:27.280 David Stephens, Prof: So, we've got, A module that's gonna last, until, 12… 13 00:02:27.580 --> 00:02:30.759 David Stephens, Prof: 12pm on the… on the West Coast, and 14 00:02:31.090 --> 00:02:33.690 David Stephens, Prof: 3pm on the, in the Eastern time zone. 15 00:02:34.450 --> 00:02:39.690 David Stephens, Prof: We're gonna do, basically, hour and a half, And then… 16 00:02:40.740 --> 00:02:45.190 David Stephens, Prof: Half an hour break, and then, finish off with an hour and a half up until the… 17 00:02:45.500 --> 00:02:48.250 David Stephens, Prof: the, 12pm or 3pm close. 18 00:02:48.860 --> 00:02:56.230 David Stephens, Prof: And I'm gonna do 45 minutes, and then a 5-minute break, and then… Continue with the, 19 00:02:57.030 --> 00:02:59.290 David Stephens, Prof: The half module, after that. 20 00:02:59.800 --> 00:03:02.040 David Stephens, Prof: So this is the plan for the content. 21 00:03:02.170 --> 00:03:11.779 David Stephens, Prof: And… The background is always that we're going to be constructing models for observed data. 22 00:03:12.210 --> 00:03:15.629 David Stephens, Prof: And we're gonna try, ultimately, to… 23 00:03:15.790 --> 00:03:22.749 David Stephens, Prof: Put ourselves in a position of being able to understand causal structures, That are, 24 00:03:23.660 --> 00:03:30.539 David Stephens, Prof: That are maybe going to be imposed by the models that we want to fit, and the conclusions that we want to draw. 25 00:03:30.800 --> 00:03:37.619 David Stephens, Prof: And then to see how graphical models can assist in our understanding of the models that should be fitted. 26 00:03:38.060 --> 00:03:42.369 David Stephens, Prof: When we have a particular conception of the data structure that we're dealing with. 27 00:03:44.090 --> 00:03:52.190 David Stephens, Prof: So here is the basic, layout of the structure. So we'll start off talking about probability distribution, so there'll be a… 28 00:03:52.340 --> 00:03:53.110 David Stephens, Prof: Quite… 29 00:03:53.590 --> 00:04:11.229 David Stephens, Prof: mathematical, although simple, presentation of the kinds of probability models that I'm dealing with. And then, to try to get a handle on the importance of the causal thinking, we're going to start talking about the notions of independence and conditional independence. 30 00:04:12.420 --> 00:04:19.310 David Stephens, Prof: And then… And then, to try to… 31 00:04:19.690 --> 00:04:23.349 David Stephens, Prof: Think about how we can embed those in a graphical 32 00:04:23.590 --> 00:04:29.249 David Stephens, Prof: structure that's going to aid our statistical analyses. As part of that, we're going to see 33 00:04:29.920 --> 00:04:34.300 David Stephens, Prof: How we can talk about cause and effect Through these graphs. 34 00:04:34.560 --> 00:04:39.150 David Stephens, Prof: To really pin down what we mean by causal conclusions. 35 00:04:39.780 --> 00:04:48.910 David Stephens, Prof: So there'll be a very important concept there, the idea of a structural model that's going to tie our conceptualization of the data structure 36 00:04:49.120 --> 00:04:56.150 David Stephens, Prof: Into a specific mechanism via which we can understand the Causal impact. 37 00:04:56.850 --> 00:05:01.310 David Stephens, Prof: In our modeling framework, anyway, of… 38 00:05:02.030 --> 00:05:05.299 David Stephens, Prof: One of the variables on another one of the variables. 39 00:05:06.530 --> 00:05:08.970 David Stephens, Prof: What we'll see in the, in the, 40 00:05:09.620 --> 00:05:27.649 David Stephens, Prof: In that understanding of the structural models, though, is that in the real world, data… our conceptualization of the data structure, the observed data structure, needs to be quite complicated, because we've got many variables that are interacting with each other. 41 00:05:28.030 --> 00:05:34.820 David Stephens, Prof: And what we'll see is that to understand the causal effect of one variable on another, we have to account for the presence of those other variables. 42 00:05:35.470 --> 00:05:41.750 David Stephens, Prof: So we'll talk about paths in the graphical structure, we'll see the importance of 43 00:05:42.320 --> 00:05:48.080 David Stephens, Prof: different types of path, we'll think about how to, identify the 44 00:05:48.710 --> 00:05:56.360 David Stephens, Prof: paths of interest to us, and I had to remove those, or account for the presence of those other paths, which would, 45 00:05:56.480 --> 00:05:58.479 David Stephens, Prof: Be otherwise problematic to us. 46 00:05:59.050 --> 00:06:08.260 David Stephens, Prof: And then the final concept that I'm going to really think about is this idea of de-separation, which is a form of conditional independence. 47 00:06:08.670 --> 00:06:12.590 David Stephens, Prof: That's going to allow us to directly target particular Causal effects. 48 00:06:13.280 --> 00:06:27.289 David Stephens, Prof: Okay? So this is the structure of the module. If you've got, questions, you can post them into the chat. I might not address them immediately. Maybe I'll save them till the end of the session. But, 49 00:06:27.980 --> 00:06:37.230 David Stephens, Prof: You can always contact me directly by email, as on the email address that I've given here, or through the Slack channel, if you've got particular questions. 50 00:06:37.570 --> 00:06:46.599 David Stephens, Prof: Alright, so… To start off on the material, what we can say is that in many settings. 51 00:06:47.240 --> 00:06:53.289 David Stephens, Prof: The purpose of… Applied research is to… really to draw 52 00:06:53.950 --> 00:06:57.930 David Stephens, Prof: To be able to draw causal conclusions from observational data. 53 00:06:58.380 --> 00:07:01.310 David Stephens, Prof: And… the… 54 00:07:01.880 --> 00:07:08.980 David Stephens, Prof: The distinction that it's important to make, of course, is the difference between the kind of data that we see in this observational setting. 55 00:07:09.380 --> 00:07:23.400 David Stephens, Prof: And what we might think of as a more gold standard for investigating causal effects of variables, which is the experimental setting. So in the experimental setting, this is, of course, where the treatment is assigned by the researcher. 56 00:07:23.880 --> 00:07:35.040 David Stephens, Prof: Independent of other confounding factors. And, in general, what we can say in that experimental setting, where there is an intervention to change a treatment level. 57 00:07:35.580 --> 00:07:37.350 David Stephens, Prof: From one level to another, say. 58 00:07:37.930 --> 00:07:41.630 David Stephens, Prof: It is possible to directly isolate. 59 00:07:41.750 --> 00:07:44.869 David Stephens, Prof: The impact of that intervention on the outcome. 60 00:07:45.750 --> 00:07:48.190 David Stephens, Prof: And we can associate that with a causal. 61 00:07:48.680 --> 00:07:49.470 David Stephens, Prof: Effect. 62 00:07:51.100 --> 00:07:56.090 David Stephens, Prof: In an observational setting, though, We have no such intervention. 63 00:07:56.850 --> 00:08:05.400 David Stephens, Prof: And we are essentially observing, let's say, treatment and outcome, and any other variables involved, simultaneously. 64 00:08:06.700 --> 00:08:11.259 David Stephens, Prof: And in that setting, it's difficult to tease out the specific effect 65 00:08:12.140 --> 00:08:14.960 David Stephens, Prof: Of the treatment from the effects of other variables. 66 00:08:16.280 --> 00:08:20.130 David Stephens, Prof: And, therefore, on the surface, It might be… 67 00:08:20.280 --> 00:08:28.190 David Stephens, Prof: difficult to conceive of how we can make causal statements in that setting. We're observing this collection of variables together. 68 00:08:28.870 --> 00:08:30.300 David Stephens, Prof: How can we tell? 69 00:08:30.600 --> 00:08:34.969 David Stephens, Prof: What the impact of one of the variables is on any of the others. 70 00:08:36.320 --> 00:08:43.489 David Stephens, Prof: Well, of course, there's a whole framework for causal inference that's been built now in the statistical, and indeed other settings. 71 00:08:44.080 --> 00:08:51.529 David Stephens, Prof: That, show us how causal conclusions from observational data are indeed possible. 72 00:08:57.420 --> 00:09:01.560 David Stephens, Prof: So, to be very specific about what we mean by causal inference. 73 00:09:04.470 --> 00:09:12.670 David Stephens, Prof: we can, again, conceptualize it as looking at the effect of intervention. So, in particular. 74 00:09:12.960 --> 00:09:19.980 David Stephens, Prof: We might say that the effect… the objective of causal inference is to quantify the effect of an intervention in a multivariable system. 75 00:09:20.180 --> 00:09:25.890 David Stephens, Prof: We are able to manipulate one of the variables, let's say, let's call that the treatment or the exposure. 76 00:09:26.300 --> 00:09:31.300 David Stephens, Prof: We're able to manipulate that, In isolation from all of the other variables. 77 00:09:32.440 --> 00:09:38.249 David Stephens, Prof: In that setting, We want to report the impact of that manipulation on 78 00:09:38.440 --> 00:09:41.740 David Stephens, Prof: Let's say an outcome of interest, a response of interest. 79 00:09:44.830 --> 00:09:47.759 David Stephens, Prof: So in many settings, in public health and epidemiology. 80 00:09:49.000 --> 00:09:51.730 David Stephens, Prof: Causal inference is really the goal. 81 00:09:51.900 --> 00:09:58.720 David Stephens, Prof: We are looking to assess the impact of one variable on another identified variable. 82 00:10:02.780 --> 00:10:17.869 David Stephens, Prof: And this idea of being able to manipulate what that input variable is is very important. So in a causal setting, we insist on the capability of manipulation, so we have to be able to intervene to change the level of one of the variables. 83 00:10:19.100 --> 00:10:21.750 David Stephens, Prof: And then inspect its impact on the other variables. 84 00:10:23.340 --> 00:10:26.190 David Stephens, Prof: Okay, so that's the primary objective in many settings. 85 00:10:26.870 --> 00:10:35.010 David Stephens, Prof: So, I'm gonna start off by building the framework by introducing some notation. So, the mathematical notation here is hopefully fairly straightforward. 86 00:10:36.320 --> 00:10:45.030 David Stephens, Prof: there'll be a few references to probability distributions later on. I won't give a full probability treatment, I'll just basically give an idea of… 87 00:10:45.260 --> 00:10:47.229 David Stephens, Prof: The necessary concepts. 88 00:10:48.040 --> 00:10:57.329 David Stephens, Prof: So we're going to collect… let's imagine we're going to collect our data. There are going to be 3 variables, X, Y, and Z. In my notation, X is the collection of 89 00:10:57.500 --> 00:11:00.990 David Stephens, Prof: predictors of an outcome. 90 00:11:02.010 --> 00:11:10.290 David Stephens, Prof: Otherwise called covariates, and sometimes they'll be called confounders, and we'll see the specific definition of the notion of a confounder later on. 91 00:11:11.390 --> 00:11:14.049 David Stephens, Prof: Y is going to be the outcome variable. 92 00:11:14.230 --> 00:11:17.129 David Stephens, Prof: And Z is going to be the treatment or exposure variable. 93 00:11:18.530 --> 00:11:25.049 David Stephens, Prof: And our task, in the Causal inference setting, is to look at the effect of changing Z on Y. 94 00:11:25.780 --> 00:11:28.560 David Stephens, Prof: Acknowledging that the X's are also there. 95 00:11:29.610 --> 00:11:31.709 David Stephens, Prof: Okay? So that's the setting. 96 00:11:31.940 --> 00:11:41.440 David Stephens, Prof: X, Y, and Z. And I'm gonna, in a typical observational data setting, I'm gonna be able to collect data of all of these variables together, so there are going to be n data points, let's say. 97 00:11:42.730 --> 00:11:47.650 David Stephens, Prof: Okay? So, on the basis of those Observe data. 98 00:11:49.940 --> 00:11:58.589 David Stephens, Prof: I want to, identify the causal effect, the effect of manipulating Z on Y. So, in order to talk about this. 99 00:11:59.010 --> 00:12:06.780 David Stephens, Prof: I'm going to introduce another specific bit of notation, which is the idea of a counterfactual. 100 00:12:08.320 --> 00:12:17.530 David Stephens, Prof: So again, the concept is fairly straightforward. I'm going to deal with it in the simplest case, where I'm going to compare, let's say, treated and untreated individuals. 101 00:12:17.660 --> 00:12:26.769 David Stephens, Prof: Okay? So, at the moment, I'm not really directly talking about the observed data, I'm talking about how I'm gonna report 102 00:12:27.030 --> 00:12:28.990 David Stephens, Prof: The effect of changing treatment. 103 00:12:30.680 --> 00:12:41.099 David Stephens, Prof: Okay, so let's say I want to imagine the causal effect of changing the treatment Z on the outcome Y if I change the treatment from Z0 to Z1. 104 00:12:42.460 --> 00:12:45.560 David Stephens, Prof: So it could be from… 105 00:12:45.970 --> 00:12:48.200 David Stephens, Prof: Untreated to treated, let's say. 106 00:12:49.470 --> 00:12:52.079 David Stephens, Prof: Z0 is 0, Z1 is 1. 107 00:12:53.670 --> 00:12:54.550 David Stephens, Prof: So. 108 00:12:54.760 --> 00:13:08.129 David Stephens, Prof: In order to talk about the Causal effect, I'm going to introduce the idea of a potential or counterfactual outcome, and I'm going to denote that in this way. It's a random variable, but it's, in a sense, indexed by 109 00:13:08.480 --> 00:13:09.410 David Stephens, Prof: Zad? 110 00:13:09.940 --> 00:13:11.440 David Stephens, Prof: This little red Z. 111 00:13:12.140 --> 00:13:19.500 David Stephens, Prof: And I'm going to use that notation to mean the outcome If I intervene. 112 00:13:19.940 --> 00:13:24.200 David Stephens, Prof: to set the treatment equal to little red side. So this is what I would get 113 00:13:25.420 --> 00:13:29.530 David Stephens, Prof: in the response, if I were to set the treatment equal to little red z. 114 00:13:30.550 --> 00:13:39.309 David Stephens, Prof: So, for example, if there are two levels of possible treatment or exposure, so let's say untreated and treated, I'm going to use 115 00:13:39.500 --> 00:13:45.269 David Stephens, Prof: Little red z equal to 0, and little red z equal to 1, to represent those two cases. 116 00:13:45.820 --> 00:13:48.630 David Stephens, Prof: And the counterfactual outcomes corresponding. 117 00:13:49.320 --> 00:13:53.929 David Stephens, Prof: to those two levels are going to be Y0 and Y1. 118 00:13:55.950 --> 00:13:56.610 David Stephens, Prof: Okay. 119 00:13:57.680 --> 00:14:01.339 David Stephens, Prof: Now, the observed outcome is gonna be easily 120 00:14:01.460 --> 00:14:06.769 David Stephens, Prof: written in this way, so this is just saying that the observed outcome that I get 121 00:14:07.460 --> 00:14:12.799 David Stephens, Prof: Is this counterfactual outcome, if, in fact, the person is not treated. 122 00:14:14.220 --> 00:14:18.649 David Stephens, Prof: And this counterfactual outcome if, in fact, the person is treated. 123 00:14:20.970 --> 00:14:21.660 David Stephens, Prof: Okay? 124 00:14:22.340 --> 00:14:30.179 David Stephens, Prof: So… This is just a framework to allow me to talk about The Causal effect. 125 00:14:30.850 --> 00:14:31.910 David Stephens, Prof: of ZA 126 00:14:33.270 --> 00:14:43.979 David Stephens, Prof: Because concretely from this formulation, what I can say is, well, the Causal effect of Z is just the difference between the Y bracket 1 and the Y bracket 0 127 00:14:44.490 --> 00:14:47.080 David Stephens, Prof: If I want to imagine the treatment. 128 00:14:47.290 --> 00:14:49.550 David Stephens, Prof: Changing from level 0 to level 1. 129 00:14:53.930 --> 00:15:00.499 David Stephens, Prof: So… This framework imagines the following Data generating mechanism. 130 00:15:02.160 --> 00:15:05.860 David Stephens, Prof: When talking about this idea of intervention, or manipulation. 131 00:15:06.000 --> 00:15:12.369 David Stephens, Prof: It says, Well, each individual walks in through the door, bringing their characteristics X with them. 132 00:15:17.590 --> 00:15:23.429 David Stephens, Prof: Now… Hypothetically, before I see the observed treatment. 133 00:15:24.330 --> 00:15:32.240 David Stephens, Prof: I imagine what the outcome for that individual would be, Corresponding to that treatment. 134 00:15:33.210 --> 00:15:37.270 David Stephens, Prof: And I say that that hypothetical quantity 135 00:15:37.470 --> 00:15:40.150 David Stephens, Prof: Is determined by the person's characteristics. 136 00:15:43.160 --> 00:15:46.029 David Stephens, Prof: So I'm imagining what's going to happen. 137 00:15:47.530 --> 00:15:51.670 David Stephens, Prof: In terms of the response, when treated at level, Little Red said. 138 00:15:52.550 --> 00:15:55.520 David Stephens, Prof: And I'm gonna say that that's determined entirely by X. 139 00:15:57.500 --> 00:15:58.200 David Stephens, Prof: Okay? 140 00:16:02.360 --> 00:16:06.490 David Stephens, Prof: Then, at the final stage, what I do is I observe 141 00:16:06.610 --> 00:16:09.309 David Stephens, Prof: The level of treatment that somebody actually had. 142 00:16:11.430 --> 00:16:17.020 David Stephens, Prof: And the corresponding outcome, Equal to the corresponding counterfactual. 143 00:16:18.650 --> 00:16:20.810 David Stephens, Prof: Okay? So this is the framework. 144 00:16:24.940 --> 00:16:30.530 David Stephens, Prof: So… In experimental studies, Where we… so… 145 00:16:30.650 --> 00:16:36.250 David Stephens, Prof: Clinical trials, where we impose a treatment on somebody, then… 146 00:16:38.010 --> 00:16:41.070 David Stephens, Prof: We're carrying out exactly the right kind of intervention. 147 00:16:41.660 --> 00:16:47.630 David Stephens, Prof: Because we are maybe randomly assigning Z, but we're doing it independently of X. 148 00:16:48.570 --> 00:16:49.260 David Stephens, Prof: Right. 149 00:16:49.820 --> 00:16:58.869 David Stephens, Prof: So, in a typical randomized study, what we'll do, we'll be… we'll collect a large cohort of individuals to experiment on. 150 00:16:59.010 --> 00:17:02.500 David Stephens, Prof: Each of them bringing their own, X values with them. 151 00:17:04.369 --> 00:17:09.600 David Stephens, Prof: We then assign the treatment, according to a coin flip or some other randomization mechanism. 152 00:17:10.900 --> 00:17:12.810 David Stephens, Prof: That assigns them Z. 153 00:17:14.020 --> 00:17:23.340 David Stephens, Prof: And then for our causal contrast, what we can do is to say, well, let's compare those people that were treated with those people that were not treated. 154 00:17:24.160 --> 00:17:26.640 David Stephens, Prof: And that gives us an estimate of the causal effect. 155 00:17:26.760 --> 00:17:27.940 David Stephens, Prof: Because… 156 00:17:28.700 --> 00:17:36.490 David Stephens, Prof: We know that the treatment assignment, the intervention to set the level of the treatment, is independent of X. 157 00:17:40.020 --> 00:17:45.229 David Stephens, Prof: That's the gold standard for, clinical investigation. 158 00:17:46.470 --> 00:17:47.990 David Stephens, Prof: If we want to get a Causal effect. 159 00:17:50.480 --> 00:17:58.190 David Stephens, Prof: Of course, most often, outside of the trial context, we're presented not with an experimental 160 00:17:58.690 --> 00:18:03.100 David Stephens, Prof: study, but instead an observational study. In that case. 161 00:18:03.330 --> 00:18:13.339 David Stephens, Prof: The researcher, the experimenter, the PI, is not the person intervening to set the treatment level. Instead, it's being observed as part of the data collection. 162 00:18:13.860 --> 00:18:16.960 David Stephens, Prof: So we're observing X, Y, and Z simultaneously. 163 00:18:21.540 --> 00:18:27.940 David Stephens, Prof: And, in that case, We can't for sure say that Zed 164 00:18:29.010 --> 00:18:35.660 David Stephens, Prof: is being assigned independent of X. It might be that the person's characteristics are determining 165 00:18:35.880 --> 00:18:37.810 David Stephens, Prof: What level of treatment they get. 166 00:18:39.500 --> 00:18:47.179 David Stephens, Prof: So, what that means is that we can't fairly compare the outcomes for those individuals who were treated and those who were not treated. 167 00:18:47.430 --> 00:18:52.030 David Stephens, Prof: Because they are fundamentally different. 168 00:18:52.790 --> 00:19:01.029 David Stephens, Prof: They come from essentially different subpopulations. The subpopulation indexed by Z equals 0, It's different from the subpopulation. 169 00:19:01.430 --> 00:19:03.060 David Stephens, Prof: indexed by Z equals 1. 170 00:19:04.560 --> 00:19:07.449 David Stephens, Prof: So those populations are not directly comparable. 171 00:19:08.790 --> 00:19:12.720 David Stephens, Prof: We can't carry out causal inference without further adjustment. 172 00:19:12.880 --> 00:19:19.770 David Stephens, Prof: And… Causal inference, in general, is… is… 173 00:19:23.000 --> 00:19:32.099 David Stephens, Prof: So, in this description, so this is, I think, a fairly well-understood collection of ideas to do with the difference between observational and experimental. 174 00:19:32.280 --> 00:19:37.370 David Stephens, Prof: studies. I talked a little bit about the idea of, intervention being a key component. 175 00:19:37.870 --> 00:19:41.810 David Stephens, Prof: But I've also mentioned terms like independence. 176 00:19:43.010 --> 00:19:47.140 David Stephens, Prof: one point, I think I mentioned conditional independence. And… 177 00:19:49.230 --> 00:19:57.299 David Stephens, Prof: These concepts turn out to be key in, really, the statistical formulation of causal inference models. 178 00:19:58.860 --> 00:20:04.340 David Stephens, Prof: And I would argue that to really study cause and effect through a probabilistic framework. 179 00:20:04.530 --> 00:20:14.450 David Stephens, Prof: we need to understand more fully the probabilistic relationship between the variables. So much of this module today is going to be about discussing that particular issue. 180 00:20:14.710 --> 00:20:20.420 David Stephens, Prof: the… The particular, structures we need in place. 181 00:20:20.900 --> 00:20:32.480 David Stephens, Prof: As encapsulated in causal graphs to allow us To really get at… Causal relationships between variables. 182 00:20:34.150 --> 00:20:38.330 David Stephens, Prof: So, we need to build… Essentially, probability models. 183 00:20:38.430 --> 00:20:42.669 David Stephens, Prof: The probability models will inspire the statistical models that follow. 184 00:20:44.250 --> 00:20:45.000 David Stephens, Prof: Okay? 185 00:20:45.150 --> 00:20:46.030 David Stephens, Prof: So… 186 00:20:48.640 --> 00:21:02.210 David Stephens, Prof: as a little working example, and the… there's a… in the other document that I've provided, there's a… there's a simulation of this setting, so here is a possible observational study. 187 00:21:03.510 --> 00:21:08.770 David Stephens, Prof: We've got, this is an HIV study, where we've got, 188 00:21:09.970 --> 00:21:14.380 David Stephens, Prof: CD4 count as being an outcome variable. 189 00:21:15.350 --> 00:21:19.939 David Stephens, Prof: D is the assignment of a HIV drug, let's say, a particular HIV drug. 190 00:21:21.260 --> 00:21:24.109 David Stephens, Prof: But there are other, variables that are involved. 191 00:21:24.320 --> 00:21:33.220 David Stephens, Prof: What we're interested in doing is, if we could intervene to change D from, let's say, 192 00:21:34.420 --> 00:21:38.620 David Stephens, Prof: no drug intervention to the, HIV drug intervention. 193 00:21:39.260 --> 00:21:41.910 David Stephens, Prof: what effect would that have on the CD4 count? 194 00:21:43.250 --> 00:21:53.099 David Stephens, Prof: So this is an example inspired by the… one of the R packages that I'm going to mention, so it's just a very generic kind of description. 195 00:21:53.480 --> 00:21:57.860 David Stephens, Prof: And what we'll see is that the structure we believe to exist 196 00:21:59.080 --> 00:22:07.480 David Stephens, Prof: between these variables, so these other variables underlying HIV severity, other symptoms, and then Follow up. 197 00:22:07.870 --> 00:22:11.669 David Stephens, Prof: That is, being included in the… in the follow-up in the study. 198 00:22:11.830 --> 00:22:18.369 David Stephens, Prof: The relationship between these variables dictate the kind of statistical models 199 00:22:19.070 --> 00:22:24.099 David Stephens, Prof: that I need to build in order to understand this interventional relationship. 200 00:22:26.290 --> 00:22:30.460 David Stephens, Prof: And what I'm going to try to stress as we go through is that 201 00:22:32.140 --> 00:22:37.799 David Stephens, Prof: With, subject area expertise, We can hopefully… 202 00:22:38.050 --> 00:22:44.889 David Stephens, Prof: Define the structural relationships, the interrelationships between these variables. 203 00:22:45.080 --> 00:22:49.990 David Stephens, Prof: And once we've done that, and once we've encapsulated it in a… a Causal graph. 204 00:22:50.590 --> 00:22:56.320 David Stephens, Prof: That will tell us what causal conclusions are possible. 205 00:22:57.970 --> 00:23:00.230 David Stephens, Prof: And what statistical models we should fit. 206 00:23:02.800 --> 00:23:18.389 David Stephens, Prof: So understanding the relationship between these variables is key, and in order for a statistical analysis to proceed, we first need to think about the probabilistic relationship between these variables. In particular, how they jointly vary. 207 00:23:19.770 --> 00:23:22.209 David Stephens, Prof: Okay? Obviously, 208 00:23:22.820 --> 00:23:31.199 David Stephens, Prof: we need to understand the relationship between D and C to answer the particular question, so the drug assignment and the CD4 count. We need to understand 209 00:23:31.360 --> 00:23:41.229 David Stephens, Prof: the joint relationship there, because that gets at the heart of this question. But what I'll also stress as we go through is that we need to understand the relationship for all of these variables. 210 00:23:41.450 --> 00:23:44.390 David Stephens, Prof: In order to be able to make the correct conclusion. 211 00:23:47.240 --> 00:23:51.399 David Stephens, Prof: So… Start talk… talking now about some notation. 212 00:23:51.530 --> 00:24:00.009 David Stephens, Prof: And some probability concepts. So this is a fairly, I think, fairly standard kind of, formulation. 213 00:24:00.480 --> 00:24:07.619 David Stephens, Prof: When we talk about a probabilistic model, what that means, basically, is a probability distribution 214 00:24:07.740 --> 00:24:11.740 David Stephens, Prof: that tells us how the three variables, X, Y, and Z, vary together. 215 00:24:13.700 --> 00:24:20.239 David Stephens, Prof: So this is a probability distribution. Here I've written it as a probability density. All it does is really 216 00:24:20.410 --> 00:24:21.890 David Stephens, Prof: tell us. 217 00:24:22.180 --> 00:24:31.280 David Stephens, Prof: how… you can think of it as saying how likely it is that a particular value of X, Y, and Z are to be seen together. 218 00:24:33.680 --> 00:24:41.350 David Stephens, Prof: And, if you've studied probability in any detail before, you'll know that once we specify this joint structure. 219 00:24:43.150 --> 00:24:51.190 David Stephens, Prof: That also specifies how we think about X on its own, Y on its own, and Z on its own, these so-called marginal distributions. 220 00:24:52.630 --> 00:24:58.539 David Stephens, Prof: Okay? So specifying the joint structure automatically specifies this marginal structure. 221 00:24:59.830 --> 00:25:00.560 David Stephens, Prof: Okay? 222 00:25:00.750 --> 00:25:02.940 David Stephens, Prof: And it also specifies for us 223 00:25:03.140 --> 00:25:12.549 David Stephens, Prof: These things called conditional distributions, which are telling us how variables behave if we were to fix the value of other variables. 224 00:25:13.350 --> 00:25:15.570 David Stephens, Prof: Okay? So in this first one here. 225 00:25:15.810 --> 00:25:19.339 David Stephens, Prof: This tells us how X would behave if I fixed Y. 226 00:25:21.070 --> 00:25:26.639 David Stephens, Prof: this, fourth one here. How Y would behave if I fixed X and Z. 227 00:25:27.940 --> 00:25:35.689 David Stephens, Prof: this, final one here, how Y and Z would vary together, If I fixed X. 228 00:25:36.660 --> 00:25:37.370 David Stephens, Prof: Okay? 229 00:25:37.520 --> 00:25:44.260 David Stephens, Prof: And the key thing is that once I specify this joint distribution. 230 00:25:45.580 --> 00:25:48.049 David Stephens, Prof: All of these other things are automatically specified. 231 00:25:51.430 --> 00:25:52.330 David Stephens, Prof: So… 232 00:25:53.130 --> 00:26:09.169 David Stephens, Prof: natural question then is, well, how do I go about specifying that? Well, typically we choose convenient distributions, like the normal, or the binomial, or something like that, in order to specify this distribution. But as we'll see in a second, there are, 233 00:26:10.030 --> 00:26:15.079 David Stephens, Prof: Sort of structured ways that we can go about thinking about how to build up this distribution. 234 00:26:16.090 --> 00:26:24.999 David Stephens, Prof: So that's going to be the… one of the key ideas in the Causal graph representations. How do we go about building that distribution from our background knowledge? 235 00:26:30.630 --> 00:26:36.670 David Stephens, Prof: So… The key result in that direction is the so-called chain rule. 236 00:26:38.870 --> 00:26:51.240 David Stephens, Prof: Here, I'll call it the chain rule factorizations, which says, well, we can build up this joint distribution, this joint specification about how the three variables vary together. 237 00:26:51.530 --> 00:27:05.959 David Stephens, Prof: by thinking about it in a structured way to say, well, let's, for example, let's first think about the distribution of X, how is X varying? How are the characteristics that each person has, how do they vary in the population? 238 00:27:07.980 --> 00:27:13.150 David Stephens, Prof: And then by saying, well, if I have somebody with specific characteristics. 239 00:27:14.550 --> 00:27:20.890 David Stephens, Prof: How do I talk about, in a probabilistic way, the treatment that they are gonna receive? 240 00:27:22.320 --> 00:27:26.620 David Stephens, Prof: So, here I have the marginal distribution for X, 241 00:27:27.110 --> 00:27:31.800 David Stephens, Prof: and then the conditional distribution for Z given X. 242 00:27:32.460 --> 00:27:36.619 David Stephens, Prof: I fix X, and then see how Z is going to be assigned. 243 00:27:36.860 --> 00:27:37.730 David Stephens, Prof: Essentially. 244 00:27:38.250 --> 00:27:45.800 David Stephens, Prof: And then for the third term, I see that this is the… A specification for that. 245 00:27:45.990 --> 00:27:59.780 David Stephens, Prof: the distribution of Y, given X and Z, that is, how I expect the response to be… be behaving in a probabilistic way, if I were to fix the person's characteristics and the treatment that they had. 246 00:28:01.020 --> 00:28:08.239 David Stephens, Prof: Okay? So this factorization here is a nice tool for allowing me to build up this joint distribution. 247 00:28:10.350 --> 00:28:12.279 David Stephens, Prof: I think about X on its own. 248 00:28:12.610 --> 00:28:14.040 David Stephens, Prof: I think about Zev. 249 00:28:14.430 --> 00:28:15.940 David Stephens, Prof: Having fixed eggs? 250 00:28:16.260 --> 00:28:17.949 David Stephens, Prof: And then I think about… 251 00:28:19.080 --> 00:28:29.040 David Stephens, Prof: Y having fixed X and Z. And I should explain my notation a little bit here. So when I write these uppercase X's, those are the random variables concerned. 252 00:28:29.630 --> 00:28:42.350 David Stephens, Prof: And when I put the lowercase x's here, X, Y, and Z, those are specific individual values, so you can think of those as being representative of specific individual observations that I could make. 253 00:28:42.590 --> 00:28:50.199 David Stephens, Prof: So when I have the uppercase variables, those are the variables that I'm talking about. So this tells me I'm thinking about the joint distribution 254 00:28:51.230 --> 00:28:53.159 David Stephens, Prof: Of the three variables together. 255 00:28:54.720 --> 00:29:01.349 David Stephens, Prof: the little X, Y, and z here, that tells me when I start thinking about individual values that those variables contain. 256 00:29:02.570 --> 00:29:11.010 David Stephens, Prof: So this chain rule factorization here is a nice way to break down the joint distribution, but it's important to note that 257 00:29:11.130 --> 00:29:21.239 David Stephens, Prof: That breakdown is not unique. I can think about labeling the variables however I like. So, rather than think about X first. 258 00:29:21.630 --> 00:29:24.950 David Stephens, Prof: I could equally well start thinking about Zed first. 259 00:29:25.350 --> 00:29:33.029 David Stephens, Prof: Think about modeling Z marginally, and then maybe think about Modeling for Y given Z? 260 00:29:33.150 --> 00:29:36.769 David Stephens, Prof: And then think about modeling for X given Y and Z. 261 00:29:37.070 --> 00:29:37.750 David Stephens, Prof: Right. 262 00:29:37.880 --> 00:29:41.569 David Stephens, Prof: And, indeed, any ordering of the variables I could adopt. 263 00:29:42.160 --> 00:29:46.039 David Stephens, Prof: And the key thing is that each of these specifications 264 00:29:46.300 --> 00:29:55.490 David Stephens, Prof: and all of the others that I could list are equally valid, right? They're all equally good ways of thinking about this joint distribution. 265 00:29:56.500 --> 00:29:58.900 David Stephens, Prof: From a probability point of view. 266 00:29:59.290 --> 00:30:06.780 David Stephens, Prof: As we'll see, though, there are going to be some preferred Decompositions, or factorizations. 267 00:30:06.940 --> 00:30:13.509 David Stephens, Prof: that I might use, might choose to use, when I want to formulate a problem in a causal way. 268 00:30:18.040 --> 00:30:20.290 David Stephens, Prof: So that's the chain rule factorization. 269 00:30:22.030 --> 00:30:30.039 David Stephens, Prof: The next concept that I want to talk about is independence. So we'll say that X and Z are independent, and I write it in this way. 270 00:30:30.510 --> 00:30:36.909 David Stephens, Prof: if… The joint distribution factorizes into the two marginals. 271 00:30:38.070 --> 00:30:43.990 David Stephens, Prof: Or, equivalently, the conditional distribution for Z given X doesn't depend on X. 272 00:30:44.260 --> 00:30:50.369 David Stephens, Prof: Or, equivalently, The conditional distribution for X given Z doesn't depend on Z. 273 00:30:51.250 --> 00:31:00.729 David Stephens, Prof: What that's really saying, of course, and the basic concept of independence, is that knowledge of X doesn't influence what I think about Z. 274 00:31:02.450 --> 00:31:04.089 David Stephens, Prof: And indeed, vice versa. 275 00:31:04.520 --> 00:31:07.579 David Stephens, Prof: Knowledge of Z doesn't influence our assessment of X. 276 00:31:10.300 --> 00:31:15.559 David Stephens, Prof: So that's the idea of independence. The two things are varying completely independently of each other. 277 00:31:16.550 --> 00:31:17.230 David Stephens, Prof: Okay. 278 00:31:22.250 --> 00:31:27.510 David Stephens, Prof: The next concept is the idea of conditional independence, and this is going to be critical in our… 279 00:31:28.430 --> 00:31:31.580 David Stephens, Prof: Formulation of this, Causal problem. 280 00:31:32.300 --> 00:31:40.010 David Stephens, Prof: So we think about conditional independence in the following way. We say that why… is independent of Z, 281 00:31:40.200 --> 00:31:48.720 David Stephens, Prof: conditional on X, If the previous type of statements hold, everywhere conditional on X. 282 00:31:49.690 --> 00:31:53.010 David Stephens, Prof: For example, the joint distribution of Y and Z 283 00:31:53.920 --> 00:31:59.939 David Stephens, Prof: conditional on X, factorizes into the conditional distribution of Z given X, 284 00:32:00.920 --> 00:32:04.069 David Stephens, Prof: and the conditional distribution of Y given X. 285 00:32:05.740 --> 00:32:10.960 David Stephens, Prof: That is, if we were to fix A particular value of X, 286 00:32:11.990 --> 00:32:15.420 David Stephens, Prof: then knowledge of Y doesn't influence our assessment of Z. 287 00:32:15.850 --> 00:32:22.500 David Stephens, Prof: Or, equivalently, knowledge of Z doesn't influence our assessment of X. Both of these statements are ONLY true 288 00:32:23.240 --> 00:32:25.860 David Stephens, Prof: If we… Fix X. 289 00:32:29.480 --> 00:32:36.110 David Stephens, Prof: So, independence is… Complete separation of the two varieties of the two variables. 290 00:32:37.370 --> 00:32:42.330 David Stephens, Prof: Conditional independence is, when that happens, conditional on the third variable. 291 00:32:45.510 --> 00:32:47.440 David Stephens, Prof: And I've got some simulations to… 292 00:32:47.930 --> 00:32:50.189 David Stephens, Prof: Try to illustrate that, coming up. 293 00:32:53.220 --> 00:32:56.419 David Stephens, Prof: So, suppose we've got 3 variables. 294 00:32:56.580 --> 00:32:59.120 David Stephens, Prof: concerned. X and Y are varying… 295 00:32:59.450 --> 00:33:02.970 David Stephens, Prof: continuously, and Z is a binary variable. 296 00:33:03.080 --> 00:33:10.559 David Stephens, Prof: So this is… maybe X is a predictor, Y is a response, and Z is a binary treatment, something like that, let's say. 297 00:33:11.960 --> 00:33:19.340 David Stephens, Prof: So what we can do in this setup is to, think about these three variables varying together. 298 00:33:21.890 --> 00:33:29.289 David Stephens, Prof: And we can do that, Let's say I want to, first of all, inspect the relationship between Y and 299 00:33:30.320 --> 00:33:36.109 David Stephens, Prof: X. I'm gonna do that Separately, for each level of Z. 300 00:33:37.540 --> 00:33:38.550 David Stephens, Prof: And then… 301 00:33:38.660 --> 00:33:46.670 David Stephens, Prof: pooling over Z in two separate analyses. Everybody got the idea? So X and Y are varying continuously, Z is binary. 302 00:33:47.200 --> 00:33:54.499 David Stephens, Prof: I'm first gonna look at how X and Y vary. 303 00:33:55.060 --> 00:33:56.629 David Stephens, Prof: within the subgroups. 304 00:33:56.980 --> 00:34:00.730 David Stephens, Prof: identified by Z, and then when I pool over subgroups. 305 00:34:01.210 --> 00:34:04.250 David Stephens, Prof: Okay, so this is the simulation. So… 306 00:34:04.540 --> 00:34:12.980 David Stephens, Prof: Here I've got a plot of… a scatterplot of some, simulated data, where X and Y are varying together. 307 00:34:13.500 --> 00:34:16.110 David Stephens, Prof: This is in the Z equals 0 subgroup. 308 00:34:18.380 --> 00:34:23.379 David Stephens, Prof: Okay? So… This could be the untreated individuals, let's say. 309 00:34:24.239 --> 00:34:33.550 David Stephens, Prof: Okay, so… In this subgroup, This scatterplot tells me that there's no systematic relationship between X and Y, right? 310 00:34:34.159 --> 00:34:41.790 David Stephens, Prof: Here I've got the actual empirical correlation value between the two variables, and it's Practically zero. 311 00:34:42.480 --> 00:34:48.460 David Stephens, Prof: Right? We can see that from the scat plot. There's no systematic relationship, so there's no… 312 00:34:48.870 --> 00:34:50.949 David Stephens, Prof: Positive or negative relationship. 313 00:34:51.179 --> 00:34:57.639 David Stephens, Prof: You know, changing the value of X has no influence on the value of Y. 314 00:34:58.690 --> 00:34:59.410 David Stephens, Prof: Okay. 315 00:35:02.010 --> 00:35:04.999 David Stephens, Prof: So this is an example of conditional independence. 316 00:35:05.290 --> 00:35:07.640 David Stephens, Prof: If I fix this value of Z, 317 00:35:08.590 --> 00:35:13.079 David Stephens, Prof: X and Y are conditionally independent. They're uncorrelated. 318 00:35:15.440 --> 00:35:16.140 David Stephens, Prof: Okay? 319 00:35:16.650 --> 00:35:23.309 David Stephens, Prof: That's for the Z equals 0 subgroup. If I go for the Z equals 1 subgroup, I have a similar picture. 320 00:35:23.980 --> 00:35:32.269 David Stephens, Prof: The cloud of points has moved around a bit, but it's still basically the same kind of structure. Again, there's no systematic relationship between X and Y. 321 00:35:34.890 --> 00:35:37.430 David Stephens, Prof: Correlation is zero, practically. 322 00:35:38.180 --> 00:35:43.610 David Stephens, Prof: empirical correlation. So again, this is saying that conditional on z equals 1, 323 00:35:44.510 --> 00:35:48.839 David Stephens, Prof: X and Y are unrelated, so in this subgroup, X and Y are unrelated. 324 00:35:50.800 --> 00:36:00.649 David Stephens, Prof: Now I'm imagining pooling, and if I leave the, leave the indices there, indicated by the colors, we see that there is a… 325 00:36:01.300 --> 00:36:06.400 David Stephens, Prof: Sort of merging of the two clouds. 326 00:36:06.980 --> 00:36:12.970 David Stephens, Prof: But here I've remembered the group labels. 327 00:36:14.320 --> 00:36:16.170 David Stephens, Prof: So I'm not strictly pooling yet. 328 00:36:16.410 --> 00:36:20.769 David Stephens, Prof: To do the pooled version of the dataset, what I need to do is to remove the label. 329 00:36:22.160 --> 00:36:28.819 David Stephens, Prof: So I've just plonked the two samples together, basically, and looked at the relationship between X and Y. 330 00:36:29.920 --> 00:36:35.880 David Stephens, Prof: So now we see… That there appears to be… a… 331 00:36:36.540 --> 00:36:41.719 David Stephens, Prof: positive association between X and Y. The correlation turns out to be about 0.5. 332 00:36:42.530 --> 00:36:47.160 David Stephens, Prof: Okay? And as X increases, Y increases. 333 00:36:48.950 --> 00:36:58.300 David Stephens, Prof: So this series of plots is meant to indicate the difference between Conditional independence within a subgroup. 334 00:36:58.710 --> 00:36:59.910 David Stephens, Prof: Independence. 335 00:37:00.350 --> 00:37:04.420 David Stephens, Prof: and marginal Dependence. 336 00:37:04.620 --> 00:37:06.620 David Stephens, Prof: If I forget the group label. 337 00:37:06.740 --> 00:37:10.859 David Stephens, Prof: We see a positive correlation, meaning that the two variables are associated. 338 00:37:15.780 --> 00:37:21.589 David Stephens, Prof: So for Z equals 0 and Z equals 1 separately, X and Y are uncorrelated. There is no association between them. 339 00:37:22.190 --> 00:37:28.300 David Stephens, Prof: But overall, if I forget about the group label and just do the pooled version, X and Y are positively correlated. 340 00:37:29.430 --> 00:37:37.089 David Stephens, Prof: So X and Y are conditionally unrelated, unassociated, uncorrelated, given Z. 341 00:37:38.080 --> 00:37:40.740 David Stephens, Prof: But they're unconditionally related. 342 00:37:43.980 --> 00:37:54.479 David Stephens, Prof: So what does that illustrate to us? Well, it illustrates to us that there is a fundamental difference between independence and conditional independence. That's built into the mathematical structure. 343 00:37:55.850 --> 00:38:02.389 David Stephens, Prof: It also shows us that conditioning Can remove or block dependents. 344 00:38:04.420 --> 00:38:05.120 David Stephens, Prof: Okay. 345 00:38:05.600 --> 00:38:08.569 David Stephens, Prof: So imagine I'd started off with a pooled dataset. 346 00:38:09.150 --> 00:38:11.809 David Stephens, Prof: I would say that they're correlated. 347 00:38:13.170 --> 00:38:21.390 David Stephens, Prof: as soon as I condition upon Z… The two variables become uncorrelated. 348 00:38:26.690 --> 00:38:30.039 David Stephens, Prof: So, conditioning can remove or block dependence. 349 00:38:30.300 --> 00:38:39.310 David Stephens, Prof: That idea, that basic idea, Is gonna be key in the subsequent constructions. 350 00:38:44.350 --> 00:38:46.710 David Stephens, Prof: So now let's move on to causal graphs. 351 00:38:47.530 --> 00:38:52.490 David Stephens, Prof: And how we encapsulate some of these ideas into graphical structures. 352 00:38:52.640 --> 00:39:04.100 David Stephens, Prof: And I'll say at this point that, if you're comfortable with the mathematical manipulation of these kinds of distributional statements, then… 353 00:39:05.350 --> 00:39:07.360 David Stephens, Prof: Perhaps you don't need any graphical. 354 00:39:07.820 --> 00:39:11.869 David Stephens, Prof: knowledge. You don't need any graphical formulation of this problem. 355 00:39:14.460 --> 00:39:21.070 David Stephens, Prof: Manipulating the… the joint, Marginal and conditional distributions is perfectly sufficient on its own. 356 00:39:22.650 --> 00:39:32.160 David Stephens, Prof: However, I would argue that causal Graphs are useful because they help to identify, in a real 357 00:39:32.580 --> 00:39:34.760 David Stephens, Prof: Epidemiological setting, let's say. 358 00:39:35.110 --> 00:39:39.860 David Stephens, Prof: The kinds of structures that we need to work with in a statistical model. 359 00:39:42.890 --> 00:39:46.079 David Stephens, Prof: The Causal Graphs will help us to identify 360 00:39:46.340 --> 00:39:51.739 David Stephens, Prof: The connections between the variables that we're most interested in, while accounting for 361 00:39:52.410 --> 00:39:59.149 David Stephens, Prof: Those connections which are spurious, or… or, problematic, or, 362 00:40:00.130 --> 00:40:02.749 David Stephens, Prof: Not the focus, main focus of our interest. 363 00:40:03.570 --> 00:40:04.780 David Stephens, Prof: Okay, so… 364 00:40:05.560 --> 00:40:12.369 David Stephens, Prof: Suppose we've got this chain rule factorization. There's a simple idea in the Causal graph construction. I'm going to start off with these three variables. 365 00:40:13.350 --> 00:40:19.080 David Stephens, Prof: And I'm going to talk about conditional independence of Z and Y given X. 366 00:40:19.390 --> 00:40:20.110 David Stephens, Prof: Okay? 367 00:40:21.060 --> 00:40:32.769 David Stephens, Prof: So, this general construction can be simplified under this assumption By noting that… The third term… 368 00:40:34.810 --> 00:40:36.710 David Stephens, Prof: Can be simplified to this. 369 00:40:38.310 --> 00:40:42.549 David Stephens, Prof: If Z and Y are conditionally independent given X, 370 00:40:43.120 --> 00:40:46.040 David Stephens, Prof: Then I don't need knowledge of Y, 371 00:40:46.350 --> 00:40:52.190 David Stephens, Prof: to specify the conditional distribution of Z, If I know X. 372 00:40:54.170 --> 00:40:59.910 David Stephens, Prof: So this final term… Can be simplified to this. 373 00:41:01.370 --> 00:41:07.269 David Stephens, Prof: and I can write the joint structure, In this simplified way. 374 00:41:09.420 --> 00:41:18.390 David Stephens, Prof: So the only difference between this one and this one is that I've simplified the final term. So if I assume this conditional independence. 375 00:41:18.680 --> 00:41:20.880 David Stephens, Prof: I can simplify this final term. 376 00:41:22.420 --> 00:41:27.999 David Stephens, Prof: Okay, so… Let's think about how we might display that in a graph. 377 00:41:31.760 --> 00:41:39.190 David Stephens, Prof: Well… One simple way to do it is to say, well, X is what we model first. 378 00:41:39.520 --> 00:41:42.700 David Stephens, Prof: And then, given X, I can model Y. 379 00:41:43.680 --> 00:41:47.720 David Stephens, Prof: But also, simultaneously, given X, I can model Z. 380 00:41:47.930 --> 00:41:50.270 David Stephens, Prof: But there's no connection between Y and Z. 381 00:41:52.300 --> 00:41:53.880 David Stephens, Prof: So this graph… 382 00:41:59.310 --> 00:42:09.500 David Stephens, Prof: Is a fundamental graphical representation Of this idea, in this joint structure, leading me To this specification. 383 00:42:11.040 --> 00:42:12.960 David Stephens, Prof: So I start off with X, 384 00:42:13.480 --> 00:42:17.980 David Stephens, Prof: I model Y given X, and at the same time, I model Z given X, 385 00:42:18.150 --> 00:42:21.179 David Stephens, Prof: But there's no interference between Y and Z. 386 00:42:22.940 --> 00:42:25.760 David Stephens, Prof: That's what this… Simple graph. 387 00:42:26.580 --> 00:42:27.740 David Stephens, Prof: displays. 388 00:42:30.090 --> 00:42:32.910 David Stephens, Prof: This type of graph is sometimes called a fork graph. 389 00:42:33.470 --> 00:42:34.200 David Stephens, Prof: Okay? 390 00:42:35.890 --> 00:42:43.300 David Stephens, Prof: Now, I can also Just display the same graph in an identical way by keeping them 391 00:42:43.590 --> 00:42:55.749 David Stephens, Prof: linear in the… in the picture. I don't need to have these angles, right? That's the… these two graphs are essentially equivalent, so I can… I could equally well… I could equally well write this, or this. 392 00:42:56.140 --> 00:43:02.860 David Stephens, Prof: The key point is that… These graphs both tell me to start off modeling with X, 393 00:43:03.960 --> 00:43:15.859 David Stephens, Prof: And once I've got X, I can model Y, and once I've got X, I can model Z, but there's no need to think about modeling Y and Z separately, sorry, in a connected way, once I've modeled 394 00:43:17.060 --> 00:43:18.709 David Stephens, Prof: Once I've fixed X. 395 00:43:20.160 --> 00:43:22.299 David Stephens, Prof: So these two graphs are equivalent. 396 00:43:22.980 --> 00:43:31.200 David Stephens, Prof: And they start to lay down the rules by which I can turn probability statements Into Graphs. 397 00:43:31.970 --> 00:43:40.089 David Stephens, Prof: Right? So what we're going to do is to associate this fork graph Oops. With this factorization. 398 00:43:40.360 --> 00:43:41.030 David Stephens, Prof: Okay? 399 00:43:41.270 --> 00:43:45.840 David Stephens, Prof: Start off with X, Do Y give an axe? 400 00:43:46.400 --> 00:43:48.240 David Stephens, Prof: Do Z give an X? 401 00:43:49.930 --> 00:43:52.129 David Stephens, Prof: In order to represent this joint distribution. 402 00:43:53.330 --> 00:44:02.359 David Stephens, Prof: So… This conditional independence assumption Is essentially being captured in graphs like this. 403 00:44:02.640 --> 00:44:04.599 David Stephens, Prof: Or, equivalently, this. 404 00:44:06.130 --> 00:44:06.840 David Stephens, Prof: Okay? 405 00:44:09.700 --> 00:44:16.609 David Stephens, Prof: Another common type of graph of that nature is called a chain, which is where we have the three, 406 00:44:17.100 --> 00:44:21.269 David Stephens, Prof: variables laid out in this way. So note the direction of the arrows. 407 00:44:21.480 --> 00:44:29.350 David Stephens, Prof: So, it says… fix Z first, and then once I've fixed Z, Then fix X. 408 00:44:29.780 --> 00:44:33.730 David Stephens, Prof: And then once I've fixed X, I can then think about fixing Y. 409 00:44:34.840 --> 00:44:35.550 David Stephens, Prof: Right? 410 00:44:35.840 --> 00:44:39.720 David Stephens, Prof: So that tells me that I start off modeling with Z, 411 00:44:40.390 --> 00:44:52.219 David Stephens, Prof: I then model X in light of Z, And then I model Y Given the value of X. 412 00:44:54.440 --> 00:44:56.409 David Stephens, Prof: So this… this graph… 413 00:44:56.720 --> 00:45:02.539 David Stephens, Prof: And this graph are clearly different. The arrows are pointing in different directions, so they mean different things. 414 00:45:04.090 --> 00:45:07.549 David Stephens, Prof: This one tells me to start modeling with X, 415 00:45:08.320 --> 00:45:11.089 David Stephens, Prof: So, as you can see there, we still go… 416 00:45:11.240 --> 00:45:17.149 David Stephens, Prof: ZXY, in that order, but the direction of the arrows has changed. 417 00:45:17.330 --> 00:45:22.140 David Stephens, Prof: I've still got ZXY, but now all the arrows flow in the same direction. 418 00:45:23.400 --> 00:45:28.009 David Stephens, Prof: So this chain graph leads me to this specification. 419 00:45:33.620 --> 00:45:40.789 David Stephens, Prof: So what we're obviously starting to build is the fact that the probability distribution Corresponding to a graph. 420 00:45:41.680 --> 00:45:44.409 David Stephens, Prof: Depends on how the arrows are configured. 421 00:45:47.730 --> 00:45:54.580 David Stephens, Prof: Okay? So this graph, And this factorization tells me that Y 422 00:45:55.070 --> 00:46:03.680 David Stephens, Prof: it's conditionally independent of Z given X. That is, if I know X… 423 00:46:04.240 --> 00:46:09.680 David Stephens, Prof: I don't need to know the value of Z in order to set the value of Y. 424 00:46:12.810 --> 00:46:15.890 David Stephens, Prof: Z tells me how to fix X. 425 00:46:16.320 --> 00:46:18.220 David Stephens, Prof: But once I fixed X, 426 00:46:18.500 --> 00:46:23.579 David Stephens, Prof: I don't need to know which value of Z corresponded to that X in order to fix Y. 427 00:46:27.350 --> 00:46:28.060 David Stephens, Prof: Okay. 428 00:46:28.290 --> 00:46:32.920 David Stephens, Prof: So, the fork graph… And the chain graph? 429 00:46:33.240 --> 00:46:38.259 David Stephens, Prof: Tell… encapsulate two different statements, two different… 430 00:46:39.690 --> 00:46:43.670 David Stephens, Prof: Ways of thinking about the joint distribution of all of these variables. 431 00:46:44.040 --> 00:46:45.540 David Stephens, Prof: They mean different things. 432 00:46:49.280 --> 00:46:52.730 David Stephens, Prof: They encapsulate two different conditional independence assumptions. 433 00:46:58.960 --> 00:47:02.839 David Stephens, Prof: Or two different formulations of a condition and dependence assumption. 434 00:47:10.900 --> 00:47:15.069 David Stephens, Prof: So… The two different ways are… 435 00:47:16.580 --> 00:47:24.619 David Stephens, Prof: If I want to imagine this… Conditional independence, so… If I fix X. 436 00:47:24.910 --> 00:47:27.319 David Stephens, Prof: then Z and Y are independent. 437 00:47:28.760 --> 00:47:31.130 David Stephens, Prof: I could mean the chain graph. 438 00:47:31.960 --> 00:47:33.959 David Stephens, Prof: Or I could mean the fork graph. 439 00:47:38.350 --> 00:47:46.670 David Stephens, Prof: So this assumption, this probabilistic assumption, if I fix the characteristics of an individual, I believe that the response 440 00:47:46.910 --> 00:47:50.970 David Stephens, Prof: And the treatment are independent, given those characteristics. 441 00:47:51.660 --> 00:47:56.950 David Stephens, Prof: That could correspond to this formulation, or it could correspond to this formulation. 442 00:48:00.540 --> 00:48:05.910 David Stephens, Prof: So you can see here that this basic idea, which I'll take a small, short break in a second. 443 00:48:06.270 --> 00:48:11.640 David Stephens, Prof: to allow this to sink in, and I'll allow you to ask any questions. This simple distinction between these two 444 00:48:11.980 --> 00:48:13.120 David Stephens, Prof: Graphs? 445 00:48:13.990 --> 00:48:17.119 David Stephens, Prof: Encapsulating the same conditional independence assumption. 446 00:48:18.040 --> 00:48:24.440 David Stephens, Prof: It's gonna give us the… really, the key to understanding how we can ask causal questions. 447 00:48:24.600 --> 00:48:28.689 David Stephens, Prof: through these variables. Because ultimately, what I'm going to be doing in… 448 00:48:28.870 --> 00:48:34.669 David Stephens, Prof: the… the hierarchy that I laid out before. I'm going to be looking for the effect of Z 449 00:48:35.400 --> 00:48:38.740 David Stephens, Prof: On why. The treatment, on the outcome. 450 00:48:39.690 --> 00:48:43.470 David Stephens, Prof: But I acknowledge that these other variables, these other characteristics are present. 451 00:48:44.370 --> 00:48:49.249 David Stephens, Prof: So I need to be precise about whether I think this is the pertinent structure. 452 00:48:49.520 --> 00:48:54.160 David Stephens, Prof: Or this is the pertinent structure before I can start building statistical models. 453 00:49:00.670 --> 00:49:03.279 David Stephens, Prof: So I'll take, 454 00:49:03.510 --> 00:49:11.560 David Stephens, Prof: 5-minute break now, I'll start again at 23 minutes past. Allow me to get a drink, my voice is going already after only 50 minutes. 455 00:49:11.770 --> 00:49:23.479 David Stephens, Prof: If you've got any immediate questions, you can ask them in the chat. What we'll do is pick up when we get back, with a more in-depth look at the notation that's being used to describe these graphs. 456 00:53:43.850 --> 00:53:55.800 David Stephens, Prof: Okay, so we can start again with a bit more of a detailed analysis of this graphical construction that we're going to be trying to use whenever we formulate a 457 00:53:55.940 --> 00:54:04.980 David Stephens, Prof: a research problem in an observational setting. I'll just quickly, give a… A nod to the other… 458 00:54:06.240 --> 00:54:09.880 David Stephens, Prof: handout that I've provided, so… the, 459 00:54:12.640 --> 00:54:17.579 David Stephens, Prof: the sheet that I provided, which is also available on the module webpage and the 460 00:54:17.850 --> 00:54:20.910 David Stephens, Prof: the link that I put to my own website. 461 00:54:21.090 --> 00:54:28.550 David Stephens, Prof: It contains some simulations and examples, to try to make the… 462 00:54:30.390 --> 00:54:35.419 David Stephens, Prof: concepts a bit more concrete. So, for example, this first, 463 00:54:36.400 --> 00:54:42.599 David Stephens, Prof: bit of code here, so it's all coded in R, this is a knitted sheet, so the code is available here. 464 00:54:44.550 --> 00:54:54.840 David Stephens, Prof: this first example is meant to illustrate the example that we just, looked at, this XYZ, three variables varying together, conditioning and unconditioning and so on. 465 00:54:55.020 --> 00:55:00.739 David Stephens, Prof: And we'll, we'll, hopefully have a chance to look through this, in a bit more detail later on. 466 00:55:00.950 --> 00:55:06.210 David Stephens, Prof: And then later on in this shoot, there are some… 467 00:55:06.860 --> 00:55:12.559 David Stephens, Prof: More complicated examples, and then right at the end, Some, 468 00:55:16.370 --> 00:55:17.490 David Stephens, Prof: Some real examples. 469 00:55:18.140 --> 00:55:20.759 David Stephens, Prof: Taken from the, R package. 470 00:55:22.990 --> 00:55:27.969 David Stephens, Prof: Okay, so, we'll hopefully get a chance to look at all that in a bit more detail later on. 471 00:55:28.880 --> 00:55:34.180 David Stephens, Prof: So, to go back to the Causal graph formulation, 472 00:55:34.600 --> 00:55:38.890 David Stephens, Prof: What we saw when we started building with… building the… 473 00:55:41.960 --> 00:55:51.150 David Stephens, Prof: representations of these probability models is we saw different types of notation on the graphs. So the nodes… 474 00:55:51.920 --> 00:55:55.990 David Stephens, Prof: the circles with X, Y, and Z in them, those are the variables, obviously. 475 00:55:56.410 --> 00:56:03.319 David Stephens, Prof: Between the nodes, between the variables, there are edges with arrows. 476 00:56:03.550 --> 00:56:09.850 David Stephens, Prof: And the arrows… Encapsulate the nature of the dependent structure. 477 00:56:13.530 --> 00:56:18.210 David Stephens, Prof: In particular, directed arrows specify the conditional independence assumptions. 478 00:56:20.190 --> 00:56:30.609 David Stephens, Prof: So we see nodes, we see edges, we see edges with arrows in the diagrams that I just used. In general, we can have different types of edges, but the… 479 00:56:30.830 --> 00:56:36.820 David Stephens, Prof: The edges with arrows are the ones that are most relevant to our formulation. 480 00:56:39.420 --> 00:56:48.020 David Stephens, Prof: So the simplest type of graph that we might, come across is a two-variable graph. So we've got two variables here, X and Y. 481 00:56:48.770 --> 00:56:50.340 David Stephens, Prof: And in this… 482 00:56:50.510 --> 00:56:57.699 David Stephens, Prof: Causal graph, a simple Causal graph. We see the arrow going from the X variable to the Y variable. 483 00:56:59.170 --> 00:57:02.579 David Stephens, Prof: Which corresponds to this causal structure. 484 00:57:02.820 --> 00:57:08.770 David Stephens, Prof: So the idea is that if you can identify a node, or a variable. 485 00:57:09.140 --> 00:57:12.900 David Stephens, Prof: For which there are no incoming arrows, that's where you start. 486 00:57:13.840 --> 00:57:16.939 David Stephens, Prof: So here we're going to start with the X variable. 487 00:57:17.350 --> 00:57:19.149 David Stephens, Prof: Model that marginally. 488 00:57:19.780 --> 00:57:24.890 David Stephens, Prof: We then see the arrow going from the X variable to the Y variable, meaning that… 489 00:57:25.530 --> 00:57:30.319 David Stephens, Prof: I'm going to specify the conditional distribution of Y given X. 490 00:57:32.410 --> 00:57:38.720 David Stephens, Prof: So those… Nodes or variables with no incoming edges, those are called founders. 491 00:57:39.960 --> 00:57:47.119 David Stephens, Prof: So that when we start to build our probability model, We look at the graph. 492 00:57:47.340 --> 00:57:51.929 David Stephens, Prof: And we identify those nodes which have got no incoming arrows. 493 00:57:52.420 --> 00:57:54.889 David Stephens, Prof: Right? In this case, there's only one. It's X. 494 00:57:55.400 --> 00:57:58.179 David Stephens, Prof: So that tells us to start modeling with X. 495 00:57:58.590 --> 00:58:06.119 David Stephens, Prof: And then the arrow going from X to Y tells us, well, okay, once we've got X, we then consider the distribution of Y. 496 00:58:06.770 --> 00:58:07.460 David Stephens, Prof: Okay? 497 00:58:09.870 --> 00:58:11.340 David Stephens, Prof: That's the first notion. 498 00:58:14.210 --> 00:58:21.840 David Stephens, Prof: The second notion that we've seen already is that if we have Nodes with only outgoing edges. 499 00:58:23.940 --> 00:58:30.860 David Stephens, Prof: They… block dependence. For example, we had this simple… 4 graph? 500 00:58:31.690 --> 00:58:36.070 David Stephens, Prof: And we said that that corresponded to this joint structure. 501 00:58:36.700 --> 00:58:43.480 David Stephens, Prof: Right? It says, well, we notice that X is a founder, right? It's got no arrows going into it. 502 00:58:43.840 --> 00:58:46.790 David Stephens, Prof: So that tells us, start modeling with eggs. 503 00:58:47.220 --> 00:58:49.140 David Stephens, Prof: So we start with X, 504 00:58:50.610 --> 00:58:58.899 David Stephens, Prof: Given X, we can model Y. Given X, we can model Z, but there's no need to worry about the joint model for X… for Z and Y. 505 00:59:01.410 --> 00:59:06.790 David Stephens, Prof: So, this graph… Corresponds to this factorization. 506 00:59:08.350 --> 00:59:12.840 David Stephens, Prof: Which leads us to this conditional independence assumption. 507 00:59:14.360 --> 00:59:23.860 David Stephens, Prof: So we can directly make the association that says, if we have a node with no incoming edges, if it's only got outgoing edges. 508 00:59:24.060 --> 00:59:27.730 David Stephens, Prof: then that's a variable like X in this system, right? 509 00:59:27.950 --> 00:59:32.429 David Stephens, Prof: and conditional on X, Z and Y are independent. 510 00:59:38.130 --> 00:59:43.210 David Stephens, Prof: But in general, Y and Z are not independent. 511 00:59:43.570 --> 00:59:50.319 David Stephens, Prof: They are conditionally independent given X, But they're not generally independent. 512 00:59:53.760 --> 00:59:55.939 David Stephens, Prof: Think back to those previous pictures. 513 00:59:58.620 --> 01:00:04.329 David Stephens, Prof: What this, what this, what this is telling us is, within subgroups of X, 514 01:00:04.630 --> 01:00:06.769 David Stephens, Prof: Z and Y look as if they're independent. 515 01:00:07.320 --> 01:00:09.269 David Stephens, Prof: But if I pull over X, 516 01:00:09.750 --> 01:00:11.520 David Stephens, Prof: Z and Y don't look independent. 517 01:00:18.470 --> 01:00:29.060 David Stephens, Prof: So… Although conditioning on X here blocks the dependence between X and Y, In general, if I… 518 01:00:30.510 --> 01:00:33.480 David Stephens, Prof: were to remove X from the formulation. 519 01:00:34.070 --> 01:00:36.909 David Stephens, Prof: Z and Y would not be independent. 520 01:00:45.460 --> 01:00:55.510 David Stephens, Prof: So, some… Other graph terminology, so nodes or vertices represent the variables, edges represent dependencies. 521 01:00:56.370 --> 01:00:59.259 David Stephens, Prof: We use the term adjacent. 522 01:01:01.030 --> 01:01:05.430 David Stephens, Prof: Between two vertices, if… There is an edge between them. 523 01:01:07.950 --> 01:01:12.239 David Stephens, Prof: In our pictures, the edges have always had arrows on them. 524 01:01:12.620 --> 01:01:16.090 David Stephens, Prof: And such edges are called directed. 525 01:01:17.090 --> 01:01:18.830 David Stephens, Prof: So, a directed edge. 526 01:01:19.580 --> 01:01:22.089 David Stephens, Prof: connecting X and Y, say. 527 01:01:22.380 --> 01:01:28.109 David Stephens, Prof: Might have an arrow going from X into Y, or an arrow going from Y into X. 528 01:01:30.420 --> 01:01:32.510 David Stephens, Prof: Those directed edges. 529 01:01:33.660 --> 01:01:40.120 David Stephens, Prof: are going to help us to talk about conditional independence. In general, we might have edges which are not 530 01:01:40.500 --> 01:01:43.000 David Stephens, Prof: Directed, that is, don't have arrows on them. 531 01:01:43.340 --> 01:01:44.010 David Stephens, Prof: Okay. 532 01:01:44.200 --> 01:01:50.669 David Stephens, Prof: Now… Such edges are not so useful in Causal 533 01:01:51.050 --> 01:01:59.080 David Stephens, Prof: Formulations, Causal or statistical formulations, because they don't allow us to make causal conclusions, but they could appear in a graph. 534 01:02:01.100 --> 01:02:05.509 David Stephens, Prof: If all edges In the graph are directed. 535 01:02:06.510 --> 01:02:09.369 David Stephens, Prof: Then, the graph is called directed. 536 01:02:11.240 --> 01:02:16.440 David Stephens, Prof: Now, in general, we might have so-called bi-directed edges. 537 01:02:18.730 --> 01:02:20.540 David Stephens, Prof: Such as in this picture here. 538 01:02:21.220 --> 01:02:25.080 David Stephens, Prof: And what that tells us is that we can't exactly tell what the… 539 01:02:25.250 --> 01:02:29.470 David Stephens, Prof: structural relationship between X and Y is. 540 01:02:30.350 --> 01:02:36.589 David Stephens, Prof: Basically, this is telling us that X and Y vary together, but we can't tell whether 541 01:02:37.490 --> 01:02:41.790 David Stephens, Prof: X causes the changes in Y, or Y causes the changes in X. 542 01:02:42.700 --> 01:02:54.109 David Stephens, Prof: Okay, so those kind of edges can come up as well. All it means, essentially, in our calculations, is that we're going to have to merge X and Y into a single variable somehow, or concatenate them into a single variable. 543 01:02:54.440 --> 01:03:01.220 David Stephens, Prof: We won't focus so much on bidirected edges, but it could, in principle, come up, if you really don't want to… 544 01:03:02.350 --> 01:03:04.079 David Stephens, Prof: Make the distinction. 545 01:03:04.630 --> 01:03:06.960 David Stephens, Prof: Such as the one we had here. 546 01:03:07.340 --> 01:03:10.080 David Stephens, Prof: Right? You don't want to commit either to this… 547 01:03:10.330 --> 01:03:15.709 David Stephens, Prof: Or, with the arrow going in the opposite direction, you could use this bidirected idea. 548 01:03:17.810 --> 01:03:19.379 David Stephens, Prof: Now, in the causal setting. 549 01:03:19.530 --> 01:03:35.569 David Stephens, Prof: we will mainly focus on directed edges, because we are interested in the impact of an intervention. So we intervene on one of the variables, and then try to trace its impact through the graph on the response variable. 550 01:03:37.210 --> 01:03:42.310 David Stephens, Prof: So, in that formulation, it makes sense to think about directed edges only. 551 01:03:43.990 --> 01:03:49.540 David Stephens, Prof: Okay, so… Building on that idea… 552 01:03:50.000 --> 01:03:53.740 David Stephens, Prof: We now start to think about… Maths in the graph. 553 01:03:54.850 --> 01:03:58.879 David Stephens, Prof: So, a path is a sequence of edges connecting two nodes. 554 01:04:00.170 --> 01:04:02.940 David Stephens, Prof: A directive path is one with a… 555 01:04:03.150 --> 01:04:07.249 David Stephens, Prof: It's a path where the directions of the arrows all point in the same direction. 556 01:04:09.720 --> 01:04:21.080 David Stephens, Prof: So, for example, from, node V1 to Node V4. Here we see… A series of directed arrows. 557 01:04:21.310 --> 01:04:24.110 David Stephens, Prof: All flowing in the same direction along that path. 558 01:04:26.200 --> 01:04:32.250 David Stephens, Prof: Right, so from V1 to V2, V2 to V3, V3 to V4. That's a directed path. 559 01:04:34.900 --> 01:04:41.660 David Stephens, Prof: Whereas an undirected path, It's present if the arrows don't all flow in the same direction. 560 01:04:42.740 --> 01:04:47.520 David Stephens, Prof: So here, there is a path, V1, V2, V3, V4. 561 01:04:49.780 --> 01:04:56.610 David Stephens, Prof: But… the arrow from V1 into V2, Goes in the opposite direction. 562 01:04:57.700 --> 01:05:01.920 David Stephens, Prof: That is into V2, compared to the previous 563 01:05:04.120 --> 01:05:06.689 David Stephens, Prof: So, this is a directed path. 564 01:05:06.870 --> 01:05:08.880 David Stephens, Prof: And this is an undirected path. 565 01:05:14.400 --> 01:05:19.910 David Stephens, Prof: And there'll be a critical Statistical, epidemiological. 566 01:05:20.330 --> 01:05:24.159 David Stephens, Prof: Difference in the way that we interpret these two graphs. 567 01:05:26.230 --> 01:05:30.549 David Stephens, Prof: In the graph, we say that two nodes are connected if a path exists between them. 568 01:05:31.040 --> 01:05:32.939 David Stephens, Prof: And disconnected otherwise. 569 01:05:34.990 --> 01:05:45.949 David Stephens, Prof: Now, where these ideas of paths are going to be useful is that what we're going to try to do, really, is to see how the effect of a treatment flows through the graph to the response. 570 01:05:47.600 --> 01:05:56.329 David Stephens, Prof: We imagine intervening on the treatment node, and then watching the impact of that intervention flow through the graph. 571 01:05:57.530 --> 01:05:58.469 David Stephens, Prof: To the outcome. 572 01:06:05.310 --> 01:06:08.370 David Stephens, Prof: Now, in general, In a graph. 573 01:06:08.670 --> 01:06:18.720 David Stephens, Prof: There may be so-called cycles, that is, directed paths that start and end at the same node. So, for example, here we go from V1 to V2 to V3, back to V1. 574 01:06:21.780 --> 01:06:26.770 David Stephens, Prof: Now, and here's another example of that, V1 to V2 to V3, back to V1. 575 01:06:27.290 --> 01:06:35.520 David Stephens, Prof: So, these kinds of, graphs, the graphs with cycles, are sometimes, 576 01:06:36.130 --> 01:06:40.580 David Stephens, Prof: Considered. But as we'll see. 577 01:06:41.370 --> 01:06:46.329 David Stephens, Prof: They are not so useful to us when it comes to answering causal questions. 578 01:06:46.550 --> 01:06:50.079 David Stephens, Prof: So we're gonna remove the possibility of cycles. 579 01:06:51.490 --> 01:06:55.559 David Stephens, Prof: We're only going to worry about graphs that do not have cycles. 580 01:06:55.770 --> 01:07:04.620 David Stephens, Prof: In particular, We're going to focus on the so-called directed acyclic graph, or DAG, formulation. 581 01:07:05.670 --> 01:07:09.050 David Stephens, Prof: So that's a directed graph with no cycles. 582 01:07:10.080 --> 01:07:15.219 David Stephens, Prof: For such graphs, for the DAG class of graphs. 583 01:07:15.940 --> 01:07:20.689 David Stephens, Prof: We will be able to formulate in a concrete way, Causal questions. 584 01:07:25.800 --> 01:07:34.029 David Stephens, Prof: So, again, A DAG, or a directed acyclic graph, is a directed graph. 585 01:07:34.270 --> 01:07:35.890 David Stephens, Prof: Which has no cycles in it. 586 01:07:37.520 --> 01:07:42.290 David Stephens, Prof: And maybe you can see immediately why such a graph would be difficult to, 587 01:07:42.430 --> 01:07:47.240 David Stephens, Prof: Think about modeling in terms of a statistical Fashion, or probabilistic fashion. 588 01:07:47.540 --> 01:07:51.119 David Stephens, Prof: Because here, there are no founders, right? 589 01:07:51.390 --> 01:07:55.579 David Stephens, Prof: Each node has got precisely one arrow coming into it. 590 01:07:58.860 --> 01:08:05.820 David Stephens, Prof: So, mapping that onto a useful probability model is not… Not straightforward. 591 01:08:06.180 --> 01:08:09.290 David Stephens, Prof: Okay, so we're interested in the DAG class. 592 01:08:09.890 --> 01:08:16.630 David Stephens, Prof: We've seen two basic types of structure so far, the fork and the chain. 593 01:08:17.270 --> 01:08:19.389 David Stephens, Prof: Three-node graphs with particular. 594 01:08:19.540 --> 01:08:20.950 David Stephens, Prof: structures. 595 01:08:22.439 --> 01:08:27.629 David Stephens, Prof: The third simple graph Of interest is the so-called kaleidograph. 596 01:08:31.760 --> 01:08:33.280 David Stephens, Prof: Here's a basic example. 597 01:08:33.790 --> 01:08:37.269 David Stephens, Prof: So we see here 3 variables again, X, Y, and Z. 598 01:08:38.140 --> 01:08:40.809 David Stephens, Prof: We see that X and Y are founders. 599 01:08:43.390 --> 01:08:50.210 David Stephens, Prof: on Z… Is available once we've… seen both X and Y. 600 01:08:50.680 --> 01:08:55.129 David Stephens, Prof: So, the… Terminology of heredity is… 601 01:08:55.359 --> 01:09:02.639 David Stephens, Prof: Quite commonly used here, so these are thought of as parents. Z is thought of as a child of X and Y. 602 01:09:02.890 --> 01:09:06.160 David Stephens, Prof: And what this… DAG. 603 01:09:06.560 --> 01:09:17.130 David Stephens, Prof: tells us about the probabilistic structure is that we start off modeling with X and Y separately, they're both founders, they're independent of each other. 604 01:09:17.370 --> 01:09:25.829 David Stephens, Prof: So we write down the separate joint… the separate marginal distributions to form the joint distribution for those two variables. 605 01:09:27.060 --> 01:09:29.720 David Stephens, Prof: And then, in light of X and Y, 606 01:09:32.229 --> 01:09:34.509 David Stephens, Prof: We can then form the distribution of Z. 607 01:09:35.279 --> 01:09:37.780 David Stephens, Prof: So, the two parents get together. 608 01:09:37.899 --> 01:09:41.200 David Stephens, Prof: And tell us what to think about the child. 609 01:09:42.200 --> 01:09:47.280 David Stephens, Prof: Right? Now, in this formulation, X and Y are both founders. 610 01:09:50.050 --> 01:09:54.870 David Stephens, Prof: So what that tells us is that we can model Those two variables separately. 611 01:09:55.440 --> 01:09:57.579 David Stephens, Prof: X and Y get modeled separately. 612 01:09:59.360 --> 01:10:04.220 David Stephens, Prof: It's only when we've got X and Y we then put them together to get the distribution of Z. 613 01:10:04.700 --> 01:10:09.280 David Stephens, Prof: So, X and Y are, for sure, independent in this formulation. 614 01:10:15.760 --> 01:10:32.170 David Stephens, Prof: The joint distribution of X and Y factorizes into the product of the two marginals. Knowledge of X doesn't influence what we think about Y. Knowledge of Y doesn't influence what we think about X. The two things are completely independent before I start taking into account Z. 615 01:10:34.920 --> 01:10:37.579 David Stephens, Prof: So, as a simple example of this, to illustrate the 616 01:10:37.730 --> 01:10:47.979 David Stephens, Prof: key thing about this kaleidograph, think about the following construction. Let's suppose that X and Y are just simply the scores on each of two dice. 617 01:10:48.100 --> 01:10:49.789 David Stephens, Prof: That are rolled independently. 618 01:10:50.030 --> 01:10:50.960 David Stephens, Prof: Type 1. 619 01:10:51.300 --> 01:10:53.850 David Stephens, Prof: Take out. 620 01:10:54.320 --> 01:11:01.040 David Stephens, Prof: One of the, One of the dice… Roll that, get a score. 621 01:11:01.150 --> 01:11:05.350 David Stephens, Prof: Take the other one, completely independently roll that, get a different score. 622 01:11:05.910 --> 01:11:10.890 David Stephens, Prof: And let's imagine that Z is the total score, that is, the sum of X plus Y. 623 01:11:12.010 --> 01:11:15.599 David Stephens, Prof: Right? So you can think of that as a basic example of what's going on here. 624 01:11:18.700 --> 01:11:23.590 David Stephens, Prof: X, random variable, uniform on the range, 1 to 6. Y. 625 01:11:25.120 --> 01:11:28.660 David Stephens, Prof: Random variable, uniform on the range, 1 to 6. 626 01:11:30.810 --> 01:11:37.359 David Stephens, Prof: the set, 1 to 6. Okay? So I roll this dice, I roll this dice, get the two results. 627 01:11:37.470 --> 01:11:40.080 David Stephens, Prof: And add the two results together to get Z. 628 01:11:41.300 --> 01:11:41.990 David Stephens, Prof: Okay. 629 01:11:42.240 --> 01:11:47.759 David Stephens, Prof: Now, in this case, once I've got X and Y, There's no randomness in Zed. 630 01:11:48.240 --> 01:11:50.640 David Stephens, Prof: It's just the sum of the two scores. 631 01:11:52.970 --> 01:11:53.660 David Stephens, Prof: Right? 632 01:11:54.090 --> 01:11:58.409 David Stephens, Prof: So, this is a simple example of that previous collider graph. 633 01:11:59.930 --> 01:12:05.120 David Stephens, Prof: So if I saw ZX equals 2 and Y equals 3, that means automatically Z is 5. 634 01:12:06.570 --> 01:12:07.300 David Stephens, Prof: Okay? 635 01:12:12.860 --> 01:12:16.990 David Stephens, Prof: The key thing about the kaleidograph is that if we condition on Z, 636 01:12:18.380 --> 01:12:24.529 David Stephens, Prof: That induces dependence between X and Y, which previously wasn't there. 637 01:12:26.820 --> 01:12:27.850 David Stephens, Prof: That is. 638 01:12:28.380 --> 01:12:43.170 David Stephens, Prof: Although X and Y were… unconditionally independent, They are no longer… conditionally dependent, Conditionally independent, Given, said. 639 01:12:45.420 --> 01:12:47.959 David Stephens, Prof: That's what this says mathematically here. 640 01:12:48.560 --> 01:12:55.420 David Stephens, Prof: And… That's very, concretely Exemplified by the fact that 641 01:12:55.650 --> 01:13:03.390 David Stephens, Prof: In this setting, in that dice rolling example, let's suppose we observed that the total score was 5, 642 01:13:03.690 --> 01:13:05.989 David Stephens, Prof: But we know that X is equal to 2. 643 01:13:08.180 --> 01:13:12.150 David Stephens, Prof: then that automatically tells us that Y is equal to 3. 644 01:13:15.480 --> 01:13:21.430 David Stephens, Prof: So, although X and Y were varying independently, When we created them. 645 01:13:21.630 --> 01:13:24.630 David Stephens, Prof: As soon as I tell you what the value of Z is. 646 01:13:26.030 --> 01:13:30.200 David Stephens, Prof: the two variables become dependent. That is, knowledge of X 647 01:13:30.940 --> 01:13:33.220 David Stephens, Prof: influences what I think about why. 648 01:13:33.370 --> 01:13:37.039 David Stephens, Prof: In this case, definitively, right? I know, once I know X, 649 01:13:37.400 --> 01:13:40.070 David Stephens, Prof: That tells me exactly what Y is. 650 01:13:40.420 --> 01:13:43.459 David Stephens, Prof: Now, I only have that because I've conditioned on the total. 651 01:13:46.570 --> 01:13:48.610 David Stephens, Prof: So here we see an example. 652 01:13:48.830 --> 01:13:59.000 David Stephens, Prof: where… marginal independence, becomes… conditional dependence, Once I condition onset. 653 01:14:01.590 --> 01:14:06.000 David Stephens, Prof: So the fork… The chain, and the collider. 654 01:14:06.190 --> 01:14:13.450 David Stephens, Prof: Are the three fundamental graph elements that we're going to use to form our larger model for a collection of 655 01:14:13.880 --> 01:14:14.980 David Stephens, Prof: variables. 656 01:14:19.340 --> 01:14:25.889 David Stephens, Prof: And whereas… For the fork and the chain. 657 01:14:26.100 --> 01:14:30.019 David Stephens, Prof: Conditioning on one of the variables induced independence. 658 01:14:31.250 --> 01:14:37.580 David Stephens, Prof: For the collider, Conditioning on one of the variables induced dependence. 659 01:14:39.070 --> 01:14:40.450 David Stephens, Prof: That's the key difference. 660 01:14:45.370 --> 01:14:51.380 David Stephens, Prof: That's just, encapsulated here, right? So X and Y are independent. 661 01:14:51.900 --> 01:14:54.910 David Stephens, Prof: But conditioning on Z renders them dependent. 662 01:14:55.680 --> 01:15:03.119 David Stephens, Prof: And, that node, Z, is, in the jargon, turned a collider. So this is a collider graph. 663 01:15:07.170 --> 01:15:12.740 David Stephens, Prof: And what we noticed from… the DAG is that we have 664 01:15:13.080 --> 01:15:17.919 David Stephens, Prof: At the collider node, we have incoming arrows only. 665 01:15:23.800 --> 01:15:27.939 David Stephens, Prof: So we've got 3 possibilities now. We've got outgoing only. 666 01:15:28.790 --> 01:15:33.439 David Stephens, Prof: For the arrows, we've got a mixture of incoming and outgoing, outgoing. 667 01:15:33.930 --> 01:15:35.980 David Stephens, Prof: And… incoming only. 668 01:15:37.270 --> 01:15:42.420 David Stephens, Prof: To represent the fork, the chain, and the… Collider, respectively. 669 01:15:45.100 --> 01:15:45.860 David Stephens, Prof: Okay? 670 01:15:46.550 --> 01:15:55.080 David Stephens, Prof: So… In this simple example here, with 5, and a slightly more complicated example. 671 01:15:55.660 --> 01:16:03.190 David Stephens, Prof: First of all, we can read off from the imposed structure, so this might be a… 672 01:16:03.610 --> 01:16:11.880 David Stephens, Prof: A joint distribution that I've built for my 5 variables, based on my background knowledge, my subject matter expertise. 673 01:16:13.330 --> 01:16:31.900 David Stephens, Prof: I've written down the five nodes, and I've written down the directions of the arrows between them. So in this case, we can read off the joint structure implied just by following the previous rules. So I look for founders, first of all. X1 is the only founder, it's the only variable, which has got no arrows going into it. 674 01:16:32.010 --> 01:16:33.780 David Stephens, Prof: So I start off with X1. 675 01:16:34.230 --> 01:16:41.969 David Stephens, Prof: Once I've got X1, that allows me to generate X2 and X3, and I do that independently. There's a fork at X1, 676 01:16:42.300 --> 01:16:44.290 David Stephens, Prof: So I do those two independently. 677 01:16:47.820 --> 01:16:49.390 David Stephens, Prof: Conditional on X1. 678 01:16:50.380 --> 01:16:55.059 David Stephens, Prof: Having got X2 and X3, I then can formulate X4. 679 01:16:56.690 --> 01:16:57.520 David Stephens, Prof: But… 680 01:16:57.790 --> 01:17:05.199 David Stephens, Prof: once I've got X2 and X3, I don't need to know the value of X1 in order to set the value of X4. 681 01:17:08.240 --> 01:17:14.110 David Stephens, Prof: The only arrows going into X4 are the ones coming from 2 and 3. 682 01:17:16.560 --> 01:17:21.600 David Stephens, Prof: Finally, To get X5, I only need to know the value of X4. 683 01:17:24.170 --> 01:17:24.870 David Stephens, Prof: Okay? 684 01:17:25.310 --> 01:17:28.880 David Stephens, Prof: So that allows me to write down the joint structure. 685 01:17:29.050 --> 01:17:31.410 David Stephens, Prof: corresponding to this DAG. 686 01:17:38.720 --> 01:17:41.600 David Stephens, Prof: Okay? Now, we see in this DAG, 687 01:17:43.270 --> 01:17:53.180 David Stephens, Prof: Different manifestations of the… of the… the three… Types of… Basics. 688 01:17:53.340 --> 01:17:54.570 David Stephens, Prof: Simple graph. 689 01:17:54.760 --> 01:17:56.530 David Stephens, Prof: Though we've illustrated so far. 690 01:17:56.880 --> 01:17:59.369 David Stephens, Prof: There's the fork at X1. 691 01:18:00.670 --> 01:18:04.740 David Stephens, Prof: There is the chain, X1, X3, X4. 692 01:18:05.220 --> 01:18:08.030 David Stephens, Prof: There is the collider at X4, 693 01:18:09.030 --> 01:18:11.210 David Stephens, Prof: Based on the X2 and X3. 694 01:18:12.080 --> 01:18:13.390 David Stephens, Prof: variables. 695 01:18:13.600 --> 01:18:16.529 David Stephens, Prof: And then also, I guess, I guess we've got this direct. 696 01:18:17.180 --> 01:18:19.179 David Stephens, Prof: connection between X4 and X5. 697 01:18:19.940 --> 01:18:24.700 David Stephens, Prof: So… Those basic graph elements can be put together. 698 01:18:25.020 --> 01:18:31.530 David Stephens, Prof: To construct a larger graph, And then that larger graph can be turned into a probability distribution. 699 01:18:35.240 --> 01:18:36.580 David Stephens, Prof: Okay, so… 700 01:18:40.360 --> 01:18:52.200 David Stephens, Prof: Those are the basic graph elements. When we talk about this in a bit more detail later on, we'll see how these basic ideas enable me to formulate causal questions. 701 01:18:52.980 --> 01:19:01.970 David Stephens, Prof: It'll come down to in-depth analyses, of the nature, of the… Paths in those graphs. 702 01:19:04.120 --> 01:19:10.140 David Stephens, Prof: Before we get onto that, though, I want to talk a bit more about the… the… 703 01:19:12.140 --> 01:19:19.149 David Stephens, Prof: true, interpretation, or at least a plausible interpretation of 704 01:19:20.830 --> 01:19:25.720 David Stephens, Prof: The symbols that we use when we construct a graph of this nature. 705 01:19:26.440 --> 01:19:36.239 David Stephens, Prof: So, here's the fourth graph again, the first graph that we looked at, and it's got an arrow going from X into Z, and another one from X into Y, and so on. X is the founder. 706 01:19:36.540 --> 01:19:43.310 David Stephens, Prof: But… this… Structure on its own. 707 01:19:44.390 --> 01:19:55.160 David Stephens, Prof: Doesn't give me a precise insight into the probabilistic structures involved, in terms of particular distributions. 708 01:19:56.730 --> 01:20:06.300 David Stephens, Prof: And what I'm driving at here is that we can write this graph, and it'll tell me about the structure of the joint distribution, but it won't necessarily tell me 709 01:20:06.520 --> 01:20:09.219 David Stephens, Prof: precisely how to get Z from X. 710 01:20:09.830 --> 01:20:12.120 David Stephens, Prof: So I'm gonna think a bit more about that now. 711 01:20:12.350 --> 01:20:18.850 David Stephens, Prof: So what, when we write this kind of simple graph structure, what does that arrow actually mean? 712 01:20:20.660 --> 01:20:24.469 David Stephens, Prof: So… one… nice, and I think… 713 01:20:24.580 --> 01:20:35.040 David Stephens, Prof: straightforward interpretation is the so-called structural interpretation. That is, that… The arrows correspond to 714 01:20:35.180 --> 01:20:38.559 David Stephens, Prof: Functions or equations that set the value of the variable. 715 01:20:39.100 --> 01:20:47.490 David Stephens, Prof: In particular, in this case, What that says is that we generate X independently, because it's a fanda variable. 716 01:20:47.760 --> 01:20:51.599 David Stephens, Prof: and then we generate X and Z independently. 717 01:20:51.940 --> 01:20:54.260 David Stephens, Prof: as functions of the realized X. 718 01:20:55.140 --> 01:20:59.420 David Stephens, Prof: What that means, effectively, is that We have a function. 719 01:21:00.140 --> 01:21:07.199 David Stephens, Prof: Or an equation that sets the value of Y given X, so it could be this. It could be that once we've got X, we say that Y is equal to 3X. 720 01:21:07.860 --> 01:21:18.109 David Stephens, Prof: And simultaneously, it says that we use a similar equation, not the same equation necessarily, to set the value of Z. So it might be that Z is equal to 4X plus 9. 721 01:21:21.390 --> 01:21:24.110 David Stephens, Prof: So what that's saying is that that arrow. 722 01:21:24.810 --> 01:21:29.850 David Stephens, Prof: from X to Z is being taken to mean, use this equation. 723 01:21:32.330 --> 01:21:38.100 David Stephens, Prof: I take the input X on the right-hand side, and that returns to me the Y. 724 01:21:40.120 --> 01:21:44.290 David Stephens, Prof: Take the input on the right-hand side, that returns to me the Z. 725 01:21:46.250 --> 01:21:54.240 David Stephens, Prof: So that… so in terms of a more concrete mathematical expression, rather than a graphical expression. 726 01:21:54.410 --> 01:21:58.120 David Stephens, Prof: we can take this DAG to mean something like this. 727 01:21:58.360 --> 01:22:03.240 David Stephens, Prof: Okay? Now, depending on the context, we're gonna have different equations that sit here. 728 01:22:03.740 --> 01:22:04.440 David Stephens, Prof: Right. 729 01:22:05.650 --> 01:22:14.930 David Stephens, Prof: Our subject matter expertise, Indeed, our statistical modeling is going to reveal to us What these structural… 730 01:22:15.650 --> 01:22:17.100 David Stephens, Prof: Equation should be. 731 01:22:21.870 --> 01:22:32.569 David Stephens, Prof: To make that idea more concrete, let's say we've got this structure. So we've got 3 founder variables, U, Y, X, and Z. They're all founders, they're generated independently. 732 01:22:33.050 --> 01:22:38.890 David Stephens, Prof: What this DAG tells us is that X and Uy get together to form Y, 733 01:22:39.280 --> 01:22:47.520 David Stephens, Prof: and X and UZ get together to form Z. That is, Y is some function of X and Uy. 734 01:22:47.760 --> 01:22:52.940 David Stephens, Prof: And Z is some function of X and UZ. For example, we might have this simple structure. 735 01:22:55.110 --> 01:22:59.680 David Stephens, Prof: X and Uy generated independently on the right-hand side here. 736 01:23:00.790 --> 01:23:03.520 David Stephens, Prof: They're summed, and that gives us the value of Y. 737 01:23:05.390 --> 01:23:07.460 David Stephens, Prof: Similarly, X and UZ. 738 01:23:08.580 --> 01:23:09.970 David Stephens, Prof: Sorry, that should be a… 739 01:23:11.810 --> 01:23:20.140 David Stephens, Prof: Yeah, sorry, that's right. So, that's a X and UZ. They get together on the right-hand side here, and they form Z. 740 01:23:21.230 --> 01:23:27.789 David Stephens, Prof: Okay? So this DAG… Has an equivalent representation through these equations. 741 01:23:31.040 --> 01:23:34.670 David Stephens, Prof: That's the idea. And this is the so-called structural relationship. 742 01:23:35.590 --> 01:23:38.719 David Stephens, Prof: Alright, this is the… so this… this graph… 743 01:23:39.390 --> 01:23:44.600 David Stephens, Prof: Encapsulated in these equations tells us the structural relationship between the variables. 744 01:23:51.720 --> 01:23:54.169 David Stephens, Prof: For the kaleidograph, we have a similar kind of thing. 745 01:23:54.340 --> 01:23:57.360 David Stephens, Prof: X and Z generated independently. 746 01:23:57.540 --> 01:23:59.539 David Stephens, Prof: They get together to form Y. 747 01:23:59.980 --> 01:24:02.499 David Stephens, Prof: So Y is some function of X and Z? 748 01:24:03.550 --> 01:24:08.810 David Stephens, Prof: In particular, Fixing the value of X to some numerical value. 749 01:24:09.350 --> 01:24:13.189 David Stephens, Prof: Whilst at the same time fixing Z to be some numerical value. 750 01:24:13.290 --> 01:24:15.330 David Stephens, Prof: That fixes the value of Y. 751 01:24:18.440 --> 01:24:21.740 David Stephens, Prof: Okay? In the same way the dice rolling experiment worked before. 752 01:24:23.810 --> 01:24:32.159 David Stephens, Prof: So… We now have a second representation of the connections between the variables. We can use the 753 01:24:32.930 --> 01:24:34.919 David Stephens, Prof: The graph, the DAG, 754 01:24:36.260 --> 01:24:42.810 David Stephens, Prof: To be precise about the conditional independence assumptions, and then we can use the structural equations 755 01:24:44.570 --> 01:24:49.780 David Stephens, Prof: And these functions, these G functions, to, tell us precisely how. 756 01:24:49.950 --> 01:24:51.790 David Stephens, Prof: The variables are generated. 757 01:24:52.740 --> 01:24:57.060 David Stephens, Prof: Ultimately, we're gonna have to put probability distributions on these things as well. 758 01:24:57.950 --> 01:25:01.850 David Stephens, Prof: like, we might have, say, X is normally distributed 759 01:25:02.870 --> 01:25:08.690 David Stephens, Prof: Z is normally distributed, Y is some function of X and Z, so it's got its own conditional distribution. 760 01:25:09.210 --> 01:25:10.089 David Stephens, Prof: And so on. 761 01:25:12.980 --> 01:25:13.880 David Stephens, Prof: No. 762 01:25:14.260 --> 01:25:24.109 David Stephens, Prof: a different, structure here enables us to think about conditional independence. So, here we've got, 763 01:25:24.330 --> 01:25:32.780 David Stephens, Prof: UX and UZ being the founders, they independently form X and Z, those two variables, through some mapping. 764 01:25:33.380 --> 01:25:36.560 David Stephens, Prof: And then X and Z get together to form Y. 765 01:25:37.770 --> 01:25:44.890 David Stephens, Prof: So, X is a function of UX, Z is a function of UZ, Y is a function of X and Z, 766 01:25:46.020 --> 01:25:54.419 David Stephens, Prof: So what that tells us is that Y is independent of UX, Give an X, 767 01:25:55.810 --> 01:26:03.790 David Stephens, Prof: And it's also independent of UZ given Z. That is, if I'm using UX to set the value of X, 768 01:26:04.230 --> 01:26:09.410 David Stephens, Prof: I don't need to retain the value of UX in order to then subsequently set the value of Y. 769 01:26:10.090 --> 01:26:13.009 David Stephens, Prof: Right? That's what this chain graph tells us. 770 01:26:15.920 --> 01:26:21.890 David Stephens, Prof: So that's the… The next idea along this direction. 771 01:26:22.110 --> 01:26:22.930 David Stephens, Prof: N. 772 01:26:25.270 --> 01:26:32.429 David Stephens, Prof: In both the graphical structure, And the structural equations, we now have a way to talk about causation. 773 01:26:35.010 --> 01:26:38.160 David Stephens, Prof: So this is what we've been building to in this formulation. 774 01:26:39.830 --> 01:26:44.140 David Stephens, Prof: So we can say that a variable X causes Y 775 01:26:44.360 --> 01:26:48.570 David Stephens, Prof: If it appears in the function G that assigns Y's value. 776 01:26:52.880 --> 01:26:55.300 David Stephens, Prof: So, in this case, X. 777 01:26:55.460 --> 01:26:59.600 David Stephens, Prof: and Z are causes of Y, because they appear in this G function. 778 01:27:01.010 --> 01:27:01.700 David Stephens, Prof: Okay? 779 01:27:04.640 --> 01:27:15.710 David Stephens, Prof: Equivalently, we can say that X causes Y if, in the graph representing the joint distribution of all the variables, there is a directed path from X to Y. 780 01:27:16.720 --> 01:27:20.110 David Stephens, Prof: That's really just an alternative way of saying. 781 01:27:20.350 --> 01:27:22.180 David Stephens, Prof: What we said in the first bullet point. 782 01:27:25.880 --> 01:27:30.940 David Stephens, Prof: We can think of X being a direct cause of Y if there's an arrow from X to Y. 783 01:27:35.700 --> 01:27:40.769 David Stephens, Prof: Okay, so this is going to be our mathematical encapsulation of 784 01:27:42.030 --> 01:27:47.009 David Stephens, Prof: Our mathematical representation of the idea of cause and effect. 785 01:27:47.940 --> 01:27:55.250 David Stephens, Prof: One variable causes another variable if it appears in the function that sets that second variable's value. 786 01:27:58.270 --> 01:28:03.560 David Stephens, Prof: And we can associate that directly with the graph by the analysis of directed paths. 787 01:28:06.290 --> 01:28:10.840 David Stephens, Prof: So in this case, for example, this is the same DAG that we had just before. 788 01:28:12.160 --> 01:28:16.570 David Stephens, Prof: we see that Y is a function of X and Z. 789 01:28:18.870 --> 01:28:21.329 David Stephens, Prof: But if I rewrite X and Z, 790 01:28:21.470 --> 01:28:29.810 David Stephens, Prof: in terms of their UX and UZ values, we also see that Y is a function of UX and UZ. 791 01:28:30.620 --> 01:28:31.910 David Stephens, Prof: Just buy this. 792 01:28:32.540 --> 01:28:34.490 David Stephens, Prof: Composition or function idea. 793 01:28:35.560 --> 01:28:42.809 David Stephens, Prof: So, in this DAG, we can say that X and Z are direct causes. 794 01:28:44.060 --> 01:28:48.460 David Stephens, Prof: Because there are arrows that go in to Y from each of those variables. 795 01:28:50.190 --> 01:28:53.580 David Stephens, Prof: And UX and UY are indirect courses. 796 01:28:53.770 --> 01:28:58.839 David Stephens, Prof: Because there is a path from UX to Y that's directed. 797 01:29:00.220 --> 01:29:04.269 David Stephens, Prof: There's a path from UZ to Y that's directed. 798 01:29:05.650 --> 01:29:07.810 David Stephens, Prof: So… X… 799 01:29:08.160 --> 01:29:15.470 David Stephens, Prof: Z, UX, and UZ are all causes of Y, because they appear in the function that sets Y's value. 800 01:29:22.200 --> 01:29:29.439 David Stephens, Prof: Now, in the… So, everything I've done so far has really been predicated on the assumption that 801 01:29:29.690 --> 01:29:38.750 David Stephens, Prof: When we start to do an analysis of a… a dataset, We… 802 01:29:38.880 --> 01:29:42.169 David Stephens, Prof: Can write down what the appropriate causal structure is. 803 01:29:45.030 --> 01:29:54.939 David Stephens, Prof: And that's clearly going to take expert knowledge of the underlying system. It could be argued that perhaps you shouldn't be embarking upon a 804 01:29:55.470 --> 01:30:11.570 David Stephens, Prof: epidemiological or statistical investigation if you don't have the expert knowledge to formulate this DAG. But of course, in practice, when you've got lots of variables, it might be difficult to pass out all of the positions of all of them in the DAG. And so. 805 01:30:12.580 --> 01:30:23.879 David Stephens, Prof: In some settings, it might be necessary to think about what's called, Causal structure discovery, or Causal structure learning, that is, to learn which DAG you should use. 806 01:30:24.070 --> 01:30:28.739 David Stephens, Prof: In order to analyze the dataset. Unfortunately, that's a hard problem, it's a subject of… 807 01:30:28.890 --> 01:30:33.240 David Stephens, Prof: Research has been ongoing for at least 35 years. 808 01:30:33.370 --> 01:30:38.009 David Stephens, Prof: And there are a few, sort of, concrete, definitive ways to… 809 01:30:38.210 --> 01:30:44.910 David Stephens, Prof: to go about doing that. So we're going to work on the basis that, when presented with a research problem. 810 01:30:45.480 --> 01:30:50.719 David Stephens, Prof: We're in a position to sit down, maybe on our own, maybe with the subject matter experts. 811 01:30:50.910 --> 01:31:03.379 David Stephens, Prof: to be able to write down what the DAG, what the connection between those variables should be. Now, that doesn't immediately tell us how to do the statistical analysis, but ultimately, it's going to inform us, through the ideas that we'll present. 812 01:31:03.670 --> 01:31:06.040 David Stephens, Prof: How that statistical NR should be carried out. 813 01:31:12.000 --> 01:31:14.939 David Stephens, Prof: The other thing to note at this stage is that 814 01:31:15.090 --> 01:31:19.770 David Stephens, Prof: If we're presented with X, Y, and Z, Simultaneously. 815 01:31:20.820 --> 01:31:27.129 David Stephens, Prof: We're not in a position to immediately Deduce what structure is relevant. 816 01:31:27.640 --> 01:31:31.649 David Stephens, Prof: That comes back to this difficulty of the causal structure learning problem. 817 01:31:32.110 --> 01:31:35.629 David Stephens, Prof: For example, if we observe X and Y together, jointly. 818 01:31:35.780 --> 01:31:43.940 David Stephens, Prof: We're not going to be in a position to tell us whether this causal implied structure 819 01:31:44.280 --> 01:31:47.489 David Stephens, Prof: Or this Causal implied structure is the right one. 820 01:31:47.590 --> 01:31:56.109 David Stephens, Prof: That is… Does X cause Y, or does Y cause X? If we're presented with X and Y together. 821 01:31:57.020 --> 01:31:59.179 David Stephens, Prof: In an observational setting, say. 822 01:31:59.480 --> 01:32:02.839 David Stephens, Prof: We're not… we're never gonna be in a position to tell 823 01:32:04.020 --> 01:32:05.809 David Stephens, Prof: Which of these is more relevant? 824 01:32:07.020 --> 01:32:15.079 David Stephens, Prof: Now, obviously that complicates Causal conclusions, but again, it's, 825 01:32:15.870 --> 01:32:19.979 David Stephens, Prof: Comes back to the problem framing in the first place. 826 01:32:20.180 --> 01:32:26.619 David Stephens, Prof: If we're observing these two variables together. Any idea of cause and effect 827 01:32:27.030 --> 01:32:31.910 David Stephens, Prof: That we can conclude for the two variables is going to be contingent on 828 01:32:32.020 --> 01:32:43.310 David Stephens, Prof: which of these two assumptions we make? Which of these two assumed structures we make. Once we assume that this is the relevant one, or this is the relevant one, then we are in a position to make causal conclusions. 829 01:32:44.650 --> 01:32:50.689 David Stephens, Prof: But distinguishing whether this is the right one, or this is the right one, that's a hard problem. 830 01:32:51.530 --> 01:33:10.670 David Stephens, Prof: And the only way it can be overcome, really, other than through modeling and assumptions, is if we have longitudinal data. We have time-stamped data that says that X, let's say X occurs before Y, and therefore, the only causal structure that makes sense is to assess whether X causes Y. 831 01:33:15.760 --> 01:33:30.829 David Stephens, Prof: Yeah, so this is the next point. So, if we have this sort of time ordering point, if there's a temporal ordering, then the structural equations make sense. We can take the things on the right-hand side, and imagine them being plugged in to get the value on the left-hand side. 832 01:33:32.250 --> 01:33:40.299 David Stephens, Prof: So it's really only sensible to think about causal formulations when we have precisely this temporal ordering. 833 01:33:41.520 --> 01:33:44.560 David Stephens, Prof: It doesn't make sense to say that X causes Y. 834 01:33:44.780 --> 01:33:45.610 David Stephens, Prof: F. 835 01:33:45.810 --> 01:33:48.370 David Stephens, Prof: X occurs temporarily. 836 01:33:48.560 --> 01:33:50.380 David Stephens, Prof: After Y is observed. 837 01:33:55.190 --> 01:34:01.220 David Stephens, Prof: Okay, so I think I'll, stop there for the half-hour break, the lunch break where I am. 838 01:34:01.500 --> 01:34:09.679 David Stephens, Prof: Coffee break, if you're on… in a different time zone, maybe. And, I'll pick up again at, on the half hour, so 1.30 my time. 839 01:34:09.870 --> 01:34:16.539 David Stephens, Prof: And we'll… then we'll start talking about how we can piece together these simple graphs into more complicated graphs. 840 01:34:16.900 --> 01:34:22.440 David Stephens, Prof: In order to inspire a statistical analysis of a multivariable data set.