 Ladies and gentlemen, I don't want to further delay. I have some technical issues I have to submit. I want to make it really good. So from this lecture, we will have now basics and probability theory. We will also have a so-called life script in MATLAB. So if you do something, you can go through. There are already some examples implemented. But right now, I'm struggling from the transition from Mac to Windows. And so long, I can talk a little bit about less probable things you can get in your life, as problems with Mac and Windows for the compatibility. So we talk about the basic term. And I think it's worthwhile to go back to Adam and Eva and talk about what is the probability? So maybe everybody has already an opinion. What do you think what is the probability? Or would you describe it, your child or your nephew, who is five years old, and ask you, what is probability? What would you answer? The chance of happening of something. The chance of happening of something? If I wanted to say to my child. And you? Everyone's going to say the same thing. So you would describe probability as being chance. That's already a very good description. Or frequency. Yeah, that's interesting. Is it different than frequency or frequency? Yeah, a frequency of something. Yes, that's actually true. Both is, of course, very much true. So probability is a very good measure we use to express our expectation when it happens. So in mathematical terms, that's a very awkward thing. Many mathematicians don't like probability theory at all because it's something weird. But it's actually very, very much handy when it comes to engineering decision making. Because engineering decision making, in principle, is a kind of reasoning. It's a kind of reasoning based on information. And this engineering decision making is actually going back to the very basic questions Emmanuel Kantes and his philosophy. You know, you remember these basic questions he had about reasoning. The last one is, what is a human? And the first three are very much related to engineering. Nobody remembers from school? That's, of course, a very big topic in Germany in school, you can imagine. So the first one is, what can I do? No? Is it enough for the next one? What can be wrong? What can we know? What can be wrong? No, what can be know is the next one. Oh, OK. So what can we do? What can we know? And what can we hope? That's very much related to engineering decision making. And Kantes, of course, a very nice philosophy. He's talking about rationality and reasoning. And he's talking about the role of information. And very interestingly, at the same time, historically seen, where probability theory was very much in its beginning, Thomas Bayes developed these rules of conditional probability and how information can be used to update this probability. That happens at the same time. So it was a very interesting development in the 18th century about these concepts. And these concepts are very much adaptable to engineering. So now I have to give you a task, because I have to resolve this, finally, now. Now we discuss with your neighbor what interpretations of probability do you know and what they are. Of course, I suppose everybody of you has a basic university education and probability theory. Now we have to remember what had been the basic interpretations of probability. But we will more closely discuss three different interpretations. Now we try to remember them and discuss them, write them down, what they are, and then we discuss them together. In the meanwhile, I fix my computer. OK, sorry, ladies and gentlemen. Now I expect very elaborated answers from yourself. So what are the different interpretations of probability? One, reliability index, interpretation of probability. And reliability index is somehow an indication for probability of failure. But still, probability of failure can be interpreted in different ways. Any other? Fragrantistic. That's one important thing. You can say a physical one, a classical one, which is basic. Not the only one. I'm going to go to the next one. So, fragantistic, classic. And I heard the word when I was fighting with my computer. I heard it already. What was the next one? Bayesian. Bayesian. Extraterrestrial sounds. So what is the fragantistic definition of interpretation? We have to make up a green number of experiences. And the probability is? Yeah, exactly, an experiment or an experience. That's an effect, an observation we can have from this experience. So we count special events from the total number of all events. So we recognize that. And the classic everyone was, who are pre-resilient about the experiments who are rezoning based on the symmetry from the experience. And so we are rezoning with physics of the experiments. I think that that's exactly the same. We don't need the experiments. We don't need experiments. That's the two very important things for the classical definition of probability. We use symmetry considerations of logic and physical reasoning. And we don't need any experiments to say or to make any statement about probability. That's the classical one. And that's very often very helpful. For instance, when we derive probability distributions, we will do that today based on that logic, or which was actually the beginning of all probability theory when you want to consult a galvan. And you have rules, you die about cards, and you have rules about these games. And from these rules and from these symmetry considerations, you can deduct the probability of certain outcomes of this game. So very many classical problems in probability theory take origin in this gambling considerations. And then the third one was the Bayesian who said it. What is that? Is the dating of the classical with the quantum stick? Yeah, it could be. Yeah, you could say that. It's a definition of probability or a perception of probability as a degree of belief. And not by coincidence, the creator of that was a referent. Who said that probability is a degree of belief? Sounds awkward for us, right? We are engineers. We want to make calculations. We want to actually, we want to fight against coincidence. And then somebody tells us degree of belief. And then another guy like me comes and says, that's the way to go for us engineers. Because that's how it is. We have a complex structure of uncertainties when we deal with problems. It's not only that we can observe a large number of experiments and then deduct our frequencies and our recurrence rates and things like that. It's much more complex. So when we want to make a statement of probability in engineering, we have actually to integrate information. We have to integrate all kinds of information we can find. And fair to say, the large part of this information is frequentistic, comes from experiments. Comes from well-defined experiments where we make our inference on. And also large parts of information comes from other sources, from not so easy to grasp sources. You might have an experience about historical behavior of some property we observe in a new experiment. And we have to integrate that knowledge about this historical insight about this behavior. I mean, we now start making tests on concrete cylinders. We don't start at zero. We already have an idea what it could be. And we should use that information. And Bayesian statistics makes use of that. It's also interesting to know that now we come to the structural reliability. And now we make more or less the round to that. Because we are very occupied in structural reliability. We are very occupied in the probability failure of the structure. And I hope many of you have already performed the reliability analysis. Even it was a simple one in your lectures. But what is the character of such a probability of failure? Is it a property of the structure we analyze? Think about it. Is this a characteristic of the structure, the probability of failure of that structure? If we would say this is a property of the structure, then we would be frequentists. Then we would think there are thousands of these structures exposed to exactly the same load. And we could make infinitive experiments and deduct on a probability from a frequentistic perspective. And we would percept the result of such a thing as a property of the thing itself. So that's actually what a frequentistic perception says. The frequentistic interpretation of probability perceives a probability as the property of something we can observe. Something outside from our self. It's something rational. And actually, some people in research history have been very keen on this argument. For me, this is the most prominent one. He was absolutely keen on the statement that a probability is something that happens outside from us. And then we could say there's a true probability or there's a wrong probability of failure. There's a true reliability or there's a wrong reliability. But as a matter of fact, we cannot do that. We will see in this lecture that all our probability statements, all our probability statements of the ingredients of a reliability analysis, the material properties of the loads, of the model uncertainties, they are all conditional. So any probability statement we do, and therefore also the probability statement of our envisaged result, the probability of failure, is one conditional on our information. Conditional on our information that is characteristic from our analysis about the problem. So the probability of failure of a structure is always the property of our analysis of it. That's very important. You should remember that. You remember only 10% of this course you should remember among this. The probability of failure, the reliability, is a property of our own analysis. And that is totally consistent with the Bayesian interpretation of probability. And that's very, very important to remember. So we lost a little bit of time. So I will go through the introduction here rather fast. So I did get you some background literature. Here is first of all my address, so you can ask me questions. Then you have a very nice book from Benjamin Connell. And that's a classical one. That's exactly about the topic of this one and a half hours. And you can imagine in this one and a half hours I will not conclude the topic. This is a very, very good book that is written from an engineering perspective. This is actually very rare to find. So often you get books on this topic from mathematicians and that's not so nice to read. This is an engineering approach to the topic. It's rather old, but it's still a classical one. And it's a very good introduction to this topic. And then we have the book from Michael Father. When you don't know him, you will meet him on Tuesday, Wednesday. And this is more or less the script he wrote when he was at ETH. And this is also a very good summary of the topic from an engineering perspective. So as a bus send, it's already a very nice introduction of what we do as engineers. So I will keep it very short. I just want to get the chance to show you a picture from Oslo. So this is a picture of the built environment. It's a picture of the built environment. And we are engineers, and we are somehow dealing with this management of this built environment, the development, and the further management of such a built environment. And the built environment contains a lot of components. So it's roads, bridges, houses, and other infrastructure elements. And of course, the decisions we take as engineers, they are supposed to manage this built environment in an optimal way. So I showed this also to my students at the university to underline that, as we can see, the built environment is somehow already there. Because we will develop it further, it will grow. But the growth rate will be maybe declined a little bit in the future. And now it's more about maintaining the built environment. And when we want to maintain the built environment, decisions like, can we extend the lifetime of the structure? Should we rebuild it? Should we repair it? What should we do with the structure? And therefore, we start, as a structural engineering profession, we start to do measurements on this built environment in order to find out what to do. Answering these basic questions from Kant, right? What should we do? What can we know? That's exactly what we apply to this built environment. And this value of information assessment is actually a very good tool. Also, it's a very ambitious tool to introduce this in engineering because when we want to introduce that, we have to more or less take the entire engineering practice and put it on the other side. Because we have to start with a rather strict representation of our uncertainties of our mainly simplified modeling of this built environment. That does not contain any probability statements normally, right? So now, we have to take our traditional rules to deal with this built environment and extend it that we have a strict and fair and honest representation of uncertainties. That's actually a point, right? Because normally, we do simplified rules, partial factor design, and we don't think too much about uncertainties. But when we want to apply the value of information assessment, when we want to apply the pre-posteriori analysis, as a starting point, we need a fair representation of all uncertainties of our a priori assessment of the model. A priori is a word you will hear more and more. In this lecture, a priori means before. A priori means before we do a further analysis, right? Posteriori means afterwards. And pre-posteriori means before but afterwards. So we look what could happen afterwards in order to find out what we should be doing. That's the pre-posterior. But we will come to that much closer. So we have to deal with this life cycle. We have to deal with uncertainties that's clear in this life cycle. And of course, the point here is we make decisions under uncertainty as engineers. And our constraints, as Sebastian told you already, is objective function. That somehow includes some criteria on the safety of personal, safety of the environment, and economically constrained. So this is the constraints we build our objective function around. So we take an example. Of course, I come from Norway. I have to talk about oil, right? So that's a classical decision problem. We already looked at the decision tree before. But that's a much more simple one. And you know that that's a classical textbook example where you have a decision indicated by the square. And you have an event indicated by the circle. So that's always with decision trees. You have decisions indicated by the square. There we have control, right? There we can design ourselves what we do. And then there is something we don't have any control. We just have to wait what happens, right? And that's a classical example of an oiled wildcatter. You can imagine these people that run their businesses, for instance, in Texas. And they have always the decision, should I rest money to drill, or should I leave it? And when they drill, in this example, when they drill, they will lose very much simplified $400,000 thing, cost the drilling. And when they get the oil, then they get $1 million back. Now, $5 million even, in this example. So that is $5 million when they get oil. In reality, this is much more complicated. Everything is somehow not discrete. But just to explain this example, this logic, we can construct a decision problem as we are. Then we have this decision tree. And we look what are the consequences of each of these branches of the decision tree. So when we drill and get oil, then we get the $5 million. But we have to deduct our investments $400,000. So we got $4.6 million. When we drill and don't get oil, then we don't get any benefit from the oil. But we have invested $400,000. So it's minus 0.4 million. And when we do not drill, then it does not matter whether there is oil or not, because we will never know. And now a decision problem is about finding an optimum. So now we have to find what to do. What is the expected benefit of the decision drilling compared to the expected benefit or the expected cost when we don't drill? So what is the expected cost when we don't drill? Zero. It's clear, zero. That's a good measure of comparsion. So now let's elaborate what happens when we drill. So when we drill, we have either the possibility, if we don't know beforehand, we have either the possibility to get oil or not to get oil. So we have to assess the probability. That's actually our context we are elaborating on probabilities, right? We always look at probabilities when we have to make a decision. So this is also a nice principle. We are engineers. We are not interested in probabilities just for fun. We want to have probabilities because we want to make decisions. Here we need the probability whether there's oil in order to find the decision in this problem. So we run around. We ask a geologist about his degree of belief. Maybe we'll find somebody who is a little bit experienced in that area. And he says, ah, normally I would say there's a little slope and things like that. I would say 0.1. Then we say, ah, we can look at the geologist in the face. OK, let's make a calculation this is 0.1. Let's make a calculation this is 0.1. So we have to multiply the outcome of trilling and getting oil with 0.1. And then we have also to multiply the outcome of trilling and not getting oil with 0.9, which is the complementary event of getting oil. And then we do that. That's the formula here. That's actually the risk. That's the expected consequence. We have to 0.1 times 4.6 plus 0.9 times minus 0.4. And that gives 0.1, which is a positive number, 100,000. So what should we do? Trill. Do you think the utilities don't work? Yeah, of course we have integrated that. But that's still it's a valid thing to think about, because we can say, OK, 0.1, 100,000, which will. But out of 10 cases, in nine cases, we may get lost. Still it. So what is this 0.1 telling us? It's the risk, but it's telling us that when we would do such decisions many, many times, then this would be the strategy to go. But if we are new in the business, just graduated from college, having maybe a big loan from the bank, we would not do that. Because we would get bankrupt in nine out of 10 cases. So there comes this risk aversion into the field. We don't discuss this. We make normally decisions from the perspective of society. So there we have many, many decisions. And we search for right strategies. So when we search for the right strategy, when we search for the right strategy in this case, then of course we would trip. But we could also say I did not like the face of the geologist. I make more advanced analysis. I go to a consultant that makes some tests in the ground and tries to find out whether there's oil or not. And then this consultant. This is maybe a good idea when we would say that a consultant is for free. Then there's nothing against it. But the consultant is also very expensive. So we don't do that now. That will be Sebastian tomorrow. When we now include the possibility to make further tests of a consultant, then we try to integrate the cost of this consultant. And we try to formulate or extend the decision problem to a decision whether we have to decide to hire a consultant or not. Then we talk about a pre-posterior analysis. But just to say that's the main point of this. Of course, you see a decision tree. We will look at much more decision trees in this course. But as a principle statement in this very brief introduction to probability theory, for engineers, for our context, the only reason we deal with probabilities is we want to make decisions. Probability has not at all any value for us when we look at it isolated. If you want, you can challenge me. Let me have a discussion. But that's my opinion. So that's the questions that have come. We discussed about them. And then we look at a set theory just to talk about the same thing. I suppose that 99.9% of you are totally aware of these things. So when we talk about sets, when we talk about outcomes of experiments, then it's very essential to be aware of the definition of the total set. That's the total set. That's the event space where all events happen. In general, when we look at a one-dimensional property, this is minus infinity to plus infinity. But for instance, we also have event spaces. For instance, for material properties, for material strengths, they would say it's rather from 0 to 2 plus infinity. And when we come back, this is actually of some practical importance when we want to decide which model to choose, which distribution function to choose to represent events we want to describe with it or represent with it. Then a very good practice is to look first at the event space defined of my model and where is it defined of my real property. And that should match. That's a very good practice. Then we have some events or some combinations of events. We are very often interested in. And we also look when we now look at some definitions on probability. So here the square is still an event space. This is the area where everything takes place. And then we have some events in this event space. Here we have event e1, e2, and e3. And we can talk about the union of an event. That is, for instance, this plus this is the union of an event. And then we have an intersection of an event. This is this little darker blue area where the two events intersect. And then here we can also define the empty set. The empty set is defined as something that does not exist. So for instance, here we don't have an intersection between event 2 and 3. We talked about this different interpretations of probability. Very important, you might have noticed that these interpretations are quite different from each other. But the calculus, the math of probability, they apply independent of the interpretation of probability. This is, of course, very nice. So let's come to these rules. The probability is defined by order of calculus and how to handle this probability is defined by its axioms. You have seen them. There are from whom? Who did write down this? Kolmogorov-Smirnov. So this was a publication from 1924. So who is Greek? The Greeks did not talk about probability too much. It's very, very much elaborated things in math already. But probability is a phenomenon that was not discussed in ancient times. So that's interesting. And that's also maybe related to the fact that probability is somehow a strange animal to us. So the entire probability theory developed comparably late. And if you think that the fact that the probability is a number between 0 and 1 was somehow postulated only less than 100 years ago, that's actually surprising. This concept, I think, is relatively new. So what does this axiom say? First of all, the probability, which is abbreviated by PR of an event A, bracket A, is always larger than 0. So we have non-negative probabilities. That's important. And then we said also data boundary. We say that the probability of a certain event is 1. So the first Greeks axioms, OK, probability a number between 0 and 1. And then we have the third one that says that the infinitive sequence of the disjoint events, disjoint means that these are events which have not an intersection, can be computed by the sum of the individual probabilities. That's also a straightforward, but that's an important rule to agree on. And these three axioms, they allow to explore a little bit on the following properties of probability very briefly. You have this also in your script. Probability of an empty set is 0. Then also the probability of a finite set of disjoint events is also the sum of those. Then we have the probability of a complementary event of an event that's 1 minus this event. So for instance, we have the probability of failure. And then what is the probability that we have survival? It's 1 minus the probability of failure. And then we have some other rules. Maybe this is also important, the last one. So the probability of a union of two events is the sum of the individual probabilities minus the probability of the intersection. This can be agreed on very nicely when we look at the Venn diagram. This situation might have two events, A and B. And we have the event space here. So the union of these events, we want to know this here, is this event plus or the probability of this event plus the probability of this event. And then we have to subtract one time this one. This is what we do. This is the intersection. But the intersection is very tricky. We will look at that when we talk about independence. So only when it's independent, we can make a very easy rule and can just say the intersection of two events is the multiplication of the corresponding probabilities. But it's only possible when these events are independent. So very important to us and very important in this course is the definition of a conditional probability. And actually when we use probabilities in engineering decision making, it would be fair to state that next to all our probabilities are conditional. When we take the Bayesian interpretation of a probability series, then we can always say, OK, it's conditional on us. So everything we do is conditional. We have to have a clear view of what is a conditional probability. Conditional probability of an event A, after we learn that event B has occurred. That's actually what it is. That's the condition on event B has occurred. Can be defined as probability of A, conditional on B, is equal to the probability of A intersected with B divided by the probability of B. So we, in a way, normalize by the probability of B. So if you look at this Venn diagram again, so now we are looking, maybe I'll make a new one. It looks exactly the same, but I make some other scribbles inside. We have again this A and B. Now the conditional probability of A given B. So we consider not the entire event space anymore, but we restrict ourselves on B. And then we look at probability that A occurs given that B has occurred. So we don't look at the entire event space anymore. Now we only look at this B. And geometrically we would look at the intersection because that's the only place where we have A and B. And we normalize it by the probability of B. So this happens in this formula. So we have only B, that's our condition, and then we look what is the probability of A given B. So that's the definition of the conditional probability. And when we look at this conditional probability and if you look at a so-called combative property of multiplication, that's something you learned already in primary school, that A times B is equal to B times A. The same holds for this intersection operator. So A intersected with B is equal to B intersected with A. And then we use these two properties that we might agree on this formula. So we had the probability of A given B equal to the probability of A intersected with B divided by the probability of B. Now when we get this on that side, then we have the probability of A B times the probability of B is equal to the probability of A and B. So if you use this and we turn around A and B, then we can write down that's the probability of B times the probability of A conditional of B is equal to the probability of A given the probability of B conditional of A. So that sounds trivial, but it's very important for the development of the next rule that we do, which is the base and rule. But before we have that, I introduced a total probability theorem. We will also employ that for most continuous variables in this course, but for discrete. Events, this total probability theorem says when we have an event space, not indicated by omega, but by S. Sorry for that. So that's the event space. And we have some disjoint events in this event space. It's called B. This figure is B1 to B7. That's some disjoint events that fill out the entire event space. And then we have another event, A. And now we have two different possibilities to express the probability of A. Either we know it, either we know the probability of A, then we don't have to make any fancy stuff, or we can express the probability of A as the sum of the probability of A conditional on all these B's times the probability of B's. So it's actually the sum of all these little segments here. And that's the total probability theory. And here we make a little example. We make an example, a practical example, without any dice, without any coins, with structures. So let's suppose we have 50% concrete structures, 30% steel structures, and 20% timber structures. Now we know the probability of failure of a concrete structure. Probability of failure. Failure of concrete is equal to 0.02. That's not based on my experience. That's just the number. That is not too small. So you can calculate with it. Then we have the probability of steel structures, failure of steel structures, steel structures, 0.03. I like to have fights with steel people. And the probability of timber structures is 0.02 flies. Just some numbers, right? But now what is the probability of failure of a structure? Please, go ahead. You are welcome to use your calculator. Anybody has an idea? 1, 2.4%? 0.030. That's at least possible, I trust you. Must be something in between, right? Oh, we don't challenge that. Can you explain how it is calculated? Can you briefly explain how it is calculated? The probability of failure once applied by the probability of having that kind of structure is 0.05. Plus the probability of failure of steel was 0.05. Yeah, exactly. So it's like hyperlating and weighted mean. So it feels OK, right? And there's nothing else than this total probability theory. We can apply it for much more complicated things, but in the end, it boils down to be something that can not be described as a weighted mean. So this total probability theory, we will also, at the end of this lecture, represent a continuous form for continuous variables. And this you can use after you have learned from John Sernsson how to do data analysis. This you can use to integrate out the uncertainties of your parameter estimation and to develop a so-called predictive and unconditional distribution of a board key. So that's very important for us. But it's also very important to, let me do this first. It's also very important to deduct and to understand Bayes' rule. Bayes' rule is actually utilizing the total probability theory. You can see the total probability of an event B given A by the probability A intersected with B. So this is nothing new. This is just the definition of a conditional probability divided by probability of A. Normally, it's tricky to compute these probability of A directly. So we can make use of the total probability theory to replace the term below the line. And here we make use about this multiplication rule for conditional probabilities using this combative law. We have seen two slides before. And then we can formulate Bayes' theory. And I think now it's time to make an example for you that you really understand what this Bayes' theory means. So let's look at the practical example. How are we time-wise, Sebastian? It's fine. So we will look at an example. And I will take this opportunity to introduce to you so-called live script. It is directly MATLAB. I've produced this lawless notes, very, very condensed notes in a so-called live script. And this contains text, as you see here. And this also contains some basic operations you can do in MATLAB. And you can imagine for this very basic probability theory, this MATLAB scripts are very humble, but they're not very complex. But tomorrow when we do the form, it will be very handy for you to have already a MATLAB script. At hand for all these algorithms. So now we have this Bayes' rule. And I suppose at least half of you have heard it. But many of you maybe don't exactly remember how it works. So let's look at the practical example. And the practical example starts actually not at Bayes' rule. It starts at the establishment of conditional probability based on data. So let's imagine a rather non-economical example. Let's imagine we are working in a company and we are developing a new device for detecting corrosion in concrete. Namely, corrosion of the concrete reinforcement bars. So we have a non-destructive device we can hold on the surface somehow. And by that we can detect whether there is corrosion initiated at the reinforcement bars or not. You can imagine that such a device is of course very nice to have. But you also know that the information that comes from such a device is not perfect. So we might get an indication and there's no corrosion. And we might get an indication or we might get no indication and there is corrosion. So there is some room for imperfection. And normally these devices are not perfect at all. So now we want to bring this detection device on the market. So we make a big experimental campaign where we have many specimen, concrete specimen. And we all measure them whether we can detect or not a corrosion initiation with our device. And afterwards we destroy this specimen and look whether there was real corrosion or not. So we have data. And we have the event of corrosion and no corrosion. And we have the event of indication of corrosion and no indication of corrosion. So this is the events we can have. So now we have data. And we actually are very lucky because we have many data. And we can make, for instance, observations on 278 where we indicate corrosion. And afterwards we really find corrosion. Then we have 66 observations where we don't indicate corrosion. But there was corrosion. It's maybe a realistic set. Then we have the case where we have indicated corrosion but we don't find corrosion. And then we have the case where we have not indicated corrosion and don't find corrosion. So now we can elaborate a little bit on the probabilities. So first of all, we can say that we have some sums. So we can count the sum of all observations that have indicated corrosion. We can sum up all observations that have indicated no corrosion. And we can sum up all events that are corroded or all specimens that are corroded and all specimens that are not corroded. So now we want to find out the probability that we get an indication of corrosion here when there was corrosion. How do we do that based on that data? So remember how the conditional probability was defined. It was the probability of the intersection of the two events. So what is the intersection of the two events? We are interested here. So it's what is the indication of corrosion and corrosion. What is the intersection of that? Which number? In the table? 200 to 100. That's the intersection, right? So we take this value and we divide it by what? By the probability of corrosion. By the sum. 314. And this is the probability of indication of corrosion given corrosion. That is somehow a descriptor of the precision of our device. So we can deduct now from this conditional probability. We have to remember that conditional probabilities, in principle, behave the same as normal probabilities of non-conditional ones. So we can deduct directly from this number what is the probability of having no indication given corrosion, which is 1 minus this number. But what we cannot deduct from this is actually the probability that is conditional on a different event. So it's, for instance, the probability of indication of corrosion given there was no corrosion. But this is something we don't get out from this number. This is something we have to look back in the table. So first we look at the intersection again. So in the intersection of these, it's 72. And then we have the sum, which is 340, I guess. And then this gives, that's the other one. These are the two numbers we can use. And of course, when we know these numbers, we also need to know the numbers of the complementary event. So now we can write this in our description for our new device, and we can set it. Now we can be gridded, OK, there's a statistical uncertainty and things like that. But let's forget about this. Let's take this as best estimates. And some valuable indications about the information content we can reach with our measurement device. And then we also go to our boss and say, are these numbers there really good? It's a good device. And actually, when you compare it with practical used devices, maybe this is even very good. So now let's take these values in mind. So this was development of conditional probabilities based on some data. And of course, we could also develop the probability of corrosion given indication of corrosion based on this data. But this is not very interesting because this data set where we had so many corroded specimen is obviously taken from some domain of structures where we have already severe corrosion. So when we would have this fraction between corrosion and no corrosion in a structure, this would be very bad. So the inference based on this data on the conditional probability of having corrosion given indication makes no sense. But in a practical situation, we might go to a bridge. Might go to a bridge. And of course, this bridge is a nice bridge. It's maybe 10 years in service. And we don't have a little bit. We are a little bit afraid about corrosion. But we say maybe the corrosion probability and that bridge is maybe 10%. This is of course nothing we do just by looking at it. This is something we integrate some of the information we have. And we come to a conclusion, maybe we have experience with 10-year-old bridges. And normally, there's not such a high risk of having corrosion in such bridges. So we can say, yeah, this is 0.1%. So we have an a priori opinion on the probability of corrosion of this bridge. But with this a priori, if you want that probability, we might reach some threshold in our organizational system of the national or federal road administration that from this a priori probability, we have to make an assessment. So we make an assessment on this bridge because we think that this 0.1 is maybe too high. And then we made measurements. And we made measurements with our brand new indication tool. We have just bought that has these properties we just developed. So we make a non-destructive measurement. And we get results corrosion indicated with our measurement device. So what is now the probability that we have corrosion given we have this measurement reason? So that's the big question, the practical relevant question. We did know the probability of corrosion a priori unconditional on our measurement. But now we want to know this. This we can actually solve using the base theory. So we can look at the probability when we look back to the slides and look at the probability of corrosion indicated or indicated given corrosion times the probability of corrosion. And this part of the formula actually contains all information. And this probability is already linear dependent on that one. It's proportional. So what we write here is just a normalization constant. Very often in practical problems there are much more complicated than that one. It's a little bit hard to solve an integral here. Now it's only a sum. And then we only have to get sure that we get a probability density or a probability not a likelihood. So here we look at the sum of the probability of corrosion indicated given corrosion. So it's very hard to see. Can you write with big letters? So I can't really see. God, now we really cannot see. Yeah. We will manage. I write it first and then you can see. And the probability of corrosion. So what we see here is that we have to, I also talked, now we have to listen. It's the probability of corrosion given corrosion indicated is equal to the probability of corrosion indicated given corrosion times the probability of corrosion. That's the information content we have. And then we have to divide that by the sum. So it's the probability of corrosion indication given corrosion. Actually the same than above here. Times the probability of corrosion plus the probability of corrosion initiation given no corrosion times the probability of no corrosion. That's the rule of base applied to this example. And now we have to remember the numbers 0.88 and 0.21. So we can write some numbers here. So we have the probability of corrosion initiated 0.88 times 0.1. That was the a priori probability divided by 0.88 times 0.1. Exactly the same. Plus, now we have the probability of corrosion initiation given no corrosion. But we don't have to look at that. 0.21 times the probability of having no corrosion is 0.9. That's the very important number of this formula, actually. This 0.9 triggers everything. Because what we observe, please calculate this for me, 0.32. What we observe is that we are maybe a little bit disappointed about our confidence we now have that there's corrosion. Even if we get our very expensive measurement device and get an indication of corrosion, we only get a probability that there's really corrosion of 0.32, which is lower than 0.5. Intuitively, this is disappointing for us. And that has to do with the following effects. And that's actually characteristic for our engineering problem. We have a relatively unlikely event. And in practical applications, these numbers are even smaller. And this number of the unlikely event, this low number, is triggering this here, which is above the line. But it's also triggering what is below the line, which becomes a very big number then, when this becomes low. So if we replace this 0.01, then we get an even worse result, an even more disappointing result. So as a rule for your fingertips, when we have a very uncertain phenomenon that we want to get information about, we have to have a very, very accurate measurement device. Otherwise, we don't add a lot of information to it. Otherwise, we can add the uncertainty of the device. And this is now already integrated, right? This probability statement, that's interesting. This is just a statement that includes our uncertainty about the problem, our uncertainty about the assessment, whether there is corrosion or not. So we did not talk about that too much. So we're supposed to end at 12 o'clock? Are we supposed to end at 12 o'clock? Yes. No, it's not a problem. I think the things that follow there are more classical things about distribution functions and things like that. So let us take five minutes on what is this uncertainty we are talking about. Because this should be mentioned at least once before we come with more advanced methods. So what we want to represent by our probabilities, now we talk about probabilities of events, right? But later on we will talk about probabilistic models, probabilistic functions. What we want to express by this is our uncertainty. And the uncertainty has two important contributors. One is randomness. And the other one is lack of knowledge. And lack of knowledge is an important one. The lack of knowledge is the one we want to address with our methodologies. The lack of knowledge is the one we want to address with this Bayesian rule. This is something we can reduce. So we always have to be aware about the part of the uncertainty in our problem that can be reduced. This is something we can somehow attack by structural health monitoring, for instance. And there's also another part that cannot be reduced. And this is generally referred to as epistemic uncertainty, the creek. It has to do with knowledge, epistemia. What is it? Science. Yeah, epistemia. OK, this is attributed to our knowledge. And the other one is aleatory. And that is to the die, right? It's a very slow die. And the die can actually be used to make a very good demonstration of the difference. So now I have a die in my hands. Normally, I refuse to have these die examples in the probability class, because this is what everybody does. But now I have a die in my hand. And I ask you, what is the probability that I will throw a six? One over six. And now I throw the die. So what is the probability I have a six? About you or us? No, what is the probability that I have a six? You know now what is that. No, you don't know. I know that. You know. Yeah, that is the problem. One over six, right? It's the same. For you, it's the same. But for you, it's not. Yeah, it depends what you know. So you still don't know. But now, this probability is a statement of epistemic uncertainty for you. And before, it was a statement of aleatory uncertainty. So this character of aleatory or epistemic changes over time. When we design a structure, now I go back to real problems again. When we design a structure, we design a beam, right? And we somehow think about some properties of this beam that are relevant for our design, for instance, the bending strength, or the yield strength of this beam. And then we make our analysis. And then, of course, the answer to the scatter of this material property before we design it, the material, we don't know where it comes from. It will be developed somewhere from China. It's a pure aleatory uncertainty because we don't know. And then once the structure is implemented, the beam is there. We could test it. Normally, we don't do. But then the uncertainty becomes epistemic because it has realized. As the throw of the die has realized, after some things are realized, they become epistemic and we can test them. And therefore, normally, the reduction of uncertainties is always an option, or should be an option considered when it comes to the assessment of existing structures because for existing structures, many of the uncertainties become observable, become detectable, and they can potentially be introduced. So that's an important principle when we talk about uncertainty and a probability and also a probability distribution function I will very briefly talk about before we have lunch. This is always a statement of our uncertainty and it contains both parts of uncertainty. But what we want to reduce is always the epistemic part of uncertainty. So long we have talked about events. And just in the end, and you can also read in the script, of course, we have to introduce functions that normally are defined on a physical dimension, on a physical scale. For instance, we can talk about the variable x here. And this x could represent the yearly maximum wind speed. It can represent yield strength of steel. It can represent everything. And we all agree that we have a physical variable that can happen. It can happen on this continuous line, so to say. And now we define something that is called probability density function. That's what we will use. That is what John Johnson will use now in his lecture. And that probability density function is a probability rule that is somehow representing the probability distribution of this variable. So for instance, take the steel yield capacity. We now can indicate with a function where possible outcomes or possible realizations of this variable will be. So linking to the Bastian's considerations, we can have observations on this axis of data. And then this curve is actually indicating the density of data we can have on this line. So this is how you can visualize this. And this is generally referred to as the probability density function. And this is written like this here. We have a small letter, we have a capital letter. And in very general terms, we should always consider this probability density function as a conditional density function. Because it's conditional, at least, it's conditional on its parameters. So these are the parameters of the distribution. And the inference you will learn now after lunch is actually associated to finding estimates for these parameters, parameter estimation. And you will learn that we can never know these parameters exactly. Parameter of a normal distribution, for instance, the mean and the standard deviation. For a uniform distribution, it's the upper and lower limit. It's the parameter of distribution function. And you can never know them exactly from a philosophical point of view. Because we will always represent a full population of things based on some data, based on finite observations. So we have to consider these uncertainties in the parameters as well. Now I have to bring this because it's so central. So suppose that we make an assessment based on data, and then we find out that we cannot estimate this parameter exactly. This is what we will find out. And suppose that we can express the uncertainty about the parameters, also with a density function. So we consider them also distributed. It sounds totally crazy. But we do that. So we have actually two random variables in this. We have the variable of interest. It's our material strings. And we have the parameters of the distribution function. And what we now want to do is we don't want to set up a confidence interval where our parameters lie. Because this confidence interval, you can imagine it's very awkward to use in a decision problem. So confidence intervals. Everybody I've heard about it, but this can actually only be of use when we want to describe the uncertainties somehow, when we want to classify them. But when we want to do something that is essential for engineering, predicting things, then we need the so-called predictive distribution. And the predictive distribution is actually the unconditional version of this. That's my last formula of today. That's the unconditional version of this. And there we, of course, have to do something with an uncertainty of the parameters. And what we do is we integrate the parameters out. So we integrate over all tethers. And we have the conditional distribution of x. And we integrate, in the script I have read the F by the p, but it's the same. We integrate over all parameters. This sounds fancy, but it's more or less a convolution integral. And it's, in the end, also the same what we have seen with this total probability theory. In such an integration, this afternoon, maybe you should try to implement the matter. So now in the next lecture, you will learn how to make estimates, point estimates, based on data. Then we will get out the distribution of the distribution parameters. And then maybe in the afternoon, I can help you to set up an integral how to find out this predictive distribution. So that's the predictive. So that's a very important tool for engineering decision making, because it considers the uncertainties consistently. And what I meant in the beginning, the practical issue very often for the value of information analysis is that we have a strict representation of uncertainties of our prior situation. The prior situation very often evolves from traditional engineering reasoning. And that has normally nothing to do with this strict representation of uncertainties. So for our case studies, for our further procedure, I think the first challenge is to get current situation of a problem and formulate it as strict that we have a fair and complete representation of uncertainties. And then, of course, we can elaborate the effect of reducing this uncertainty. Are there any questions so far? So as I said, Sebastian Bill has already sent you a link to a SIP folder. In the SIP folder, I'm afraid you will see something that has to do with Mac OS. But you have to click on that folder. And then it should be at least possible to open the PDF. And there is also an MLX. That's a live script for MATLAB. And that you can import on the root of your MATLAB program. And you can read it in MATLAB. And there you can also execute some simple programs. And the content of that script goes kind of beyond what I have told you today. So it's actually not meant to give you a full overview in one and a half hours about this topic. But it's meant that you read through this live script. And also, if you are interested, look at literature. I also have attached some PDFs of literature. And it's all you're supposed to ask me in the afternoon about particular things you are wondering about. In the center email, in which email? In the center email later, just after the lecture now. Yeah, good. Yes, I'm sorry for the problems I had in the beginning. There was two advanced computer tools involved. It's always not good. So thanks so far. And have a nice lunch. Ladies and gentlemen, I ask you for your attention. So what you see here is what you see when you open MATLAB, who of you has opened MATLAB at least once in his life? So everybody is aware of it, you two? OK, some not, no problem. MATLAB is a tool you can make calculations, right? It's not a programming language. It's a so-called script language. So it does things in a very convenient and easy way. So that's actually exactly what we need as engineers when we want to come to fast and dirty solutions. But you can also do rather advanced stuff with MATLAB, but you can somehow skip the formal programming hassles you normally have to do when you use C++ or Fortran or other languages. So what I did, I did produce for you a little script. And this script mainly contains text. It's actually not the perfect tool to write the text in a MATLAB script. But especially tomorrow we will see that it will be very convenient to have the text that introduces the background of something and the corresponding program that computes this or examines the theory is actually a convenient one. So I will send you this file and you can open it in MATLAB and then you can scroll down and then you see some text and you see some formulas and you see some examples. And here, for instance, is the example we looked at. You don't have to read every word by word, but this is the example we looked at for this corrosion problem where we had the data and where we had to find out the conditional probabilities that we get these observations. And here you see the corresponding MATLAB file with the data, maybe hard to read, 278 observations that we have an indication and corrosion and so forth. And then you have the calculations that have taken place. So this afternoon you are asked to look at these examples and understand them. And when you don't understand them, we ask. And then there are some examples where I also produced some pictures. So this is an example with these concrete and steel structures with a total probability theory. This is an example on the base with this concrete example continued. It's not very spectacular. It will be much more handy when we have to do more advanced calculations. But also for those of you not having any background in MATLAB it's maybe a very nice start that you see how to calculate things. And here we start introducing something I was not so much talking about. That's the first probability distribution. So what we have here for those that cannot read, I read it for you. It's an F from a variable set. That's our random variable. And that has a distribution that it's P when set is equal to 1. And 1 minus P when set is equal to 0. So who knows what is the name of such a distribution? It's so easy that you maybe have even forgotten. It's a binomial distribution. That's actually a very basic distribution for Bernoulli experiments where we have an outcome that is success or a failure. This distribution we can use for many things. I just introduced it here as a probability distribution, meaning that we can have a function that distributes probabilities to certain events. And in this case we have an event of set equal to 1 on set equal to 0. And we attribute probabilities to these events. Then as a next, and I attached this distribution to an example where we have a mass production of mechanical parts. And we know that the probability that such a mass produced mechanical part is defective is 0.1, just to name a number. And then we can have a probability distribution. It is pretty straightforward, which looks like this. For set equal to 0, that means failure. We have the probability of 1. And set equal to 1, that is the probability of 0.9. And now this might appear very, very basic for you. But now we can elaborate on the fact that we have probability distributions for many different purposes for our engineering uncertainty modeling, and that very many times we find some logical arguments that this probability distribution should look like that. Actually, for many probability distributions we can use the classical interpretation of probability in order to derive them. So we can, without making any experiments, come up with a solution that appears to us as a good suggestion for probability distribution. That's actually interesting to learn. So these probability distributions that we also use to represent a little bit more relevant and a little bit more advanced aspects in our daily life engineering decision making, these probability distributions, they come from somewhere. They have a certain logic. And they should be applied for certain things. And now, making a long story short, we go to this mechanical parts again. So we have a mass production of mechanical parts. And we know that the probability that we have a defective part is 0.1. That would be, for instance, the result from a large experimental campaign where we test 1 million parts. And find that one tenth of these parts is defective. Maybe 100,000. And then we might conclude that this is the probability. And then we draw new mechanical parts from this mass production. And we consider that drawing is somehow fair. So we don't have any dependency in this drawing. So any draw is entirely random. And then we are interested, how many defective parts do we get out from 10 draws? What would you say? Now your spontaneous reaction is 1. But this is 2. Could it be 2? Could it be 3? Could it be 0? Yes or no? It could, right? So we have to elaborate a little bit on that. So let's have this situation. We take 10 out of this mass production. So what is the probability? Now we have a new variable, x. And x means the number of defective parts out of 10. What is the probability that x is 0, given independent drawing? This is something you manage. What is it? 1? No, you may get 10 times. So what is the probability that you get a non-defective part when you draw it one time? 0.9. And the second time you draw, it's again 0.9. 0.9? Yeah? But why? It's very important. When they are independent, every draw we do, 0.9, 0.9. And then we have a situation in the end when we want to have 0 defective parts that we have an intersection of events, namely the intersection of events that we did not get an defective part of the first one and we did not get a part of the second one and the fourth. So it's 0.9 by the power of 10. So if the probability to get one defective part is p, then we say p minus 1, sorry, 1 minus p by the power of 10. So a sloppy representation here on the board, you have the full text in the script. So what is the probability of getting x equal to 10? What is the probability of getting x equal to 10? That means any part we draw is defective. 0.1. 0.1. 0.1. Must be a very, very small number, right? So we all agree on that. Now we go a little bit more interesting. What is the probability that we have, say, x equal to 3? Then you know too much. But just say, how would you first approach this? I mean, you can ask various where you have 3 successes. And so that's 3 among 10 successes. And so when you are calculating each of these tasks, you have p power 3 and 1 minus p power 7 with the product p. OK, he's right, of course. But let's keep it simple. So let's talk about the probability of one possibility that we get 3 failures. And one possibility is that the first 3 1 are defective, and the next 7 1 are non-defective. You can imagine like that. It's one possibility, right? So we say that we have the first 3 p equal to by the power of x times 1 minus p by the power of 10 minus x. That would be the probability of having exactly the first 3 defective and the next 7 non-defective. One possibility. And we have to multiply this by the number of possibilities we get 3 out of 10. And the number of possibilities to get 3 out of 10, that's 10 over 3. This is the nominal thing we remember from our secondary school. I wrote 3, but I'm sorry, after lunch very sloppy. So here only with numbers. But we see that x, this is actually our r meter. So we can express something like that for all kinds of x's. So the general form is probability of x 10 over x p by the power of x 1 minus p 10 minus x. So that's the probability distribution. That's the probability function of a discrete variable, which is the number of defective parts out of 10 rows. This you can see implemented here. So here's a much more pedagogic representation of this example. And here's the corresponding script. And then we have a probability function for this discrete variable where we have here the number of defective parts. That's the number of observed defective parts out of 10 rows. So that's the denominator of distribution. The other one was Bernoulli. And we see that the deduction of this probability function was entirely based on the classical interpretation of probability. We did use symmetry, we did use logic. We did use an assumption that was actually an assumption of symmetry, or at least connected to that. That was independent. Therefore, we could multiply the probabilities. But we use this logic and we found the reason of representation of this phenomena. And in the same way, we can find distributions for different phenomena that we want to physically represent in our engineering problems. For instance, the normal distribution stems from the central limit theory. Everything which is a sum of a big number of random events that sum up and none of these events dominates the others. And the events are also not correlated to each other. That boils down to a normal distribution. So in an engineering problem, when we have the self-weight of a structure consisting of several parts, installations, materials, furniture, that all sum up together, none of them is dominating the sum. We could claim that a normal distribution is maybe a very good model for the weight of a structure. For instance, who can challenge that? What did I tell you at the beginning about event spaces? Louder, please. That's one way to challenge that it's not frequentistic to do so. But when we use the normal distribution to represent self-weight, we might challenge that assumption because the self-weight is defined on a scale from 0 to infinity on a domain. And the normal distribution is defined from minus infinity to plus infinity. So especially if you have a large scatter in the property, the use of the normal distribution is very critical. Because when we, for instance, run simulations, then we get a finite probability to get negative realizations of a property that cannot be negative. So the weight of a structure cannot be negative. We agree on that. The same holds for the material strength or the yield strength of steel. So it's always very important, besides looking at the data and besides doing the inference, we will soon be introduced by John. We should never forget that we should have some logical reasons and some rational reasons to choose a distribution function to represent a property. Just an example, it was highly discussed how to represent the extreme values of a wind speed recently in our community. And then it was advocated that the data that is available fits very nicely to a three-parameter log normal distribution. And that's actually the way to go. It fits much better than to other distributions that have actually a meaning for some of our extreme value statistics. And that's actually true. On the other hand, it's also not very hard to beat a two-parameter distribution with a three-parameter distribution because you have an additional degree of freedom to fit to your data. But on the other hand, when you want to extrapolate on such a model, and that's what we do, especially when we look at extreme events and the modeling of these extreme events, then it's very important that we have a physical foundation and a physical assumption that somehow builds the foundation for this and builds also the foundation for the extrapolation. So are you ready? Yes. With this, I would conclude and steal a lot more time from John. So he will give you now some practical tools. And I hope we can try them out later on today when we do this interactive part of the lecture. So thanks for watching.