Tag: Bar graphs

  • Drawing Bar Graphs in statistics

    Drawing Bar Graphs in statistics

    Bar graphs consist of vertical or horizontal rectangles.We draw these rectangles on a Cartesian plane. They represent a particular data item with its frequency.

    Bar charts are especially effective with numerical data. This is when the data splits nicely into different categories. You can quickly see trends within your data.  They are best used to:

    • show change over time
    • compare different categories
    • compare parts of a whole.

    There are two types of simple bar charts:

    • Vertical or column chart –bars are moving upwards or are vertical.
    • Horizontal bar chart– This is a bar chart where the bars are horizontal.

    For vertical bar graphs, horizontal axis shows category of items and vertical axis the frequency.

    horizontal bar graphs

    For horizontal bar graphs, item categories are on vertical axis and frequency on the horizontal axis. see the figure below

    Bar graphs are particularly useful in making comparison of data. The height or length of a bar graph is directly proportional to frequency. However, the width does not have numerical significance.

    Consider a hypothetical data about daily visitors. They visit the first seven major stores in Washington. This is shown in the table below.

    We can represent the above information on a bar graph for a more appealing visualization. A typical vertical bar graph for the above data can be as in the diagram below.

    A vertical bar graph

    Vertical bar graphs

    If the same information could be represented using horizontal bar graph, it could appear as shown below:

    Horizontal bar graph

    Each unit in the horizontal scale represents 200 visitors

    By now you may have realized that a chart has 5 important elements:

    • Chart title– example: Number of visitors per day in 5 stores
    • Vertical axis title-e.g. : store name
    • horizontal axes title-e.g. : number of visitors
    • axes labels-e.g, Amazon fresh, Food lion, Gian….
    • data labels

    Chart title is arguably the most important piece of a chart. It is the element that lets the audience know what your chart is about.

    Your chart titles should be descriptive enough. At first glance, your audience should know what information the chart intends to give them. The title should also be brief and concise so that the graph is not cluttered.

    Chart title is usually placed at the top of the chart.

    Example

    The table below shows the number of students enrolled in each course in the department of Science and Engineering at Kenyatta University on January 2024.

    Draw a bar graph to show this information

    solution

    Vertical bar chart showing relationship between enrollment and course

    The vertical scale in the above chart represents 1 unit for 5 students

    Multiple Bar Graphs

    Multiple bar graphs are used when we have more than one category of data entities to analyze. For example performance of students in two or more subjects.

    For Example compare sales value of two loan products for various banks in the last one year in million dollars as shown

    Task: draw a bar graph to represent this information

    Solution

    Multiple bar graphs

    In the above chart the bar blue bar shows A mortgage sales and the orange color shows business loan.

    Divided Bar Charts

    This type of bar chart represents two or more quantities on the same bar. One category is connected in series with the other category.

    The information about bank products described above is represented as stacked graph as shown.

    stacked bar graphs

    Practice Exercise

    1. The table below presents the number of female students. It also shows the number of male students. These students are enrolled in 7 courses. The courses are offered in a semester from the department of science and Technology.

    Task:

    1. Draw a multiple graph to represent the information
    2. Draw a stacked graph to represent the information
    3. Which causes has more females compared to males
    4. which cause has the lowest number of participants

    2. Learners in grade 4 were asked to name the breeds of dogs at their homes. Their teacher recorded their responses in the table below.

    Required: Represent the data on a bar graph.

    3. The results of a mathematics tests for 30 students were as follows:

    43 62 33 45 56 32 34 39 51 65 32 43 33 32 43 45 46 44 33 45 51 56 35 33 34 45 32 42 43 62

    Required: Make a bar graph to show this information

    4. The masses of students in grade 7 and 8 were recorded as follow

    required:

    1. draw a multiple bar graphs to represent this information
    2. Represent the information using a stacked graph

    Conclusion

    In this lesson we have discussed how to represent data Using bar graphs. Bar graphs represents data in a more intuitive way. There are various ways we can draw bar graphs. This includes:

    • Vertical bar graphs
    • Horizontal bar graphs
    • Multiple bar graphs
    • stacked bar graphs
    bar graphs

    We can compare more than one entity of data in one bar graph.

    Related Topics


  • Histograms

    Histograms

    Definition

    A histogram is a plot that lets you discover, and show, the underlying frequency distribution of a set of continuous data allowing the inspection of data for its underlying distribution . The common distribution shape can be normal distribution, outliers, skewness, etc.

    Continuous data refers to data that can take any value within a given range. It can be measured with great precision and includes decimal or fractional values. Continuous data is essentially infinite and allows for a smooth and unbroken spectrum of possibilities. Examples of continuous data include height, weight, temperature, and distance.

    Histogram is a bar graph where the area of the bars are used to represent the frequencies. Unlike in bar graphs, there are no gaps between adjacent bars.

    Unlike in bar graphs where class limits are on horizontal axis, in histogram we must use the lower and upper class boundaries which must be clearly marked on the horizontal axis with an accurate scale.

    The width of each bar in histogram is proportional to the class width.

    Example

    The following are masses of some 30 patients that visited a health center in a certain day.

    33 45 49 45 60 67 57 49 48 43 59 64 39 38 44 55 45 48 52 55 54 57 56 49 55 56 39 42 41 46.

    1. Present the information in a frequency table
    2. Draw a histogram to represent the information

    solution

    We start by first determining the number of classes required

    Range = 67-33=34

    A class size of 5 will give 34/5 = 6.8 ≈ 7

    The frequency table will be as follow

    frequency table for the data

    The measurements are usually the estimates of the actual measurements. so that a measurements of 33 kg could be around 32.5kg and 33.4 kg

    In the above example, all classes have equal class width, hence it will be like a bar graph.

    To draw a histogram, we consider the lower and the upper class boundaries of each class, which becomes the boundaries of the bars.

    The bars are equal in width but heights corresponds to the frequencies. The histogram is a shown.

    Practice question

    The frequency table below shows the measurements of girths of 30 trees in a forest in centimeters

    ClassFrequency
    60-648
    65-6914
    70-7916
    80-8910
    90-947
    Frequency table for girths of trees

    Using a suitable scale, draw a histogram to represent this information.

    After working it out, check whether your resultant histogram is like the one in figure below

    n a histogram, each bar’s size shows how many times something happened in a specific range. The height alone doesn’t tell the full story but it is the combined height and width of the bar that gives the complete picture. Height alone shows how often things occur only when all the bars are the same width. If the bars have different widths, you need to look at both the height and the width to understand the frequency.

    Difference between a bar chart and a histogram

    The major difference is that a histogram is only used to plot the frequency of score occurrences in a continuous data set that has been divided into classes called bins. Bar charts, on the other hand, can be used for a great deal of other types of variables, including ordinal and nominal data sets.

    Related Topics and pages


  • Bar Graphs

    Bar Graphs

    Bar graphs constitutes vertical or horizontal rectangles drawn on a Cartesian plane in order to represent a particular data item with it’s frequency.

    Bar charts are especially effective when you have numerical data that splits nicely into different categories so you can quickly see trends within your data.  They are best used to:

    • show change over time
    • compare different categories
    • compare parts of a whole.

    There are two types of simple bar charts:

    • Vertical or column chart –bars are moving upwards or are vertical.
    • Horizontal bar chart– This is a bar chart where the bars are horizontal.

    For vertical bar graphs, horizontal axis represents category of items and vertical axis the frequency.

    For horizontal bar graphs, item categories are on vertical axis and frequency on the horizontal axis. see the figure below

    Bar graphs are particularly useful in making comparison of data.The height or length of a bar graph is directly proportional to frequency but the width does not have numerical significance.

    As an example consider a hypothetical data about daily visitors that calls in in the first seven major stores in Washington as in table below.

    We can represent the above information on a bar graph for a more appealing visualization. A typical vertical bar graph for the above data can be as in the diagram below.

    A vertical bar graph

    If the same information could be represented using horizontal bar graph, it could appear as shown below:

    Horizontal bar graph

    Each unit in the horizontal scale represents 200 visitors

    By now you may have realized that a chart has 5 important elements:

    • Chart title– example: Number of visitors per day in 5 stores
    • Vertical axis title-e.g : store name
    • horizontal axes title-e.g : number of visitors
    • axes labels-e.g, Amazon fresh, Food lion, Gian….
    • data labels

    Chart title is arguably the most important piece of a chart.It is the element that lets the audience know what your chart is about.

    Your chart titles should be descriptive enough such that, at first glance, your audience knows what information the chart intends to give them. The title should also be brief and concise so that the graph is not cluttered.

    Chart title is usually placed at the top of the chart.

    Example

    The table below shows the number of students enrolled in each course in the department of Science and Engineering at Kenyatta University on January 2024.

    Draw a bar graph to show this information

    solution

    Vertical bar chart showing relationship between enrollment and course

    The vertical scale in the above chart represents 1 unit for 5 students

    Multiple Bar Graphs

    Multiple bar graphs are used when we have more than one category of data entities to analyse. For example performance of students in two or more subjects.

    For Example compare sales value of two loan products for various banks in the last one year in million dollars as shown

    Task: draw a bar graph to represent this information

    Solution

    Multiple bar graphs

    In the above chart the bar blue bar represents A mortgage sales and the orange colour represents business loan.

    Divided Bar Charts

    This are bar charts that represents two or more quantities on the same bar where one category is connected in series with the other category.

    The information about bank products described above could be represented as stacked graph as shown.

    stacked bar graphs

    Practice Exercise

    1. The table below shows the number of female and male students enrolled in 7 courses offered in a semester from the department of science and Technology.

    Task:

    1. Draw a multiple graph to represent the information
    2. Draw a stacked graph to represent the information
    3. Which causes has more females compared to males
    4. which cause has the lowest number of participants

    2. Learners in grade 4 were asked to name breed of dogs at their home and their teacher recorded their response in the table below.

    Required: Represent the data on a bar graph.

    3. The results of a mathematics tests for 30 students were as follows:

    43 62 33 45 56 32 34 39 51 65 32 43 33 32 43 45 46 44 33 45 51 56 35 33 34 45 32 42 43 62

    Required: Make a bar graph to show this information

    4. The masses of students in grade 7 and 8 were recorded as follow

    required:

    1. draw a multiple bar graphs to represent this information
    2. Represent the information using a stacked graph

    Conclusion

    In this lesson we have discussed how to represent data Using bar graphs. Bar graphs represents data in a more intuitive way. There are various ways we can draw bar graphs. This includes:

    • Vertical bar graphs
    • Horizontal bar graphs
    • Multiple bar graphs
    • stacked bar graphs

    We can compare more than one entity of data in one bar graph.

    Related Topics