1 00:00:00,320 --> 00:00:05,950 And welcome back to our class, of course, about the complete introduction to the science synthase 2 00:00:06,090 --> 00:00:13,890 class, we are still going to talk about Seabourne and we are going to talk about another type of blood 3 00:00:13,890 --> 00:00:16,890 that you guys can create inside of this amazing tool. 4 00:00:17,760 --> 00:00:21,020 And basically this blog is called it's called the joint plot. 5 00:00:21,510 --> 00:00:24,830 And what it will do, it will put dots inside of the graph. 6 00:00:24,840 --> 00:00:32,070 So basically, those little dots you'll see, they will allow us to understand what is the relation 7 00:00:32,070 --> 00:00:33,370 between two variables. 8 00:00:33,990 --> 00:00:38,910 So for the purpose of this example, I'm planning to use the TIPS database. 9 00:00:38,940 --> 00:00:45,840 So basically, if we go in on GitHub, on our Web, on our databases that we will use, it's going to 10 00:00:45,840 --> 00:00:46,960 be the databases right here. 11 00:00:46,980 --> 00:00:47,820 So basically, it's going to be. 12 00:00:49,430 --> 00:00:51,890 You'll see, it's pretty simple to understand. 13 00:00:52,490 --> 00:00:56,040 So the first thing that we'll do is we will import our database. 14 00:00:56,060 --> 00:00:57,710 So how exactly do we import it? 15 00:00:58,100 --> 00:00:58,880 So it's pretty simple. 16 00:00:58,890 --> 00:01:00,260 We want to create a variable. 17 00:01:00,260 --> 00:01:05,030 So in this case will create a variable that will be called data base, as always. 18 00:01:06,020 --> 00:01:09,420 And we are going to make a reference to Seabourne. 19 00:01:09,470 --> 00:01:16,500 So basically, we'll start we start our sentence with S.B and we want to load data set. 20 00:01:17,600 --> 00:01:20,160 So what exactly what Barasat want to loop. 21 00:01:20,570 --> 00:01:24,060 So in this case, we want to load this, which is one of the datasets. 22 00:01:24,260 --> 00:01:26,480 So if you guys want to work with something else, you can. 23 00:01:26,480 --> 00:01:29,650 But for the purpose of this example, we are going to work with this. 24 00:01:30,410 --> 00:01:38,330 So if we print everything, so if we print our data sets or in this case, if we print the data base, 25 00:01:41,000 --> 00:01:43,490 we'll see what this database will look like. 26 00:01:44,480 --> 00:01:46,480 So you can see here is our data. 27 00:01:47,060 --> 00:01:47,780 So pretty simple. 28 00:01:47,780 --> 00:01:49,400 As you can see, we have our total bill. 29 00:01:49,400 --> 00:01:50,240 We have Earthship. 30 00:01:50,240 --> 00:01:57,380 We have if the person is a male or a female, we have the person smokes or know the weekday if it's 31 00:01:57,380 --> 00:02:00,500 dinner time and the size of the table. 32 00:02:01,070 --> 00:02:01,480 All right. 33 00:02:01,490 --> 00:02:06,630 So what we'll do right now will simply calculate what is the tip based on the total bill. 34 00:02:07,100 --> 00:02:14,720 So if the tip is higher for a higher total bill or if the tip is if there is a relationship between 35 00:02:14,720 --> 00:02:19,590 the tip and the total bill or if there is no relationship between those two. 36 00:02:20,900 --> 00:02:22,180 So how exactly will do this? 37 00:02:22,520 --> 00:02:23,270 It's pretty simple. 38 00:02:23,280 --> 00:02:25,340 So we will create a joint plug. 39 00:02:25,370 --> 00:02:28,790 So basically, you'll see this type of graph is pretty interesting. 40 00:02:29,750 --> 00:02:30,940 So how exactly created. 41 00:02:30,950 --> 00:02:31,620 It's pretty simple. 42 00:02:31,640 --> 00:02:35,050 Once again, we need to make a reference to our seabourne too. 43 00:02:35,390 --> 00:02:39,640 So we will start our sentence with S.B, that joint. 44 00:02:39,650 --> 00:02:45,050 So basically joint plot, which is the type of plot that we will use then right here we will need. 45 00:02:45,050 --> 00:02:47,660 We have three arguments that we need to write them. 46 00:02:48,430 --> 00:02:52,130 So we have our X, which would be our first argument. 47 00:02:52,130 --> 00:02:59,120 And in this case, what we want to have as an X, we want to have tips as an X, so here will have tips 48 00:02:59,120 --> 00:03:00,080 as X. 49 00:03:00,620 --> 00:03:02,940 Then the second argument will be our Y. 50 00:03:02,960 --> 00:03:06,050 So instead of a graph, we have X and we have our Y. 51 00:03:06,530 --> 00:03:09,980 So in this case, what do we want to have as what we want to have? 52 00:03:09,980 --> 00:03:12,110 The total bill will write it down. 53 00:03:12,110 --> 00:03:20,580 Total bill, then the last thing we want to know from where exactly the data is going to come from. 54 00:03:20,600 --> 00:03:23,890 So in our case, the data will come from database. 55 00:03:23,930 --> 00:03:26,460 So from here we will have autonomy. 56 00:03:26,480 --> 00:03:31,100 So basically, if you guys have more than one database, you can choose from where you want to you want 57 00:03:31,100 --> 00:03:32,340 to have your data coming from. 58 00:03:33,440 --> 00:03:35,660 So in our case, we want our data. 59 00:03:37,010 --> 00:03:40,250 To come from the valuable data base. 60 00:03:41,810 --> 00:03:43,910 All right, so we have everything that we need. 61 00:03:44,540 --> 00:03:51,590 Next thing that we want to do is simply run our graphs, basically simply write down that show to be 62 00:03:51,590 --> 00:03:54,800 able to see your graph so we can run everything. 63 00:03:56,190 --> 00:03:58,480 And as you can see, we have our graph right here. 64 00:03:58,830 --> 00:04:02,220 So right now it's time to understand what we have just generated. 65 00:04:03,450 --> 00:04:07,020 So right here, we have our total bill and right here we have our. 66 00:04:07,590 --> 00:04:11,210 So basically, the majority of the tips are somewhere around here. 67 00:04:12,030 --> 00:04:14,220 So we have a tip of three dollars. 68 00:04:14,670 --> 00:04:18,030 Basically, that's the average if we want to see. 69 00:04:18,050 --> 00:04:19,640 So the majority is somewhere right here. 70 00:04:19,950 --> 00:04:25,650 And as you can see, the more the price of the table is, the more the tip will be high and the less 71 00:04:25,650 --> 00:04:27,840 the price of the table will be, the less the tip will be. 72 00:04:27,840 --> 00:04:30,410 So basically, we have extremes are extremes here. 73 00:04:30,420 --> 00:04:35,240 So we have our lowest extreme right here and our highest extreme right here. 74 00:04:35,580 --> 00:04:38,280 And on the other hand, for example, we have some other extremes. 75 00:04:38,280 --> 00:04:44,640 For example, right here we have a tip of five dollars for a meal that doesn't even cost ten dollars. 76 00:04:45,090 --> 00:04:51,750 And we have another extreme right here of a tip of less than one dollar for a meal, a for a meal that 77 00:04:51,750 --> 00:04:53,240 costs more than 30 dollars. 78 00:04:53,760 --> 00:04:59,010 So basically, as you can see, yes, there is a relationship between the tip and the total bill, and 79 00:04:59,010 --> 00:05:01,970 we can see it directly inside of this graph. 80 00:05:02,910 --> 00:05:08,850 So basically, we can automatically see that the more tip costs, the more the total bill will be high. 81 00:05:09,240 --> 00:05:13,180 So the more the total bill is high, the more the tip will be higher. 82 00:05:13,230 --> 00:05:13,950 In this case. 83 00:05:14,520 --> 00:05:16,140 So, yes, we have extremes. 84 00:05:16,140 --> 00:05:20,940 But once again, it's important to understand that in the majority of cases in this case, somewhere 85 00:05:20,940 --> 00:05:25,120 around 80 percent of cases, this is respected. 86 00:05:25,140 --> 00:05:28,380 So basically, the more the total is high, the more the tip will be. 87 00:05:29,640 --> 00:05:34,840 So this is basically how we can analyze data in a basic basically. 88 00:05:35,250 --> 00:05:39,940 So I hope you guys understand right now how to make a joint block or this type of graph. 89 00:05:39,960 --> 00:05:45,630 In other words, and how you can understand it and be able to work with this type of graph. 90 00:05:45,870 --> 00:05:46,980 So that's it for us guys, guys. 91 00:05:46,980 --> 00:05:49,110 And see you all in our next class.