2025-11-14
## Loading required package: ggplot2
## ## Attaching package: 'plotly'
## The following object is masked from 'package:ggplot2': ## ## last_plot
## The following object is masked from 'package:stats': ## ## filter
## The following object is masked from 'package:graphics': ## ## layout
## A marker object has been specified, but markers is not in the mode ## Adding markers to the mode...
\[ s^2 = \frac{1}{n-1} \ sum_{i=1}^{n} (X_i - \bar{x})^2 \]
iphoneUsage = data.frame( hours = rnorm(200, mean = 4.5, sd = 1.2))
sampleMean = mean(iphoneUsage$hours)
ggplot(iphoneUsage, aes(x = hours)) +
geom_histogram(binwidth = 0.5,
fill = "pink", color = "white", alpha = 0.7) +
labs( title = "Daily Iphone Screen Time",
x = "Hours Per Day",
y = "Number of Users") +
theme_minimal()