 Let's look at an example of total expectation. Consider a communications network. We have two computers, A and B. A wants to send packets to computer B. In this network, let's say there are just two paths to send packets. So A can send packets to B via the blue path, path one, or it can send packets to B via the red path, path two. And let's say we know the average delay of packets across each path. So across the path one, it's 100 milliseconds. And across path two, it's 150 milliseconds. And also, let's say we know the probability of sending packets across each path. So the probability that A sends packets across path one is 30%, or 0.3%. And 70% of the packets are sent via path two. So in this system, we have the event of sending packets via path one. We know the expected value of the delay for that event, 100 milliseconds. And we know the probability of that event occurring, 0.3%, or 30%, and similar for path two. The two paths are independent of each other. We cannot send packets across both paths, or a packet across both paths. They go via one or the other. And in this case, let's assume there are no other paths they can take. The packets either take path one or path two. So in this case, we can look at the total expectation. That is the total average delay in the system. So we have the total expected value is the sum of the expected value for path one times by the probability of using path one plus the expected value for using path two times by the probability of using path two. So we have values for this. The expected value for path one is 100 milliseconds. And the probability is 0.3, or 30%. And for path two, it's 150 milliseconds, with a probability of 0.7. And we calculate that to be the total expectation of 135 milliseconds. So in our system, on average, our packets will take 135 milliseconds to get from A to B.