Preview:
print(getwd())

setwd(“set the path”)

data<-read.csv("population.csv")

print(data)


OUTPUT: 

 population

 1 1000

 2 2000

 3 3500

 4 4500

 5 5000

zstat<-(mean(data$population)-1000)/(sd(data$population)/sqrt(nrow(data)))

print(zstat)

OUTPUT:

[1] 2.926836
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter