- point estimation
- sample data
- ggplot
- plotly plot
2024-02-13
\[ \hat{\theta} = g(X_1, X_2, \ldots, X_n) \] where: represents the point estimator. X_1, X_2, , X_n are random variables representing the observed data from a sample. g is a function that maps the sample data to the parameter of interest.
# Generating example data for point estimation
set.seed(123) # for reproducibility
sample_data <- rnorm(50, mean = 8, sd = 2)
sample_mean <- mean(sample_data)
sample_sd <- sd(sample_data)
cat("Sample Data:", toString(sample_data), "\n")
## Sample Data: 6.87904870689558, 7.53964502103344, 11.1174166282982, 8.14101678284915, 8.25857547032189, 11.4301299737666, 8.92183241197841, 5.46987753078693, 6.62629429621295, 7.10867605980008, 10.4481635948789, 8.71962765411473, 8.80154290118811, 8.22136543189024, 6.88831773049185, 11.5738262736062, 8.99570095645848, 4.06676568674072, 9.40271180312737, 7.05441718454413, 5.86435258802631, 7.56405017068341, 5.94799110338552, 6.54221754141772, 6.74992146430149, 4.62661337851517, 9.67557408898905, 8.30674623567303, 5.72372612597611, 10.5076298421399, 8.85292844295363, 7.40985703401546, 9.79025132209004, 9.75626697506608, 9.64316216327497, 9.37728050820018, 9.10783530707518, 7.87617657884656, 7.38807467252017, 7.23905799797523, 6.61058604215897, 7.5841654439608, 5.46920729686347, 12.337911930677, 10.41592399661, 5.7537828335933, 7.19423032940185, 7.06668929275356, 9.55993023667263, 7.83326186705634
cat("Sample Mean:", sample_mean, "\n")
## Sample Mean: 8.068807
cat("Sample Standard Deviation:", sample_sd, "\n")
## Sample Standard Deviation: 1.85174
This red line is the mean value which is the point estimator, in this case the majority data is below the point estamate line.
In this graph, it once again shows the red line, which is the mean as the point estamator.