DSA-Midterm
DSA-Midterm
Visualization
- Dave Miracle Cabanilla
Outline
● The Power of Graphs and Charts
● Data-Driven Decision-Making
The method for making a frequency table differs between the four types of
frequency distributions.
How to make an ungrouped frequency table
1. Create a table with two columns and as many rows as there are values of the variable. Label the first
column using the variable name and label the second column “Frequency.” Enter the values in the first
column.
● For ordinal variables, the values should be ordered from smallest to largest in the table rows.
● For nominal variables, the values can be in any order in the table. You may wish to order them
alphabetically or in some other logical order.
2. Count the frequencies. The frequencies are the number of times each value occurs. Enter the
frequencies in the second column of the table beside their corresponding values.
● Especially if your dataset is large, it may help to count the frequencies by tallying. Add a third
column called “Tally.” As you read the observations, make a tick mark in the appropriate row of
the tally column for each observation. Count the tally marks to determine the frequency.
Example: Making an ungrouped frequency table
How to make a grouped frequency table
How to make a grouped frequency table cont.
Example: Grouped frequency distribution
Example: Grouped frequency distribution cont.
How to make a relative frequency table
How to make a relative frequency table cont.
How to make a cumulative frequency table
How to make a cumulative frequency table cont.
How to graph a frequency distribution
Pie charts, bar charts, and histograms are all ways of graphing frequency
distributions. The best choice depends on the type of variable and what you’re
trying to communicate.
Pie chart
● A pie chart is a graph that shows the relative frequency distribution of a
nominal variable.
● A pie chart is a circle that’s divided into one slice for each value. The size of
the slices shows their relative frequency.
● This type of graph can be a good choice when you want to emphasize that
one variable is especially frequent or infrequent, or you want to present the
overall composition of a variable.
● A disadvantage of pie charts is that it’s difficult to see small differences
between frequencies. As a result, it’s also not a good option if you want to
compare the frequencies of different values.
Pie chart
Bar chart
● A bar chart is a graph that shows the frequency or relative frequency
distribution of a categorical variable (nominal or ordinal).
● The y-axis of the bars shows the frequencies or relative frequencies, and the
x-axis shows the values. Each value is represented by a bar, and the length or
height of the bar shows the frequency of the value.
● A bar chart is a good choice when you want to compare the frequencies of
different values. It’s much easier to compare the heights of bars than the
angles of pie chart slices.
Bar chart
Histogram
● A histogram is a graph that shows the frequency or relative frequency
distribution of a quantitative variable. It looks similar to a bar chart.
● The continuous variable is grouped into interval classes, just like a grouped
frequency table. The y-axis of the bars shows the frequencies or relative
frequencies, and the x-axis shows the interval classes. Each interval class is
represented by a bar, and the height of the bar shows the frequency or relative
frequency of the interval class.
Histogram
Histogram