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

ALY2010 Project 1 Assignment

Grade: 50 points

Prepare the following report in an R script file.

On computer, create a folder named "ALY2010 R Project" and create one folder inside named "DataSets“

On computer, install the latest versions of R and R Studio.

On your R Studio, create a project named "ALY2010 R Project" using the folder you created above. See the File M1_3 R Install and create folder.pptx in CANVAS. Make sure the project is open on your R Studio before you start your work. The name should be present on the top-right corner.

Create an R Script file and named: Project1_yourlastname

At the beginning of the R Script file, enter your information using hashtags (#) (this indicates non-coding text), example below.

 

 

 

 

 

 


 

 

When you prepare and present each task on your R Script file, use The task number and the title I provide: in red

until the first dot.

Task 1: Create a vector named car_speed. Use the vector to enter the car speed data from table 1. Note: Enter

only the speed data, not the record numbers.

Task 2: Obtain the average speed. Create an object named mean_speed and present it using the print(paste())

code combination.

Use code round() to present the result using only two decimals.

Note: Since this is the first time you will do it, I will help you with the codes, see the example below.

 

 

 

Task 3: Obtain the standard deviation. Create an object named sd_speed and present it using the print(paste())

code combination. Use code round() to present the result using only two decimals.

Task 4: Obtain the median speed. Create an object named median_speed and present it using the print(paste())

code combination. Use code round() to present the result using only two decimals.

Task 5: Obtain the quantiles. Create objects min_speed, q25_speed, q50_speed, q75_speed, and max_speed to

present the minimum speed, the 25th, 50th, 75th quantiles, and the maximum value.

 

 

Task 6: Delete values. Delete the last value from vector car_speed, name the new set car_speed2 and obtain the new mean.

Task 7: Adding values. Add the value 45.12 mph to vector car_speed2, name the new set car_speed3 and obtain the new mean.


WORKING WITH VECTORS

Task 8: Create vector sales.

Create a vector named sales” to store the following data: 180, 250, 440, 620, 730, 710, 510

Task 9: Create vector days.

Create a vector named “days” to store the days of the week in the following order: “Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday”

Task 10: Link the days of the week with the sale values.

Task 11: Present sales again and observe the difference.

Task 12: Create vector with name: good_sales.

Enter the corresponding code to identify in which days of the week the sales were higher than $500. Hint: TRUE and FALSE outcomes.

Task 13. Present only the days of the week with more than $500 in sales.

 

 


WORKING WITH MATRICES

Task 14. Working with Matrix.

Using the matrix strategy presented in the file Vectors and Matrices.R” added by your instructor on the Modules section (CANVAS), enter the data from table 2 into your R Script file.

1) Submit the R Script file you created. Make sure all codes run without errors.

2) A Word document. Include:

(a) Title section: Start with a title and your information, similar to what you did in the R document.                                                                  (b) Introduction section. In the introduction, and using your own words, explain the importance of descriptive and inferential statistics, importance of data analytics, and what do you know about R and its application on data analytics.                                                                   (c) Analysis section. Write a resume of all the tasks you performed.

(d) Conclusion section: Using your own words, explain what you learnt from this assignment. Use bullet points.

(e) References section: Include any reference you used to support your work: statistical books, academic websites, R books, R websites, etc.