1. LON-CAPA Logo
  2. Help
  3. Log In
 

Browsing resource, all submissions are temporary.


Maximum Speed in Stat 100 Survey Data

In this problem, you are going to look at Stat 100's survey 1 data in Fall 2017. The csv data file can be downloaded here. Put the file, Stat100_2017fall_survey01.csv, to your R's working directory and load it with the command

survey <- read.csv("Stat100_2017fall_survey01.csv")

The column variables are explained on this webpage. Use various R commands you encountered in last week's exercise to explore the data before attempting the questions below.

a. The 'speed' column is the maximum speed (in mph) students claimed they had ever driven. What is the mean and sample standard deviation of 'speed'? Give your answer to 2 decimal places.

Mean = mph         sample sd = mph

 Tries [_1]

b. Use the hist() function to plot a histogram of the maximum speed. You should notice that there are students who said '0', meaning that they had never driven a car. Use an appropriate combination of R functions to calculate the total number of students who had never driven a car. Of these students, how many of them were male?

Total number of students who had never driven a car =

 Tries [_1]

Number of male students who had never driven a car =

 Tries [_1]

c. From the histogram, you also see that there are a number of students whose maximum driving speeds were quite low. Let's assume that only those whose maximum driving speeds exceed 30 mph were regular drivers. Create a subset of the 'speed' column for regular drivers and then calculate the mean and sample standard deviation. Give your answers to two decimal places.

Mean = mph         Sample standard deviation = mph

 Tries [_1]

d. Plot a histogram of the maximum speed for the regular drivers using the parameters breaks=15 and freq=FALSE. Then superpose a normal curve with the same mean and standard deviation (calculated in part(c) above). Which of the following plots is closest to the correct histogram and superposed normal curve?






 Tries [_1]