A recent survey by Kaggle revealed that data professionals used a variety of different ML algorithms in their work. On average, data professionals used two (median) algorithms. The most frequently used algorithms were 1) linear/logistic regression, 2) decision trees/random forests and 3) Convolutional Neural Networks. The total number of and use of specific algorithms varied across job titles, with ML engineers using the most (4) and DBA/Database Engineers using the least (1).
Machine learning algorithms are employed by data professionals to predict important outcomes as well as find patterns and structure in their data. The application of machine learning reaches across industries (e.g., healthcare, education) and professions (e.g., marketing, content management). Kaggle conducted a worldwide survey in October 2020 (2020 Kaggle Machine Learning and Data Science Survey), asking over 20,000 data professionals about the work they do, including the ML algorithms they tend to use.
Figure 1. Top Machine Learning Algorithms Used in 2020. Click image to enlarge.
The survey included a question for data professionals, “Which of the following machine learning algorithms do you use on a regular basis? Select all that apply.” On average, data professionals reported that they use 2 (median) machine learning algorithms. The top 10 machine learning algorithms used were (see Figure 1):
Figure 2. Machine Learning Algorithm Usage Across Different Job Titles for Data Professionals. Click image to enlarge.
Not all data professionals are created equal. Comparing data professionals by job title, we found that the data professionals differed with respect to the number of ML algorithms used and the types of ML algorithms used. Specifically, the survey results revealed that data professionals who used greatest number of algorithms were:
Machine Learning Engineer (4 algos used)
Data Engineer (3 used)
Data Scientist (3 used)
Research Scientist (3 used)
The job title with the lowest number of algorithms used was DBA/Database Engineer (1 used).
Figure 2 includes information about ML algorithm usage for specific job titles. While Linear or Logistic Regression and Decision Trees or Random Forests were clearly the top algorithms across all data professional, for some data pros, many of them use additional algorithms as part of their work; specifically, many Machine Learning Engineers and Research Scientists use Convolutional Neural Networks (62% and 47%, respectively). More than half of Data Scientists (57%) say they use Gradient Boosting Machines. Finally, more than a third of Machine Learning Engineers (39%) say they use Recurrent Neural Networks and Dense Neural Networks (MLPs, etc) on a regular basis.
It’s not difficult to imagine that the use of ML algorithms is likely related to the type of work activities in which each data professionals are involved. We have seen before that different data roles possess different job activity profiles; work-related activities will necessarily dictate the types of algorithms that are needed to effectively perform each activity. Building and running data infrastructures requires different algorithms than doing research to advance the field of machine learning. Next week, I’ll look at the these activities across the data roles studies in this blog.
When applying for data-related job, it could be useful to understand the typical types of machine learning algorithms you will need to know to be successful in that position. If you’re competent in a variety of ML algorithms, you might be able to successfully broaden your job search to include different data roles.
I like sharing my knowledge about the power of data and analytics. This knowledge can help business leaders and citizens understand how the world works, improving how they manage their business and make better decisions to improve their personal lives, respectively. Toward that end, I am creating a video series called, Data Days, to explore the world of data and analytics. In these short videos (around 3 minutes long), I will cover different data-related topics, including data science, the people who practice data science, predictive analytics, machine learning and many more.
My goal is to help both aspiring and practicing data professionals understand how they can best use their skills to improve how they use data and analytics to generate insights. Additionally, I would like to inspire the non-data professionals who want to participate in and contribute to data projects in their work and personal lives. I hope you’ll join me on this exploration of data and analytics and how they can help you make better decisions. In the first video below, I talk about the practice of data science.
http://www.youtube.com/watch?v=eXWyqwjh10w
What is Data Science?
In its simplest form:
Data science is way of extracting insights from data using the powers of computer science and statistics.
Extracting these insights requires three skill sets. First, you need knowledge and skills in the content domain that is related to the problem you’re trying to address. If you’re problem is in the domain of finding cures for cancer, you need skills and knowledge in oncology. If you’re addressing problems of customer churn, you likely need to possess business acumen. Second, you need skills in the areas of technology and programming; these types of skills allow you to get access to the data you need to answer the questions. Last, but not least, you need solid math and statistical skills to analyze the data in a way that will solve your problem.
Data science requires three broad skills (content domain, technology/programming, statistics/math). Data professionals tend to specialize in one of the three skill areas. Click image to enlarge.
Finding a data professional who is proficient in all data science skill areas is extremely difficult. The chance of finding a data professional with Expert level of proficiency in all data science skill areas is akin to finding a unicorn; they just don’t exist. In a study I conducted a couple of years ago, we found that data professionals who practice data science tend to specialize in one of the three data science skill areas.
As you might have noticed, I have not used the term, “data scientist.” As it is being used right now, the term “data scientist,” has become somewhat ambiguous. It is ambiguous with respect to the varying types of skills different “data scientists” possess.
Even though my twin brother and I possess different skills, we both engage in the practice data science. Click image to enlarge.
For example, my twin brother and I are both considered to be data scientists in our current job roles. While we both hold this sexy moniker, we have vastly different skill sets. He has a background in computer science and is highly proficient in technology and programming. I, however, have a background in industrial-organizational psychology and quantitative methods and my expertise falls in the areas of statistics and research methods. So, using the term, “data scientist,” to describe our roles really masks our skill differences.
So, rather than use the term data scientist, I prefer the term, “data science,” to focus more on the process of getting insights rather than the job titles of those who are getting the insights
In summary, I think of data science as a way of thinking about a problem using data. And when you’re approaching a problem with a data science eye, you need to bring three skills to bear on the problem: 1) Content domain knowledge, 2) technology and programming and 3) math and statistics.
Next time, I’ll discuss the process of data science.
Each year, I write a summary of my most popular blog posts. This year-end summary is a rather simple exercise. I count the pageviews of my blog posts and present the top 10 posts of the year. This year’s BOB blog count, however, only goes from January through June 2016. Since June, I have been writing primarily on the Appuri blog – this summer, I joined this fantastic startup (Appuri) where we help companies integrate their data silos and apply machine learning capabilities to the consolidated set of metrics to improve their customer retention efforts. As their Chief Research Officer, I direct research on customer analytics best practices to help companies improve their customer experience and customer success initiatives. If you want to learn more about what we do, please contact me.
In 2016, 9 of the top 10 BOB blogs are about my research on the topic of data science. The research focused on the meaning of data science and how organizations can best leverage their skills. The other top blog is on the statistics topic of sampling error (which is one thing everybody needs to know).
As always, thanks for reading. The top 10 B.O.B. blog posts for 2016 were:
Top 10 Skills in Data Science: Data professionals report that they are most proficient in such skills as communication, managing structured data, math, project management and data mining and visualization tools. Top skills varied by data science roles.
10 Data Science Skills You Need to Improve Project Success: In this post, I looked at the skills that are predictive of the quality of projects. Many of the important data science skills are highly quantitative in nature; in fact, 8 of the top 10 skills include data mining and viz tools, statistics and statistical modeling, science/scientific method and algorithms and simulations.
Empirically-Based Approach to Understanding the Structure of Data Science: This blog was a fun one to write and visualize. I conducted a principal components analysis of 25 data science skills. The results clearly showed that the skills fall into three general skill areas: 1) subject matter expertise, 2) technology and 3) statistics.
When Does Education Level Matter in Data Science?: Data scientists are highly educated. I found that over half of them hold either a Masters or PhD degree and about a quarter of them hold a 4-year degree. The level of educational attainment is related to proficiency in data science skills (more advanced degrees are associated with greater proficiency), but only for specific types of data scientists.
Industry Differences in Data Science Roles, Skills and Project Outcomes: The Information Technology industry is home to most data scientists. Data scientists who are Researchers outnumber the other types of data scientists in six of the top 10 industries that employ data scientists. Data scientists in the Professional Services industry, compared to data scientists in other industries, are highly proficient in all three data science skills: Business, Technology and Math/Statistics skills.
Are You Using the Right Data Science Tools for Your Big Data Projects?: I found that, on average, data professionals use 5 data tools. No single data science tool will do it all. One way to help in your tool selection process is to identify the tools that are commonly used together and use them.
In 2017, I am continuing my research on best practices in customer analytics, data science and how companies can get the most value from their data. If you want to keep up with my latest thinking on these topics and more, be sure to read my posts at Appuri.
The AnalyticsWeek and Business Over Broadway Data Science Survey survey revealed regional differences in data science roles, proficiency in data science skills and satisfaction with work outcomes. APAC has the lowest percent of Business Manager data scientists (32%). LATAM has the lowest percent of Creative data scientists (25%). North America has the lowest percent of Developer data scientists (39%). Data scientists from North America and EMEA have greater proficiency in Statistics and Math & Modeling skills compared to their counterparts in other regions. There were no difference among regions on satisfaction with work outcomes.
Figure 1. Adoption rates of analytics tools across regions. From KDnuggets 2016 Software Poll.
Big Data and data science adoption is occurring throughout the world. While all regions are growing their data science capabilities, KDnuggets found strong regional differences in the use of analytics tools among data professionals (see Figure 1). Their results showed that NA shows lower adoption of Big Data tools (36%) compared to EMEA and APAC countries (~43%). LATAM and APAC countries show higher adoption of the statistical analysis tool, R (54%), compared to EMEA and NA countries (~46%). The current analysis will extend this research to better understand regional differences in data science roles and expertise. Do adoption rates for these tools match the skills needed to use those tools?
We asked over 1000 data professionals about themselves and what they do. We captured their proficiency across three broad data science skills: Business, Technology, Math & Modelling, Programming and Statistics. We also asked about the roles that these data scientists play: Business management, Developer, Creative and Researcher. Finally, we asked them about their satisfaction with the outcomes of projects on which they work.
A majority of the respondents work for companies headquartered in North America (62%) and APAC (21%) (see top of Figure 2).
Data Science Roles Across Regions
Figure 2. Regional differences in data science roles and skill proficiency.
There were a few notable differences across regions with respect to the types of data scientists they have (see middle of Figure 2). Results showed that APAC has the lowest percent of Business Manager data scientists (32%) while EMEA has the most (47%). LATAM has the lowest percent of Creative data scientists (25%) while North America had the most (41%). There were no other statistically significant differences across regions for the other two data science roles (i.e., Researchers and Developers).
Proficiency in Data Science Skills Across Regions
Next, I looked at proficiency in skills across the different regions (see bottom of Figure 2). Of the five skills assessed, we only found two skills that varied significantly over regions. In general, data scientists from NA and EMEA had greater proficiency (on a scale from 0 to 100) in Statistics (~66) and Math & Modeling (~56) compared to data scientists from LATAM and APAC (~54 for Statistics and ~46 for Math & Modeling).
Satisfaction with Outcomes of Analytics Projects Across Regions
There was no statistically significant difference in satisfaction with work outcomes across regions. Satisfaction ratings were about 7.0 for each region (on a scale from 0 – Extremely dissatisfied to 10 – Extremely satisfied).
Summary
Survey results revealed a few interesting data science differences across regions.
Data scientists who work for companies headquartered in NA and EMEA reported greater proficiency in Statistics and Math & Modeling skills compared to the other two regions (also, these differences held even when we only compared Research data scientists across regions). It’s interesting to note that, even though data scientists from LATAM and APAC had significantly lower proficiency in Statistics and Math, the KDnuggets survey found a higher adoption rate of R (statistics program) for LATAM and APAC data scientists; despite the higher adoption rates in these regions, they may not be getting the most value from R due to sub-par skill proficiency (proficiency below 60).
Our prior research found a strong relationship between skill proficiency and satisfaction with work outcomes; data scientists with higher proficiency in data skills (especially Statistics and Math) were happier with the outcome of their analytics projects. However, in the current analysis at the regional level, we did not find this relationship. Data scientists from all regions reported the same level of satisfaction with their work despite differences in Statistics and Math skills proficiency.
There is no doubt that the field of Big Data and data science is growing across the world. While data scientists are key to extracting insights and value from their data, we know that a team of data scientists with complementary skills outperform their counterparts who work alone. It appears that companies headquartered in NA and EMEA may be in a better position to extract insights from their data given that their data scientists are more proficient in Statistics and Math, the language of data. A better understanding of the possible reasons (e.g., skill proficiency, analytics tools used, data science methods/practices) behind the regional differences can help international companies find the right mix of data scientists and help recruiters understand the pain points of some regions.
As part of my series on Making Sense of Our Big Data World, today’s post is on sampling error. See the overview, Making Sense of Our Big Data World: Statistics for the 99%, to understand the importance and value of understanding statistics and statistical thinking.
This Big Data world is defined by the enormous amount of ever-expanding, diverse data being generated, collected and analyzed by researchers and practitioners alike. While large data sets allow us to gain useful insights about general trends, smaller segments contained within the larger data set are still useful. Consider how the concept of personalization works (e.g., recommendation engines, personlized medicine). From the large data set, we create smaller, homogeneous, data sets to make predictions within smaller groups.
Samples and Populations
Statistically speaking, a population is a “set of entities concerning which statistical inferences are to be drawn.” These inferences are typically based on examining a subset of the population, a sample of observations drawn from that population. For example, if you are interested in understanding the satisfaction of your entire customer base, you measure the satisfaction of only a random sample of the entire population of customers.
Researchers/Scientists rarely, if ever, work with populations when they are studying their phenomenon of interest. Instead, they conduct studies using samples to make generalizations about the population. Specifically, medical researchers rely on the use of a sample of patients to study the effect of a treatment on disease. Polling organizations make nationwide predictions about outcomes of elections based on the responses of only 1000 respondents. Business professionals develop and implement company-wide improvement programs based on the survey results of only a sample of their entire customer base.
Sampling Error
Suppose we have a population of 1,000,000 people and want to make conclusions about their height. We may have only the resources to measure 50 of these people. We use the mean from the sample to estimate the mean of the population.
Based on our sample of 50 randomly selected people, we calculate the mean of their height. Suppose we found the mean height of the sample to equal 62″. Now, let’s place this sample back into the population of 1,000,000 people and take another sample of 50 randomly selected people. Suppose we found the mean of this sample to equal 55″. We notice that there is some difference between the means of the first and second sample of people, both differing from the unknown mean of the population.
For the sake of argument, suppose we knew the mean height of the population to be 60″ with a variance = 50″. The difference of the sample means from population mean is referred to as sampling error. This error is expected to occur and is considered to be random. For the first sample, we happen to select, by chance, people who are slightly taller than the population mean. In the second sample, we selected, again by chance, people who are slightly shorter than the population mean.
Standard Error of the Mean
In the preceding example, we witnessed the effect of sampling error; in one sample the mean was 62″ and in the second sample the mean was 55″. If we did not know the population mean (which is usually the situation), we could not determine the exact amount of error associated with any one given sample. We can, however, determine the degree of error we might expect using a given sample size. We could do so by repeatedly taking a sample of 50 randomly selected people from the population, with replacement, and calculating the mean for each sample. Each mean would be an estimate of the population mean.
If we did this process for 100 different samples, we would have 100 different means (estimates of the population); we could then plot these 100 means to form a histogram or distribution. This distribution of means is itself described by a mean and a standard deviation. This distribution of sample means is called a sampling distribution. The mean of this sampling distribution would be our best estimate of the population mean. The standard deviation of the sampling distribution is called the standard error of the mean (sem). The sem describes the degree of error we would expect in our sample mean. If the population standard deviation is known, we can calculate the sem. The standard error of the mean can be calculated easily using the following formula.
Standard error of the mean = σ /n
Figure 1. Three Distributions. One distribution is based on a sample size of 1 (n = 1). The other two are sampling distributions (n = 10; and n = 100) .
where n is sample size and σ is the population standard deviation (σ²) is the population variance). If we do not know the population standard deviation, we can calculate the standard error of the mean using the sample standard deviation as an estimate of the population standard deviation.
The sampling distributions for two different sample sizes are presented in Figure 1. The population mean (µ) is 60″ and the population variance (σ2) is 50″. The size of sample 1 is 10 and the size of sample 2 is 100. Using the equation above, the standard error of the mean is 2.24″ for sample 1 and .71″ for sample 2. As seen in Figure 1, the degree of sampling error is small when the sample size is large. This figure illustrates the effect of sample size on our confidence in the sample estimate.
When the sample size is 100, we see that any one of our sample means will likely fall close to the population mean (95 percent of the sample means will fall within the range of 58.58″ to 61.42″). When the sample size is 10, our sample means will deviate more from the population mean than do our sample means when using a sample size of 100 (95 percent of the sample means will fall within the range of 53.68″ to 66.32″). In fact, when the sample size equals the population size, the standard error of the mean is 0. That is, when sample size equals population size, the sample mean will always equal the population mean.
Figure 2. Illustration of the relationship between sample size and sampling error. As sample size increases, sampling error decreases.
Figure 2 illustrates the relationship between sampling error and sample size. As sample size increases, sampling error decreases. When sample size equals one, the standard error of the mean is, by definition, the standard deviation of the population. When sample size equals the size of the population, there is no error in the estimate of the population mean; this sample mean (the sample equals the population) will be exactly the mean of the population. Thus, the standard error of the mean is 0 when sample size equals the size of the population.
Sampling Error and the Need for Inferential Statistics
Inferential statistics is a set of procedures applied to a sample of data in order to make conclusions about the population. Because your sample-based findings are likely different than what you would find using the entire population, applying some statistical rigor to your sample helps you determine if what you see in the sample is what you would see in the population; as such, the generalizations you make about the population need to be tempered using inferential statistics (e.g., regression analysis, analysis of variance).
When Decision-Making Goes Wrong: Tampering with your Business Processes
Used in quality improvement circles, the term, “tampering,” refers to the process of adjusting a business process on the basis of results that are simply expected due to random errors. Putting data interpretation in the hands of people who do not appreciate the notion of sampling error can result in tampering of business processes. As a real example of tampering, I had the experience where an employee created a customer satisfaction trend line covering several quarters. The employee showing me this trend line was implementing operational changes based on the fact that the trend line showed a drop in customer satisfaction in the current quarter. When pressed, the employee told me that each data point on the graph was based on a sample size of five (5!). Applying inferential statistics to the data, I found that the differences across the quarters were not based on real differences, but due, instead, to sampling error. Because of the small sample size, the observed differences across time were essentially noise. Making any changes to the business processes based on these results was simply not warranted.
Big Data Tools will not Create Data Scientists
There has been much talk about how new big data software solutions will help create an army of data scientists to help companies uncover insights in their data. I view these big data software solutions primarily as a way to help people visualize their data. Yes, visualization of your data is important, but, to be of value in helping you make the right decisions for your business, you need to know if the findings you observe in your data are meaningful and real. You can only accomplish this seemingly magical feat of data interpretation by applying inferential statistics to your data.
Simply observing differences between groups is not enough. You need to decipher if the observed differences you see in your metrics (e.g., customer satisfaction, call center) reflects what is happening in the population. Inferential statistics allows you to apply some mathematical rigor to your data that go well beyond merely looking at data and applying the inter-ocular test (aka eyeballing the data). To be of value, data scientists need a solid foundation of inferential statistics and an understanding of sampling error. Only then, can data scientists help their company distinguish signal (e.g., real differences) from the noise (e.g., random error).
Political Polling in National Elections: Example of Sampling Error
Table 1. Summary of polling results from fivethirtyeight.com published on 11/6/2012, one day before the 2012 presidential election. Click image to read entire post.
Nate Silver became a household name when he accurately predicted the winner of the 2008 US presidential election. He used polling data (samples of the population) to help determine who would be the likely winner. When he used the same technique to predict an Obama victory in 2012, he received much criticism from Republicans leading up to election day who said the election was essentially a tossup. As you can see in Table 1, the different polls have slightly different outcomes, some gave Obama a small or larger margin of victory while a few gave Romney the victory. Take a look at the polls within a given state. As you can see, they do not have the same margin of victory for a given candidate. That is because they are based on a sample of likely voters, not the entire population of people who will vote on election day. Because of sampling error, poll results varied across the different polls.
The Power of Aggregation
Let’s compare how Nate Silver and the political pundits made their predictions. While both used publicly available polling data, political pundits appeared to make their predictions based on the results from specific polls. Nate Silver, on the other hand, applied his algorithm to many publicly available polling data at the state level. So, even though the aggregated results of all polls painted a highly probable Obama win, the pundits could still find particular poll results to support their beliefs. (Here is a good summary of pundits who had predicted Romney would win the Electoral College and the popular vote).
No matter your political ideology, I believe that these political polling data (samples) are useful in providing insight about the actual election results (populations), a future event. While Silver’s exact formula for making predictions is unknown, what he does is average many different polling results to make his predictions. His prediction did not say that Obama was certain to win. What it was saying is that if a candidate had a margin of victory as big as Obama had in the polls, he wins 85% of the time. It was not a guarantee that Obama would win. But the odds were in his favor. That is all. Silver’s predictions were not magic. They were simply based on the aggregate of different samples taken from the population.
Summary
Sometimes, opinion and data collide. Some people primarily rely on their personal opinions as a guide to their understanding of the world. Others primarily rely on the use of data as their guide. The prediction of the outcome of US presidential election pits these two views against each other. Based on my examination of recent US political battles, it’s clear that even the use of samples in making predictions is far more accurate than simply using your gut.
Sampling error is the degree to which the sample is different from the population. These differences are a natural part of using only a portion of the population to make conclusions about that population. While we may never know the population (because we can never measure it), we can know how well the values in our sample represent the values from that population. Because the sample will likely be different from the population, it’s important to apply statistical rigor to the sample in order to understand if the sample values paint a real picture of what is going on in the population.
I’ve counted the pageviews of each of my 2015 blog posts and present them here in my end-of-year summary. This year, I wrote a lot about my research in the areas of data science; this research focused on the meaning of data science and how organizations can best leverage their data. Additionally, I conducted and presented research on the development of a new way to measure customer sentiment that combined both a structured and unstructured approach; this research helps organizations simplify their annual customer relationship survey.
This year was difficult for me on a personal level. My wife passed away from breast cancer this summer, and I celebrated her life by writing about her spirit and love of life.
As always, thanks for reading. The top 10 B.O.B. blog posts for 2015 were:
Investigating Data Scientists, Their Skills and Team Makeup: This post was, by far, the most popular post of the year. I studied the structure and practice of data science by asking data professionals about their team, what they do and what they know.
Statistics: Is this Big Data’s Biggest Hurdle: Getting value from data not only requires data professionals to analyze the data, it also requires data users to correctly interpret and apply those those results. Collectively, we as a species would be better off if everybody learned the basics of statistics and statistical thinking.
Data Scientists and the Practice of Data Science: I think of data science more like a discipline than a single profession. There are different types of data professionals, each bringing unique skills (i.e., Subject Matter Expertise, Technology/Programming and Math/Statistics) to a team that applies principles of data science to their data.
Getting Insights Using Data Science Skills and the Scientific Method: Science is a way of thinking more than it is a body of knowledge. The scientific method is a way of using data to solve a problem, answer a question, test a hypothesis. The scientific method minimizes human bias and leads to evidence-based conclusions to help you improve how you make decisions and optimize algorithms.
Theresa Allman: A Celebration of Life: I lost the love of my life this year. I have never loved a woman so deeply and easily. She inspired me. She inspired everybody she met. She’ll inspire you.
Making Sense of our Big Data World: Statistics for the 99%: Data are everywhere. Everyone needs a grasp of basic statistics and statistical thinking to maneuver in this Big Data world. I started the process of providing material you can use to learn about statistics.
In the upcoming year, I will continue my research in the area of data science and how organizations can best leverage their data. Also, I will continue studying and refining the Customer Sentiment Index for practical purposes.
As part of my series on Making Sense of Our Big Data World, today’s post is on descriptive statistics. See the overview, Making Sense of Our Big Data World: Statistics for the 99%, to understand the importance and value of understanding statistics and statistical thinking.
In the previous post, I showed how to calculate frequencies and create histograms as a way of summarizing data. Another way to summarize large data sets is to use summary indices, which describe the shape of the histogram. I will introduce two types of summary indices that can help you understand the data: central tendency and variability. These two indices can be calculated on data that are on, at least, an interval scale of measurement.
Central Tendency
Table 1. Hypothetical data set of 10 customers and their satisfaction rating
A useful way of summarizing data is to determine the center or middle point of scores. Measures of central tendency allow us to determine roughly the center of the scores in the data set. For example, we may measure the satisfaction level (on a scale from 1 to 5) of 10 customers. The data are presented in Table 1. The scores vary considerably, from a low of 1 to a high of 5. We can capture a lot of information about these scores by determining the middle point. By doing so, we get an idea of the value around which the ratings/scores fall. Three statistics that describe the central tendency are the mean, median, and mode.
Mean
The mean is the arithmetic average of all scores in the data set. It is calculated by adding all the scores in the data set and dividing by the total number of observations in the data set. The formula is:
where n = the number of observations in the data set and Σxi is the sum of all scores in the data set. Using the formula, we can calculate the mean of the data in Table 1.
Median
Table 2. Rank order of data from Table 1.
Another measure of central tendency is the median. The median is the middlemost score. In other words, half of the scores have values larger than the median and half have values smaller than the median. If the data set has an odd number of scores, the median is the (n + 1/2)th largest score in the data set. If the data set has an even number of scores, the median is the average of two numbers, the (n/2)th largest score and the (n/2 + 1)th largest score. The first step in calculating the median is to rank order the data from either highest to lowest or lowest to highest. Table 2 provides the rank order of data from Table 1. Since the number of scores in the data set is even, the median is calculated as the average of the two middlemost scores. The median value in the data set is 3.
Mode
The third measure of central tendency is the mode. The mode is the score that occurs most often in the data set. In Table 2, there are two 1s, two 2s, two 3s, three 4s, and one 5. Therefore, the mode of this data set is 4, since it is the most frequently occurring score. It is possible that a data set could have more than one mode. This occurs when two or more values in the data set have the highest frequency.
Variability
While measures of central tendency indicate the middle of the distribution, we also would like to know about the spread of data or how much the data vary around the middle of the distribution. The spread of data is indexed by measures of variability. Measures of variability indicate the extent to which scores are tightly packed together versus spread out. The measures of variability presented here are the variance and the standard deviation. Both measures indicate the spread of data around the mean.
Table 3 contains four columns of numbers. The first column is x, the five score; the second column contains a deviation score from the mean; the third column contains the squared deviation score; and the last column is the squared value of each score.
One measure of variability is the variance. Variance, s2, is the sum of the squared deviations about the mean (SS) divided by the number of scores in the data set less one. The formula for the variance is
The numerator is the sum of the squared deviations about the mean (SS) and the denominator is called the degrees of freedom. In general, the degrees of freedom for a particular statistic is the number of observations in the data set minus the number of estimated parameters used in the equation. The total number of observations used in the calculation is the sample size (n), and the number of estimated parameters used in the equation is one (the sample mean). It should be noted that some people, in calculating the variance, divide the SS by n instead of n –1. Usually, n is used when the variance is used to describe the present data set, while n – 1 is used to make inferences about the population variance from which the sample is drawn. A more complete discussion between the difference is available in various introductory statistics books. Using the previous equation, the variance of the data is calculated.
The formula for the sum of squared deviations (SS) can be simplified to facilitate hand computation of the variance. The formula for the sum of squares is
Using the data in Table 3, the SS is calculated to be
The value of the variance is 2.5 (10 / 4). You can look at the numerator of the formula to get a sense of what variance tells you about the data. The numerator is the squared deviation of each score from the mean. As the scores are widely spread out from the mean, the numerator increases. Therefore a large variance indicates that the scores are widely spread out, and a small variance indicates that the scores are tightly packed around the mean.
Standard Deviation
Another measure of variability is the standard deviation. The standard deviation is simply the square root of the variance and is denoted by s. The standard deviation for the data in Table 3 is calculated to be s =1.58. The larger the standard deviation, the larger the spread in the data.
If the data are normally distributed, the standard deviation can be used to estimate the percentage of scores that fall within a specified range. By definition, 68 percent of the scores fall within a range whose limits are (mean – 1s) and (mean + 1s), and 95 percent of the scores fall within a range whose limits are (mean – 2s) and (mean + 2s). If the standard deviation is small, a high percentage of the data falls closely around the mean. For our data in Table 3, approximately 68 percent of the data falls within a range from 1.4 to 4.6 (3 – 1.58 to 3+1.58).
Example
Table 4. Descriptive statistics of items in the patient satisfaction questionnaire
A physician’s office conducted a customer survey to identify their strengths and weaknesses (see Table 4 in previous post on frequencies). In the previous post, we summarized these patient satisfaction ratings using frequencies/percentages. The descriptive statistics (e.g., mean, median, mode and standard deviation) for the patient satisfaction questionnaire are presented here in Table 4.
As we can see from Table 4, the descriptive statistics indicate that customers seem to be satisfied with the overall experience of the exam (ratings can vary from 1 (low) to 5 (high)). Additionally, they seem to be satisfied with the physician quality and overall office quality (ratings can vary from o (low) to 3 (high)).
Although using descriptive statistics to describe the data (mean, median, and mode) summarizes the data even more than using frequencies and percentages, we concluded the same thing about the patients. That is, most of the patients report high levels of quality regarding their patient experience. Also, the wait time indicates that the patients typically had to wait about 15 minutes before seeing the physician. Once in to see the physician, the typical patient spent about 44 minutes with the physician. If we just want to get a general idea of what the satisfaction data tell us, the method of reporting the descriptive statistics is easier than reporting the frequencies.
Summary
This blog included measures of central tendency and measures of variability. Both types of measures summarize information contained in a set of scores. Measures central tendency tell you the middle point of the scores in the data set around which all other scores cluster. Measures of variability determine the extent of spread of the data around the middle point of the distribution.
This blog post is part of a series to help people learn the basic concepts of statistics. See the overview, Making Sense of Our Big Data World: Statistics for the 99%, to understand the importance and value of understanding statistics and statistical thinking.
Data can be overwhelming. Often we are confronted with large data sets consisting of hundreds, thousands or millions of scores. Summarizing the data helps us make sense of it. This blog post will discuss one way of summarizing large data sets with the use of frequencies and histograms.
Frequencies
Table 1. Hypothetical data set
Table 1 lists scores from a hypothetical study examining the level of customer satisfaction of a given company. The data set contains 48 scores, each representing one person’s average score on the customer satisfaction questionnaire. Upon examination, we see that scores vary somewhat, ranging from a low of 1.4 to a high of 4.6. To gain a better understanding of the data, we need to summarize the scores in a simple format.
One way of summarizing data is to calculate the frequency of occurrence of a specific value, or how often that given value occurs in our data set. To calculate frequencies, we first rank the scores from lowest to highest (see right half of Table 1). After the ranking, we determine the frequency of occurrence of each value. We see that the value of 1.4 occurred only once. Therefore, 1.4 has a frequency of one. Likewise, the value of 2.5 has a frequency of four.
Although calculating frequencies for each specific value will help summarize the information, the amount of information can still be overwhelming. For example, with characteristics measured in small increments, we may obtain a lot of values, each occurring with little frequency. Calculating the frequency of each value might not be enough to simplify the data. Therefore, when calculating frequencies, we usually group values with similar scores into a particular class. Then we calculate frequencies for these class values.
Class Intervals
Table 2. Frequencies for the class variable.
A class interval represents a range in which a set of values is included. Creating class intervals is a process of dividing the scores into specified equal intervals. Each class interval is defined by a lower bound and an upper bound. The lower bound represents the lowest possible score that can be included in the interval; the upper bound represents the highest possible score. Using the data set in Table 1, we can create a class interval with the width of 0.4 to represent the scores. Starting with a lower bound of 1.0, the first class interval would include scores ranging from a low of 1.0 to a high of 1.4. The second class interval would include scores ranging from 1.5 to 1.9. The last class interval would include scores ranging from 4.5 to 4.9. Table 2 presents these class intervals and the frequency of values that occur in the class.
We use arbitrary numbers to select class intervals and determine the width of each class interval. It has been shown that, if continuous data are divided into intervals, you lose less information about the data by creating more intervals. A reasonable number of intervals is seven (Shaw, Huffman, and Haviland 1987¹), although more intervals would result in less information loss.
Percentages
Another way of looking at the frequency of values is through the use of percentages. A percentage reflects the proportion of scores of a particular value. The percentage for a particular value is calculated by dividing the frequency of a given value by the total number of scores in the data set. For our data, we see that the percentage of people with scores of 2.5 to 2.9 is 18.8 percent (9/48), and the percentage of people with scores ranging from 4.0 to 4.9 is 14.6 percent (7/48). The total of the percentages for a given question should be 100 percent (given rounding errors).
The percentage is sometimes preferred to the frequency since it incorporates the total number of scores into its calculation. A frequency of 50 may not tell us all we want to know about the data. A frequency of 50 in one sample of scores may indicate a large percentage (for example, when sample size is 60), while in another sample a frequency of 50 may indicate a minute percentage (for example, when sample size is 1,000,000). Thus, before interpreting the magnitude of the frequency, we should be aware of the total sample size.
Constructing Frequency Distributions of the Intervals
We can graphically represent the frequencies of the class intervals. The graph is formally called a histogram. The histogram aids in summarizing the data beyond the lone use of frequencies since it captures many pieces of information in a single picture. The histogram not only indicates the frequency of each value, but also roughly indicates the range of the data (lowest to highest value) and the shape of the distribution.
Figure 1. Histogram of the class intervals in Table 2.
The histogram has two axes. The horizontal axis (sometimes referred to as the X axis or abscissa) represents the variable or class interval. The vertical axis (sometimes referred to as the Y axis or ordinate) represents the frequency for a variable or class interval.
The horizontal axis is scaled by the midpoint of each class interval. Therefore, for the data in Table 2, the horizontal axis would be scaled by eight values, each value representing the midpoint of each class interval. The midpoints are 1.2, 1.7, 2.2, 2.7, 3.2, 3.7,4.2, and 4.7. The histogram appears in Figure 1.
We can calculate frequencies for variables that are on any scale of measurement (nominal, ordinal, interval, and ratio). For example, a questionnaire could include various questions pertaining to satisfaction levels as well as questions asking for demographic information. The demographic portion could include questions pertaining to gender and age.
Table 3. Frequencies and percentages for the variables of gender and age.
If the questionnaire was distributed to 150 people, we could subsequently calculate the frequency or proportion of males versus females and also determine the frequency or proportion of a given age group. The frequencies for the sex variable (nominal) and age variables (ratio) are listed in Table 3. The frequencies indicate that the sample consists of more males than females. In terms of percentages, we see that males represent 58 percent (87/150) of respondents and females represent 42 percent of respondents. Also, this sample consists of a large group of people aged 36 to 45 years.
Distributions
The histogram in Figure D.1 can also be called a distribution of scores. Although there are many forms of distributions, such as a bi-modal (two-humped) distribution and a uni-modal (one-humped) distribution, I will present a special type called a normal distribution. The normal distribution is a symmetric, bell-shaped distribution. Many of the things we measure in our environment can be described by a symmetric, bell-shaped distribution. For example, if the heights of many people were plotted, the shape of the histogram would form a normal distribution.
Example
Table 4. Frequencies and percentages for the patient satisfaction survey
A clinic conducted a patient survey to better understand their patient’s level of satisfaction. The survey questions as well as the percentage respondents for each of the questions are presented in Table 4.
As we can see in Table 4, the distribution of scores is fairly evenly spread across the three quarters of the year. Additionally, the surveys are composed of surveys from all of the offices in the western region. Most of the surveys represent the San Jose, Yakima, Tacoma, and Spokane offices. San Diego and Sonoma have the least amount of surveys. Furthermore, a little over half of the sample of surveys (53.4 percent) is from offices located in the state of Washington. Looking at the percentage of responses for our survey questions, many of the customers indicate a “Yes” to the questions. The percent of “Yes” responses range from a low of 53.4 percent to a high of 99.1 percent.
Figure 2. Histogram of the overall rating of the exam.
Figure 2 shows a histogram of the responses for the overall rating of the exam. As is indicated, most of the respondents rated the exam “Good” or “Excellent” response.
Summary
I introduced various ways of describing and presenting data. Frequency tables and the histograms are both useful tools for summarizing data. The frequency table reflects the frequency of occurrence of specific values or the frequency of values for a specific class interval. The histogram is a graphic illustration of the frequency table.
¹ Shaw, D.G., Huffman, M.D. and Haviland, M.G. (1987). Grouping continuous data in discrete intervals: information loss and recovery. Journal of Educational Measurement, 20(2), 167-173.