In this session, we're going to see univariate analysis, what is the reason I'm considering each of
the variables one by one, I'm analyzing each other variables in isolation, like if, let's say gender
is a variable, I'm analyzing gender.
If income is a variable, I'm analyzing income.
How I'm analyzing in isolation.
Right.
What kind of analysis I do depends on whether the data is numerical, continues variables or categorical
gains for is a continuous variable.
I'll be using measures of central tendency in this push.
What is measures of central tendency in this position?
You will see that very shortly.
Right.
But why are we doing this?
We are doing this because of two reasons.
One, I want to ensure.
I get a better idea about my life.
That's very obvious.
The second reason is because of the concept of population.
What is this population of?
Many times in real life situations, we want to get to work on the complete historical leader, we will
only be provided with a sample of the historical data.
Right, it is up to us to ensure that the sample data that we have taken up for developing here is representative
of the entire historical dataset.
For example, if my entire historical dataset consisted of data from all the states in India or the
US, if I take the sample data for the purpose of.
Creating my machine learning model, I must ensure the representativeness is adhered to.
What I mean by that is if, for example, the Midwest, you know, in the US, right in the historical
data, contributed to 30 percent of all the insurance cases in the sample.
Also, I must ensure that the Midwest contributes to 30 percent.
But.
This is something that happens in opinion polls and all right, when they do a survey as to which party
will win, which candidate will win, they need to ensure the person who is doing the survey needs to
ensure that the representativeness is taken care.
Like, if I'm doing an all India survey as to which party will come to power, I need to ensure this
representativeness in the electorate population is taken.
Right.
So the same concept we're doing here also because it's a very basic concept, that is when analyzing
the variables in isolation, it will help to validate this representativeness aspect.
That is, whatever proportion I have in the complete dataset, which is called as population, I must
ensure the same representation level is maintained in my sample data.
Also, I please note that, you know, you don't get to work on the complete dataset.
You know what is called as population.
That can be various reasons for that and what the data can be collected.
Right.
Only the recent data may be available.
Right.
Your database may have some limitations, so you may be compromising.
So that can be various reasons, but that's a fact of life, right, if you get to work on the complete
data set.
Well and good, but what if you don't get to work on the complete dataset?
Must still continue, right.
We have a wonderful principle of statistics, which is the representation aspect in population as a
sample, please here to ensure that the sample that you are taking for developing machine learning model.
Right.
Is representative of the population or the complete dataset.
I believe in order for it.
So let's get back to the univariate analysis in univariate analysis, if it is a continuous data for
a number.
Right.
What I do is I look at what is the measure of central tendency and what is dispersion.
Central tendency tells me, you know, I don't have a legitimate point.
What is the value this person tells?
Right.
What is the level of radiation that I have in my process?
But if let's say I take the example of Moxa painting a glass, if I say that in all the average motss,
say 80 percent.
But few students have scored even 95 percent or 99 percent, and few students have scored just 10 percent
of kids.
So this Extreme's right, eight percent and 99 percent.
That tells me the variation that is there.
I need to understand this also, right?
So that's what I'll do for my country.
So if let's say these are the numbers.
OK, I mean, it's nothing but the arithmetic, right?
I add all these numbers and divide by the number of entries, which is divided by five points.
This arithmetic average median is the midpoint after arranging the data in ascending order.
OK, please note, I need or indeed in ascending order and the midpoint is the number that counts.
OK.
That's my more this the frequently occurring member.
OK, standard deviation is the extent of deviation from the average, how much I might deviating from
the average.
Get that's what I do in.
Measures of central tendency and the other concepts like percentiles, they are also used, but I'm
not covering it here.
If you are interested, you can go ahead and understand it.
But this is sufficient for most of the scenarios.
OK, you will be using median more than on other concepts like the central tendency in this push and
concepts subsequently writing the other analysis also.
So now let's apply to some new tendency in this position to data.
I start with the income, right, I look at what is the mean one way to understand the variation.
OK, yes, of course, calculating the standard, I can also plot the frequency distribution.
Like frequency distribution.
If I put this frequency distribution, I can find that most of the income is.
Zero to 5000 on the next is between 5000 to 20000 and beyond 20000 the.
Few values of it, so that's the first information I get.
If I were to apply this apply, the concept of population was a sample based on this, if you see this
here, you know, I can convert this into some percentages.
Majorities in 025 dozing off of that is in five thousand to twenty thousand.
And then few entries are there greater than 20000 of.
This is, let's say for this my sample, I need to verify if this proportion is there in my population
or the complete dataset or if it is not there, I'm setting myself up for failure.
Like my forecast accuracy will definitely take a minute.
Please stop your exercise if the sample is not representative of the population.
You must stop.
You must first ensure that the representativeness is followed.
That's one of the fundamental things in.
Machine learning or in statistics?
Machine learning is based on statistics.
So that's the thing you will validate.
So now that now you've got this right for categorical variables, you know, I find out what is the
for example, in the case of gender?
What is the percentage of male?
What is the percentage of female?
Right.
What is the percentage of graduate?
What is the percentage of of the number of graduates?
Number of saying that whether the individual is married or not.
I can also put this in the form of a chart.
So all that I explain in population was the same applies here also.
Like.
So please ensure that, right, so I do this for both my continuance, that's for less categorical.
If I put it in the ground, know I'm able to understand the composition of data better because the picture
is worth a thousand words, like to always use graphs.
Right.
So that's what we do in univariate analysis.
Clear and you understand why you univariate analysis is necessary on.
OK, so having understood this, now getting to Vivarium analysis studies how one variable interacts
with the other way, how dependent variable interacts with independently.
So that's what we're going to see in by video analysis.
OK.