Reading 2.1; #7-15 odds
7
9
11
13
Never: 0.0262
Rarely: 0.0678
Sometimes: 0.1156
Most of the time: 0.2632
my_data <- c (125, 324, 552, 1257, 2518)
groups <- c ("never", "rarely", "sometimes", "most of the time", "always")
barplot(my_data, main = "How Often College Students Wear Seat Belts", names.arg = groups)
my_data <- c (125, 324, 552, 1257, 2518)
groups <- c ("never", "rarely", "sometimes", "most of the time", "always")
rel_freq <- my_data / sum(my_data)
barplot(rel_freq, main = "How Often College Students Wear Seat Belts", names.arg = groups)
my_data <- c (125, 324, 552, 1257, 2518)
groups <- c ("never", "rarely", "sometimes", "most of the time", "always")
pie(my_data, labels = groups, main = "How Often College Students Wear Seat Belts")
15
More than 1 hour a day: 0.3678
Up to 1 hour a day: 0.1873
A few times a week 0.1288
A few times a month or less 0.0790
Never 0.2371
0.2371
my_data <- c (377, 192, 132, 81, 243)
groups <- c ("more than 1 hour a day", "up to 1 hour a day", "a few times a week", "a few times a month or less", "never")
barplot(my_data, main = "Time Spent on the Internet", names.arg = groups)
my_data <- c (377, 192, 132, 81, 243)
groups <- c ("more than 1 hour a day", "up to 1 hour a day", "a few times a week", "a few times a month or less", "never")
rel_freq <- my_data / sum(my_data)
barplot(rel_freq, main = "Time Spent on the Internet", names.arg = groups)
my_data <- c (377, 192, 132, 81, 243)
groups <- c ("more than 1 hour a day", "up to 1 hour a day", "a few times a week", "a few times a month or less", "never")
pie(my_data, labels = groups, main = "Time Spent on the Internet")
Reading 2.2; #9-14
9
10
11
12
13
14
Additional problem:
hist(iris$Sepal.Length)
This histogram is bell-shaped and is not skewed, but not uniformed either.