Calculate the sample variance "kind of by hand":
Built-in R function:
Show Another