1 00:00:01,140 --> 00:00:06,790 Hello and welcome back to the class of our course about the complete introduction to data science. 2 00:00:07,170 --> 00:00:10,440 So in this class, this will be our last class about death statistics. 3 00:00:10,440 --> 00:00:13,450 And in today's class, the main topic would be probabilities. 4 00:00:13,710 --> 00:00:19,590 So we are going to talk about what exactly are probabilities, where they're used and some of the formulas 5 00:00:19,590 --> 00:00:21,650 that you guys can find in probability. 6 00:00:21,660 --> 00:00:26,760 We're not going to go too much in depth in those formulas because just the concept of statistics and 7 00:00:26,760 --> 00:00:33,510 probability, just the concept, really could be a complete class of at least forty five hours that 8 00:00:33,510 --> 00:00:38,490 we can talk about, about all the functions that are in play, how to use those functions and many other 9 00:00:38,490 --> 00:00:38,700 things. 10 00:00:38,710 --> 00:00:44,690 So try to be as brief as possible and and give you a brief introduction to this topic. 11 00:00:45,300 --> 00:00:46,860 So let's jump right into it. 12 00:00:47,190 --> 00:00:49,560 So basically what exactly are probabilities in this case? 13 00:00:49,560 --> 00:00:54,790 Probabilities are the measure of likelihood that an event will occur in a random experiment. 14 00:00:55,530 --> 00:00:58,760 So basically, it's just the probability of something happening. 15 00:00:58,770 --> 00:01:03,330 So let's say, for example, you are playing with a one dollar piece of money. 16 00:01:03,570 --> 00:01:12,120 And what are the chances that when true, that piece of money it will it will fall on a hat on the face, 17 00:01:12,130 --> 00:01:13,440 so it will fall on face. 18 00:01:13,710 --> 00:01:18,740 So you will have 50 percent of chances that this piece of money, if you throw it, it falls on face. 19 00:01:19,530 --> 00:01:24,390 So basically, those are the police would simply be the odds of this happening. 20 00:01:24,390 --> 00:01:29,670 In that case, probabilities are used in many, many places, not only in data science. 21 00:01:29,680 --> 00:01:33,590 Well, it's really a huge part of it, but it can be used in many, many places. 22 00:01:33,600 --> 00:01:36,460 So basically it's simply calculating the odds of something happening. 23 00:01:36,840 --> 00:01:39,820 So one of the major places where this is used is casinos. 24 00:01:40,170 --> 00:01:45,420 So basically, when you're going to the casino and let's say you are playing a game, why the casino 25 00:01:45,450 --> 00:01:49,920 always wins because you have statisticians that have studied the game. 26 00:01:49,920 --> 00:01:54,370 They have created a game that gives you an advantage on the long run. 27 00:01:54,660 --> 00:01:58,350 So, yes, sometimes the casino might lose money on the short run. 28 00:01:58,350 --> 00:02:00,960 So you come here, you play, you win, you go home. 29 00:02:01,530 --> 00:02:07,590 But on the long run, on, let's say, you know, one hundred plays, one thousand plays, the casino 30 00:02:07,590 --> 00:02:09,370 will always be positive. 31 00:02:10,200 --> 00:02:14,520 So basically, that's the goal of the casino being positive on the on the long run. 32 00:02:15,360 --> 00:02:20,420 So basically where exactly police are used, it can be used in many places, as I said. 33 00:02:20,430 --> 00:02:22,470 So the first one will be games of chances. 34 00:02:22,470 --> 00:02:24,780 So in this case, everywhere where you need to gamble. 35 00:02:24,780 --> 00:02:26,100 So it could be sports. 36 00:02:26,100 --> 00:02:29,850 It could be I don't know, it could be, for example, casinos. 37 00:02:29,850 --> 00:02:30,760 It could be a lottery. 38 00:02:30,760 --> 00:02:33,270 It could be all the places where you have to gamble. 39 00:02:33,280 --> 00:02:39,510 So once again, if you don't imply a mathematical calculation and you just speculate on a certain outcome, 40 00:02:40,140 --> 00:02:42,590 those well, you will include probabilities. 41 00:02:42,610 --> 00:02:48,840 And if you start calculating and well, including math, including math, it's no longer gambling. 42 00:02:50,040 --> 00:02:52,400 Second place the weather prediction. 43 00:02:52,410 --> 00:02:55,590 So basically, for those who don't know how exactly it works, better prediction. 44 00:02:56,190 --> 00:03:02,550 So you have someone that will analyze what exactly will analyze some some things. 45 00:03:02,550 --> 00:03:07,380 For example, looking at clouds, looking at the sun and some other variables that I know nothing about. 46 00:03:07,800 --> 00:03:09,840 But they will analyze some variables. 47 00:03:10,080 --> 00:03:17,370 And by analyzing those variables, they will be able to make a prediction based on many variables. 48 00:03:17,610 --> 00:03:20,790 Once again, this prediction is never 100 percent sure. 49 00:03:21,000 --> 00:03:23,210 It's only based on past experiments. 50 00:03:23,400 --> 00:03:28,680 This is why the weather is not always accurate, but based on past experiences. 51 00:03:29,220 --> 00:03:35,550 The weatherman is able to say, hey, tomorrow we can we will have a sunny day and we have 30 percent 52 00:03:36,720 --> 00:03:41,280 or 30 percent sure that that it's going to rain once again, just 30 percent. 53 00:03:41,670 --> 00:03:44,950 And once again, it will predict based on different variables. 54 00:03:46,020 --> 00:03:47,550 The third part would be finance. 55 00:03:47,630 --> 00:03:54,000 So for everybody who is speculating on the financial market, probabilities are really a huge part of 56 00:03:54,000 --> 00:03:54,100 it. 57 00:03:54,120 --> 00:03:59,460 So to be able to calculate the risk that the person is taking, so just putting the risk as a number, 58 00:03:59,760 --> 00:04:00,820 it's really important. 59 00:04:00,840 --> 00:04:06,660 Well, putting it any number and understanding it, understanding how much profits you could be able 60 00:04:06,660 --> 00:04:12,960 to make, understanding all the variables that are around financial investments require a lot of public 61 00:04:13,140 --> 00:04:19,680 knowledge through that mathematics, since statistics and probabilities are part of statistics that 62 00:04:19,680 --> 00:04:20,760 are part of mathematics. 63 00:04:21,130 --> 00:04:25,910 Of course, mathematics, well, have a lot of probabilities in them. 64 00:04:26,760 --> 00:04:27,790 It's a part of it. 65 00:04:28,140 --> 00:04:33,580 And finally, any other place where you require that you are required to make provisions and that you 66 00:04:33,600 --> 00:04:41,700 are required to speculate on something that will happen or no say in part, what we are going to talk 67 00:04:41,700 --> 00:04:43,310 about today will be the type of event. 68 00:04:43,320 --> 00:04:44,400 So basically probabilities. 69 00:04:44,400 --> 00:04:47,030 You have two types of events that can happen. 70 00:04:47,370 --> 00:04:53,220 So you have this joint events and once again on joint events, basically a difference between both of 71 00:04:53,220 --> 00:04:58,290 them is that one will include two variables. 72 00:04:58,320 --> 00:04:59,730 Well, the first one with. 73 00:05:00,470 --> 00:05:06,950 So if two events can cannot both happen at the same time, so basically the first one will include that 74 00:05:08,180 --> 00:05:13,670 two events can happen at the same time, and the other one will be able to let you have two events that 75 00:05:13,670 --> 00:05:14,700 happen at the same time. 76 00:05:14,960 --> 00:05:21,980 So if we start with the first event type, so that this joint event so a good example that we can have 77 00:05:22,010 --> 00:05:23,400 is the one that I wrote right here. 78 00:05:23,420 --> 00:05:28,580 So the probability that we get one and two simultaneously by rolling the dice so you have a dice in 79 00:05:28,580 --> 00:05:34,250 your hand and you threw that dice, what are is it possible to have one in two at the same time? 80 00:05:34,400 --> 00:05:40,600 No, it's not possible because you only have one one dice and it's possible to have a one or a two. 81 00:05:40,940 --> 00:05:46,390 So this would be a disjoined event because you can't have those answers at the same time. 82 00:05:46,790 --> 00:05:51,860 But let's say right now you have two doses and you threw them and you show those Dice's and you have 83 00:05:51,860 --> 00:05:59,240 a one and you can have a one and a two at the same time, because the fact that the dice, number one, 84 00:05:59,570 --> 00:06:03,050 falls on one is not dependent on the dice. 85 00:06:03,050 --> 00:06:06,480 Number two, that falls on number one or number two or whatever. 86 00:06:06,860 --> 00:06:13,430 So there is an independence between the two things that are thrown in this case, the dice that are 87 00:06:13,430 --> 00:06:13,820 thrown. 88 00:06:14,270 --> 00:06:17,930 And this independence makes it a non disjoint event. 89 00:06:18,860 --> 00:06:22,550 So basically disjoined if there is a dependence between the two events. 90 00:06:23,000 --> 00:06:25,770 So if we throw one dice, it will have a dependence. 91 00:06:25,770 --> 00:06:34,160 So the fact that it falls on the one make the dice well will create a situation where the dice can't 92 00:06:34,160 --> 00:06:37,070 fall on two because it's already fought on one on one. 93 00:06:37,400 --> 00:06:42,740 But on the non disjoined event, if we truly to dice is the fact that the dice number one falls on the 94 00:06:42,740 --> 00:06:48,980 one makes doesn't make a situation when dice number two can fall on one or two decks, number two will 95 00:06:48,980 --> 00:06:50,910 fall on one or two or whatever. 96 00:06:51,050 --> 00:06:53,150 So there is no dependence between Dice's. 97 00:06:54,110 --> 00:06:55,670 So here you can have an example of it. 98 00:06:56,150 --> 00:07:01,460 So you will have mutually exclusive events that will be disjoined events and you will have not mutually 99 00:07:01,460 --> 00:07:03,950 exclusive events that are nonetheless joint events. 100 00:07:04,550 --> 00:07:06,470 And basically the difference. 101 00:07:06,710 --> 00:07:11,990 Enciso, A and B can't happen at the same time and here, and B can happen at the same time. 102 00:07:12,000 --> 00:07:17,330 So in the non disjoined events, it's possible to have them happening at the same time. 103 00:07:18,770 --> 00:07:22,160 Next thing that we are going to talk about today will be the types of probability. 104 00:07:22,170 --> 00:07:26,770 And basically in this case, we have three types that are very important you're going to talk about. 105 00:07:27,080 --> 00:07:28,880 So you have the marginal probabilities. 106 00:07:28,910 --> 00:07:33,020 We have conditional probabilities and finally we have joint probabilities. 107 00:07:33,710 --> 00:07:37,220 The first one that is the marginal probability is pretty simple to understand. 108 00:07:37,220 --> 00:07:46,500 It's simply the odds or the probabilities that something happens right now or happens at a certain moment, 109 00:07:46,500 --> 00:07:46,910 the moment. 110 00:07:47,780 --> 00:07:49,540 So basically, let's look at this example. 111 00:07:49,550 --> 00:07:52,600 So the probability of drawing a black card in a deck of cards. 112 00:07:53,000 --> 00:07:57,550 So say you have a deck of cards right now and you want to you take a card. 113 00:07:57,560 --> 00:08:03,230 So the probability that this card would be a black card, basically half of the deck is black. 114 00:08:03,230 --> 00:08:04,490 How the deck is red. 115 00:08:04,490 --> 00:08:09,500 So you will have 50 percent of chances of taking away taking out a black card. 116 00:08:09,890 --> 00:08:15,510 So basically, this would be an example of marginal probability, the event, the probability that something 117 00:08:15,530 --> 00:08:17,600 happens right now on the spot. 118 00:08:18,590 --> 00:08:23,480 Second thing would be conditional probability in this case, that will be the probability of an event 119 00:08:23,480 --> 00:08:26,450 occurring when another event has occured. 120 00:08:27,290 --> 00:08:29,540 So basically, let's say something happens. 121 00:08:29,540 --> 00:08:34,030 Let's say you have drawn a certain card. 122 00:08:34,040 --> 00:08:41,000 So like an example right here, you have a king and a deck of cards and then this king. 123 00:08:41,000 --> 00:08:46,590 What are the odds that this king would be, let's say red would be a red card? 124 00:08:47,000 --> 00:08:53,240 So once again, the chances of this king being the red card would be 50 percent, because you have four 125 00:08:53,240 --> 00:08:55,460 kings, you have taken away a king. 126 00:08:55,760 --> 00:09:00,980 And the probability of this king being red would be simply 50 percent, because you have four things 127 00:09:00,980 --> 00:09:01,940 to read to black. 128 00:09:02,820 --> 00:09:09,380 But in the other case, if let's say, for example, you have taken out a red card, what are the odds 129 00:09:09,380 --> 00:09:12,710 that those of this red card is a king? 130 00:09:13,070 --> 00:09:18,710 Well, in this case, it's a bit more different because you have well, you have 52 cards in a deck, 131 00:09:19,100 --> 00:09:20,450 so you will have. 132 00:09:22,500 --> 00:09:28,650 We want you in this case, you will have twenty six cards of each of 13 cards that are red, so the 133 00:09:28,650 --> 00:09:33,650 chances of you having a king in those 13 cards would be one on 13. 134 00:09:33,670 --> 00:09:37,190 So once again, this is a fraction, but it's going to be something like seven percent. 135 00:09:38,340 --> 00:09:44,790 So you will have seven percent of chances that this card that you just took took out would be king. 136 00:09:46,020 --> 00:09:46,410 All right. 137 00:09:46,410 --> 00:09:52,710 So the final one, the joint probability, it's well, looks like the conditional probability you will 138 00:09:52,710 --> 00:09:56,960 see it's pretty much the same thing, but there is a small difference between both of them. 139 00:09:58,680 --> 00:10:03,540 So the joint probability is the reality that two events occur at the same time. 140 00:10:03,900 --> 00:10:09,600 So what are the odds that you drew a one and a half and a deck of cards? 141 00:10:09,600 --> 00:10:13,690 So basically, what are the probabilities that you do a one heart in a deck of cards? 142 00:10:14,070 --> 00:10:18,730 So basically this probability would be one on fifty two because there is just one heart. 143 00:10:18,750 --> 00:10:23,600 So one eight in this case, it's going to be a what ace. 144 00:10:23,790 --> 00:10:30,690 So basically in this case, it's going it's going to be one on 52 because you only have one ace of heart 145 00:10:30,690 --> 00:10:38,280 inside of the deck of cards if the probability of future ace of red. 146 00:10:38,310 --> 00:10:41,040 So in this case, it's going to be one on the twenty six. 147 00:10:41,060 --> 00:10:49,470 So the probability of you drawing the ace a red, it's going to be greater than probability of you drawing 148 00:10:49,620 --> 00:10:50,250 ace. 149 00:10:50,250 --> 00:10:51,500 That is a part. 150 00:10:52,530 --> 00:10:55,940 So basically this is the difference between the conditional and the joint. 151 00:10:55,950 --> 00:11:03,990 So basically the conditional will will happen if an event occurs, the probability that another event 152 00:11:04,290 --> 00:11:05,230 occurs as well. 153 00:11:05,550 --> 00:11:06,840 So this would be the conditional. 154 00:11:07,860 --> 00:11:12,180 So something happens and then you are looking at the probabilities that something else happens. 155 00:11:12,480 --> 00:11:17,340 So it's basically two probabilities and the joint probability, it's like putting those two probabilities 156 00:11:17,340 --> 00:11:17,860 together. 157 00:11:18,210 --> 00:11:22,950 So basically, let's let's take once again this example right here of the king. 158 00:11:22,950 --> 00:11:25,050 Let's say you took a king of your pack of cards. 159 00:11:25,290 --> 00:11:30,720 In the first case, you calculate the stress, the probabilities, a few a king, then you will calculate 160 00:11:30,720 --> 00:11:33,330 the probability of you joining it can't read King. 161 00:11:33,360 --> 00:11:39,960 So in this case that you drew a red card as well, in the joint probability, you will simply calculate 162 00:11:39,960 --> 00:11:42,450 the probability of you drawing a red king. 163 00:11:42,540 --> 00:11:45,520 So this would be just this calculation that will be made. 164 00:11:47,100 --> 00:11:51,960 So this is for the title of the last thing that we are going to think about are the probability distributions. 165 00:11:52,290 --> 00:11:57,570 So once again, this is the birth of the course that takes the most of time because there is a lot and 166 00:11:57,570 --> 00:11:58,860 a lot and a lot of formulas. 167 00:11:59,490 --> 00:12:01,000 They pretty much look like this. 168 00:12:01,020 --> 00:12:06,900 So as you can see, basically what you need to understand, we're not going to go to each of the formulas 169 00:12:07,050 --> 00:12:09,180 well, through each of the functions. 170 00:12:09,570 --> 00:12:13,890 But what you need to understand is that the probability distributions are a function that describes 171 00:12:13,890 --> 00:12:20,070 the likelihood of obtaining a possible value that a random variable can assume based on different criteria. 172 00:12:21,120 --> 00:12:26,230 So basically, you have a situation that happens and you want to calculate the odds of something happening. 173 00:12:26,520 --> 00:12:28,020 So how exactly do you calculated? 174 00:12:28,030 --> 00:12:34,500 So you need to take all the variables in consideration and based on the situation, you will have to 175 00:12:34,500 --> 00:12:36,190 use a certain function. 176 00:12:36,210 --> 00:12:41,520 So you will not use that geometrical function at the same time that you will use the B well, the Benally 177 00:12:41,520 --> 00:12:48,360 function, for example, or the binomial function or the plus one function, everything all those functions 178 00:12:48,360 --> 00:12:52,730 are based on different situations and are based on different type of events. 179 00:12:52,750 --> 00:12:58,740 So let's say, for example, if you have a situation where where you, I don't know, draw cards, for 180 00:12:58,740 --> 00:13:05,820 example, from a deck and you put them back inside of the deck and you want to have the probability 181 00:13:05,820 --> 00:13:12,000 of you drawing two times the same card so will not use the same function that if you don't put back 182 00:13:12,000 --> 00:13:13,080 the cards in the deck. 183 00:13:13,110 --> 00:13:17,940 So basically you will use two different functions, because in the first situation, you took the cards 184 00:13:17,940 --> 00:13:23,580 from the deck and each time you put them back inside of the deck and in the same situation, you didn't 185 00:13:23,610 --> 00:13:26,290 you didn't put the cards back inside the deck. 186 00:13:26,700 --> 00:13:31,830 So there is depending of the situation, you will use different probability distributions. 187 00:13:31,830 --> 00:13:33,030 So different functions. 188 00:13:33,870 --> 00:13:38,530 So this is what you guys need to understand about probability distributions once again. 189 00:13:38,550 --> 00:13:39,540 There is a lot of them. 190 00:13:39,540 --> 00:13:44,660 And to become, well, more advanced and understand them all, you need to practice. 191 00:13:44,730 --> 00:13:50,910 If you guys are interested, I highly suggest you to just take a statistics course and you will have 192 00:13:51,030 --> 00:13:57,060 everything that you need instead of it because, well, especially if you want to know a bit more about 193 00:13:57,180 --> 00:13:58,860 those functions. 194 00:13:59,940 --> 00:14:03,800 So basically what we talked about inside of the scores are probabilities in. 195 00:14:05,310 --> 00:14:07,520 Well, we talked about probabilities. 196 00:14:07,830 --> 00:14:09,960 We talked about types of event. 197 00:14:10,200 --> 00:14:16,870 We talked about type different types of probabilities and finally probability distributions that are 198 00:14:16,890 --> 00:14:18,160 this part of the course. 199 00:14:19,020 --> 00:14:21,900 So this, as I said, the statistical. 200 00:14:21,980 --> 00:14:29,980 Part of the scores can easily be done in at least two university level courses, so it's really complicated. 201 00:14:29,990 --> 00:14:35,330 I try to make it as easy as possible for you guys to understand it. 202 00:14:35,630 --> 00:14:38,300 So once again, this is just a an introduction to it. 203 00:14:38,570 --> 00:14:40,400 So I hope you guys liked it. 204 00:14:40,400 --> 00:14:46,520 And if you liked, well, all the studies, if you like the statistical part and want to get well to 205 00:14:46,520 --> 00:14:50,420 understand it a bit better, I highly suggest you to take a statistical course. 206 00:14:50,690 --> 00:14:54,770 We're just to practice a little bit and you'll see it's not that hard. 207 00:14:54,770 --> 00:14:56,330 It's not that complicated to understand. 208 00:14:56,690 --> 00:14:58,130 It's just a question of practice. 209 00:14:58,440 --> 00:15:03,530 So that's it for this last course about statistics and see in our next class.