So let us see how to do univariate analysis and what we will do.
EDT, which is we will be finding out, extended the dictionary by looking at the EDT.
If we have Dode on distribution of some of the variables, we'll be plotting histograms or box plots
to find out whether there is skewness or outliers.
And lastly, we'll be looking at the categorical variables making their bar plots and looking at their
distribution.
When we have looked at EGD histograms, Mock's plots and bar plots, we will summarize out observations
in the end.
So let us look at the EDT first IT league and we found out by writing somebody back at D.F..
So when we press control under this command, is it done?
And we get the EGD blue hair, you can see that for each variable.
I'm getting some information.
The information includes the minimum value, maximum value.
Meanwhile, you, Andy, for corteges, that is first quarter, second quarter and third quartile.
And the maximum value second quartile is also the median value since second quartile represents these
58 percentile value, which is also the middle value and the median.
Now, one of the things we have to do when we have EGD compared the median and mean values.
So whichever variable has skewness or outliers will have large difference between median and mean value.
If we look at mean and median rally of price, they look approximately in the same range.
And at that indicator of Skewness or outliers, their distribution in different caudate.
So if we look at this particular variable call and hard rooms during the first quarter day, which is
from minimum to first quartile value, ten point zero six to learn point one nine in this small range
of one point one three.
I have 25 percent of the values.
But if I look at the third quarter lendee, maximum value from 14 to 101, twenty five percent of values
are and are having a range from 14 to 101, which is a huge range.
So it is clear to me that it is skewness awesome out that are present in the last quartile, which is
giving us this result.
Similarly, if we look at these rainfall variable, the first quarter is from three to twenty eight,
whereas the last quarter is from 50 to 60.
So it is suggesting that probably in the first quarter we either have outliers or the distribution is
skewed.
So by looking at the distribution of caudate, we can estimate whether there are outliers or skewness
variables or not.
You can go through each of these variables.
I have identified these two eatables and we will be plotting box plot to identify whether there is skewness
or outlet.
The second thing we should note is the presence of and is in all of these variables almost seem features
at present.
But in N husband you can see that there is an added value of N is and as he was ending missing values
in the doodah.
So when we imported our data, whenever there was a blank space, are automatically converted into any
and the count of any is going ahead.
So in N Horsburgh variable, we do not have ID values.
So we need to handle these eight missing values.
Since analysis cannot be done if the dataset has missing values.
The third thing to be noticed in EGD is the distribution of categorical variables.
As you know, we have three categorical variables airport, water, body and bus terminal.
If you look at airport, we have two 27 no and 279 yes.
So there is nothing suspicious about this variable.
Similarly, if I look at the distribution of water boarding variable, it is also not suspicious.
But if you look at bus terminal, clearly there is something wrong with this variable.
We have all the values as yes, there is no other category.
And this bus terminal that evil will plot these into a bomb plot.
Also, just to visualize how the distribution is, what these variables.
If we have a lot of categories using visual cues can help identify any problems in need, categorical
variables.
So let's create box plot for the two variables for which we suspect that there is outliers or skewness
present.
So to create a box blur, we need to write a single line of code, which is box plot and within bracket
relate.
D.F. Dollar.
The variable for which we want to create the box plot, which is.
And heartworms.
Let us zoom in this graph.
So you can see that it has several parts.
So it has a box.
This is a box and it has two lanes, one above and one below.
And this one dark lane in the middle to the dog lane in the middle is representing the median value.
This line of the box is for the first quarter.
This line is for detailed quartiles.
So you can notice that a lot of values are concentrated in this small regionally.
Only these two points are extremely far away from it.
And we can easily see that these are outliers or outlying values which we need to ratify or modify it
so that these do not impact our analysis not to see the outliers in the gene fault that even we look
at.
And then a matter which is usually used in a regression analysis will create a scatter plot of rainfall
variable response variable, which is sold to create a scatterplot with a beer, beers and within bracket
data.
This is little less.
And which is a boulder, Abdeh.
No.
Right.
If dollar salt.
Remember, this is capital in total.
Plus, the F dollar rainfall.
So you can see that most of the point are in this growing due to 60 day annually.
Only one point is nearly zero.
And it is very far away from all the other point, too.
That is why we can also classify this point as an outlier.
And we'll be handling this point.
Also.
And now we'll be drawing board plot of the categorical variables
to see the distribution of a categorical variable.
We can write bar plot and within bracket we'll rate Peyman.
Blackard, DFW Airport.
So you can see this is the bad blood of aiport variable.
It has two categories.
Yes and no.
And the height of these bars is giving us these values in these two categories.
We can similarly create, but not for other variables also.
So let's create DeBartolo for bus terminal.
We already saw in EGD that it has only one category which we are seeing in the butler, not to the point
of grabbing a bar plodders.
Usually when we have a lot of categories, if we draw Butler, we can easily identify such categories,
which may not be very useful for the analysis purpose.
We can identify such categories and glub them or aggregate them with other categories for better analysis.
So here it is clear that this bus terminal very well has only one category.
Having one category makes this variable useless.
That is, since it is not having any added value, we cannot determine its impact on the response variable,
but therefore we do not need to keep this variable bus terminal in our analysis.
So now let us summarize these observations from just univariate analysis.
The first observation is we have identified two variables, which are outliers.
So in heart rooms and rainfall has outliers.
Our second observation is, and horse bait has missing the loose.
And the third observation is that there is a categorical variable called bus terminal, which is useless.
The bus tour is useless.
So we need to take action on these three observations, which we will see in the coming videos.