Professional Documents
Culture Documents
2 Confidence Intervals in R
Winter 2021
Mon: 4:30-6:20pm
Wed: 5:00-6:50pm
Professor: Clarence Au
Date: Apr 7th, 2021
Learning Objectives
12.6 Determine confidence intervals using R.
Textbook
Practice Questions
Review Example
lower , upper
A Guide to R – Using Functions to Create
Confidence Intervals
input
function_name<-function(var){
Do something a function
return(new_variable) }
output
Building a Confidence Interval Function
p hat, n (sample size), cl
(confidence level)
q hat = 1 – p hat, SE =
z*= qnorm (0.95/2+0.5, 0, 1,
lower.tail=TRUE)
function_name(var1, var2…)