Given a data frame and the name of a column, calculates the estimate of the standard deviation using the following formulas: 1. Estimate of variance = (corrected sum of squares)/(n - 1) 2. Corrected sum of squares = sum(x^2) - (sum(x)^2)/n 3. Estimate of standard deviation = sqrt(estimate of variance)

std_dev_estimate(df, col_name)

Arguments

df

A data frame containing the column to calculate the standard deviation estimate.

col_name

A string representing the name of the column for which to calculate the estimate.

Value

A numeric value representing the estimate of the standard deviation of the column.

Examples

data(mtcars)
std_dev_estimate <- std_dev_estimate(mtcars, "mpg")
std_dev_estimate
#> [1] 6.026948