Lecture 3: Data Display Methods and Statistical Visualization
Principles of Tool Selection for Data Display
The selection of an appropriate graphical tool for data visualization depends on two primary methodological criteria:
Analytical Objective: Determining whether the goal is to examine the distribution of a single variable within a sample, or to analyze the associations and relationships between two or more variables.
Variable Type: Identifying whether the variables under investigation are categorical or numerical.
Variable Classification and Taxonomy
Data variables are broadly divided into two primary categories, each containing specific sub-types:
Categorical Variables
Categorical variables represent qualitative attributes or groups. They are subdivided into:
Nominal Variables (N): Categories without any intrinsic quantitative order or ranking.
Examples: Major area of study, Survival status ( / ).
Ordinal Variables (O): Categories that possess a natural, sequential ordering or scale.
Example: Likert scale responses (, , , , ).
Numerical Variables
Numerical variables represent measurable quantities. They are subdivided into:
Discrete Variables (D): Variables that take on distinct, countable integer values.
Example: Number of trees in a sample.
Continuous Variables (C): Variables that can take on any real value within a given continuous interval.
Example: Height.
Graphical Methods for Single-Variable Frequency Distributions
When analyzing the distribution of a single variable, the visual tool is selected based on data type:
Categorical Data: Displayed using a Bar graph.
Numerical Data: Displayed using a Histogram.
Framework for Displaying Associations Between Variables
When examining relationships between two variables, the choice of graph depends on the data types of both the explanatory variable ( -axis) and the response variable ( -axis):
| Explanatory Variable ( -axis) | Response Variable ( -axis) | Recommended Graphical Method | | :--- | :--- | :--- | | Categorical | Categorical | Mosaic plot, Grouped bar graphs | | Categorical | Numerical | Bar plots, Box-and-whisker plots | | Numerical | Categorical | Bin responses & plot averages using scatter plot or stacked bar graph | | Numerical | Numerical | Scatter plot |
Limitations of Software Tools
Standard spreadsheet software such as Microsoft Excel can easily construct basic plots (e.g., standard bar charts, scatter plots), but is poorly equipped to natively generate advanced displays such as mosaic plots or customized binned plots. Advanced statistical computing environments (e.g., R) are preferred for these complex visualization formats.
Associations Between Numerical Explanatory Variables and Categorical Responses
When analyzing a numerical explanatory variable alongside a categorical response variable, raw data must often be grouped into intervals (bins) and summarized before plotting.
Case Study 1: Dose-Dependent Mortality
An experiment measures the categorical response of survival (: , ) across continuous numerical dosage levels.
Raw Observation Data
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Dose : Survived (Code )
Binned Summary Table
Bin Range | Bin Midpoint | Average Survival |
|---|---|---|
Graphical Representation
The summarized data is visualized by plotting the Estimated Probability of Survival on the -axis (ranging from to ) against the Dose Bin Midpoints on the -axis (ranging from to ).
Case Study 2: Questionnaire Response Across Income Levels
An evaluation of ordinal categorical survey responses to the statement: "Taxes in this country are too high" (Options: , , ) across numerical income levels.
Data Summaries Table
Income Bin () | Bin Midpoint | Disagree (%) | Neutral (%) | Agree (%) |
|---|---|---|---|---|
Graphical Representation
Data is plotted using a Stacked Bar Chart:
-axis: Proportion of Respondents ( to ).
-axis: Income Bin Midpoint in (, , , , ).
Segment Divisions: Percentage breakdown of , , and per bin.
Analytical Purpose: Evaluates whether response probabilities systematically depend on individual income.
Advanced Graphical Methods for Categorical Variables
Mosaic Plots
Definition: A specialized visual display designed to examine associations between two or more categorical variables.
Structure: Similar to a stacked bar plot, but with one critical distinction: the width of each bar varies proportionally to reflect the sample size of each category.
Example Application: Evaluating relative frequency ( to ) of disease incidence ( vs. ) across experimental treatment groups ( vs. ).
Implementation Note: Standard tools like Excel are inefficient at creating mosaic plots; statistical environments like R are recommended.
Grouped Bar Graphs
Definition: A graph used to compare bivariate categorical relationships by placing bars adjacent to one another within groupings along the -axis.
Operational Limitation: While useful, grouped bar graphs can make visual comparison across -axis groupings difficult if sub-sample sizes differ significantly between groups.