And welcome back to our class, of course, about the complete introduction to the science synthase
class, we are still going to talk about Seabourne and we are going to talk about another type of blood
that you guys can create inside of this amazing tool.
And basically this blog is called it's called the joint plot.
And what it will do, it will put dots inside of the graph.
So basically, those little dots you'll see, they will allow us to understand what is the relation
between two variables.
So for the purpose of this example, I'm planning to use the TIPS database.
So basically, if we go in on GitHub, on our Web, on our databases that we will use, it's going to
be the databases right here.
So basically, it's going to be.
You'll see, it's pretty simple to understand.
So the first thing that we'll do is we will import our database.
So how exactly do we import it?
So it's pretty simple.
We want to create a variable.
So in this case will create a variable that will be called data base, as always.
And we are going to make a reference to Seabourne.
So basically, we'll start we start our sentence with S.B and we want to load data set.
So what exactly what Barasat want to loop.
So in this case, we want to load this, which is one of the datasets.
So if you guys want to work with something else, you can.
But for the purpose of this example, we are going to work with this.
So if we print everything, so if we print our data sets or in this case, if we print the data base,
we'll see what this database will look like.
So you can see here is our data.
So pretty simple.
As you can see, we have our total bill.
We have Earthship.
We have if the person is a male or a female, we have the person smokes or know the weekday if it's
dinner time and the size of the table.
All right.
So what we'll do right now will simply calculate what is the tip based on the total bill.
So if the tip is higher for a higher total bill or if the tip is if there is a relationship between
the tip and the total bill or if there is no relationship between those two.
So how exactly will do this?
It's pretty simple.
So we will create a joint plug.
So basically, you'll see this type of graph is pretty interesting.
So how exactly created.
It's pretty simple.
Once again, we need to make a reference to our seabourne too.
So we will start our sentence with S.B, that joint.
So basically joint plot, which is the type of plot that we will use then right here we will need.
We have three arguments that we need to write them.
So we have our X, which would be our first argument.
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
as X.
Then the second argument will be our Y.
So instead of a graph, we have X and we have our Y.
So in this case, what do we want to have as what we want to have?
The total bill will write it down.
Total bill, then the last thing we want to know from where exactly the data is going to come from.
So in our case, the data will come from database.
So from here we will have autonomy.
So basically, if you guys have more than one database, you can choose from where you want to you want
to have your data coming from.
So in our case, we want our data.
To come from the valuable data base.
All right, so we have everything that we need.
Next thing that we want to do is simply run our graphs, basically simply write down that show to be
able to see your graph so we can run everything.
And as you can see, we have our graph right here.
So right now it's time to understand what we have just generated.
So right here, we have our total bill and right here we have our.
So basically, the majority of the tips are somewhere around here.
So we have a tip of three dollars.
Basically, that's the average if we want to see.
So the majority is somewhere right here.
And as you can see, the more the price of the table is, the more the tip will be high and the less
the price of the table will be, the less the tip will be.
So basically, we have extremes are extremes here.
So we have our lowest extreme right here and our highest extreme right here.
And on the other hand, for example, we have some other extremes.
For example, right here we have a tip of five dollars for a meal that doesn't even cost ten dollars.
And we have another extreme right here of a tip of less than one dollar for a meal, a for a meal that
costs more than 30 dollars.
So basically, as you can see, yes, there is a relationship between the tip and the total bill, and
we can see it directly inside of this graph.
So basically, we can automatically see that the more tip costs, the more the total bill will be high.
So the more the total bill is high, the more the tip will be higher.
In this case.
So, yes, we have extremes.
But once again, it's important to understand that in the majority of cases in this case, somewhere
around 80 percent of cases, this is respected.
So basically, the more the total is high, the more the tip will be.
So this is basically how we can analyze data in a basic basically.
So I hope you guys understand right now how to make a joint block or this type of graph.
In other words, and how you can understand it and be able to work with this type of graph.
So that's it for us guys, guys.
And see you all in our next class.