Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
One of the most general commands for getting descriptive statistics in SPSS, and my personal favorite, is the Frequencies command in the Analyze menu. This is a great way to get all of the common descriptive statistics you might want, such as the mean, the standard deviation and the quartiles--that includes the minimum, the median and the maximum-- for several variables at once, and to get simple charts such as histograms or bar charts at the same time. I view it as SPSS's one-stop shopping center for basic statistics for almost any kind of variable.
For this example, I'm going to be using the NASDAQ data set. This is information about all 2,800 stocks listed on the NASDAQ Stock Exchange, and I'm going to be gathering some descriptive statistics about a few of these variables. The information about the LastSale-- that's how much shares went at the time that I gathered this data--the market capitalization of each country, as well as their sector. And what I'm going to do is I'm going to come up to Analyze, to Descriptive Statistics, to Frequencies, the very first one.
Now the Frequencies command is associated for a lot of people with just categorical variables, because it gives frequency tables, how common each particular answer is, and it's well suited to this, but it also is a very well suited to dealing with scaled variables. I'm going to begin with a categorical variable, because that's the most familiar for people. The variable that I'm going to use in this case is called Sector Code, so I'm just going to come down here to SectorCode, select that, and move it over to the Variable list on the right. Now by default it's going to give me a Frequency table, but I can ask it for a few other things.
With a categorical variable like SectorCode, the most important would be a bar chart. And if I come right over here to Charts, I can ask it to make a bar chart and just press Continue, and then I press OK. And what I have here is it tells me that it's gotten statistics for 2,820 cases. There's no missing data, and this first one is the frequency table that comes by default, and what it has is the name of each of the categories under Sector, from Basic Industries through Transportation.
Then it has the frequency, that is, the number of industries that fall into each of those categories. For instance, 133 of these had no SectorCode listed, but under Healthcare, 234 companies were listed. The next one is the Percent, that is, of all of the cases 1% fall into each one. So Capital Goods, which had a Frequency of 204, that accounts for 7.2% of the companies in the NASDAQ Index. Now the next one, Valid Percent, is the same because we have no missing data, but say for instance, that half of the companies were missing data.
There was no response at all under SectorCode. Then instead of Basic Industries being 2.8%, it would be 5.6%, because the valid percent excludes the missing cases, or the cases that are missing on that particular variable. The Cumulative Percent simply takes the Valid Percent and adds it on as it goes. So it finishes with 100% by the time it gets to the last valid category. So that's the frequency table.
The next thing is I asked it to produce a bar chart. Now this is a bar chart that is produced as a sort of supplementary feature of the Frequencies command, and I would probably want to go through and edit it to sort them from the most common sector to the least common. So Finance would be first and it looks like Transportation would be the last. I might flip it sideways so it would be easier to read, but those are the things that we covered in the section on creating bar charts as univariate charts.
But this is a very simple way to get a lot of good information about a categorical variable. Next, what I'm going to show you is how to use the Frequencies command to get information about a scaled variable, something that people don't use that often for that purpose. I come back up to Analyze and I come to Descriptive Statistics, again to Frequencies, except this time I'm going to reset it, and I'm going to pick two scaled variables. I'm going to pick LastSale-- that's the price of the individual stock shares the day before I gathered the data, and the market capitalization.
So I just double-click to move both of those over, and then I can ask for certain statistics. There's a few that are really helpful. Number one is the Mean, the average. I also like to get the standard deviation, which is an indication of how spread out the scores are. The mean and the standard deviation are very common statistics, although they both work well for bell curves, and I happen to know that both of these variables are very skewed, and that's one reason why I also want to use what are called percentile- or quartile-based measures, that is, the minimum and the maximum and then the 25th percentile, the median, the 50th percentile and the 75th percentile, also called quartiles, all the way through.
Now if I wanted to, I sometimes could get information about skewness and kurtosis which are indications of how closely the data fit a bell curve on normal distribution, but I'm not going to do that right now. So all I'm going to do now is I'm going to click Continue. Now because I have scaled variables, it can also be nice to get a histogram. And so I go up to Charts and I click Histogram. I could show the normal curve, what it should look like-- undo that, that being more for humor here--and click Continue.
Now there's one more thing I want to do here. When I come back to this list you see that the Display frequency tables, which is below the Variable list, is checked. That's by default in the Frequencies command. However, because all 2,800 companies have different market capitalization values, this will give me a list of 2,800 different values. I don't want that. I'm using summary statistics to avoid that, so what I'm going to do is I'm going to uncheck that. When I'm using the scale variable, I usually don't want the Frequency table.
And now I can click OK. And what I get here are a couple of different things. First off, I get a table of statistics that lists each variable as a column. So the first column is LastSale, the second column is Market Capitalization, and then each row is the various statistics that it gathered, from the valid and how many cases have values for that particular statistic, to the mean and standard deviation, then to these quartile- based statistics. And then from these for instance, I can see that the average value of a share on the NASDAQ was $18.72.
I can also see that the minimum is $0.01, at which point I think they drop off the market. Below those tables I have histograms. This is the value of a share in a particular stock, and what you can see is everything is bunched up really low. Most stocks have prices that are, for instance, below $50. And in fact, if I go back up to the table, I can see that 75% of the stocks have values that are less than $23.61, but some of them, the maximum, get huge.
The maximum price for a stock on the NASDAQ is $1,132, which is why when we come down here we see that the scale goes all the way up to $1200. There is one very high outlier sticking out up there. I also have a histogram for market capitalization, and again, we know from before that this goes up to $300 billion and so most of the companies are stuck right there in the very first one and a very low level of market capitalization, But there's a few that go up very, very high.
What these histograms do is they do give me an indication that we have some extraordinary outliers, but this also gives me an indication with the table of an idea of how I can describe those outliers. And so I think this demonstration shows how flexible the Frequencies command is and why it's one of my favorite procedures, especially because it works with both categorical and scale variables. It gives percentile statistics. It can do frequency tables. It can do charts at the same time.
This makes it my first stop when getting the fundamental statistics for my data, and I'm sure you'll find it especially useful for your data and your analyses too.
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.