Chapter 8 Total Comments

The following plot shows the distribution of Total Comments for a Hidden Gem.

  • Minimum number of Total Comments is 0

  • Maximum number of Total Comments is 103

  • Median number of Total Comments is 10

95% Confidence Interval for a Hidden Gem Comments is between 12 and 15

8.1 Box Plot

kvcs %>%
  filter(!is.na(TotalComments)) %>%
      ggplot(aes(x = TotalComments, fill = fillColor2)) +
      geom_boxplot() + 
      labs(x= ' [Total Votes]',y = ' [Count]', title = paste("Distribution of", ' Total Votes ')) +
      theme_fivethirtyeight(base_size = 15) +
  theme(legend.position = "none") 

8.2 Density Plot

kvcs %>%
  filter(!is.na(TotalComments)) %>%
      ggplot(aes(x = TotalComments)) +
      geom_density(fill = "orange", bw = 0.01) +
      scale_x_log10() +
      labs(x= ' [Log TotalComments]',y = ' [Count]', title = paste("Distribution of", ' Total Comments ')) +
  guides(fill=guide_legend(title="Total Comments Distribution")) +
      theme_fivethirtyeight(base_size = 15)

8.3 Summary Statistics for Total Comments

summary(kvcs$TotalComments)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.    NA's 
##    0.00    4.00   10.00   14.21   18.00  103.00       8

8.4 95% Confidence Interval for Hidden Gems Total Comments

# Calculate the mean and standard error
l.model <- lm(TotalComments ~ 1, kvcs)

# Calculate the confidence interval
confint(l.model, level=0.95)
##                2.5 %   97.5 %
## (Intercept) 12.48135 15.94331