The Scene

On the random rectangles worksheet, each of you used three methods to estimate the average area of the 100 apartments printed on the back of the activity. Let’s take a look at the class results

Import the data

df <- read.csv("https://mphitchman.com/stats/data/rectanglesF22.csv")

You can run this line of code at the console prompt in RStudio (copy and paste!) to load the survey data into your own RStudio session. The code loads the data and gives it the working name df in your session.

Here’s a look at the first 5 rows of the data frame

head(df,5)
##   student method1 method2 method3
## 1       1       9    14.4     5.0
## 2       2      10     9.2     6.4
## 3       3      10    13.6     7.8
## 4       4      16     6.8    28.8
## 5       5      13     9.0     7.8

Method 1 Estimates

Here are the mean, standard deviation, and five number summaries for

mean(df$method1)
## [1] 12.61538
sd(df$method1)
## [1] 7.115206
fivenum(df$method1)
## [1]  5  9 10 15 37

Here’s a histogram of the Method 1 estimates

hist(df$method1,breaks=12)

Method 2 Estimates

Here are the mean, standard deviation, and five number summaries for

mean(df$method2)
## [1] 10.83846
sd(df$method2)
## [1] 3.053664
fivenum(df$method2)
## [1]  6.8  8.4 10.1 13.4 17.0
hist(df$method2,breaks=12)

Method 3 Estimates

Here are the mean, standard deviation, and five number summaries for

mean(df$method3)
## [1] 8.019231
sd(df$method3)
## [1] 4.545593
fivenum(df$method3)
## [1]  3.0  6.4  7.7  8.5 28.8
hist(df$method3,breaks=12)

And side-by-side boxplots!

boxplot(df$method1,df$method2,df$method3)

and if you’ve read this far, you are rewarded with this knowledge: the true average area of the 100 apartments is… 7.42.