In: Statistics and Probability
1. Discuss the different measures of central tendency that have been used during the pandemic with Examples.
2. What is the Distinguish between classical, empirical, and subjective probability and give examples of each.
A measure of central tendency is a summary statistic that represents the center point or typical value of a dataset. These measures indicate where most values in a distribution fall and are also referred to as the central location of a distribution. You can think of it as the tendency of data to cluster around a middle value. In statistics, the three most common measures of central tendency are the mean, median, and mode. Each of these measures calculates the location of the central point using a different method.
Choosing the best measure of central tendency depends on the type of data you have. In this post, I explore these measures of central tendency, show you how to calculate them, and how to determine which one is best for your data.
Locating the Center of Your Data
Most articles that you’ll read about the mean, median, and mode focus on how you calculate each one. I’m going to take a slightly different approach to start out. My philosophy throughout my blog is to help you intuitively grasp statistics by focusing on concepts. Consequently, I’m going to start by illustrating the central point of several datasets graphically—so you understand the goal. Then, we’ll move on to choosing the best measure of central tendency for your data and the calculations.
The three distributions below represent different data conditions. In each distribution, look for the region where the most common values fall. Even though the shapes and type of data are different, you can find that central location. That’s the area in the distribution where the most common values are located.
As the graphs highlight, you can see where most values tend to occur. That’s the concept. Measures of central tendency represent this idea with a value. Coming up, you’ll learn that as the distribution and kind of data changes, so does the best measure of central tendency. Consequently, you need to know the type of data you have, and graph it, before choosing a measure of central tendency!
Related posts: Guide to Data Types and How to Graph Them
The central tendency of a distribution represents one characteristic of a distribution. Another aspect is the variability around that central value. While measures of variability is the topic of a different article (link below), this property describes how far away the data points tend to fall from the center. The graph below shows how distributions with the same central tendency (mean = 100) can actually be quite different. The panel on the left displays a distribution that is tightly clustered around the mean, while the distribution on the right is more spread out. It is crucial to understand that the central tendency summarizes only one aspect of a distribution and that it provides an incomplete picture by itself.
Related post: Measures of Variability: Range, Interquartile Range, Variance, and Standard Deviation
Mean
The mean is the arithmetic average, and it is probably the measure of central tendency that you are most familiar. Calculating the mean is very simple. You just add up all of the values and divide by the number of observations in your dataset.
The calculation of the mean incorporates all values in the data. If you change any value, the mean changes. However, the mean doesn’t always locate the center of the data accurately. Observe the histograms below where I display the mean in the distributions.
In a symmetric distribution, the mean locates the center accurately.
However, in a skewed distribution, the mean can miss the mark. In the histogram above, it is starting to fall outside the central area. This problem occurs because outliers have a substantial impact on the mean. Extreme values in an extended tail pull the mean away from the center. As the distribution becomes more skewed, the mean is drawn further away from the center. Consequently, it’s best to use the mean as a measure of the central tendency when you have a symmetric distribution.
When to use the mean: Symmetric distribution, Continuous data
Related post: Using Histograms to Understand Your Data
Median
The median is the middle value. It is the value that splits the dataset in half. To find the median, order your data from smallest to largest, and then find the data point that has an equal amount of values above it and below it. The method for locating the median varies slightly depending on whether your dataset has an even or odd number of values. I’ll show you how to find the median for both cases. In the examples below, I use whole numbers for simplicity, but you can have decimal places.
In the dataset with the odd number of observations, notice how the number 12 has six values above it and six below it. Therefore, 12 is the median of this dataset.
When there is an even number of values, you count in to the two innermost values and then take the average. The average of 27 and 29 is 28. Consequently, 28 is the median of this dataset.
Outliers and skewed data have a smaller effect on the median. To understand why, imagine we have the Median dataset below and find that the median is 46. However, we discover data entry errors and need to change four values, which are shaded in the Median Fixed dataset. We’ll make them all significantly higher so that we now have a skewed distribution with large outliers.
As you can see, the median doesn’t change at all. It is still 46. Unlike the mean, the median value doesn’t depend on all the values in the dataset. Consequently, when some of the values are more extreme, the effect on the median is smaller. Of course, with other types of changes, the median can change. When you have a skewed distribution, the median is a better measure of central tendency than the mean.
Comparing the mean and median
Now, let’s test the median on the symmetrical and skewed distributions to see how it performs, and I’ll include the mean on the histograms so we can make comparisons.
In a symmetric distribution, the mean and median both find the center accurately. They are approximately equal.
In a skewed distribution, the outliers in the tail pull the mean away from the center towards the longer tail. For this example, the mean and median differ by over 9000, and the median better represents the central tendency for the distribution.
These data are based on the U.S. household income for 2006. Income is the classic example of when to use the median because it tends to be skewed. The median indicates that half of all incomes fall below 27581, and half are above it. For these data, the mean overestimates where most household incomes fall.
When to use the median: Skewed distribution, Continuous data, Ordinal data
Mode
The mode is the value that occurs the most frequently in your data set. On a bar chart, the mode is the highest bar. If the data have multiple values that are tied for occurring the most frequently, you have a multimodal distribution. If no value repeats, the data do not have a mode.
In the dataset below, the value 5 occurs most frequently, which makes it the mode. These data might represent a 5-point Likert scale.
Typically, you use the mode with categorical, ordinal, and discrete data. In fact, the mode is the only measure of central tendency that you can use with categorical data—such as the most preferred flavor of ice cream. However, with categorical data, there isn’t a central value because you can’t order the groups. With ordinal and discrete data, the mode can be a value that is not in the center. Again, the mode represents the most common value.
In the graph of service quality, Very Satisfied is the mode of this distribution because it is the most common value in the data. Notice how it is at the extreme end of the distribution. I’m sure the service providers are pleased with these results!
Finding the mode for continuous data
In the continuous data below, no values repeat, which means there is no mode. With continuous data, it is unlikely that two or more values will be exactly equal because there are an infinite number of values between any two values.
When you are working with the raw continuous data, don’t be surprised if there is no mode. However, you can find the mode for continuous data by locating the maximum value on a probability distribution plot. If you can identify a probability distribution that fits your data, find the peak value and use it as the mode.
The probability distribution plot displays a lognormal distribution that has a mode of 16700. This distribution corresponds to the U.S. household income example in the median section.
When to use the mode: Categorical data, Ordinal data, Count data, Probability Distributions
Which is Best—the Mean, Median, or Mode?
When you have a symmetrical distribution for continuous data, the mean, median, and mode are equal. In this case, analysts tend to use the mean because it includes all of the data in the calculations. However, if you have a skewed distribution, the median is often the best measure of central tendency.
When you have ordinal data, the median or mode is usually the best choice. For categorical data, you have to use the mode.
In cases where you are deciding between the mean and median as the better measure of central tendency, you are also determining which types of statistical hypothesis tests are appropriate for your data—if that is your ultimate goal. I have written an article that discusses when to use parametric (mean) and nonparametric (median) hypothesis tests along with the advantages and disadvantages of each type
-----------------------------------------------------------------------------------------------------------------------------------------------------
2) What Is Probability?
The notion of "the probability of something" is one of those ideas, like "point" and "time," that we can't define exactly, but that are useful nonetheless. The following should give a good working understanding of the concept.
Events
First, some related terminology: The "somethings" that we consider the probabilities of are usually called events. For example, we may talk about the event that the number showing on a die we have rolled is 5; or the event that it will rain tomorrow; or the event that someone in a certain group will contract a certain disease within the next five years.
Four Perspectives on Probability
Four perspectives on probability are commonly used: Classical, Empirical, Subjective, and Axiomatic.
1. Classical (sometimes called "A priori" or "Theoretical")
This is the perspective on probability that most people
first encounter in formal education (although they may encounter
the subjective perspective in informal education).
For example, suppose we consider tossing a fair die. There are six
possible numbers that could come up ("outcomes"), and, since the
die is fair, each one is equally likely to occur. So we say each of
these outcomes has probability 1/6. Since the event "an odd number
comes up" consists of exactly three of these basic outcomes, we say
the probability of "odd" is 3/6, i.e. 1/2.
More generally, if we have a situation (a "random process") in
which there are n equally likely outcomes, and the event A consists
of exactly m of these outcomes, we say that the probability of A is
m/n. We may write this as "P(A) = m/n" for short.
This perspective has the advantage that it is conceptually simple
for many situations. However, it is limited, since many situations
do not have finitely many equally likely outcomes. Tossing a
weighted die is an example where we have finitely many outcomes,
but they are not equally likely. Studying people's incomes over
time would be a situation where we need to consider infinitely many
possible outcomes, since there is no way to say what a maximum
possible income would be, especially if we are interested in the
future.
2. Empirical (sometimes called "A posteriori" or "Frequentist")
This perspective defines probability via a thought
experiment.
To get the idea, suppose that we have a die which we are told is
weighted, but we don't know how it is weighted. We could get a
rough idea of the probability of each outcome by tossing the die a
large number of times and using the proportion of times that the
die gives that outcome to estimate the probability of that
outcome.
This idea is formalized to define the probability of the event A
as
P(A) = the limit as n approaches infinity of
m/n,
where n is the number of times the process (e.g., tossing the die)
is performed, and m is the number of times the outcome A
happens.
(Notice that m and n stand for different things in this
definition from what they meant in Perspective 1.)
In other words, imagine tossing the die 100 times, 1000 times,
10,000 times, ... . Each time we expect to get a better and better
approximation to the true probability of the event A. The
mathematical way of describing this is that the true probability is
the limit of the approximations, as the number of tosses
"approaches infinity" (that just means that the number of tosses
gets bigger and bigger indefinitely). Example
This view of probability generalizes the first view: If we indeed
have a fair die, we expect that the number we will get from this
definition is the same as we will get from the first definition
(e.g., P(getting 1) = 1/6; P(getting an odd number) = 1/2). In
addition, this second definition also works for cases when outcomes
are not equally likely, such as the weighted die. It also works in
cases where it doesn't make sense to talk about the probability of
an individual outcome. For example, we may consider randomly
picking a positive integer ( 1, 2, 3, ... ) and ask, "What is the
probability that the number we pick is odd?" Intuitively, the
answer should be 1/2, since every other integer (when counted in
order) is odd.
To apply this definition, we consider randomly picking
100 integers, then 1000 integers, then 10,000 integers, ... . Each
time we calculate what fraction of these chosen integers are odd.
The resulting sequence of fractions should give better and better
approximations to 1/2.
However, the empirical perspective does have some disadvantages.
First, it involves a thought experiment. In some cases, the
experiment could never in practice be carried out more than once.
Consider, for example the probability that the Dow Jones average
will go up tomorrow. There is only one today and one tomorrow.
Going from today to tomorrow is not at all like rolling a die. We
can only imagine all possibilities of going from today to a
tomorrow (whatever that means). We can't actually get an
approximation.
A second disadvantage of the empirical perspective is that it
leaves open the question of how large n has to be before we get a
good approximation. The example linked above shows that, as n
increases, we may have some wobbling away from the true value,
followed by some wobbling back toward it, so it's not even a steady
process.
The empirical view of probability is the one that is used in most
statistical inference procedures. These are called frequentist
statistics. The frequentist view is what gives credibility to
standard estimates based on sampling. For example, if we choose a
large enough random sample from a population (for example, if we
randomly choose a sample of 1000 students from the population of
all 50,000 students enrolled in the university), then the average
of some measurement (for example, college expenses) for the sample
is a reasonable estimate of the average for the
population.
3. Subjective
Subjective probability is an individual person's measure
of belief that an event will occur. With this view of probability,
it makes perfectly good sense intuitively to talk about the
probability that the Dow Jones average will go up tomorrow. You can
quite rationally take your subjective view to agree with the
classical or empirical views when they apply, so the subjective
perspective can be taken as an expansion of these other
views.
However, subjective probability also has its downsides. First,
since it is subjective, one person's probability (e.g., that the
Dow Jones will go up tomorrow) may differ from another's. This is
disturbing to many people. Sill, it models the reality that often
people do differ in their judgments of probability.
The second downside is that subjective probabilities must obey
certain "coherence" (consistency) conditions in order to be
workable. For example, if you believe that the probability that the
Dow Jones will go up tomorrow is 60%, then to be consistent you
cannot believe that the probability that the Dow Jones will do down
tomorrow is also 60%. It is easy to fall into subjective
probabilities that are not coherent.
The subjective perspective of probability fits well with Bayesian
statistics, which are an alternative to the more common frequentist
statistical methods. (This website will mainly focus on frequentist
statistics.)
4. Axiomatic
This is a unifying perspective. The coherence conditions
needed for subjective probability can be proved to hold for the
classical and empirical definitions. The axiomatic perspective
codifies these coherence conditions, so can be used with any of the
above three perspectives.
The axiomatic perspective says that probability is any function
(we'll call it P) from events to numbers satisfying the three
conditions (axioms) below. (Just what constitutes events will
depend on the situation where probability is being used.)
The three axioms of probability:
If we have a fair die, the axioms of probability require that each number comes up with probability 1/6: Since the die is fair, each number comes up with the same probability. Since the outcomes "1 comes up," "2 comes up," ..."6 come up" are mutually exclusive and their union is the certain event, Axiom III says that
P(1 comes up) + P( 2 comes up) + ... + P(6 comes up) = P(the certain event),
which is 1 (by Axiom 2). Since all six probabilities on the left are equal, that common probability must be 1/6.