Human eyes are designed to capture colors and patterns. We can quickly identify the red part of a green or a circle of a square. Nowadays where huge amounts of data are generated every day, data visualization helps to attract our interest and keep our main focus on the message to make data-based decisions. There are many data visualization techniques and tools, such as charts, graphs, or maps, that provide an accessible way to identify trends, deviations, and patterns in data. Another popular technique for presenting data is a histogram, which is an estimate of the probability of distributing a continuous variable. In this article, we will show you two different ways to create a SAS histogram. But first, let’s look at some of the most common types of data representations.

#### The Ultimate Data Science Job Guarantee Program

6-month course in data science with a job guaranteeJoin today

## Types of data presentation

### 1. Bar chart

The bar chart visualizes data horizontally or vertically as quantities and frequency. It can be single or grouped. The most common use of bar charts is to compare different elements. It is easy to tell which types of data affect the other by looking at all the bars in the diagram. Fig .: Bar chart (source)

### 2. Histogram

The histogram is similar to the appearance of a bar chart. However, there is a big difference between a histogram and a bar graph. The bar graph measures the frequency of the categorical data (gender, months, estimates, etc.), while the histogram is used for quantitative data (data for categorical variables). Fig .: Histogram (source)

### 3. Linear graphics

Linear graphics use lines and dots to represent change over time. They can be used to represent the growing population of the world day after day, the number of animals left on earth, or the growing number of data from day to day, and so on. It gives you an idea of ​​the changes taking place in the world over time. Fig .: Graph of speed versus time (source)

### 4. Pie chart

A pie chart is a pie chart used to represent a numerical proportion. They are often used to display percentages as a whole and percentages at a particular point in time. However, pie charts do not show changes over time, unlike other data representations. It can be replaced in most cases with other data representations such as bar chart, field chart, scatter chart, etc. Fig .: Pie chart of the populations of native speakers in English (source)

#### Free course: Introduction to data science ### 5. Frequency distribution table

A frequency allocation table helps you summarize the value and frequency of the chart. There are usually two or three columns. The first column lists all the different results as individual values, while the second column lists the frequency of each data result. This data presentation gives you a snapshot of the data to help you identify patterns.

#### number

1

Completely agree

23

2

Agree somewhat

31

3

I’m not sure

22

4

I do not agree to some extent

19

5

Strong disagreement

16

### 6. Scatter diagram

A scatter plot is a type of diagram or mathematical diagram that uses values ​​from two variables plotted in a Cartesian plane. In case the points are coded, you can display an additional variable. The data is displayed as a collection of points – the value of one variable is determined by the position on the horizontal axis, and the value of the other variable is determined by the position on the vertical axis. Fig .: Scattered graphics (source)

### 7. Box Plot

A box graph is a graphical representation of the location, distribution, and distortion of numerical data through their quartiles. In addition to the chart field in the box, the graphs of the boxes may also have lines extending vertically from the boxes or whiskers that show variability outside the upper and lower quartiles. Deviations that differ significantly from the rest of the data set can be plotted as separate points. Fig .: Paintings (source)

#### Master’s program Data Scientist

In collaboration with IBMTake a course ## SAS histogram

The SAS histogram helps you examine your data by showing the distribution of a continuous variable over value categories. It can be created using PROC UNIVARIATE, PROC CHART or PROC GCHART.

### Syntax

The syntax for creating a histogram in SAS is:

 PROC UNIVARIATE DATA = DATA SET; HISTOGRAM variables; RUNNING;

Where ‘DATASET’ is the name of the data set used and ‘variables’ are the values ​​used to plot the histogram.

### A simple histogram

A simple histogram can be created by specifying the name of the variable and the range for grouping the values. In this example, we will take the minimum and maximum values ​​of the variable “horsepower” and a range of 50. The values ​​will form a group of steps of 50.

 proc single data = sashelp.cars; horsepower histogram / midpoints = 176 to 350 by 50; run;

By executing the code above, you will get the following output: ### Histogram with curve fitting

We can also fit some distribution curves into the SAS histogram using some additional options. For example, let’s add a distribution curve with averages and standard deviation values ​​referred to as EST. This option uses parameter estimation.

 proc univariate data = sashelp.cars noprint; horsepower histogram / normal ( mu = est sigma = prognostic color = blue w = 2.5 ) barlabel = percentage midpoints = 70 to 550 by 50; run;

By executing the code above, you will get the following output: ## Related topics

1. SAS datasets
2. SAS contours
3. SAS Macro Guide
4. SAS arrays
5. SAS linear regression

Are you considering a profession in the field of Data Science? Then get certified with the Data Science Bootcamp program today!