3. Graphs-1
3. Graphs-1
By,
Ms. Shakila Shaikh
Assistant Professor
Dept. of Pharmacology
Contents
Introduction to Graphs
Histogram
Pie Chart
Cubic Graph
Response surface plot
Counter Plot graph
Introduction to Graphs
Graphs and charts are used for easier interpretation of numerical
information.
There are different types of graphs in statistics which can be used to
represent data in a pictorial form.
A graph is defined as, "the pictorial representation of statistical data in
graphical form".
A chart can be used to represent numeric data, functions or some kinds
of quality structure in tabular format that provides different information.
Most commonly used graphs are line graphs, bar graphs and histograms,
pie charts, cubic graphs, response surface plots and counter plots.
Histogram
Histogram is a specific type of bar chart, where
categories are ranges of numbers.
A histogram is an area diagram. It can be defined as,
"a set of rectangles with bases along with the intervals
between class boundaries and with areas proportional
to frequencies in the corresponding classes”.
In histogram, all the rectangles are adjacent since the
base covers the intervals between class boundaries.
The heights of rectangles are proportional to
corresponding frequencies of similar classes and for
different classes; the heights will be proportional to
corresponding frequency densities.
Histogram
Histogram illustrates the distribution of numeric data across categories ‘
and therefore show combined continuous data. For example, histograms
can be used to present percentage of patients who received | number of
drugs in hospital.
Types of Histograms:
➢Uniform histogram:
➢Symmetric histogram:
➢Probability histogram:
➢Bimodal (side-by-side) histogram:
Histogram
➢Uniform histogram:
A uniform distribution in histogram reveals that,
the number of classes is too small, and each class
has the same number of elements. It may involve
distribution that has several peaks.
➢Symmetric histogram:
When we draw vertical line down to the center
the histogram, and the two sides are identical in
size and shape, the histogram is said to be
symmetric.
Histogram
➢Probability histogram:
It shows a pictorial representation of a distinct probability
distribution. It consists of a rectangle centered on every value
of x, and the area of each rectangle is proportional to the
probability of the corresponding value.
➢Bimodal (side-by-side) histogram:
A histogram is unimodal if there is one peak, bimodal if there
are two peaks and multimodal if there are many peaks. The
bimodality feature results when the data set has observations
on two different kinds of individuals or combined groups and
if the centers of the two separate histograms are far enough to
the variability in both the data sets.
Pie Chart
A pie chart is a pictorial diagram that shows how
total amount is divided between levels of a
categorical variable. It looks like a circle (or a pie)
divided into radial slices or sectors.
The slices are of different sizes based on how much
of the whole they represent. Each slice is labeled
to represent its value to the whole. It is used to
show dependent data that how the whole
population breaks down into parts.
Usually pie chart is not appropriate to use for
samples with more than 5 or 6 different
categories.
Pie Chart
Pie charts are used in research and business presentations to demonstrate
population segments, outcome responses and budget allocations.
The pie chart can also be used to illustrate the numerical problems and
also to find out the composition of something. Pie charts, are preferred
choice as contains different segments and sectors and each segment or
sector of a pie chart forms a certain portion of the total percentage.
The total of all the data is equal to 360° and total value of the pie is
100% (i.e. 360° 100%). The steps performed to compute the percentage
of sector a pie chart include categorization of the data, calculating the
categories and total, converting dividing them the into percentages and
finally, calculating the degrees.
Pie Chart
Uses of Pie Chart:
➢ Pie chart can be used for displaying data as an alternative to table
formats. These are useful for displaying data that are classified into
nominal or ordinal categories.
➢ It helps to categorize data into different ranks as very poor, poor,
fair, good, very good. Pie charts are used to show percentage or
proportions of data.
➢ These charts are good for displaying data for around 5-7 categories
or fewer which becomes easier to interpret.
Pie Chart
Advantages Disadvantages
1. The pie picture is simple and easy-to- 1. Pie chart becomes less effective, if there are
understand. too many categories of data to use.
2. Data can be represented visually as a 2. If there are too many pieces of data, they
fractional part of a whole. may become crowded and difficult to read.
3. It helps in providing an effective 3. As this ‘ chart only represents one data set,
communication tool for uninformed we need series to compare ‘ multiple sets.
audience.
4. Pie charts with many categories are difficult
4. Provides a data comparison for the readers to analyze and assimilate information
at a glance for immediate analysis.
5. No need to examine underlying numbers
which can be removed in this chart. Easy to
manipulate pieces of data in the pie chart.
Cubic Graph
A cubic graph is one that is obtained by taking all
vertices denoted as binary words and joining the
vertices with the edge whenever the binary words
differ by 1.
It is a graph in which all vertices have degree 3. Therefore, a cubic graph is a 3-
regular graph and is also called as trivalent graphs. These graphs are symmetric or
semi-symmetric. A graph is said to be regular if all its vertices are of same degree and
k-regular if all its vertices are of degree k.
A 3-regular graph is also called a cubic graph. A vertex with degree zero is an
isolated vertex, a vertex with degree one is a pendant vertex and the unique edge
incident to a pendant vertex is a pendant edge.
A vertex of odd degree is an odd vertex and a vertex of even degree is an even
vertex.
Cubic Graph
Properties of Cubic Graph:
➢Cubic graph can be colored with at most three colors.
➢Contour plot a Every connected cubic graph has an independent set of at
least n/3 vertices, where n is the number of vertices in the graph.
➢Cubic graphs arise naturally in topology as simple polyhedra and polyhedra.
➢The path width of any n-vertex cubic graph is at most n/6.
➢Every cubic graph has an even number of vertices.
➢Every cubic bridgeless graph has a perfect matching.
➢Every cubic bridgeless graph has an exponential number of perfect matching.
➢Every cubic bridgeless graph with n vertices has at least 2/3656 perfect
matching.
➢Cubic graphs can be used to model many types of relations and process
dynamics in computer science, physical and biological and social systems.
Response surface plot
Response surface plots are 3-D diagrams that show a functional
relationship between a dependent variable (y), and two independent
variables (x and z). In order to construct surface plot, first 2-D grid of x
and z variables is constructed.
The range of this grid is equal to the range of the data. It is followed by
calculating y value for each grid point. The y value is a weighted
average of all data values that are near this grid point. The number of
points to be averaged needs to be specified.
Then the 3-D surface is constructed using these averaged values.
Therefore, surface plot does not show any variation at each grid point.
Surface plots are useful in regression analysis for viewing the relationship
among a dependent and two independent variables.
Response surface plot
The multiple regressions assume that surface is a
perfectly flat surface and hence it helps to visually
determine if multiple regression is appropriate.
Generally, a surface plot is constructed from three
variables using Windows MS Excel.
The condition to construct the surface plot is that
all three variables must be numeric. The x variable
is displayed along the horizontal axis, the y
variable is displayed along the vertical axis, and
the z variable is displayed on the depth axis.
Surface charts are useful to find the optimum
combinations between two sets of data.
Response surface plot
❖ 3-D surface plots:
A 3-D surface chart shows 3-D view of the data, which can be
imagined as a rubber sheet stretched over a 3-D column chart.
Color bands in a surface chart do not represent the data series
but it indicates the difference between the values.
❖ Wireframe 3-D surface plots: 3-D surface plots
This is a 3-D surface chart shown without color on the surface. This
type of surface chart shows only the lines. This type of surface
chart is difficult to | read, but it can plot large data sets much
faster as compared to 3-D surface \ chart. Wireframe 3-D surface
chart is used to show the trends in values across two dimensions in
a continuous curve, when the categories and the | series are both
numeric values and when the data curves behind itself.
Wireframe 3-D surface plots
Counter Plot graph
Contour plots are similar to the response surface plots. A contour plot is a
graphical technique for representing a 3-D surface by plotting constant z
slices, called contours, on a 2-D format.
For example, if values for z are given, lines are drawn for connecting the (x, y)
co- ordinates where that z value occurs.
The contour plot is an alternative plot to a 3-D surface plot. This plot shows
symmetry of the surface and peaks in the center.
The contour plot is formed by vertical axis (independent variable 2),
horizontal axis (independent variable 1) and lines (iso-response values).
The independent variables are usually placed on x-axis. The determination of
correct iso- response values is complex and is always done by using computer
software.
Counter Plot graph
An additional variable may be required to specify the
z values for drawing the iso-lines. Some software
packages require explicit values while some software
packages determine them automatically.
If the data is not suitable to form a regular grid, in such
cases it needs to use 2-D interpolation to form a
regular grid. The contour plot is used to obtain
information about how does z change as a function of
x and y.
The contour plot is a specialized type of plot used in
the design of experiments, especially for full and
fractional factorial designs.
Counter Plot graph
❖3-D Counter Plot:
Contour plots are surface charts that are viewed from top and are the
form of while statistical software programs which vary widely in their
capabilities to plot and generate contour plots.
Many programs provide simply the basic contour plot over a
rectangular grid higher versions permits color filled or shaded contours.
Statistical software programs that supports design of experiments also
has a DOE contour plot facility.
Contour charts are used to show the 2-D top view of a 3-D surface
chart, to represent the ranges of the values using color and when both
the categories and the series are numeric.
Counter Plot graph
❖Wireframe Contour Chart:
Wireframe contour charts are also surface charts
viewed from above. These charts shows only the
lines without the color bands on the surface but
are not easy to read.
Thus, usually 3-D surface chart is used.
Wireframe contour chart is used to show the 2-D
top view of a 3-D surface chart only with lines
and when both the categories and the series are
numeric.
In order to look at the case where x and y do not
form a perfect grid, an example s a surface.