In the previous lesson, we tested the sharp null hypothesis of no effect in a uniform randomized experiment, and we also tested the null hypothesis of a constant effect. Then, as we pointed out, those were rather limited, especially when we think that treatment effects are likely to be heterogeneous. We can also talk about estimation using the randomization-based approach. Now, as I mentioned, sometimes one finds that a little confining in the sense that you're limited to within sample, but some people would argue that you have much better internal validity that way. So, it certainly should be presenting you some material on how you do estimation in that context. So, let's focus on estimating the sample average treatment effect, which I've written up there. I've written it up there in a general way for the case where you have strata or blocks. The effects now can vary over the subjects. Don't think that equation one means that the effects are the same within strata. They're not necessarily. They can vary over strata and subjects. So, let's first take up the case of a completely randomized experiment. So, equation two is just the difference between the treatment group and control group mean. I've written it in a way that'll be useful for later on. Now, we want to show that this is an unbiased estimate of the sample average treatment effect. So, let's remember that the potential outcomes are fixed constants, and that the randomization occurs through the assignment mechanism. That means that we need to take the expectation over the randomization set Omega for the completely randomized experiment. Now, we want to remember that all the cap n, well, n factorial over n one factorial, n nought factorial assignment vectors are equally likely, and thus each subject is assigned to the treatment group with probability and sub one over n. So, now I can use that expression that we had and take expectations. You can see that what's going on is that because the Y's are fixed constants, the expected value of Z_i times Y_i is just y_i times the expectation of Z_i. That's all that's really being used up there. Then, little algebra, straightforward algebra, you essentially get unbiasness. It should be pretty clear that the result's going to extend to the block randomized experiment because it's just S completely randomized experiments. So, now I'm going to rewrite sample average treatment effect as a weighted average of the within stratum sample, average treatment effects, with the weights equal to the proportion of units within the stratum. Then, you can see each difference within stratum, between the treatment group mean and the control group mean within the stratum is unbiased for the sample average treatment effect within the stratum S. Then, if I average over those guys, I get unbiased estimator of the previous equation. So, that's pretty straightforward. Now, we want to test hypothesis and construct interval estimates. Now, to do that, we're going to need the variance of the estimated sample average treatment effect and an estimate of the variance. A derivation is incredibly tedious, or at least I think it is. I'm just going to give you the formula and we'll just parse it out and what it means. If you want to see the results, you can look at the Imbens and Rubin book. I believe it's Chapter 6 where they do this. So, our estimate is going to be the difference between the treatment group mean and the control group mean. Now, we're looking at the completely randomized experiment case. I mean, once you have this in here and you can generalize to the lock randomized experiment. But the variance of Y_1 bar minus Y_0 bar is sum of these three terms. The first term is the variance of the potential outcomes in the absence of treatment. The second term is the variance of the potential outcomes under treatment. Then you have this third term, which is the variance of the unit effects divided by the number of observations. Now, this third term being the variance of the unit effects, think about it, since we only see one of the potential outcomes, we don't have any information on the third term. What you can say, however, and see from the formula is that if the unit treatment effects are constant, the third term vanishes. So, to estimate the variance of Y_1 bar minus Y_0 bar, we're going to let little s_0 squared. It's just the sample variance of the control observations, you're pretty used to that stuff, s_1 squared is sample, variance is treated observations. A conservative estimate would then be below s_0 squared over n_0 plus s_1 squared over n_1. Now, this conservative, because it will generally be larger, than the actual variants, but it is unbiased, this estimate is unbiased, for the actual variants when the unit treatment effects are constant. Remember that's when the third term goes away. Now, hypothesis tests and interval estimates of the sample average treatment effect may then be obtained using a normal approximation for the randomization distribution of the estimated sample average treatment effect. This looks very familiar. So, this statistic is approximately standard normal in large samples. So, we call that sometimes the n units are a primary interests, but oftentimes they're not. When there are primary interests, our interests is in the sample average treatment effect. But when they're not, then our interest is probably in something like the average treatment effect. We'll get around to that as well. But then, we're going to be using essentially model-based inference at least when we're sampling from some super-population