Now that we have gone through descriptive statistics, let's start solving a few questions.
You can see the question on your screen, and you will be able to watch the video.
And after posing that, we do it can solve the questions and we will discuss a solution after that.
You need to find out the meaning of these scores of 620 strings so you can see the scores are not sorted
here.
You can simply find of the men, the max, the range of these scores.
The standard deviation, the variance, the mean median, all these calculations you need to do by hand.
And after that, I will show you how you can solve this using byte.
So let's go ahead.
You can pause the video and find the solution.
Now let's start solving the problem.
I have taken all of these values and sorted.
After sorting the values, the minimum value comes out to be for the maximum value comes out to be sixty
six when we are trying to find out the median of the values.
It will be the middle most value.
So the minimum, most value will be, as these values are, even a number in the most value will be
the average of 10 and 11.
That will be a median.
So the average of 15 and 17 here will be 16.
So that is the median value.
Now, how do we calculate the mean value?
The mean value?
We can be concluded by adding all of these values and dividing by the count of these items, four zero
eight divided by 20.
So let's take a some of these.
And then divide it by the count of these.
In Excel, you also do have divided function to average, so you can use that as well.
Next, we let us find out the standard deviation for these numbers.
So to find out the standard deviation of these numbers, we can simply find out the difference of these
numbers from the mean value.
So you've become a mean value, which will be fixed.
So to fixing the value of what they're doing, the same here, and then we want to subtract each number
from it.
And why we do this.
We also want to square these values.
So let's square them simultaneously.
Let's raise it to the father, too, so that we can be aware of these numbers.
Now, these are the squared deviation of these number from the mean value.
Now we also want to take the average of these what we can simply say save, even take some of these
values and again, divided by the account of these values.
So we can just simply copy the formula as well here.
So you can see this taking the sum of all these values and then dividing by the count of all these values.
So it comes out to be two fifty five point four.
Now, if I simply take a square root of this value now, this is the standard deviation of these numbers
and the variance will be square root of this.
So I can simplify the square root and of this particular number.
So it comes out to be fifteen point nine.
So the mean for this num these numbers will be twenty point for the standard deviation comes out to
be two fifty five point four, and the variance comes out to be fifteen point ninety.
Now, this is how we solve it by hand.
Now, let us try to solve this and let's try to find out how we can find the solution to this using
byte.
So here I have simply created a list of the numbers which we were given in the question, and I have
created a data frame out of it, creating a data frame is simple in nature, and it provides a lot of
functions we can use easily.
So I've created into a data frame.
And now let view the data in a plot.
So for that, you can simply say deer.
You can see Pted dot data frame signifies a creation of a data.
And yet I've given the column name as the F, the name of the data frame which we have created.
So if I want to check the values so I can simplicity of both E and here, I can see all the values which
we have given.
Now, for that, if I want to plot these values, I can simply see the tornado plot and what these values
voters.
So here you can see these are the values which we.
Now, further, if we want to create a histogram, we can simply instead of seeing plot thickens, maybe
a first aid or test.
This is the histogram.
So you can see that the values are usually between zero and 20, and then that is a few values which
are above 60.
Next, we will go ahead and create a density plot for a better visualization so we can do the same thing
and simply say density.
It will give us a density block.
Sorry.
So this will give us identity plot.
So here you can see the maximum values on No.20.
And you can see the data is kind of normal still here.
But after that, we have these values which are extra here, which makes this data a little skewed also.
So let us go further and check the minimum, maximum mean median mode for this so we can simply say
this is not a dog.
Meaning that if we have seen this also,
I copy this entire thing.
What I can show you everything here, Max.
I
mean,
then we'll see the median.
But then let's also see the standard deviation antiquarians.
So you can see the min value is four.
Max is 66.
Min is 20.
Median is 16.
The standard deviation is sixteen point three nine.
And the median is to sixty eight point eight.
If you want to see the more we can view the mood also.
So there are three months, then 12 and 15.
Further, if you want, we can view the skewness and doses of this as well.
So let us find that as want to simply say, Dawn, you were skewness and not good for purposes.
So here you can see that the skewness is one point nine six and the closest is three point seven two,
which simply shows that there is skewness in the data.
Now, because the causes is greater than three.
We can simply say that this is left to go dig in nature that is which is clearly visible, that it is
having a very slim peak, and the values and the edge in the fields are also left in the.
So this is how you can simply find out, I mean, we didn't move minimax and everything that you want
using Python.
And just by using a single function.
So this is not this overly complicated python makes it very simple for you to solving this.
Now, there are a few things which we need to solve, whether we will be solving a few more questions
so that you can learn how we can deal with data, with just presenting different forms to us.
We might not always have data, which is as simple as this.
Yes.
There are a large number of rules when there are in sort of 20, if there are even one million or 100
million, no matter what the number is.
You can use the same function and find out the mean million more than all these enderlin lenses.
But the only difference is if the data is given in some other way.
So we need to learn how to handle the day that is given in some other way, no matter how large it is.
It will still be as simple as this.
So let's go ahead and have a look at another type of questions so that you can get what I'm trying to
see.
Now, let us solve this particular question.
Now, if you see the difference between what the questions here, we had all the scores in hand.
These are straightforward.
We have the scores directly.
So if we want to calculate the mean, it is simple in nature, we will simply find the sum of all the
values and found of all the values and lower division for them.
But then we have to find out the mean that we have scored and the frequency.
Then it will be slightly different.
You can see that the scores are not just 10, 15, 20, 17, but there are five students who have scored
them, 20 for students who have scored 15, 20 children to have scored 20.
So we need to handle it in a different way.
Now, I give you some time, you can pause the video and try to solve this, I think, around how we
can solve this kind of question.
We have here.
We have the score and the frequency.
So the number of data points, which we have, the number of rows which we have is not actually the
number of students which we have, but the number of students are given separately.
So the number of students will be five plus twenty four plus 12 plus 12 plus extra 16 plus twenty one
plus sixty six platform.
So this is the number of students and the score for each student will be, say, five students will
have been 24 students will have scored 15 to Astrid's will have scored 20 and so on.
So let's pause the video for some time.
Try solving it at your own.
Think around it and then you can pause the video for resolution.
Now, let us solve this problem.
Now, when we want to see how many store how much force rooms have got, the total score for these students
will be there will be five students who will have scored then.
So the score for these five students will be 50.
Then for 24 students who have scored 15, the total score would be 360.
For 12 students who have scored 20, the total score would be 240.
So this is basically then multiplied by five fifteen, multiplied by twenty four, twenty multiplied
by 20.
So this gives us the scores for each of basically the combined score for all the.
Now we can take the sum of all of these values, which are product of school frequency, to get the
total school, to get the combined score for all the students that we have.
Now, what is the total number of students that we have for the number of students will be five plus
24, last 12 plus twenty one plus twenty twelve plus explosive, six plus four.
So if we add all of these values, you can see this is the cumulative frequency.
So for five it is five, five plus twenty four comes out to be twenty nine five plus twenty four plus
twelve comes out to be forty one.
Some of these is sixty two.
Some of then twelve is seventy four times one.
So the total number of students that we have is one sixty eight.
And the sum of all the scores will be sum of all.
These numbers, which we have yet 50 plus 360 plus to 40 in all of this.
So if we find out the mean, the mean will be some of all the scores divided by the number of students.
So some of all schools will be what it will be, the sum of scores multiplied by the frequency.
So 50 plus 360 plus 240.
This some of all of these values will be four, two, three, nine, divided by the number of students.
What is the number of students, the number of student?
Does the sum of all the frequencies which comes out will be one sixty eight.
So the means for all of these students is actually twenty five point two three.
So this is the means for all of these students.
Now, if you want to find out the median score, then the median score will be a lot different.
How do we find out the median scored?
The median score will be the score, the middle most scored of these scores, which we have now, the
middle score.
You cannot find out directly from here, but you will have to find out the score of the middle, most
stringent in the sorted order.
So it will be half of one sixty eight.
Now, what is half of 168?
Half of 168, is it before 168?
Divided by two is 84.
Now, where do we get the cumulative frequency as a before it is here?
I scored 27, so I scored 27.
The cumulative frequency is around 80, 84.
So the median score is 27.
While the mean is twenty five.
So you can clearly see how the values are spread out, how it is very different.
If you consider me and median, if you consider median, you get the middle most value.
While when you're trying to find out the mean, you get the value, which is an average value of value
is of the words, though, if is not impacted, which is actually impacted by the outliers.
So let's go back now, let's solve a little question here now considered here this question where we
have the asymptotes instead of the score itself.
So here I had the exact score, which is the mean given distribution.
So we have then 15 dwin like this.
We have the numbers.
But now what we have is we have these mean of we have the class interval.
So we don't know the exact scores of these students, but we do know that the scores are ranging between
zero and eight, eight and 16, 16 and when differential.
So we have a class in Berkeley.
Now, when we have class interval, the calculation somewhat remains the same.
But you will have to make slight changes to the approach which you are following.
Then we are given class interval.
You will not be given the class interval mean, but you will have to calculate the class interval.
So I have calculated the class interval mean for you in advance.
But now it is completely up to you how you solve this question.
So it is somewhat in the same terms of the last question, but you just need to get the understanding
what we are doing and why they're are doing it.
So just try this particular question and try to find out the mean value for this.
You can also find out the standard deviation and variance and all of the matrices.
Right.
That is an additional practice which you can do.
But the main question here is, if you want to find out the mean, how would you do that?
So you can pause the video and then find out the values you can unbossed to see the solution.
Now, let us look at the solution.
So here I have copied the class interval and the respective values for, you know, we just converted
this into.
So I have converted this into the glass in Deauville form, and I have gone through the glass in Deauville
mean for you.
So this is the interval mean.
So when we were talking about the propria problem there, we had the exact course.
We were calculating based on the exact spot.
So we have the most value.
Now, this model, most value is just the mean of the glass interval.
So this particular value can be the same as a score of which we had earlier.
So in sort of taking the entire value in one value at a time, we're just simply saying that there were
five students who have the score, which is having the mean value of food.
And then we are doing the same calculation which we were doing in the case.
So we just simply find out the product of this.
So this will be this.
So we do the same here.
Now, this is the product.
Now we we need to find out the some of the frequency.
So we need to know the total number of students that we have.
So it will be equal to some
of these.
So basically, these are the total number of students that we have.
And these are these two are a total of the scores.
But frequency and when we add these up, we get the
total score for fifty nine students.
And if you want to find out the mean, we can simplify it down by dividing the sum by the sum of the
frequency.
So what did we do, B, for each class in Doval, we multiplied it with the frequency to get the score
for that particular frequency.
That is five students high school as four.
So we multiplied it to get the score for our total school for that five students.
And similarly, for 10 students, the class interval was 12.
So these 10 school student scored on an average around 12.
So that is why we say 120 is the total score for the student and so on.
So this is the score, but the frequency.
And when we are these up, we get one, four, six, eight.
That is a total school for all these orders.
And these all students are nothing but fifty nine in number, which we got by adding the frequencies
together.
And when we divide the total score by total number of students, which is the normal formula for me,
the guilty by means court for this particular class.
So this is how we solve that particular problem.
In case you faced similar kind of problem, in case of data frames, or even if you have a huge data
there, you have this kind of problem, you can simply find out the frequency and use similar approach
on your data frames.
Let's go ahead and learn inferential statistics.
And once we are going through the influential statistics, we will pick up different problems.
We will pick up different data sets.
And you can apply these methods on that particular dataset to find out the mean median, more outages
and all the values so that you get a handle on how you solve these problems.
So the problems will be slightly more difficult in case of inflation statistics.
So that is why it is important to have a clear knowledge of descriptive statistics so that you can understand
what is going on in influential, sarcastic.