 Statistics and Excel. Histogram versus bar chart. Got data? Let's get stuck into it with statistics and Excel. You're not required to, but if you have access to OneNote, we're in the icon left hand side OneNote and Excel presentation tab 1030 Histogram versus bar chart. We will also try to put the transcripts in OneNote as well. And if you go to the View tab, the Immersive Reader tool, you can actually change the language on the transcripts if you so choose and either read or listen to the transcripts in multiple languages. Desktop version of OneNote here. We have the information on the left hand side. Our data imagining it to be yearly salary or income of employees at a corporation. We've already ordered the data from smallest to largest. In other words, instead of being in order by like alphabetical order of the employees, we've taken the data and put it from smallest to largest, which is a typical thing to do as a first step in sorting the data when we're trying to pull information from it. Now we want to think about the relationship between a histogram and a bar chart. So we've taken a look at some histograms and prior presentation. Here's one that we built from this data set in a prior presentation. So we want to actually use the bar chart and think about like a bar chart and how we can use Excel's function of a bar chart to create in essence a histogram. And that will give us a better sense of kind of the relationship between what the similarities and differences are. So up top, we just have some of our standard data up top. So you'll recall that the mean or the average is can be done in a manual method, or it can be done with a function. So if we used an Excel function in order to take the mean or the average, we can use the average function. So equals average, and then we would just select the data. So here's the data in the table, and that would give us the average. If we did the manual calculation, we can then say that it's going to be the sum, meaning we add up all the data to do that, we can use the trustee sum function equals the sum of all the data. And then we can count the data, meaning counting 123 for all of the data. And in Excel, we can use the trustee equals count function to do that, and then select all the data, which is nice. And then of course, we're going to divide that out. If we used Excel, we would take this cell, which is referenced by the D five divided by this cell referenced by D six, 3630 400 divided by 51 gives us the average 71 184, which matches what we got with the function. And then if we take the median, we can do that in Excel by saying equals the median, or the second quartile, we could use quartiles if we want, but the median is more common. And if we were going to do it in a manual method, remember, it's just like Rocky's trainer, the boxer Rocky's trainer, if it's an old movie, but you hit the one in the middle when you see three of them out there, you hit the one in the middle, that's the advice of so so Rocky's trainer was a was a fan of using the median hit the one in the middle. So then if we look at our our histogram, the major components of the histogram are the buckets down below that we've discussed in prior presentation. So you can see here, the definition of the buckets are now 2000 apart. And we have 15 of them. So 1234567891011123415 buckets. And they're separate and they're spanning 2000 55,000 to 57,000. So you can see that in this range, we only have the one data point in it. And then we have nothing from 57 all the way up to us to what 67. And then at 67269, we have 769 to 711971 to 731573 to 757. Now note that if you were to try to select this data in Excel and create a bar chart, instead of a histogram, then you're going to run into problems because the bar chart, what it wants to do is try to put all of these data sets kind of on the x axis and then and then basically say how often they each one of them appear. But you can't have all of these separately listed. Because because they might you might not have two numbers that are the same, right? Like if you if you had a small set of data where you had a lot of repetition, and whatever it is that was coming up, then you could use the bar chart and it would basically give you the proper x axis. But here, what we want to do is say a range, we have to take this information and make a range from it like 55,000 to 57,000, so that we have the appropriate bucket. And then we can have a something like a hit this histogram looks a lot like a bar chart. So you might say, Hey, I could do that myself, like I could just make my own buckets, I can make these ranges, and I can count how much are in the range. And and then I can use the bar chart function to create a histogram. And that if so let's see what that would look like that will give you an idea of the similarities between again a bar chart and histogram. And also sometimes it's useful to do that process to actually make your own buckets, create your own histogram. Because if you wanted to put like two histograms on top of each other, sometimes that's easier to do with like a bar chart than a histogram. So let's see how we can construct this this histogram using like a bar chart method. If we take our information on the left hand side, we could start with the smallest point, which would be 55. So the 55 is the first bucket, I'm going to bring it down to 49. However, just for that first bucket, and then I'm going to go to to the 57. And I'll show you why when we do the function. And then from there, we're just going to keep on going up by 2000. So you can see these this range goes from 57 to 59 to 61 to 63. So all I do with a formula here is just take the prior one starting at this point 57,000 plus 2000 is 59,000 plus 2000 is 61,000 plus 2000 is 63,000. And if I had a formula here that just said equals the one above it plus 2000, I can drag that formula down. And it'll give us a it'll be able to to give us all of our numbers. So these are the beginning