Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

CS544 Module 3 Assignment

Using R code, do the following:

Part 1) 20 points

Initialize the dataset about prime numbers as shown below:

df <- read.csv("http://people.bu.edu/kalathur/datasets/myPrimes.csv")

The resulting data frame of the primes below 10000 along with their last and first digits

 

a) Show the barplot of the frequencies for the last digit.

b) Show the barplot of the frequencies for the first digit.

c) What inferences do you draw from these two plots? (two inferences from each plot)

Part 2) 30 points

Initialize the dataset about the quarter coin productions of the 50 US states by the


us_quarters <- read.csv("http://people.bu.edu/kalathur/datasets/us_quarters.csv")

 

a) For which state were the highest number of quarters produced by each mint?

 

b) What is the value of the total coins in dollars?

c) Produce the following barplot from the data using the R barplot function with the data

looking at the plot.


d) Show the scatter plot of the number of coins between the two mints. Write any two

 

e) Show the side-by-side box plots for the two mints. Write any two inferences for each

 

f) Using R code, what states would be considered as outliers for each of the two mints.


 


Part 3) 20 points

Use the stocks dataset with the weekly closing values for the year 2021 initialized as

 

stocks <- read.csv("http://people.bu.edu/kalathur/datasets/stocks.csv")

 

a) Show the pair wise plots for all the 6 stocks in the dataset in a single plot.

c) Provide at least 4 interpretations of the results.

the dataset, show the top 3 correlated stocks for that respective stock. The code should

shown below:


 

 

Part 4) 30 points

Initialize the scores of 100 students as shown below:

scores <- read.csv("http://people.bu.edu/kalathur/datasets/scores.csv")

a)  Show the default histogram of the student scores. Save the result of the histogram

 

 

 

b)  Using the breaks option of the histogram, show the histogram and the custom output

 

 

 

Submission:

When the term lastName is referenced, please replace it with your last name.

Create a folder, CS544_HW3_LastName and place the following files in this folder.              Provide all R code in a single file, CS544_HW3_LastName.R. Clearly mark each subpart of each question.

Provide the corresponding outputs from the R console in a single Word document, CS544_HW3_LastName.doc.

Archive the folder (CS544_HW3_LastName.zip). Upload the zip file to the Assignments section of Blackboard.