2023-06-11

MLB 2022 Batting Stats

I will examine batting different elements of MLB 2022 Season Batting statistics from a csv file downloaded from the official MLB website.

Explaining anglesweetspotpercent

\[ \text{anglesweetspotpercent} = \frac{\text{Number of hits classified as a 'sweet spot'}}{\text{Total number of hits}} \times 100 \]

Explaining ev95percent

\[ \text{ev95percent} = \frac{\text{Number of hits with exit velocity} \geq 95 \text{mph}}{\text{Total number of hits}} \times 100 \]

3D Plot: Average Hit Speed by Avg Hit Angle and Max Distance

Distribution of Average Hit Speed

ggplot(exit_velocity_data, aes(x = avg_hit_speed)) +
  geom_histogram(binwidth = 1,fill = "blue", color = "black") +
  labs(title = "Distribution of Average Hit Speed", x = "Average Hit Speed", y = "Count")

Relationship between Max Hit Speed and Launch Angle