2025-03-25

Slide 1: Introduction to Point Estimation

Point estimation is a statistical technique that is used to estimate the value of a population parameter using sample data.

  • Example: Estimating the population mean using the sample mean.
  • The sample mean is the most common point estimate.

Slide 2: The Sample Mean as a Point Estimate

The sample mean is calculated as:

\[ \bar{x} = \frac{1}{n} \sum_{i=1}^n x_i \]

Where: - \(\bar{x}\) is the sample mean - \(n\) is the sample size - \(x_i\) are the individual sample values

Slide 3: Example of Point Estimation with R Code

Sample data will be generated and the sample mean will be calculated using R.

# Generating sample data
set.seed(123)
data <- rnorm(100, mean = 50, sd = 10)

# Calculating sample mean
sample_mean <- mean(data)

# Displaying sample mean explicitly as part of the slide
sample_mean
## [1] 50.90406

Slide 4: Visualizing the Data Distribution

We will visualize the distribution of the data using a histogram with the sample mean as a vertical line.

Slide 5: Bias of a Point Estimator

There can be bias, which refers to the over or underestimation of the true value. If the expected and true value are the same then it is unbiased. We’ll visualize the bias by comparing the sample mean (point estimator) with the population mean.

Slide 6: Calculate the 95% Confidence Interval for the Mean

We will calculate the 95% confidence interval for the mean using a t-test.

# Generate data
data_values <- rnorm(100, mean = 50, sd = 10)

# Perform the t-test
ci_result <- t.test(data_values)

# Display the confidence interval
ci_result$conf.int
## [1] 47.00582 50.84324
## attr(,"conf.level")
## [1] 0.95

Slide 7: Plotting the Histogram with Confidence Interval Bounds

We will plot the histogram with the 95% confidence interval bounds using Plotly.

Slide 8: Understanding Margin of Error

The margin of error (MOE) represents the range within which the true population parameter is likely to fall, given the sample data.

To calculate the margin of error, we subtract the lower bound of the confidence interval from the upper bound and divide by 2.

Slide 9: Visualization of MOE

Margin of Error Calculation

# Generate sample data
set.seed(123)
data_values <- rnorm(100, mean = 50, sd = 10)

# Perform t-test to get the confidence interval
ci_result <- t.test(data_values)

# Calculate the margin of error (MOE)
moe <- (ci_result$conf.int[2] - ci_result$conf.int[1]) / 2
moe
## [1] 1.811225