Welcome back to an intuitive introduction to probability. In this lecture, I want to tell you about probability tables. Why do we use tables? So far, our calculations were always on rather small examples. There was an A, and a B, an intersection of A and B and so on. Often however, we want to look at probabilities in more complex examples. And we have many different probabilities. We need to order them. We need to do some accounting, and get some structure on them. And that's what probability tables are good for. Let me show you a first example of data. <i>Here we have from our most recent</i> <i>year when complete data is available.</i> <i>The number of foreign visitors to Switzerland.</i> <i>Our friends in Australia may forgive me.</i> <i>I left you out because your numbers weren't that large.</i> <i>So, let's divide the world into 4 continents.</i> <i>Africa, The Americas, Asia and Europe.</i> <i>Visitors in Switzerland can stay overnight</i> <i>either in a hotel or another destination.</i> <i>Another destination could be a caravan, could be a camping ground,</i> <i>it could be a used hostel. It could be friends,</i> <i>it could be a private house, or private apartment</i> <i>that people rent.</i> <i>We see hear in this particular year,</i> <i>there were about 28.3 million visitors in total.</i> <i>At the bottom, we see the totals</i> <i>of overnight stays by foreign visitors from the 4 continents.</i> <i>Not surprisingly, most visitors came from Europe,</i> <i>Switzerland is in Europe.</i> <i>And fewer people came from other continents</i> <i>where you effectively have to fly.</i> <i>We see that about 17 million overnight stays</i> <i>were in hotels. And a bit more than 11 million</i> <i>were in these other domiciles.</i> <i>Now, I think you agree with me</i> <i>this table is a mess.</i> <i>We see these long numbers, we have numbers between 50,000 and 28 million.</i> <i>It's difficult to sort of look and understand this.</i> <i>So, this table of raw data of counts,</i> <i>we typically like to translate into proportions.</i> <i>And then we can also use them as probabilities.</i> <i>Using once again, concept number 2, empirical probabilities.</i> <i>Here in the bottom right hand corner, with the green shade,</i> <i>there is always 100%.</i> <i>How do I get this data?</i> <i>If you look at the company's excel spreadsheet you will see,</i> <i>you just divide every number by the total 28.3 million.</i> <i>Whiles the total divided by itself gives me this 1.000.</i> <i>We see that 60% of all overnight stays</i> <i>were in hotels, 40% were other.</i> <i>Those together, 60 plus 40, gives me the 1.</i> <i>At the bottom, we see the percentages for the 4 continents.</i> 1.2% for Africa, 7 and a half for the Americas, 7.1 for Asia, 84.2 in Europe. You add those numbers up, and guess what? We are back to a 100%. In the middle, we see now intersection probabilities. For example, the upper left hand corner, hotel and Africa, 0.010, so... 1% of all overnight stays were by visitors from Africa in hotels. And we have 8 of these intersection probabilities. Here now, a little bit of lingo from these probability tables. The numbers in the margins of the table, so at the very right column, and the very bottom row, are called marginal probabilities. Here, for hotels, we will say P of hotel is 0.6. <i>At the bottom, the P of Americas, 7 and a half percent.</i> <i>P of Asia, 7.1%.</i> <i>So, </i> People in probability theory are not very creative or imaginative. These are indeed the margins of the table. And that's where the name came from, marginal probabilities. In the interior, in the middle, we have these intersection probabilities. As I mentioned before, probability of hotel and Africa, 1%. <i>Probability of other and Europe, 38.1%.</i> <i>These intersection probabilities in the interior are called joint probabilities.</i> Because we're looking at joint events of hotel and Africa joining and both happening together. That's the motivation for the choice of the name. You can now see scale this as far as you want. <i>So, it doesn't have to be just by 4.</i> <i>You can have as many rows as you want.</i> <i>Here I use the generic M.</i> <i>So we have A1, A2, all the way to A-M.</i> <i>You can have as many columns as you want.</i> <i>Here I use a generic K, B1, to B2, to B-K.</i> <i>Here is the requirement that these events must satisfy.</i> <i>A1, A2, all the way to A-M,</i> <i>need to be what's called, mutually exclusive.</i> <i>We have heard that before in the term of disjoint.</i> <i>So, they can't happen simultaneously.</i> <i>And they need to be collectively exhaustive.</i> <i>So here, you either stay in a hotel, or in other.</i> <i>Or, you are from Africa, the Americas, Asia, or Europe.</i> <i>No other possibility.</i> <i>So that's what it means to be completely exhaustive.</i> <i>Mutually exclusive means, either one or the other happens.</i> <i>So don't tell me, oh I smoked but didn't inhale.</i> That's nonsense! Either you smoked, or you did not smoke. So there's an empty intersection and everything is covered. And then, we have the joint probabilities, these intersection probabilities in the interior. The probabilities in the margins, the marginal probabilities are then the sums across the rows or across the columns. And so, here now, let me show you <i>this. If you look at the column,</i> <i>the Africa column 1%, plus 0.2%</i> <i>equals 1.2% in the total.</i> <i>If you look at the role of other, we have 0.002.</i> <i>Plus 0.011, plus 0.007,</i> <i>plus 0.381,</i> <i>the total is 40%.</i> <i>So the margin, is the sum of the interior.</i> <i>Now, probability tables are very helpful</i> to show us the margin or total probability of an event. Probability of hotel, probability of Asia. And it's great at showing us these intersection probabilities. What, these probability tables do not show us are conditional probabilities. But those we cannot really easily calculate, let me show you how. <i>What is the probability that overnight stay</i> <i>in other, is from a person visiting from Europe.</i> <i>What do we do? Remember the conditional probability definition.</i> <i>Takes the intersection probability and divide it</i> <i>by the probability of the event that occurred.</i> So here, the probability of Europe given other, <i>take the intersection probability that's the probability in the middle,</i> <i>in the interior of the table, and divide it by the appropriate marginal probability.</i> <i>Here we learn, more than 95%</i> <i>of all overnight stays in other,</i> <i>in caravans, in camping grounds, in vacation houses or apartments,</i> <i>in youth hostels is from European visitors.</i> <i>And here in the table, notice what we did.</i> <i>We took the 0.381, the interior probability, Europe and other,</i> <i>and divide it by the probability of other, 0.4.</i> <i>So you can just take the element from the interior of the table</i> <i>divide it by the marginal probability, and voila! </i> <i>There's your conditional probability.</i> <i>We can also go in the other direction.</i> <i>Other, given Europe.</i> <i>So, what is the probability that an European visitor</i> <i>will stay an overnight in other?</i> <i>So now, Europe is given,</i> <i>probability of other, given Europe is what we're looking for.</i> <i>And now, we take the same intersection probability,</i> <i>but we're dividing by the marginal probability in the bottom row, the totals.</i> <i>So 0.38 divided by 0.842.</i> <i>And that gives me 45%.</i> <i>To sum up, </i> why do we use probability tables? Things can get very quickly, very ugly, if we have may different events. So we need to learn to structure the presentation of probabilities. Probability tables are a great way to do this. That's why we use it. In the probability tables, we see marginal probabilities and joint probabilities. And so that's why we need to talk about these concepts. We will use these probability tables for more calculations in the next few lectures. Thanks for your attention, and please come back.