Data Visualization
Dr. Maansi Gupta, PhD
Reasons for Visualizing Data
▪ Helps identify errors in the data.
▪ Reducing size of the dataset by highlighting important relationships and
trends.
▪ Helps convey the analysis to others.
▪ Decision may not be in the hands of the person analyzing the data.
▪ Proper data visualization techniques improve the ability of the decision-
maker to interpret the analysis easily.
Important Terms
▪ Data
▪ Variable
▪ Observation
▪ Decision variables
▪ Uncertain or random variables
▪ Population
▪ Sample
Important Terms
▪ Cross-sectional data
▪ Longitudinal data
▪ Panel data
▪ Structured data
▪ Semi-structured data
▪ Unstructured data
Important Terms
▪ Quantitative data
▪ Qualitative or categorical data
▪ Discrete variable
▪ Continuous variable
▪ Levels of measurement: nominal, ordinal, interval and ratio
▪ Univariate data and bivariate data
Sources of data
▪ Internal vs external sources of data
▪ Use of existing data vs collection of data
▪ Experimental study
▪ Observational or non-experimental study
Issues with Respect to Data
▪ Data privacy
▪ Data quality
▪ Accurately representing reality
▪ Measuring what it is supposed to measure
▪ Timeliness
▪ Completeness
Missing Data
Missing
Legitimately
completely at
missing data
random (MCAR)
Missing data
Illegitimately Missing at
missing data random (MAR)
Missing not at
random (MNAR)
Remedial Action for Missing
Data
▪ Depends on:
▪ Prevalence of missing data
▪ Pattern of missing data
▪ Dealing with missing values is subjective in nature.
▪ The goal is to preserve as much information as possible without introducing
bias in the analysis and results.
Remedial Action for Missing
Data
▪ If small number of observations, and MCAR or MAR: delete the observations.
▪ If deleting is not an option, go with imputation.
▪ MCAR: mean, median, mode
▪ MAR: predictive model to predict values
▪ If MNAR, may be replace with another variable that is related to or measures
similar characteristic as MNAR variable.
Levels of Measurement
Nominal Ordinal Interval Ratio
Data are Meaningful
Meaningful
Data may ranked, zero point
differences
only be but no and ratios
between
classified meaningful between
values
differences values
Qualitative Data
▪ Tabular representations:
▪ Frequency table
▪ Relative class frequencies
▪ Graphical representations:
▪ Bar chart
▪ Pie chart
Quantitative Data
▪ Tabular representations:
▪ Frequency distribution
▪ Relative frequency distribution
▪ Percentage frequency distribution
▪ Cumulative frequency distribution
▪ Relative cumulative frequency distribution
▪ Percentage cumulative frequency distribution
Quantitative Data
▪ Graphical representations:
▪ Histogram
▪ Frequency polygon
▪ Cumulative frequency polygon
Measures of Location
▪ Mean (raw and grouped data)
▪ Median (raw and grouped data)
▪ Mode
▪ Geometric mean (both formulae)
Measures of Dispersion
▪ Range
▪ Mean deviation
▪ Variance (population, sample, grouped data)
▪ Standard deviation (population, sample, grouped data)
▪ Coefficient of variation
Skewness
▪ Symmetric data
▪ Positively skewed data
▪ Negatively skewed data
▪ Pearson’s coefficient of skewness
Important Topics
▪ Empirical rule
▪ Percentiles, quartiles, deciles
▪ Inter-quartile range or IQR
▪ Box plot
▪ Outliers
▪ Z-score
Bivariate Data
▪ Graphical representation:
▪ Scatter diagram
▪ Tabular representation:
▪ Contingency table
▪ Descriptive measures:
▪ Covariance
▪ Correlation coefficient
Additional Charts
▪ Line chart
▪ Bubble chart
▪ Heat map
Tables vs Charts
▪ Human mind can process visual images such as charts faster than rows of
numbers.
▪ Some images are better than others at conveying information.
▪ In general, charts can convey information faster and easier to readers.
▪ In some cases, tables may be more appropriate.
When to Choose Tables
▪ Reader needs to refer specific numerical values.
▪ Reader needs to make precise comparisons between different values and not
just relative comparisons.
▪ Values being displayed have different units or very different magnitudes.
Practice Questions
▪ What is the purpose of data visualization?
▪ What is data visualization?
▪ Describe any two types of charts, with appropriate examples and diagrams.
▪ Describe any two visual/ tabular/ graphical representations for qualitative data,
with appropriate examples and diagrams.
▪ Describe any two visual / tabular/ graphical representations for quantitative
data, with appropriate examples and diagrams.
Practice Questions
▪ Which data visualization technique is usually preferred and why?
▪ In which scenarios would you prefer using a tabular representation over a
graphical one? Explain with the help of appropriate examples.
▪ Which two-dimensional chart would be appropriate to represent three
variables? Explain with the help of an appropriate diagram.
▪ Distinguish between various types of missing data. What remedial measures
can be adopted for missing data?