0% found this document useful (0 votes)
3 views

Assignment_1-1

This assignment requires students to familiarize themselves with R software by downloading it and reading specific chapters of the manual. Students must perform various probability calculations and analyze an Auto data set, including identifying predictors, calculating statistical measures, and creating visualizations. The assignment emphasizes the application of R commands to manipulate and interpret data effectively.

Uploaded by

zhiqianhuang813
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Assignment_1-1

This assignment requires students to familiarize themselves with R software by downloading it and reading specific chapters of the manual. Students must perform various probability calculations and analyze an Auto data set, including identifying predictors, calculating statistical measures, and creating visualizations. The assignment emphasizes the application of R commands to manipulate and interpret data effectively.

Uploaded by

zhiqianhuang813
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

BU.510.

650 Assignment #1
Data Analytics Page 1 of 1
Dr. Ruxian Wang, Johns Hopkins Carey Business School

Assignment #1

All assignments should be submitted through our course website. Please submit two files: one file
(in format .pdf) includes your answers to all questions; the other file (in format .R) contains your R
commands. File names should be LastName FirstName AssignmentNumber, e.g., for Assignment
#1 your files should be named by “Wang Ruxian 1.docx” and “Wang Ruxian 1.R”.

1. Get familiar with the statistical software R.

(a) Download the software R and Rstudio and install it to your computer. You can find the
suitable version for your Operating System (Windows, Mac, Linux) at this link
http://www.cran.r-project.org/ and https://www.rstudio.com/products/rstudio/download/
(b) Read Chapters 1 to 8 of the manual: “An Introduction to R”, which can be found at
the link below
http://cran.r-project.org/doc/manuals/r-release/R-intro.pdf
(c) Repeat the examples in Chapters 1 to 8 of “An Introduction to R”.

2. Use R to calculate the probability for each of the following events:

(a) A standard normally distributed variable is larger than 3.


(b) A normally distributed variable with mean 35 and standard deviation 6 is larger than
42.
(c) Getting 10 out of 10 successes in a binomial distribution with probability 0.8.
(d) X < 0.9 when X has the standard uniform distribution.
(e) X > 6.5 in a χ2 distribution with 2 degrees of freedom.

3. This exercise involves the Auto data set, which can be downloaded at the BlackBoard. Make
sure that the missing values have been removed from the data.

(a) Which of the predictors are quantitative, and which are qualitative?
(b) What is the range of each quantitative predictor? You can answer this using the range()
function.
(c) What is the mean and standard deviation of each quantitative predictor?
(d) Now remove the 10th through 85th observations. What is the range, mean, and standard
deviation of each predictor in the subset of the data that remains? (Try to use R
commands to do so.)
(e) Using the full data set, investigate the predictors graphically, using scatterplots or other
tools of your choice. Create some plots highlighting the relationships among the predic-
tors. Comment on your findings.
(f) Suppose that we wish to predict gas mileage (mpg) on the basis of the other variables.
Do your plots suggest that any of the other variables might be useful in predicting mpg?
Justify your answer.

You might also like