Z test

PHOTO EMBED

Tue Apr 02 2024 02:13:19 GMT+0000 (Coordinated Universal Time)

Saved by @V07

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
content_copyCOPY