Multivariate statistics – 1ZM31 – Q1 2021/2022
Assignment 1
Data exploration
What is a multivariate data set? several variables are
measured for each unit of analysis
Notation: q variables q>1, n units of analysis
The data fit in a rectangle, rows/individuals can be shuffled
and columns/variables can be shuffled
Nonmetric data
Nominal scales: no ordering
- Dummy variables 0/1: e.g. EU citizen yes/no
- Categorical variables
o E.g. nonbinary/female/male
o E.g. country,
transportation (bike,
foot)
Ordinal scales: ordering
- E.g. education: primary
school, high school,
university, PhD
Metric data
Interval scales: no meaningful absolute zero
- E.g. temperature: 10C is not twice as hot
as 5C
Ratio scales: meaningful absolute zero
- E.g. the height of a person, the number of
employees
Data visualization
Boxplot: best to visualize metric data
Scatterplot: combined visualization of two metric
data variables
In this graph
- No correlation (check if this is significant)
- No causal relationship
1
, Why we care about outliers: an outlier is a data point that is very different from other data
points
Therefore
1. Outliers might indicate an error in
the data collection, or might be
unrepresentative of the population
(substantive concern)
2. Outliers have a disproportionate
influence on statistical analyses
(practical concern)
Results of the factor analysis are stable,
whether or not we exclude data points
with highest values of the MD
Multivariate outliers: Mahalanobis
distance (MD)
- Identify the center of the data
- Draw ellipse around the center of the data
- Each data point on the same ellipse has the same distance to the center
- A higher MD tells you that the data point is further away from the center of the data
- If the data is normally distributed then we know the distribution of the Mahalanobis
Distance
What if the data are not normally distributed?
- We cannot use the rule-of-thumb
- Outliers still have a large Mahalanobis Distance
- Go look into the data whether this is a valid data point
o Error in the data?
o If no error in the data, influence on the results?
Normality
QQ-plot: plot the observed quantiles against the theoretical
quantiles of the normal distribution
- If the data are normally distributed, then the sample
quantiles are close to the theoretical quantiles
- Look whether the data points are close to the 45-degree
line
- If they are not do a logarithmic transformation
2
Assignment 1
Data exploration
What is a multivariate data set? several variables are
measured for each unit of analysis
Notation: q variables q>1, n units of analysis
The data fit in a rectangle, rows/individuals can be shuffled
and columns/variables can be shuffled
Nonmetric data
Nominal scales: no ordering
- Dummy variables 0/1: e.g. EU citizen yes/no
- Categorical variables
o E.g. nonbinary/female/male
o E.g. country,
transportation (bike,
foot)
Ordinal scales: ordering
- E.g. education: primary
school, high school,
university, PhD
Metric data
Interval scales: no meaningful absolute zero
- E.g. temperature: 10C is not twice as hot
as 5C
Ratio scales: meaningful absolute zero
- E.g. the height of a person, the number of
employees
Data visualization
Boxplot: best to visualize metric data
Scatterplot: combined visualization of two metric
data variables
In this graph
- No correlation (check if this is significant)
- No causal relationship
1
, Why we care about outliers: an outlier is a data point that is very different from other data
points
Therefore
1. Outliers might indicate an error in
the data collection, or might be
unrepresentative of the population
(substantive concern)
2. Outliers have a disproportionate
influence on statistical analyses
(practical concern)
Results of the factor analysis are stable,
whether or not we exclude data points
with highest values of the MD
Multivariate outliers: Mahalanobis
distance (MD)
- Identify the center of the data
- Draw ellipse around the center of the data
- Each data point on the same ellipse has the same distance to the center
- A higher MD tells you that the data point is further away from the center of the data
- If the data is normally distributed then we know the distribution of the Mahalanobis
Distance
What if the data are not normally distributed?
- We cannot use the rule-of-thumb
- Outliers still have a large Mahalanobis Distance
- Go look into the data whether this is a valid data point
o Error in the data?
o If no error in the data, influence on the results?
Normality
QQ-plot: plot the observed quantiles against the theoretical
quantiles of the normal distribution
- If the data are normally distributed, then the sample
quantiles are close to the theoretical quantiles
- Look whether the data points are close to the 45-degree
line
- If they are not do a logarithmic transformation
2