 One of the very first things that I like to do when analysing data is to look at the graphs. It is a very nice thing to have a visual representation of the data. It gives you a visceral feeling of what is going on with this data and where this analysis is going. Way before I do any statistical analysis, whether that's just descriptive statistics or inferential statistics, I like to see a couple of graphs for the various variables that we do have. Let's start off by looking at a frequency distribution otherwise known as a histogram of the age column. Remember a histogram will take a numerical variable between the minimum value and the maximum value and it will divvy that range up into what is called bins and it will count how many times a value in my data set occurs inside of those little bins and it will give me that frequency distribution. So I'm going to go up to graphs. The first time I'm going to use this legacy dialog and right at the bottom we find histogram. I'm just going to hit reset because this is the way you're going to see it. What variable do you want your histogram to be of and it's that first one I want age. I'm going to click on age and then click on this insert button and we're going to find the age. That's all I want. I'm going to hit OK and we're going to get this output document. You see the syntax above, that's the syntax that SPSS wrote behind the scenes to create this graph. And look at this distribution. It really was a uniform distribution. Each value had an equal likelihood of being chosen. We see that the mean there in my instance, it will be different for yours, was 51 standard deviation of 20 and there were 250 cases. So it took the minimum and the maximum value and it decided how to divvy these up and you see minus just beyond 20 here so it wasn't exact. But all these bins are of equal sizes and it counts how many times. So in my instance this first little bin had 15 values inside of there. Distribution like this, almost a straight line that we can draw on the top. It's a uniform distribution but a histogram like this gives us a very nice sense of what the spread in our data was. Now if I want to go back to my spreadsheet view, I'm going to go up here to this little red star button here. It says go to data and I go to the data. Let's create a histogram this time of the temperature and I'm not going to use the legacy dialogues now. I'm just going to use the chart builder. It's going to give me this little warning. It says basically that we should go through that step where we coded the variables to be of a specific data type. I can just ignore that for now because we did that. I'm going to say OK. I'm going to hit the reset button because this is what you're going to see first of all. Yes, the list that we get from SPSS, all the different graphs that it can do. Of course we are interested in a histogram and you see the different types of histograms that they are. I just want this very first one. I'm going to drag that up. That means choosing from the gallery and that's what I want. What do I want on the x-axis? Well, we said we wanted to take a look at temperature. I'm going to take temperature and I'm going to drag it all the way down. Now you see the statistic that can be used. It's histogram. There's histogram percent count cumulative count. I want none of those at the moment. All I want is just the histogram. By the way, this little panel that opened on the side, you can get to this big button here, element properties. That's what we want. One thing I want to do is just to display a normal curve as well. I've selected that and I'm going to say apply. You see this little representation here. This is not your true data. This is not what we call a kernel density estimate. It is just going to draw a normal distribution from the mean and standard deviation for your specific data set. It is not going to be a representative kernel density estimate of your data. Let me show you. I'm going to click OK. This is the code for the chart builder, the syntax that SPSS writes. We can ignore that and let's go down and just look at this. What do we see? Remember when we simulated this data, when we created this simulation, we had a chi-square distribution. Indeed, that is what we see. We see some values way up top here. As it gets higher and higher, the temperature now, this gets a bit ridiculous, but that is how we created the simulated data. We might suggest that these are statistical outliers and the data was entered incorrectly, so not too bad, but you see here this attempted drawing the normal curve and you obviously see that this distribution that we see from our histogram does not follow this normal distribution at all. This was from a different distribution and we must be aware when doing statistical tests on this data and right now I would suggest that we can't use parametric tests when doing inferential statistics on this data and I get that just really from looking at these graphs. Let's carry on. Let's do some more graphs. This time let's take one of the categorical variables like referral here and let's just do a bar chart. I'm going to go to graphs chart builder and say okay there. I'm going to reset to get everything clear here and I want a bar chart. Now bar is for categorical data and it's just going to count how many of each of our unique values occur. So if I look down referral, there's city, coastal and inland. Those are the unique values. There is nothing other than those and it's just going to count how many of each of these occur. So it's just a normal one I want. I'm going to drag that up and I'm going to say referral. I'm going to drag that down into my x-axis and I just want to count. I want a simple count, not me, not the value, not the median. I just want a simple count and I'm going to click okay. The syntax gets written and there we go. Remember that was also from a uniform distribution. So city, coastal and inland. Each had a probability of one over three of being chosen for each of the entries and there we go. We see they were sort of close to each other of cities, the number of coastal referrals and the number of inland referrals. Let's keep going. Let's do one more. I'm going to say graph chart builder. Now you can click that. Don't show the style again. Just so that this doesn't appear again. I'm going to hit reset. And this time around, let's go for a box plot. I just want a very simple box plot there and let's get a box plot of the heart rate. Just a box plot of the heart rate. I'm going to drag that into the x-axis here. I should say the y-axis. We're going to drag it to. And it is going to draw a box plot. It shows three here, which is unfortunate because I have not shown you how to make different subgroups because I might want the heart rate for the coastal patients, the heart rate for the inland patients and the heart rate for the city patients. But this is not what we're going to do here. So we're only going to get the single box plot. So I'm just going to hit OK. And there we go. We see this distribution. And we also see these statistical outliers. So SPSS is going to decide these are the statistical outliers and it'll actually show the values the patients with heart rates of 104, 234, 244. So once again, we might suggest that these are statistical outliers that was just entered incorrectly. And that follows beautifully from the way that we generated our random or simulated data. Let's do one more. Let's go to graph chart builder. I'm going to say OK. I'm going to reset everything again. Let's stick to our box plot. And this time around, we're going to take the months and we're going to drag that, remember, to the y-axis. The values are on the y-axis, these numerical values. And we're just going to hit OK. Let's look at those. And you see the chart that was generated right here with the median. First and the third quartiles, that is a box plot. So do experiment with these. We'll certainly, throughout this course, see many more graphs as we do our statistical analysis. And I'll also show you how to make subcategories so that we can have different graphs all in one go for a specific variable.