Since the town is small, they can’t afford cameras or other automated counting techniques. They have to use observers to go out and count the traffic in half hour periods. They figure that they can afford 12 half hour periods of observation at each intersection during the upcoming work week. From their experience living in the town they know the following general items about traffic in the town.
Answer the following questions
# Here is the code to read in the data
data.dir = "http://byuistats.github.io/M330/data"
i1 = read.csv(file.path(data.dir,"intersection_1.csv"),stringsAsFactors = FALSE)
i2 = read.csv(file.path(data.dir,"intersection_2.csv"),stringsAsFactors = FALSE)
# now how would you pull your half hours?
# remember we have 24*2*5 = 240 possible half hours in our week
random_rows = sample(240,12)
mean(i1[random_rows,"counts"])
mean(i2[random_rows,"counts"])