 In this lecture, I want to build on the previous lectures talking about analytical methods for doing data simulation and implementing the forecast analysis cycle, but now shift gears to talking about numerical methods for assimilating data into models. As a reminder, the framework we're thinking about is this idea of making forecasts and then iteratively updating those forecasts as new information becomes available. In the previous analytical methods, we were using analytical methods to make that forecast to propagate the uncertainty in the forecast into the future. Here I want to talk about ensemble methods for doing data simulation. The key distinction between this and the previous approaches is that we're going to use the ensemble based approaches for doing that uncertainty propagation, which we talked about in the previous lecture on ensemble error propagation. In a nutshell, you're going to have distributions of your initial conditions and any other uncertainties you need to propagate. You'll sample from those. You'll run your forecast model forward into the future under different samples of these different initial condition values, parameter values, inputs, so you're running a whole ensemble of models and that ensemble is capturing the uncertainty in your prediction. Once that is done, you then need to do the analysis step. For the analysis step, in the general sense, we can do this using any form of Bayesian inference to do the analysis where we are using the model forecast as our prior and then updating that using the likelihood to add new information. The thing that sets ensemble based approaches apart from other approaches is that once we have that ensemble and we construct the prior, we're going to need to assume a named probability distribution that we're fitting that ensemble to. The most common form of ensemble data simulation is the ensemble Kalman filter. The ensemble Kalman filter, like the other variants of the Kalman filter, assumes that that forecast takes a normal distribution. The essential step in the ensemble Kalman filter is after we've used the ensemble members to make the forecast, we fit the sample mean and sample variance to that ensemble in order to put parameters on that prior that we've put in the analysis step. Once we've fit that prior distribution to the ensemble, then that enters into the Kalman data simulation the same way that we did in the Kalman filter and the extended Kalman filter. So we have a normal prior, we have a normal likelihood, we combine those things and we get a normal posterior. Because of its simplicity, the ensemble Kalman filter is particularly popular in ecology and it is one that has a lot of advantages. So one of the major advantages of the ensemble Kalman filter is its ease of implementation. So you just need the ability to run the model multiple times over multiple different initial conditions and parameter settings and drivers to propagate the uncertainty. You do not need to analytically solve the model for derivatives, you don't need to restrict yourself to linear models. In fact, the ensemble Kalman filter and other ensemble filters are able to deal with the non-linearity of models very easily and unlike the extended Kalman filter, they are able to deal with that in a way that doesn't violate Genesis inequalities. In fact, they arguably do a better job at handling the non-linearity in the models than the analytical techniques. The other advantage, like I said, is they don't require doing any additional mathematical analysis, additional steps, you can use them using your existing code. As long as that model that you're using to make a forecast can be stopped and restart under new initial conditions after the analysis, you can use it with your existing model, you just need the capacity to run that model multiple times. One of the common questions with ensemble-based data simulation methods is what size is needed for the ensemble? Here we can rely on just basic statistical theory to say, given amount of variability observed in the ensemble and we want a specific level of precision in our estimate of the posterior mean and variance, what sample size do we need to get that? This is simply a standard deviation, one over sample size is standard error sort of calculation. Rule of thumb, an ensemble-based methods that's usually on the order of tens to hundreds because, again, the goal here is just the ability to constrain, to get a good solid estimate of the mean and the covariance, not to approximate the full distribution with the ensemble. Similar to the extended common filter, it is worth noting that the ensemble common filter does have this assumption of normality into it, but also by definition technically violates that assumption because if you start from a normal distribution for your initial conditions, you transform that through a nonlinear model of what comes out technically cannot be normal. An important question then is how bad is that assumption? And really the best way to check that is just by looking at the histogram of your predictions, so looking at the ensemble itself. So most of us in our basic statistics are pretty comfortable with making a histogram of our data or making a histogram of our residuals and looking and seeing is this approximately normally distributed and if so, we're fine with it, that assumption and we can proceed on using those assumptions. But there are a number of places where you are likely to violate that in ensemble filters. So some of the ones I've encountered are, for example, where you make a forecast and under some set of ensemble members, there are mortality or disturbance or something where you can end up with a bimodal distribution between ensemble members where everything remained happy and ensemble members where there was some event, mortality event, disturbance event, species going locally extinct that can actually create, for example, a bimodal distribution that would very much violate the assumptions of normality and is not the sort of thing that's easy to transform to be consistent with those assumptions. That said, as I mentioned earlier, there's nothing that says we can't generalize these approaches to data simulation and the analysis could be handled with any choice of distribution for the prior that we feel comfortable representing with our ensemble.