Statistics
Lecture 3
Descriptive statistics
Akerkeh Zadauly,
Senior Lecturer
Kazakh-British Technical University
What is Descriptive Statistics?
Descriptive statistics summarize and organize characteristics of a
data set using numerical values and graphical displays.
What Descriptive Statistics Do:
Summarize data: Condense large collections of raw data into
concise summaries.
Organize data: Provide structure to data for easier interpretation.
Describe data characteristics: Highlight key features like the
typical value or how spread out the data is.
Key aspects of Descriptive statistics:
Measures of Central Tendency: These describe the center or typical
value of a dataset:
• Mean: The average of all values in a dataset
• Median: The middle value in a dataset when it's ordered from
lowest to highest
• Mode: The most frequently occurring value in a dataset
Measures of Variability (or Spread): These indicate how dispersed
the data points are:
• Variance: The average squared distance of each data point
from the mean
• Standard Deviation: A measure of the average distance of
data points from the mean
• Range: The difference between the maximum and minimum
values in a dataset
Frequency Distribution: This describes the occurrence of each
data value within the dataset
Descriptive statistics: Histograms
A histogram is a visual display of a frequency chart. It consists of
contiguous, vertical boxes with both a horizontal axis and a vertical
axis. The horizontal axis is labeled with the classes or categories from
the frequency chart.
Descriptive statistics: Histograms
Algorithm of constructing histograms.
1. Create a frequency table from given data.
2. Find the starting point (SP) or the smallest data and the ending point (EP)
or the highest data.
3. Find the convenient SP and the convenient EP: value carried out to one
more decimal place than the value with the most decimal places.
4. Choose the number of classes/bars you need.
5. Find the Class Width:
Convenient EP − Convenient SP
Class Width =
Number of classes
6. Find the relative frequency (RF) of each data in each class:
Amount of data in one class
RF =
total amount of data
7. Construct the histogram: horizontal axis - classes, vertical axis – RF.
Descriptive statistics: Histograms
Example.
Frequency table of the heights (in inches to the nearest half inch) of
100 male semiprofessional soccer players
Descriptive statistics: Histograms
The smallest data value is 60.
Because the data with the most decimal places has one decimal (for instance, 61.5),
we want our starting point to have two decimal places. Because the numbers 0.5,
0.05, 0.005, etc. are convenient numbers, use 0.05 and subtract it from 60, the
smallest value, for the convenient starting point.
Then the convenient SP is 60 − 0.05 = 59.95
The highest data value is 74.
The convenient EP is 74 + 0.05 = 74.05
Number of classes is chosen to be 8, then the class width is:
74.05 − 59.95
Class Width = = 1.76 𝑜𝑟 ≈ 2
8
The heights 60 through 61.5 inches are in the first class 59.95–61.95. The heights that are
63.5 are in the second class 61.95–63.95. The heights that are 64 through 64.5 are in the
third class 63.95–65.95. The heights 66 through 67.5 are in the fourth class 65.95–67.95. The
heights 68 through 69.5 are in the fifth class 67.95–69.95. The heights 70 through 71 are in
the sixth class 69.95–71.95. The heights 72 through 73.5 are in the seventh class 71.95–
73.95. The height 74 is in the last class 73.95–75.95.
Descriptive statistics: Histograms
Descriptive statistics: Frequency Polygons
A frequency polygon is a line graph used in statistics to visually
represent the distribution of a dataset. It is created by plotting the
midpoint of each class interval against its corresponding frequency and
then connecting the points with straight lines.
Descriptive statistics: Frequency Polygons
The use of frequency polygons:
•Visualizing trends: They provide a clear visual representation of data
distribution, helping to identify the shape and trends within a dataset.
•Comparing datasets: Their linear nature makes it easy to overlay and
compare two or more different datasets on the same graph.
•Identifying central tendency: The modal class (the class with the
highest frequency) can be easily identified as the peak of the polygon.
•Estimating statistics: Calculations like the estimated mean can be
performed using the midpoints and frequencies represented in the
graph
Descriptive statistics: Frequency Polygons
Algorithm of constructing Frequency Polygons.
1. Create a frequency table from given data.
2. Calculate midpoints: Find the midpoint (or class mark) for each class
interval by adding the upper and lower limits of the interval and dividing by
two:
Upper limit − Lower Limit
Midpoint =
2
3. Plot the points: Draw and label the axes. Plot the midpoints on the
horizontal (x) axis and the frequencies on the vertical (y) axis. Each point
represents a coordinate pair of (midpoint, frequency).
4. Connect the points: Use a ruler to connect the plotted points with straight
lines, starting from the left and moving to the right.
5. Close the polygon: To create a complete polygon, connect the first and last
points to the horizontal axis. This is done by adding an extra class interval
with a frequency of zero before the first interval and after the last interval.
Descriptive statistics: Frequency Polygons
Example.
A frequency polygon was constructed from the frequency
table below.
Descriptive statistics: Frequency Polygons
Descriptive statistics: Frequency Polygons
Frequency Polygons vs Histograms:
Descriptive statistics: Time series graphs
A time series graph is a line graph that displays data points over time,
with the time intervals on the horizontal axis and the measured
variable on the vertical axis. It is a powerful visualization tool used to
analyze trends, patterns, and fluctuations in a dataset over a
continuous period.
Descriptive statistics: Time series graphs
The use of time series graphs:
•Business: Tracking sales figures, website traffic, and stock prices to
spot performance trends and make strategic decisions.
•Science: Monitoring environmental data, such as temperature
changes or pollution levels over time.
•Forecasting: Providing a visual basis for making future predictions
based on past patterns.
Time series graphs vs Frequency Polygon:
Descriptive statistics: Time series graphs
Algorithm of constructing Time series graphs.
1. Prepare your data: Organize your data into two columns: one for the
chronological time periods (e.g., hours, days, months, years) and another for
the corresponding values of the variable you are tracking.
2. Draw and label the axes:
• Horizontal axis (x-axis): Always represents time, with intervals clearly
and equally spaced.
• Vertical axis (y-axis): Represents the variable being measured, such as
temperature, sales, or population.
3. Plot the data points: For each data entry, plot a point on the graph at the
intersection of its time period and its corresponding variable value.
4. Connect the points: Draw straight lines to connect the data points in
chronological order. This creates a visual representation of how the variable
changes over time.
Descriptive statistics: Measures of central tendency
Measures of central tendency are single summary values used to
describe the typical or central value of a dataset, representing the
middle of its distribution. The three main measures are the mean, the
median and the mode.
Mean
What it is: The arithmetic average of all values in a dataset.
How to calculate: Sum all the values and divide by the total number of
values.
When to use: Suitable for datasets with a normal distribution, but it is
sensitive to outliers (extreme values) that can significantly influence the
average.
or
sample mean
Descriptive statistics: Measures of central tendency
Median
What it is: The middle value in a dataset that has been ordered from
smallest to largest.
How to calculate: If the dataset has an odd number of values, the median is
the single middle value; if it has an even number, the median is the average
of the two middle values.
When to use: A good measure of central tendency when there are outliers
or when the data is skewed, as it is not affected by extreme values.
Example:
The median mark is the middle mark - in this case, 56. It is the
middle mark because there are 5 scores before it and 5 scores after
it. This works fine when you have an odd number of scores.
Descriptive statistics: Measures of central tendency
Median
What it is: The middle value in a dataset that has been ordered from
smallest to largest.
How to calculate: If the dataset has an odd number of values, the median is
the single middle value; if it has an even number, the median is the average
of the two middle values.
When to use: A good measure of central tendency when there are outliers
or when the data is skewed, as it is not affected by extreme values.
If there are even number of scores, for example 10 scores, then you
simply have to take the middle two scores and average the result:
Example:
now we have to take the 5th and 6th score in our data set and average
them to get a median of 55.5.
Descriptive statistics: Measures of central tendency
Mode
What it is: The value that appears most frequently in a dataset.
How to calculate: Identify the value with the highest frequency or "peak" in
the data.
When to use: Useful for identifying the most typical or common value in a
dataset. A dataset can have multiple modes (multimodal) or no mode at all.
Descriptive statistics: Measures of central tendency
Calculating the Mean of Grouped Frequency Tables
To calculate the mean from a grouped frequency table we can
apply the basic definition of mean:
Descriptive statistics: Skewness and the mean, median, and
mode.
Descriptive statistics: Skewness and the mean, median, and
mode.
Distribution of this type is called skewed to the left because it is pulled
out to the left.
Descriptive statistics: Skewness and the mean, median, and
mode.
Distribution of this type is called skewed to the right because it is
pulled out to the left.
Descriptive statistics: Skewness and the mean, median, and
mode.
To summarize:
• If the distribution of the data is symmetrical,
mean = median = mode (assuming there is only one mode). If
there are multiple modes in a symmetric distribution, the
modes would be different from the mean and the median, but
the mean and median would still be equal.
• If the distribution of the data is skewed to the left,
mean < median < mode .
• If the distribution of the data is skewed to the right,
mean > median > mode .
Descriptive statistics: Measures of location.
The common measures of location are quartiles and percentiles.
Quartiles are numbers that Percentiles are numbers that
separate the data into quarters separate the (ordered) data
(four parts). Like the median, into hundredths (100 parts).
quartiles may or may not be an The n-th percentile,𝑃𝑛 is the
actual value in the set of data. value where n% of the
To find the quartiles, order the data observations in the data are
(from smallest to largest), find the less than the value of the n-th
median or second quartile 𝑄2 . The percentile.
first quartile, 𝑄1 , is the middle value To score in the 90th percentile of an
of the lower half of the data and the exam does not mean, necessarily,
third quartile, 𝑄3 is the middle that you received 90% on a test. The
value of the upper half of the data. 90th percentile means that 90% of
test scores are less than your score
and 10% of the test scores are the
same or greater than your test
score.
Descriptive statistics: Measures of location.
The interquartile range is a number that indicates the spread of the
middle half or the middle 50% of the data. It is the difference between
the third quartile 𝑄3 and the first quartile 𝑄1 .
The IQR can help to determine
potential outliers. A value is suspected
to be a potential outlier if it is less than
1.5 × 𝑰𝑸𝑹 below the first quartile or
more than 1.5 × 𝑰𝑸𝑹 above the third
quartile. Potential outliers always
require further investigation.
Descriptive statistics: Measures of dispersion.
Measures of dispersion or variability are used to describe the spread
or dispersion of the data.
The range is the difference between the largest and smallest value in
a set of data: Range = Maximum value – Minimum value
!! Range is not a very good measure of
variability because it is based on only two
values in the data set (the largest and
smallest values) and is highly influenced
by outliers. Also, the range does not help
us distinguish between two data sets with
the same largest and smallest values
because the two data sets will have the
same range.
Descriptive statistics: Measures of dispersion.
Variance and Standard Deviation.
An important characteristic of any set of data is the variation in the
data from the mean.
The standard deviation is a number that measures, on average, how
far data values are from their mean. The standard deviation provides
a numerical measure of the overall amount of variation in a data set
and can be used to determine whether a particular data value is close
to or far away from the mean.
is always positive or zero
The standard deviation is small when
the data are all concentrated close to s – sample standard
the mean because there is little
variation or spread in the data. deviation
The standard deviation is larger
when the data values are more 𝝈 – population
spread out from the mean because standard deviation
there is a lot variation in the data.
Descriptive statistics: Measures of dispersion.
Calculating the standard deviation
To calculate the standard deviation, we need to calculate the
variance first. The variance is the average of the squares of the
deviations:
𝑥 − 𝑥ҧ are for a sample
𝑥 − 𝜇 are for the population
𝜎 2 represents the population variance and the standard
deviation of it will be 𝜎 2 = 𝜎
𝑠 2 represents the sample variance and the standard
deviation of it will be 𝑠 2 = 𝑠
Descriptive statistics: Measures of dispersion.
Calculating the standard deviation
Descriptive statistics: Measures of dispersion.
Important notes
For ANY data set, no matter what the distribution of the data is:
• At least 75% of the data is within two standard deviations of the
mean.
• At least 89% of the data is within three standard deviations of the
mean.
• At least 95% of the data is within 4.5 standard deviations of the
mean.
This is known as Chebyshev’s Rule.
For data having a distribution that is BELL-SHAPED and SYMMETRIC:
• Approximately 68% of the data is within one standard deviation of
the mean.
• Approximately 95% of the data is within two standard deviations of
the mean.
• More than 99% of the data is within three standard deviations of
the mean.
This is known as the Empirical Rule.