Categorical Data (factor, nominal)
Continuous data (interval)
Ordinal Data (ordered categorical, ordered factor, Likert scale)
• Like categorical but there is an order to the sequence
• Example: how tired are you feeling right now? Pick one of the following options
1. Very tired
2. Tired
3. Alert
4. Very alert
• Can’t do maths with ordinal data
• Like categorical data, we can talk about the most chosen and least chosen options, but not the average tiredness
Mode
• The score / value / number / response that happens most often
• You can have more than one mode
• One mode = unimodal
• Two modes = bimodal
• Can take modes of continuous data too
What is the mode of the variable bdi.8m, shown on the right? Interpret the result in the context of the data
A score of 0 is the mode (it has 7 appearances or “counts” in the data)
median
mean
What most people mean when they say “average”
Only useful for continuous data
It is the sum (total) of all the values divided by the number of values
Would need to know more about the measurement scale used Let’s formalise that in a formula X ̅=Σx/n The mean has outliers
variability
range
interquartile range
interpreting the IQR
variance
interpreting the variance
standard deviation
just the square route of the variance
interpreting standard deviation
Calculating skew: Pearson’s coefficient of skewness
μ = mean ν = median σ = standard deviation
R studio
Describe(data, mean = mean(dataset), stdev = sd(dataset))
R studio, arrange by the descriptive stats
Describe(data, by dataset, mean = mean(dataset), stdev = sd(dataset))
R studio min and max
describe(data =data, mean_dataset = mean(dataset), SD_dataset = sd(dataset), max_dataset = max(dataset), min_dataset = min(Intrusion), by = Condition)
R studio example
describe(data =tetris, mean_intrusion = mean(Intrusion), SD_Intrusion = sd(Intrusion), max_Intrusion = max(Intrusion), min_Intrusion = min(Intrusion), by = Condition)
r studio correlation
cor(data)
gives you something like:
exercise_mins stai_state
exercise_mins 1.0000000 -0.3985458
stai_state -0.3985458 1.0000000
Calculate the variance explained in R studio
r_exercise_anxiety = 0.3985458