 Okay, that's cool. As usual, in the end of the semester, there is a box here, which is getting more and more filled up with stuff you have forgotten, including this black notebook containing extremely interesting information. Whoever is the owner of this, I suggest that you collect it. It's interesting reading. Now, coming back to the real issue of today's lecture, I am introducing here failure events and basic random variables. Now, by a failure event, we associate event of special interest. So this is typically an event which is associated to consequences. Consequences which we need to assess in the context of decision-making. So we identify the events which are associated with cost consequences or loss of life consequences or injuries consequences or damages to the qualities of the environment consequences, etc. And then we try to formulate these events in terms of the parameters which will influence the problem. And some of those parameters may be uncertain and we model those parameters then using random variables. And one very convenient way of describing such events is by the concept of limit-state functions. Now, I'm sure that those small discussions some of you are having now that they can wait until the break. It will be much more efficient for you to listen to what I'm saying here instead of having to read it more carefully later. We are introducing these failure events. I call them failure events, but it does not necessarily relate to failure. It's just a word we are using, a standardized word we are using when we do reliability analysis. So a failure event in an abstract sense relates to any event for which we have interest in assessing the probability. And we describe this event, this is simply an event, in terms of the function g, which is the limit-state function, using parameters x, which are related to the outcomes of basic random variables. Okay? Now what we would like to do is that when we introduce these basic random variables we would like to be able to calculate the probability of the event, the probability that the event f will take place. Now, in principle, this is an extremely easy operation because what we can do is simply that we can evaluate this probability by integrating the joint probability density function of the random variables x over the domain where the limit-state function is smaller than or equal to zero. So that means we are integrating the joint probability density function up in the region, which is defined as being failure by use of this limit-state function. So, if we have a very simple limit-state function like this one, two variables r and s, and we assume that the event of interest will take place is if s is larger than r, meaning that this limit-state function has a value smaller than or equal to zero. That could be a typical case in structural engineering if the resistance of a structural component is smaller than the load on the structural component, then this structural component will fail. Now, r and s here are assumed to be outcomes of random variables, r and s respectively. Here you have an illustration of the joint density function of r and s. So, you see here in two dimensions, actually you see in three dimensions the density function, the load along this axis, the resistance along this axis. Now what I have done is that I have split up the sample space of load and resistance into two regions. One region in which the limit-state function has values smaller than zero, and one region where the limit-state function has values which are larger than zero. If the limit-state function has values which are smaller than zero, then it corresponds to a case of failure. And that corresponds to this area here, this part of the domain spanned by the load and the resistance here. You see that? Exactly here on the borderline between these two domains, we have that the limit-state function is equal to zero. So this is a separation between the safe domain and the failure domain. And in order to calculate this probability integral, what we are doing is that we are calculating the volume of this joint density function in this failure domain. This is all what it is. It's simply a calculation of this volume integral, nothing more. And that may seem to be a trivial problem, but the sad side of the story is that it's not so trivial. First of all, it's not trivial because the probabilities we want to evaluate, the volume we want to evaluate is small. Typically, when we are dealing with, for instance, events associated with loss of lives, the annual probability that this would happen in a certain situation could be in the order of 10 to the minus 4 or smaller. So you realize that the probabilities are small. Secondly, in practical situations, we are not only typically not only dealing with two random variables, we are not only dealing with R and S, but we may be dealing with 8 or 12 or whatever number of random variables. And that means that we are dealing with a high-dimensional integral with a small integrand. And for that reason, the standardized ways of doing numerical simulation, because you could also consider to evaluate this integral in using the numerical techniques which you have learned or will learn about, you have certainly learned about Simpson integration. You may have learned about Gauss integration or you will learn later. There are also techniques called Jepichef integration and there are many other numerical integration schemes. Principally, using, for instance, Simpson integration, what you are doing is that you are splitting up your axis into a number of intervals and then you are calculating the value of the integral at each of those combined interval points in this multi-dimensional space and then you are adding up the calculated values and you realize that if you have two axes, if you have a two-dimensional problem and you want a very precise integral because you have a nonlinear function and we are dealing with small probabilities so probably you need, let's just, to give a number, you need 100 intervals along each axis, then it means you need to have 100 times 100 calculations of the functions. Now, that's already a large number. If you then imagine that you have not only two dimensions but three or four, then it becomes 100 times 100 times 100 times 100. So it becomes a very, very large number of function values you need to calculate in order to assess the integral and that basically becomes practically impossible to do and for that reason we need other methods and this is what we will look at. I'm introducing now the concept of linear limit state functions and normal distributed random variables. So if we look at situations where the limit state function is linear in the random variables and we assume that the random variables are all normal distributed, then we can write the limit state function in this way here. So it's just a linear function in terms of coefficients a and basic random variables xi and you see here realizations of the basic random variables and you see the coefficients. Now, if we, using the assumption, the underlying assumption here, starting out that the basic random variables are all normal distributed, then we also know that a linear combination of normal distributed random variables results in a normal distributed random variable itself and this random variable we call the safety margin. Okay, so now I change this limit state function x with the safety margin which is the random variable itself and it's now given in terms of the functional relationship here from the limit state function where I have introduced, instead of the outcomes of the random variables, I've introduced the random variables themselves and what we can easily do for such a linear combination of random variables independent on the distribution type, we can easily calculate the expected value and we can easily calculate the variance. We have learned that already, I don't want to repeat that. In this lecture, the mean value comes out like this, simply summing up the mean values of the random variables. The variance comes out like this where we remember the rules for doing the variance operation and what you have here are the correlation coefficients between the individual random variables entering into the sum. If the random variables x are all uncorrelated, then this last term here will fall out and you see we only have this contribution to the variance. Now, what we can easily do in case of the normal distributed safety margin is that we can calculate the probability that the limit state function will be smaller than or equal to zero because that is equal to the probability that this safety margin random variable will be smaller than or equal to zero. We already know the mean value of the safety margin and we already know the variance of the safety margin, so now nothing could be more easy than calculate this probability and we can do that using the standard normal integral. Now, what we are concerned about are outcomes of the safety margin which are smaller than zero, so this is now the argument of the standard normal integral, the argument zero. Now, because I'm using the standard normal probability function, I have to subtract the mean value and I have to divide by the standard deviation. This is the rule which we are using when we are using this standard normal integral, the standard normal distribution function. And this thing here we generally refer to as the reliability index, so the ratio between the mean value of the safety margin and the variance of the safety margin we call the reliability index beta. We can calculate this probability of failure extremely easy. If you look at the density function for the safety margin, it looks like this. Here you have the mean value of the safety margin, I have indicated also the standard deviation of the safety margin and what you see here is the contribution of this density function here to the failure probability. What we really want to do is to calculate the integral of this density function in the domain where the outcome is smaller than or equal to zero. So this is a simple thing and this is why we can do it so easily using the standard normal probability distribution function. The reliability index, this thing here, can be understood as the number of standard deviations from the mean value down to the point where the safety margin is equal to zero. So this is the number of standard deviations from the point where the safety margin is zero up until the mean value. Now this reliability index in general has a geometrical interpretation. In general, we will not go into the details of that, but in general the basic random variables they do not necessarily have to be normal distributed. But in our case, and this is what we are looking at today, we assume that they are normal distributed, but of course they all have their own mean values and variances. So if you look at a contour plot here in two dimensions of the joint probability density function then it would look more or less like this. So you see some contour lines, they are not circles because the contour lines correspond to a joint density function where the variances are not necessarily equal to one another and you see here the mean value location is located up here. Now what we can do, so these are normal distributed, we assume here that they are also uncorrelated, what we can do is that we can transform this representation where they are given with their individual mean values and variances. We can transform this space into another space where the space is spanned by outcomes of random variables which again are normal distributed, but they have zero mean values and unit variances. So this space here corresponds to a standardized normal distributed space. This here is just a normal distributed space, this here has been standardized. So going from x to u, we are now subtracting the mean value of all the x variables and we are dividing by their standard deviations. Then we come to this space here and of course when we do that, then the density function moves, it's translated down to the oracle because the mean values are equal to zero and now you see the contour lines are all nice circles because the variance of all random variables in u space is equal to one. So in this space there are some nice properties, namely we know that the central point in this joint density function is zero located in oracle and we know that the variances are all equal to one, meaning that we get these nice symmetrical contour lines. And in this space, and this is now the important thing, the reliability index is the distance between the oracle and the limit state function, the smallest distance. So this is the graphical interpretation of the reliability index and this is quite useful and we will use this a little later. But before we do that, just one small exercise. Imagine that you have two models and imagine that these models have been developed and they are being verified using data. Data from a data set containing 15 observations. That goes for model one and two using the same data set. Now in one case, we have not used the data for assessing the parameters of the model. So using a chi-square test, we have 15 minus 1 degrees of freedom. In the other model, we have used the data also to assess two parameters of the data of the model. The mean value and the standard deviation, let's say. And for this reason, we have 15 minus 1 minus 2 degrees of freedom equal to 12. We have now also calculated the chi-square sample statistic in the two cases. We have concluded that the models could not be rejected at the chosen level of significance. And now the question is, we have also calculated the sample likelihood, corresponding to the two models and the data. And the question is here, which of the following statements are true? Model one is better than model two as it has a higher sample likelihood. Model two is better than model one as it has a lower chi-square statistic and hence also a lower difference between observed and model values. And the third possibility here, it's not possible to make such comparisons. Now, think about this for about three and a half seconds and then show me the color cards. Well, I need more cards. Come on, some of you are not showing your cards. Okay, I see mostly red actually. I see some green, I see a few yellow. And in this case, the evaluation is that based on the sample statistics, it's not really possible to compare directly because the number of degrees of freedom are not the same in the two cases. And for that reason it does not really make sense. But what makes sense is to compare the sample likelihoods. And based on that comparison, we see here that the sample likelihood is larger for model one and for model two, why model one would be a good choice. Okay, let's continue. Let's look at an example, the r minus s example. So we have a limit state function which is basically r minus s is equal to g of x. And r and s are both assumed to be normal distributed random variables. I have written up the mean values here. The mean value of r is equal to 350. The standard deviation of r is equal to 35. And here you have the mean value of the loading s is equal to 200. The standard deviation of the loading is equal to 40. Now what we would like to be able to do is to calculate the probability that the loading is larger than the resistance. And for this reason now what I can do is that I can write up the mean value of the safety margin corresponding to r minus s. The mean value would be equal to 350 minus 200 which is equal to 150. Now the standard deviation of the safety margin is simply equal to the square root of the summed variances. Of r and s. So now I sum the variances and I take the square root so this is now the standard deviation of the safety margin. Now we can easily calculate the reliability index which is the ratio between the mean value of the safety margin to the standard deviation of the safety margin like this equal to 2.84. And now I use the standard probability integral of minus beta and I get here a probability of failure which is equal to 2.4 times 10 to the minus 3. And if the loading random variable would correspond to an annual max loading event then this probability of failure would correspond to an annual probability of failure. So you see in this case linear safety margins normal distributed random variables it's extremely easy to calculate these probabilities. Now let's have a look at the error accumulation law. In many engineering applications the error accumulation plays an important role. Errors may be affecting our problem. Errors like due to fabrication tolerances of building components. Errors in surveying associated with the equipment and with the surveying operations themselves due to the interaction of humans with the instruments and also of course there are errors in connection with measurements performed in the laboratory. So we are dealing with many types of situations where we have errors and we need to be able to assess how these errors will sum up. Now let's assume that the error epsilon can be written as a differentiable function of random variables like this. Epsilon is equal to h of x. Keep in mind that the function h of x could in principle also have been written as the function g of x but now I just introduce h to separate these two cases. And x here is a vector of realizations of basic random variables with mean values given and with covariances given like here. Now the concept is behind the error accumulation law is that we linearize our differentiable function h. And we linearize that using a first-order Taylor expansion. So doing that we can write up that the error is approximately equal to the function value taken in the linearization point x0. And then we are adding up some of linear terms around the linearization point. So these are all linear terms here around the linearization point containing the first-order partial derivative of not the first-order partial derivative of f. This is a mistake. Please correct this. I cannot imagine how this came in. This f here should be h. That should be clear. So please make a note of that. So these are the first-order partial derivatives of the function h taken evaluated in the linearization point. The point where we expand this linear function namely x0. So this is just a Taylor expansion, first-order Taylor expansion of the function h. Now what we can do is that we can look at this function here which I have written up here again and now it becomes an easy thing to assess the expected value of this function. So the expected value of the error simply comes out here as the function h taken in the value of the variables corresponding to their mean values, to their expected values. And the variances using the properties of the variance operator is also extremely easy because we are dealing with a linear function. So we take the coefficients in the sum. We square them. These coefficients are related here to the first-order partial derivatives of the function h. We square them and then we multiply them on the variance of the individual random variables. And then in case that some of the random variables are also correlated, we have to take those cross terms into account. And that becomes this term here. So the expected value of the error and the variance of the error is easy to assess, but you realize one thing and this is the crucial point here that when we do a linear expansion, when we linearize a function, we have to make a choice on where to linearize it. And here we linearize in the mean value. And this is simply a choice. It may not be the best choice. And the result of the expected value and the variance would of course depend on this choice. But here using the classical error propagation law the linearization is made in the value corresponding to the mean values of the random variables. Now if you look at this particular problem which we introduced earlier also, if we have measurements of B, we have measurements of A, we would like to assess the value of C subject to measurement uncertainties associated with B and A. And what we furthermore would like to assess is the probability that the length of C will exceed a certain value here. Just for the example I chose 13.5. Now let's assume that A and B can be modeled as normal distributed random variables with mean values given here, 12.2 and 5.1 respectively and standard deviations equal to 0.4 and 0.3. Then of course we know by particularists that C can be calculated as the square root of the sum of A to the power of 2 plus B to the power of 2. And the statistical characteristics of C, namely the mean value and the variance of C now can be calculated using the error propagation law where we take this function here and we linearize it. We linearize it in the point corresponding to the mean value of A and B. So in that case the expected value of C comes out as the function taken in the expected values. So now it's the square root of the expected value of A to the power of 2 plus the expected value of B to the power of 2 and the variance is now equal to the sum here of the first order partial derivatives of the function H in regard to the individual random variables to the power of 2 multiplied by the variance of those random variables. When you do this then you end up with the variance constructed of two terms namely the differential in regard to A and the differential in regard to B and then now multiplied here on the variance of A and B. So if we now input the numbers into these two equations here then we get that the expected value of the length C is equal to 13.22 and the variance of the length C is equal to 0.18. Now what we would like to do was to calculate the probability that 13.5 minus C is smaller than equal to zero namely that C is larger than 13.5 that was the problem at hand and well we calculate the reliability index again the mean value of the safety margin becoming 13.5 minus 13.22 divided by the standard deviation which is equal to the square root of 0.18 and that comes out looking up the standard normal probability function in Excel or anywhere else in a table you get the number 0.26 so this is a probability that C will be larger than 13.5 you see using the error propagation law but as I said this strongly depends on where you linearize and the result and the goodness of this result will depend on your choice of linearization so this is some degree of arbitrariness and this is not nice so we want something which is better so let's look at this function we introduced this AIDS function was in principle a nonlinear function it was a nonlinear relationship between random variables and we linearized this but let's look at a slightly better way or not slightly a very much better way of doing that the problem that the results will depend on where to linearize was basically solved by two researchers Haas-Ofer and Lindt they suggested that if we are dealing with nonlinear limit state functions then of course we can linearize them this is always a first good engineering approach to linearize if we are dealing with something which is nonlinear but the question is where to linearize and their idea was to identify the point on the limit state function which is a black line here the nonlinear limit state function in this normal distributed standardized space U space to find the point which is closest to or ago and select this point as the linearization point that was their suggestion and this turns out for different reasons I will not elaborate on that but that turns out to be the right point to do it and in that case if you do that then to identify the reliability index simplifies to be a simple optimization problem where you are looking for points on this black line here which have the closest distance to or ago then when you have found that you have immediately found your reliability index and when you have your reliability index you immediately have your probability of failure so this type of optimization problem can be formulated as the minimization of the Euclidean distance between or ago and a point a point which is chosen to be located on this function here namely the border line between the safe domain and the unsafe domain namely the line where we have the limit state function is equal to zero that's the idea and that type of problem can be formulated this type of optimization problem can also be formulated in terms of an iteration scheme so many optimization problems can be transformed into an iteration problem and in this iteration problem we are using two properties namely we are using the property related to the vector the outward vector on the limit state function where this is equal to zero which we can assess in terms of the first-order partial derivative of the limit state function taken in the linearization point which we don't know this is what we are trying to find iteratively the point where to linearize this point can be expressed as beta times alpha beta being the distance and alpha being a unit vector along the direction to the point on the limit state function where we want to linearize this is what we are trying to find in an iterative way and we can write the components of the vector alpha in terms of the first-order partial derivative of the limit state function and what else do we have? we have the information that on the limit state function this limit state function should be equal to zero in the point we are looking for and the point we are looking for is equal to beta times the components of the alpha vector so these are the two informations we have now we can develop an iteration scheme so that we start out by choosing a point simply by choice to start the iteration we choose a point u star being equal to beta multiplied by the alpha vector now in this point we can establish a new alpha vector by calculating the first-order partial derivatives of the limit state function in the chosen point and we have to normalize with the length of the vector components to ensure that this is a normal this is a unit normal vector so that the length of the alpha vector is equal to one now from this equation here and the new value of alpha we can solve for beta using this equation here we have a problem relating to finding a zero of a function in terms of one variable beta having done that we have achieved a new alpha and a new beta we now take this new alpha and a new beta into this relationship and we calculate new alphas we calculate new betas and we continue until the beta value does not change anymore then we have convergence like this we start out in the original space then we transform into standardized normal distributed space in this space here of course the mean value is equal to zero and the variances are all equal to one here you see the limit state function in the u space we start in some point located by choice and we linearize the limit state function in this point we calculate based on this linearized limit state function we calculate a new point calculating alpha and calculating beta we have a new point then we can linearize again and we continue this scheme here until there is only a very small change in the achieved reliability indexes so when the difference between the last and the present calculated reliability index is smaller than a certain criteria then we stop the iteration scheme I have included a hand calculation in the presentation power points but we will not have time to look at this I suggest that you try to follow this scheme which I have shown but we will not have time to do it here what I do want to introduce before you leave is the concept of Monte Carlo simulation it will only take one minute in Monte Carlo simulation we calculate the probability integral by trial what we do is that we calculate a number of random outcomes of the limit state function value and then we calculate up the number of outcomes where the value of the limit state function is smaller than zero and we divide that by the total number of outcomes which we have generated the total number of trials we have performed and in that way we can establish a frequentistic estimate of the probability of failure now the issue here is how to generate one outcome of the value of the limit state function and this is extremely simple because in order to calculate an outcome of the limit state function you need to generate outcomes of the vector x of which the limit state function depends in order to calculate one outcome of each component of the vector x you go in for each of those components you go in and you generate what we call a pseudo random number a pseudo random number is a number between zero and one I'm calling it a pseudo random number because it's not possible to generate something which is truly random but there are algorithms for calculating something which is almost random so for each of those random variables we generate an outcome a random outcome between zero and one and now if you take this random outcome between zero and one and you put it in on the axis of the cumulative distribution function for your random variable xi in this cumulative distribution function for the random variable xi then you can go in and find the value where it crosses the cumulative distribution function and you can follow that down to the x-axis and then you have generated one outcome of the random variable xi and this is how you generate outcomes of random variables and then you do that for all the components of your vector you put this into the limit state function and you check whether the value of the limit state function is smaller or larger to zero if it's smaller than zero then you have a failure and you keep that in mind you store this failure and then you generate again and again and again and again outcomes of this random vector you calculate the limit state function and you check whether you have failure or no failure each time you have failure you add one to the number of failures in the end here you see such samples I'm sampling points here you see they're almost all in the safe domain but there are like two outcomes in the failure domain and in this case the number of failures would be two you divide that by the total number of simulations which would in this case be I think 10,000 or something like that so you would get two times 10 to the minus four as the failure probability this is called Monte Carlo simulation simply sampling randomly outcomes of random variables according to the probabilistic models of those random variables and this is the principle okay thank you for today and I will see you tomorrow morning at eight in H-I-L-E four thank you