[1] "Average Games Played"
[1] 45
[1] "Standard Deviation of Games Played"
[1] 26.17843
[1] "Average Goals"
[1] 8.166667
[1] "Standard Deviation of Goals"
[1] 10.42571
2024-04-03
[1] "Average Games Played"
[1] 45
[1] "Standard Deviation of Games Played"
[1] 26.17843
[1] "Average Goals"
[1] 8.166667
[1] "Standard Deviation of Goals"
[1] 10.42571
[1] "Average Assists"
[1] 13.76667
[1] "Standard Deviation of Assists"
[1] 14.11207
[1] "Average Points"
[1] 21.93333
[1] "Standard Deviation of Points"
[1] 23.8818
The graph shows that David Pastrnak is the outlier here as he is more than two standard deviations away from the mean in terms of points.
Here, again, David Pastrnak is an outlier in the data as his Goals stat is more than two standard deviations away from the mean.
This graph is meant to display that, in general, more shots equates to more goals.
[1] "Standard Deviation"
\[ \sigma = \sqrt{\sum(x_i-\bar{x})^2/N} \] \[ \sigma = Population \] \[ x_i = Individual Value \] \[ \bar{x} = Mean \] \[ N = Population Size \]
[1] "Variance"
\[ S^2 = \frac{\sum(x_i-\bar{x})^2}{n-1} \] \[ S^2 = Sample Variance \] \[ x_i = Individual Value \] \[ \bar{x} = Mean \] \[ n = Observations \]
Points <- player_stats$P
g <- ggplot(player_stats, aes(x=Player, y = Points, fill = Player)) +
geom_bar(stat = "identity") +
theme(axis.text.x = element_text(face = "bold", color = "black",
size = 8, angle = 60, hjust = 0.8))
library(plotly)
ggplotly(g)%>%
layout(margin = list(l = 150, t = 60)) %>%
config(g)