02/04/2024

}

Defenition

A point estimation are estimates of population parameters based on sample data. Is a type of estimation that uses a single value, oftentimes a sample statistic, to infer information about the population parameter.

Examples:

Sample Mean \(\bar{X} = {\sum x \over n}\)

Sample Standard deviation \(s = \sqrt{\sum (x_i+\bar{x}_i)^2 \over n-1}\)

Sample Variance \(s^2 = {\sum(x_i+\bar{x}_i)^2 \over n-1}\)

Sample Mean

Sample mean can be calculated by simply summing up the individual values and dividing by the number of samples measured.

\(\bar{X} = {\sum x \over n}\)

Example code:

m = mpg %>%
      group_by(class)%>%
        summarise(Average = mean(cty, na.rm=TRUE))%>%
          ggplot(aes(x=class, y=Average, fill=class)) +
            geom_col()+theme_bw()+ 
              ggtitle("Bar Plot of Average City MPG by Class") +
                theme(plot.title = element_text(hjust = 0.5), 
                  axis.text.x = element_text(angle = 90)) +
                    geom_text(aes(label= paste0(round(Average,2))), 
                      vjust=0)

Sample Mean (Bar plot ggplot2)

Sample Standard deviation

The sample standard deviation is a statistic that estimates the standard deviation based on the distance between each point and the mean. It’s calculated using the formula:

\(s = \sqrt{\sum (x_i+\bar{x}_i)^2 \over n-1}\)

Example code:

std = mpg %>%
        group_by(class)%>%
          summarise(StandardDev = sd(cty, na.rm=TRUE))%>%
            ggplot(aes(x=class, y=StandardDev)) +
              geom_point()+theme_bw()+ 
                ggtitle("Standard Deviation of City MPG by Class") +
                  theme(plot.title = element_text(hjust = .5), 
                    axis.text.x = element_text(angle = 90)) +
                      geom_text(aes(label= paste0(round(StandardDev,2))), 
                        vjust=0)

Sample Standard deviation (ggplot2)

Sample Variance

The sample variance is a measure of dispersion of the observations around their sample mean.

\(s^2 = {\sum(x_i+\bar{x}_i)^2 \over n-1}\)

sample= mpg %>%
          group_by(class)%>%
            summarise(variance = var(cty ,na.rm = T))

v = plot_ly(x = sample$class, y = sample$variance, type = 'bar', 
            text = round(sample$variance,2), textposition = 'auto',
            marker = list(color = rainbow(7),
            line = list(color = rainbow(7), width = 1.5)))%>% 
              layout(title = "Bar plot of Sample Variance 
                              of City MPG by Class",
              xaxis = list(title = "Class"),
              yaxis = list(title = "Variance"))

Sample Variance (plotly)

References