Skewness measures how asymmetrical a distribution is relative to a normal, or Gaussian, distribution. A value of 0 indicates symmetry; negative values indicate left-skew, and positive values indicate right-skew. section 17.4.1
Use skewness alongside visual checks. Density plots reveal distribution shape and help assess skewness or symmetry; comparing mean and median lines can make the pattern easier to interpret. Values above 2 or below -2 qualify as non-normal distributions and can complement or replace a Shapiro-Wilk test. section 4.5.1 section 17.4.1
Checking skew in basketball data
Create a descriptive table with tableone, then inspect its skew column for variables such as points, opening spreads, closing totals, and player statistics. For example, ptsR has skewness 0.1, while openspreadR has -0.2, indicating only slight asymmetry in both distributions.
p1 <- ggplot(free_agents, aes(x = annual_salary)) +
geom_density(alpha = .3, fill = "salmon") +
geom_vline(aes(xintercept = mean(annual_salary, na.rm = TRUE)),
color = "red", linetype = "longdash", size = .8) +
geom_vline(aes(xintercept = median(annual_salary, na.rm = TRUE)),
color = "blue", linetype = "longdash", size = .8) +
labs(title = "Annual Salary Distribution",
subtitle = "Shortlisted Free Agents",
x = "Annual Salary",
y = "Density",
caption = "Salary data is illustrative only") +
scale_x_continuous(labels = comma) +
theme(plot.title = element_text(face = "bold")) +
annotate("text", x = 18000000,
y = .000000025, label = "Mean", color = "black",
size = 4, fontface = "bold", angle = 90) +
annotate("text", x = 14000000,
y = .000000025, label = "Median", color = "black",
size = 4, fontface = "bold", angle = 90)
Compare a density curve with mean and median reference lines to inspect distribution shape visually. section 4.5.1




