2025-06-08

Introduction

  • Point estimation uses sample data to estimate unknown population parameters.
  • Some common estimators are sample proportion \(\hat{p}\), sample mean \(\bar{x}\), and sample variance \(s^2\).
  • I will be using the built-in Iris dataset to show point estimation.

What is a Point Estimator?

\[ Equation: \hat{\theta} = T(X_1, X_2, ..., X_n) \]

  • \(\hat{\theta}\) is the estimator of a population parameter \(\theta\) (Theta).
  • \(T\) is a function of the sample values
  • The goal of this function is to have unbiasedness, consistency, and efficiency.

Introducing the iris Dataset

  • The iris dataset contains 150 observations from three iris species which are setosa, versicolor, and virginica.
  • Measurements or columns have Sepal and Petal lengths and widths.
head(iris)
##   Sepal.Length Sepal.Width Petal.Length Petal.Width Species
## 1          5.1         3.5          1.4         0.2  setosa
## 2          4.9         3.0          1.4         0.2  setosa
## 3          4.7         3.2          1.3         0.2  setosa
## 4          4.6         3.1          1.5         0.2  setosa
## 5          5.0         3.6          1.4         0.2  setosa
## 6          5.4         3.9          1.7         0.4  setosa

Estimating Mean Sepal Length

library(ggplot2)
mean_sl <- mean(iris$Sepal.Length)
mean_sl
## [1] 5.843333

Estimating Proportion of Virginica

prop_virginica <- mean(iris$Species == "versicolor")
prop_virginica
## [1] 0.3333333

R Code Summary

# Point estimation code
mean(iris$Sepal.Length)             # Sample mean
## [1] 5.843333
mean(iris$Species == "versicolor")   # Sample proportion
## [1] 0.3333333

3D Visualization with Plotly

library(plotly)

plot_ly(iris, 
        x = ~Sepal.Length, 
        y = ~Petal.Length, 
        z = ~Sepal.Width,
        color = ~Species, 
        colors = c(
          "setosa" = "lightblue", 
          "versicolor" = "orange", 
          "virginica" = "lightgreen"
        ),
        type = "scatter3d", 
        mode = "markers") %>%
  layout(scene = list(
    xaxis = list(title = 'Sepal Length'),
    yaxis = list(title = 'Petal Length'),
    zaxis = list(title = 'Sepal Width')
  ))

3D Scatter Plot of Iris Data

Conclusion

  • Point estimates are single values used to estimate population characteristics.
  • Here are some examples:

\[ \hat{p} = \frac{x}{n} \quad \text{(sample proportion)} \]

\[ \hat{\mu} = \frac{1}{n} \sum_{i=1}^{n} x_i \quad \text{(sample mean)} \]

  • Using the iris dataset, we estimated the mean Sepal Length and the proportion of Virginica species