You are on page 1of 29

Bar graphs

Line graphs
Pie graphs
Stem and leaf diagrams

Lesson 2: Graphing the data

Le Thi Xuan Mai

The university of sciences

January 5, 2022

T.X.M. Le Introduction to statistics


Bar graphs
Line graphs
Pie graphs
Stem and leaf diagrams

A graph is a diagram that shows relationships between


variables:
how changes in one variable are related to changes in
another
how one variable (dependent variable) is a function of
another.
In this lesson, we concentrate on graphs that show how
changes in a measurement variable X are related to changes in
either frequency, relative frequency, or percentage. There are
three types of graphs
bar graphs
line graphs
pie graphs

T.X.M. Le Introduction to statistics


Bar graphs
Line graphs
Pie graphs
Stem and leaf diagrams

T.X.M. Le Introduction to statistics


Bar graphs
Line graphs
Pie graphs
Stem and leaf diagrams

T.X.M. Le Introduction to statistics


Bar graphs
Line graphs
Pie graphs
Stem and leaf diagrams

T.X.M. Le Introduction to statistics


Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

A bar graph is constructed on a rectangular coordinate


system, where by tradition the X axis represents the
independent variable, the Y axis the dependent variable,
rectangles (bar) show the relationship between the variables.
A line graph is also constructed on a rectangular coordinate
system. It shows the relationships between variables by means
of dots connected by lines.
Pie graphs show the relationship between variables by dividing
a circle (or a pie) into appropriately sized sectors. They are
used to display relative frequency and percentage distributions.

T.X.M. Le Introduction to statistics


Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

A bar chart is a bar graph for nominal-level, ordinal-level, and


discrete ratio-level data that shows frequency, relative
frequency, or percentage by the height of the bar and not by
the bar’s area, and shows vagueness or discontinuities in the
measurement scale by spaces between the bars.
In bar charts, the length of the bar shows the number of
observations or the value of the variable of interest for each
level of the nominal and ordinal variable, and the width has no
meaning.
Return to the example of hair color of students
Hair color Frequency Frequency distribution
black 33 0.22
brown 55 0.37
red 20 0.13
blond 42 0.28
T.X.M. Le Introduction to statistics
Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

T.X.M. Le Introduction to statistics


Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

A histogram is a bar graph for continuous ratio-level data. A


histogram differs from a bar chart in that the histogram shows
frequency, relative frequency, or percentage by the area of the
bar and not always by its height, and shows the height level of
measurement being graphed by bars that touch each other to
form a continuous structure. If all the intervals are of equal
width, then the height of the interval, as well as its area,
represents the frequency of the interval.
For a histogram of relative frequency,
the base of rectangles is put on horizontal axis and limited
by boundaries of class.
the area of rectangles is proportion to the frequency of
the class.
the total area of histogram is equal to 1.
T.X.M. Le Introduction to statistics
Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

Return to the example of weights of salmons

Weights (xi ) Frequency (fi ) Relative frequency


1.1 3 0.15
1.2 2 0.10
1.3 5 0.25
1.4 6 0.3
1.5 2 0.1
1.6 2 0.1

T.X.M. Le Introduction to statistics


Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

T.X.M. Le Introduction to statistics


Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

T.X.M. Le Introduction to statistics


Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

The first rectangular has a base between 1.05 and 1.15 and its
area is equal to 0.15. So

h1 × (1.15 − 1.05) = 0.15

which implies
0.15
h1 = = 1.5
0.1
The third rectangular has a base between 1.25 and 1.35 and
its area is equal to 0.25. So

h3 × (1.35 − 1.25) = 0.25

which implies
0.25
h3 = = 2.5
0.1
T.X.M. Le Introduction to statistics
Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

Return to the example of DIG

Age groups Class limit Class mark Frequency Relative


lower-upper lower-upper fi frequency
< 40 ?-39 ? 3 3/40=0.075
[40, 50[ 40-49 44.5 6 0.15
[50, 60[ 50-59 54.5 8 0.20
[60, 70[ 60-69 64.5 11 0.275
[70, 80[ 70-79 74.5 12 0.30
Total 40 1

T.X.M. Le Introduction to statistics


Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

T.X.M. Le Introduction to statistics


Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

T.X.M. Le Introduction to statistics


Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

Return to the example of Boston marathon

Times Class limit Class Class Freq Relative


(min) lower-upper boundaries mark ni frequency
[128, 131[ 128-130 127.5-130.5 129 3 0.0353
[131, 134[ 131-133 130.5-133.5 132 1 0.0118
[134, 137[ 134-136 133.5-136.5 135 4 0.0471
[137, 140[ 136-139 136.5-139.5 138 3 0.0353
[140, 143[ 140-142 139.5-142.5 141 7 0.0824
[143, 146[ 143-145 142.5-145.5 144 12 0.1412
[146, 149[ 146-148 145.5-148.5 147 13 0.1529
[149, 152[ 149-151 148.5-151.5 150 13 0.1529
[152, 155[ 152-154 151.5-154.5 153 29 0.3412
Total 85 1

T.X.M. Le Introduction to statistics


Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

T.X.M. Le Introduction to statistics


Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

The Boston data can be grouped into 6 classes instead of 9


classes
Times Class mark Freq Relative
(min) ni frequency
[125, 130[ 127 1 0.012
[130, 135[ 132 4 0.047
[135, 140[ 137 6 0.071
[140, 145[ 142 14 0.165
[145, 150[ 147 23 0.270
[150, 155[ 152 37 0.044
Total 85 1

T.X.M. Le Introduction to statistics


Bar graphs
Bar charts
Line graphs
Histograms for ungrouped data
Pie graphs
Histograms for grouped data
Stem and leaf diagrams

Remark. This histogram has a tail of low relative frequency


values that extends to the left, in the negative direction along
the X axis. It is said to be negatively skewed.
T.X.M. Le Introduction to statistics
Bar graphs
Line graphs Polygone for ungrouped data
Pie graphs Polygone for grouped data
Stem and leaf diagrams

A polygon is a simply a line graph of a frequency, relative


frequency, or percentage distribution. Midpoints of the implied
range for the category are connected by straight lines to make
a polygon.
Return to the example of weights of salmons

T.X.M. Le Introduction to statistics


Bar graphs
Line graphs Polygone for ungrouped data
Pie graphs Polygone for grouped data
Stem and leaf diagrams

T.X.M. Le Introduction to statistics


Bar graphs
Line graphs Polygone for ungrouped data
Pie graphs Polygone for grouped data
Stem and leaf diagrams

It is assumed in the construction of a polygon for grouped


data that all measurements within a class are at the class
mark. The class dots are connected by straight lines and thus
the polygon connects the midpoints of the tops of adjacent
histogram bars.
Return to the example of DIG

T.X.M. Le Introduction to statistics


Bar graphs
Line graphs Polygone for ungrouped data
Pie graphs Polygone for grouped data
Stem and leaf diagrams

T.X.M. Le Introduction to statistics


Bar graphs
Line graphs
Pie graphs
Stem and leaf diagrams

Pie graphs represent relative frequency or percentage


distributions with circles divided into sectors that are
proportional in areas to the relative frequency or percentage
values. If there is an ordering to the categories (or classes) of
the distribution, it is typically preserved in a clockwise
sequence starting at the 12 o’clock position.

T.X.M. Le Introduction to statistics


Bar graphs
Line graphs
Pie graphs
Stem and leaf diagrams

Figure: Relative frequencies of age in the example of DIG (1997).


T.X.M. Le Introduction to statistics
Bar graphs
Line graphs
Pie graphs
Stem and leaf diagrams

A stem and leaf diagram (Tukey’s histogram) is a good way


to obtain an informative visual display of a data set where
each number xi consists of at least two digits.
To construct a stem and leaf diagram, use the following steps
1 Divide each number xi into two parts: a stem,consisting
of one or more of the leading digits and a leaf,consisting
of the remaining digit.
2 List the stem values in a vertical column.
3 Record the leaf for each observation beside its stem.
4 Write the units for stems and leaves on the display.

T.X.M. Le Introduction to statistics


Bar graphs
Line graphs
Pie graphs
Stem and leaf diagrams

I Stem and leaf diagram provides more precise information


than histogram.
I It shows not only the frequency of classes but also the
values of data that helps us to calculate the median, the first
and the second third quartile, minimum and maximum.

T.X.M. Le Introduction to statistics


Bar graphs
Line graphs
Pie graphs
Stem and leaf diagrams

Example: Boston marathon

The decimal point is 1 digit(s) to the right of the |


stem leaf freq
12 9 1
13 0034 4
13 566888 6
14 11122223333344 14
14 55555666677788888899999 23
15 0000111122222222233333333333444444444 37

T.X.M. Le Introduction to statistics

You might also like