The following 50 values are fake IQ values from 50 randomly selected people from a population:
106, 108, 92, 127, 104, 102, 119, 89, 93, 136, 100, 125, 78, 97, 106, 105, 85, 100, 84, 111, 116, 67, 119, 81, 107, 110, 97, 90, 102, 107, 113, 69, 75, 121, 116, 107, 111, 114, 60, 117, 93, 103, 96, 113, 95, 108, 94, 84, 118, 111
We will use the data to:
Another set of data we will use are fake grades of the 50 people:
B, B, B, B, B, B, C, B, F, B, B, F, C, B, B, B, C, B, C, B, D, C, C, B, A, C, A, B, A, B, B, C, D, B, B, B, C, A, D, C, D, A, B, B, B, B, B, B, C, B
We will use the data to:
A third set of data we will use are the (fake) numbers of good friends of the 50 people:
32, 28, 25, 29, 24, 22, 31, 20, 27, 47, 24, 33, 14, 25, 29, 32, 20, 18, 21, 38, 40, 11, 28, 33, 30, 32, 29, 16, 25, 23, 30, 16, 11, 39, 36, 26, 34, 37, 17, 34, 25, 29, 34, 39, 30, 30, 27, 24, 30, 24
We will use the data to:
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 60.0 93.0 104.5 101.6 112.5 136.0
## [1] 15.99986
# Prepare IQ data for analysis
IQ <- c(106, 108, 92, 127, 104, 102, 119, 89, 93, 136, 100, 125, 78, 97, 106, 105, 85, 100, 84, 111, 116, 67, 119, 81, 107, 110, 97, 90, 102, 107, 113, 69, 75, 121, 116, 107, 111, 114, 60, 117, 93, 103, 96, 113, 95, 108, 94, 84, 118, 111)
# Create a summary of IQ data
summary(IQ)
# Calculate sample standard deviation for IQ data
sd(IQ)
# Make histogram for IQ data
hist(IQ)
# Make boxplot for IQ data
boxplot(IQ)
# Prepare grade data for analysis
Grade <- c("B", "B", "B", "B", "B", "B", "C", "B", "F", "B", "B", "F", "C", "B", "B", "B", "C", "B", "C", "B", "D", "C", "C", "B", "A", "C", "A", "B", "A", "B", "B", "C", "D", "B", "B", "B", "C", "A", "D", "C", "D", "A", "B", "B", "B", "B", "B", "B", "C", "B")
# Make barplot for grade data. Note: Table the data then plot the table.
barplot(table(Grade))
# Scatterplot: Number of friends (on the y-axis) versus IQ (on the x-axis)
Friend <- c(32, 28, 25, 29, 24, 22, 31, 20, 27, 47, 24, 33, 14, 25, 29, 32, 20, 18, 21, 38, 40, 11, 28, 33, 30, 32, 29, 16, 25, 23, 30, 16, 11, 39, 36, 26, 34, 37, 17, 34, 25, 29, 34, 39, 30, 30, 27, 24, 30, 24)
plot(Friend ~ IQ)