# Calculates var(beta0hat)/sigma^2 for a straight line regression with n values of x # The vector of x-values is the input to the program. varbeta0hat <- function(x) { n <- length(x) a <- sum(x^2) v <- a/(n*a - (sum(x))^2) v }