Graphical Presentation of Data

Getting expertise in the graphical presentation of data is important, and also a major way to get insights about data.

Graphical Presentation of Data

A chart/ graph says more than twenty pages of prose; it is true when you are presenting and explaining data. The graph is a visual display of data in the form of continuous curves or discontinuous lines on graph paper. Many graphs just represent a summary of data that has been collected to support a particular theory, to understand data quickly in a visual way, by helping the audience, to make a comparison, to show a relationship, or to highlight a trend.

Usually, it is suggested that the graphical presentation of the data should be carefully looked at before proceeding with the formal statistical analysis. It is because the trend in the data can often be depicted by the use of charts and graphs.

A chart/ graph is a graphical presentation of data, in which the data is usually represented by symbols, such as bars in a bar chart, lines in a line chart, or slices in a pie chart. A chart/ graph can represent tabular numeric data, functions, or some kinds of qualitative structures.

Common Uses of Graphs

Graphical presentation of data is a pictorial way of representing relationships between various quantities, parameters, and variables. A graph summarizes how one quantity changes if another quantity that is related to it also changes.

  1. Graphs are useful for checking assumptions made about the data, i.e., the probability distribution assumed.
  2. The graphs provide a useful subjective impression as to what the results of the formal analysis should be.
  3. Graphs often suggest the form of a statistical analysis to be carried out, particularly the graph of a model fitted to the data.
  4. Graphs give a visual representation of the data or the results of statistical analysis to the reader, which are usually easily understandable and more attractive.
  5. Some graphs are useful for checking the variability in the observation, and outliers can be easily detected.
Graphical Presentation of Data

Important Points for Graphical Presentation of Data

  • Clearly label the axes with the names of the variables and units of measurement.
  • Keep the units along each axis uniform, regardless of the scales chosen for the axis.
  • Keep the diagram simple. Avoid any unnecessary details.
  • A clear and concise title should be chosen to make the graph meaningful.
  • If the data on different graphs are to be measured, always use identical scales.
  • In the scatter plot, do not join up the dots. This makes it likely that you will see apparent patterns in any random scatter of points.
  • Use either grid rulings or tick marks on the axis to mark the graph divisions.
  • Use color, shading, or pattern to differentiate the different sections of the graphs, such as lines, pieces of the pie, bars, etc.
  • In general, start each axis from zero; if the graph is too large, indicate a break in the grid.

Real-Life Examples of Graphical Presentation of Data

Here are some practical examples:

  1. Business and Economics: Sales trends of a company can be tracked over a year using line graphs. A Pie chart can be used for comparing the market share of different brands.
  2. Education and Research: Students’ performance can be compared using a histogram. A relationship between study time and grades can be observed by using a scatter plot.
  3. Healthcare and Medicine: A comparison of COVID-19 cases across countries can be made by using Bar Graphs, while heart rate fluctuations over time of a patient can be represented over a time series plot.
  4. Weather Forecasting: The daily temperature variations in different cities can be visualized by using line graphs with multiple lines. Monthly rainfall data in different provinces can be compared using a heatmap diagram.
  5. Social Media and Technology: The website traffic sources can be studied using a Donut chart (similar to a pie chart). Comparison of iOS vs Android App downloads per region can be visualized using a stacked bar graph.

For further reading about the Graphical Presentation of data, go to https://en.wikipedia.org/wiki/Chart

Graphical Presentation of Data in R Language

Percentiles: Relative Standing

Percentiles are a measure of the relative standing of an observation within a dataset. Percentiles divide a set of observations into 100 equal parts, and percentile scores are frequently used to report results from national standardized tests such as the NAT, GAT, and GRE etc.

The $p$th percentile is the value $Y_{(p)}$ in order statistic such that $p$ percent of the values are less than the value $Y_{(p)}$ and $(100-p)$ (100-p) percent of the values are greater $Y_{(p)}$. The 5th percentile is denoted by $P_5$, the 10th by $P_{10}$ and 95th by $P_{95}$.

Percentiles for the Ungrouped Data

To calculate percentiles (a measure of the relative standing of an observation) for the ungrouped data, adopt the following procedure:

  1. Order the observation
  2. For the $m$th percentile, determine the product $\frac{m.n}{100}$. If $\frac{m.n}{100}$ is not an integer, round it up and find the corresponding ordered value and if $\frac{m.n}{100}$ is an integer, say k, then calculate the mean of the $K$th and $(k+1)$th ordered observations.

Ungrouped Data Example

For the following height data collected from students, find the 10th and 95th percentiles. 91, 89, 88, 87, 89, 91, 87, 92, 90, 98, 95, 97, 96, 100, 101, 96, 98, 99, 98, 100, 102, 99, 101, 105, 103, 107, 105, 106, 107, 112.

Solution: The ordered observations of the data are 87, 87, 88, 89, 89, 90, 91, 91, 92, 95, 96, 96, 97, 98, 98, 98, 99, 99, 100, 100, 101, 101, 102, 103, 105, 105, 106, 107, 107, 112.

\[P_{10}= \frac{10 \times 30}{100}=3\]

So the 10th percentile, i.e., $P_{10}$ is the 3rd observation in sorted data is 88, which means that 10 percent of the observations in the data set are less than 88.

\[P_{95}=\frac{95 \times 30}{100}=28.5\]

The 29th observation is our 95th Percnetile i.e., $P_{95}=107$

Percentiles for the Frequency Distribution Table (Grouped data)

The $m$th percentile (a measure of the relative standing of an observation) for the Frequency Distribution Table (grouped data) is

\[P_m=l+\frac{h}{f}\left(\frac{m.n}{100}-c\right)\]

Like median, $\frac{m.n}{100}$ is used to locate the $m$th percentile group.

$l$    is the lower class boundary of the class containing the $m$th percentile
$h$   is the width of the class containing $P_m$
$f$    is the frequency of the class containing
$n$   is the total number of frequencies $P_m$
$c$    is the cumulative frequency of the class immediately preceding the class containing $P_m$

Note that the 50th percentile is the median by definition, as half of the values in the data are smaller than the median and half of the values are larger than the median. Similarly, the 25th and 75th percentiles are the lower ($Q_1$) and upper quartiles ($Q_3$), respectively. The quartiles, deciles, and percentiles are also called quantiles or fractiles.

Percentiles: Measure of Relative Standing

Grouped Data Example

For the following grouped data compute $P_{10}$, $P_{25}$, $P_{50}$, and $P_{95}$ given below.Solution:

  1. Locate the 10th percentile (lower deciles i.e. $D_1$)by $\frac{10 \times n}{100}=\frac{10 \times 3o}{100}=3$ observation.
    so, $P_{10}$ group is 85.5–90.5 containing the 3rd observation
    \begin{align*}
    P_{10}&=l+\frac{h}{f}\left(\frac{10 n}{100}-c\right)\\
    &=85.5+\frac{5}{6}(3-0)\\
    &=85.5+2.5=88
    \end{align*}
  2. Locate the 25th percentile (lower quartiles i.e. $Q_1$)  by $\frac{10 \times n}{100}=\frac{25 \times 3o}{100}=7.5$ observation.
    so, $P_{25}$ group is 90.5–95.5 containing the 7.5th observation
    \begin{align*}
    P_{25}&=l+\frac{h}{f}\left(\frac{25 n}{100}-c\right)\\
    &=90.5+\frac{5}{4}(7.5-6)\\
    &=90.5+1.875=92.375
    \end{align*}
  3. Locate the 50th percentile (Median i.e. 2nd quartiles, 5th deciles) by $\frac{50 \times n}{100}=\frac{50 \times 3o}{100}=15$ observation.
    so, P50 group is 95.5–100.5 containing the 15th observation
    \begin{align*}
    P_{50}&=l+\frac{h}{f}\left(\frac{50 n}{100}-c\right)\\
    &=95.5+\frac{5}{10}(15-10)\\
    &=95.5+2.5=98
    \end{align*}
  4. Locate the 95th percentile by $\frac{95 \times n}{100}=\frac{95 \times 30}{100}=28.5$th observation.
    so, $P_{95}$ group is 105.5–110.5 containing the 3rd observation
    \begin{align*}
    P_{95}&=l+\frac{h}{f}\left(\frac{95 n}{100}-c\right)\\
    &=105.5+\frac{5}{3}(28.5-26)\\
    &=105.5+4.1667=109.6667
    \end{align*}

The percentiles and quartiles may be read directly from the graphs of the cumulative frequency function.

Further Reading: https://en.wikipedia.org/wiki/Percentile

Drawing Graphs and Charts in R Language

Stem and Leaf Plot: Exploratory Data Analysis

Before performing any statistical calculation (even the simplest one), data should be tabulated or plotted, especially if they are quantitative and few (few observations), to visualize the shape of the distribution.

Stem and Leaf Plot

A stem and leaf plot summarizes the set of data measured on an interval scale in condensed form. Stem and leaf plots are often used in exploratory data analysis and help to illustrate the different features of the distribution of the observed data. A basic stem and leaf display contains two columns separated by a vertical line. The left side of the vertical line contains the stems, while the right side contains the leaves. It is customary to sort the values within each stem from smallest to largest. In this statistical technique (to present a set of data), each numerical value is divided into two parts

  1. Leading Digit(s)
  2. Trailing Digit

Stem values are the leading digit(s), and leaves are the trailing digit. The stems are located along the vertical axis, and the leaf values are stacked against each other along the horizontal axis.

A stem and leaf display is similar to a frequency distribution with more information. It provides information about the observed data set’s symmetry, concentration, empty sets, and outliers. Organizing the data into a frequency distribution has the disadvantage of

  1. Loss of the exact identity of each value (individuality of observation vanishes)
  2. Did not know (sure) how the values within each class are distributed.

The advantage of the stem and leaf plot (display) over a frequency distribution is that we do not lose the identity (individuality) of each observation. Similarly, a stem and leaf plot is similar to a histogram but usually provides more information for a relatively small data set.

More than one data set can be compared by using multiple stem and leaf plots. Using a back-to-back stem and leaf plot, we can compare the same characteristics in different groups.

The origin of the stem and leaf plot is associated with Tukey, J. W. (1977).

Constructing a Stem and Leaf Plot

Let us have the following data set: 56, 65, 98, 82, 64, 71, 78, 77, 86, 95, 91, 59, 69, 70, 80, 92, 76, 82, 85, 91, 92, 99, 73 and want to draw the required graph of the given data.

First of all, it’s better to sort the data. The sorted data is 56, 59, 64, 65, 69, 70, 71, 73, 76, 77, 78, 80, 82, 82, 85, 86, 91, 91, 92, 92, 95, 98, 99.

Now the first digit is the stem and the second one is a leaf, i.e., stems are from 5 to 9 as data ranges from 56 to 99.

Draw a vertical line separating the stem from the leaf. Put stem values on the left side of the vertical line (bar) and leaf values on the right side of the vertical line.  Note that each number is assigned to the graph (plot) by pairing the unit digit, or leaf, with the correct stem. The score 56 is plotted by placing the unit’s digit  6 to the right of the stem 5.

The stem and leaf plot of the above data would look like this.

The decimal point is 1 digit(s) to the right of the |
Stem | Leaf
5      | 6 9
6      | 4 5 9
7      | 0 1 3 6 7 8
8      | 0 2 2 5 6
9      | 1 1 2 2 5 8 9

The stem and leaf plot looks like a histogram by rotating it anti-clockwise.

By adding columns of frequency and cumulative frequency in the stem and leaf plots, we can find the median of the data.

stem and Leaft Plot
Stem and Leaf Plot

Reference