WK1 Lecture 3 - Descriptive Statistics and Visualisation
Common Types of Variables
Numeric - continuous
- Can be any value over a given range
- Examples include: height and weight
Numeric - discrete
- There's no "in-between" adjacent values
- Values are usually integers
- Examples include: Number of plants or animals
Categorical
- Two or more categories with no intrinsic order
- Also known as nominal
- Examples could include: Male/Female, Blue/Green/Red
Ordinal
- Two or more categories with an intrinsic order
- Examples include: Likert scales
See 1A. Types of Data for more information
Representing Single Continuous Variables
Some graphics appropriate for a single continuous variable are:
- histograms (optionally with a density plot)
- box and whisker plots
- stem and leaf plots
- density plot with rug plot
- Q-Q plot to assess normality
Features seen in plots
| Feature | Histogram | Box and Whisker Plot |
|---|---|---|
| Skewness | Y | Y |
| Outliers | Y | Y |
| Multimodality | Y | N |
| Gaps | N | N |
| Heaping | N | N |
| Rounding | N | N |
| Impossibilities | Y | Y |
| Errors | N | N |
- A key decision in histograms is bin width
- Bars must be touching as x-axis is a continuous measurement
- Space between bars has meaning as the x-axis is continuous so it represents gaps in data
Descriptive Statistics -Numeric Data
There are three aspects to consider:
Location (central tendency)
- Where are the data on average and what's the location on the number line.
Spread (dispersion or variation) - How spread out are the data
Shape - Symmetric or skewed?
- Unimodal or bimodal?
- Flat or peaked?
- Other shape features?
Location - mean
Spread - variance
Spread - standard deviation
Other Visualisations
Some other graphics appropriate for single continuous variables are bar charts and pie graphs. There are some issues with pie graphs, hence why some statisticians take issue with them. In a pie chart angles are often difficult to compare and alternatives make comparisons easier.
Presenting categorical bar graphs
Features could be: unexpected pattern of results, uneven distributions, extra categories (e.g. M/F and m/f), large numbers of categories, unsure answers, errors and missing values.
Sensible order: alphabetical, highest to lowest or vice versa, by measure presented.
Presentation: start the y-axis at zero to appropriately represent values in the graph.
Presenting pie charts
Ensure the slices add up to 100%. Order slices according to their size. Try to minimize the amount of categories, consider having an "other" category.