Calculate the summary statistics of spread


Assignment:

Challenge 1: Read "OR Cases.csv" into a data.frame.

Challenge 2: Keep only the first 2 columns of the data.frame. The remaining columns have only NA values.

Challenge 3: Eliminate all rows of the data.frame where the Date is blank (""). You should now have a table with no blank rows or columns.

Challenge 4: Convert the Date column to R dates.

Challenge 5: For number of cases, calculate the summary statistics of location: mean, median, min, max, 1st quartile, 3rd quartile.

Challenge 6: For number of cases, calculate the summary statistics of spread: standard deviation, variance, range. WARNING: Make sure the range = max - min.

Challenge 7: (1) Plot a trend chart of OR cases over time. (b) Make sure the x and y axes nave nice titles. (c) Make sure the y axis has nice, round number endpoints. (d) Add a title.

Challenge 8: (a) Plot a histogram of OR cases by day. (b) Make sure the x- and y-axis scales have nice, round numbers. (c) Make sure the bins have nice, round number breakpoints.

Challenge 9: Plot a histogram of OR cases by day, this time as a probability density. Make sure the x- and y-axis scales have nice, round numbers, and make sure the bins have nice, round number breakpoints.

Challenge 10: Supplement your data.frame with three new columns: day of week, week of year, month.

Challenge 11: Add a new column, "Weekday", to the data.frame. Initialize its value to "Weekday", even it the day falls on a weekend. Print the first 10 lines.

Challenge 12: Create a test of whether a day falls on a weekend.

Challenge 13: Use the test from the prior challenge to set the values in the Weekday column to Weekend if the day falls on Sat or Sun. Print the first 10 rows to make sure you're getting the correct results.

Challenge 14: Get the subset of data that falls on a week day. Print the first 10 rows.

Challenge 15: Create a histogram of the number of week day OR cases.

Challenge 16: Create a histogram of the natural log of the number of week day OR cases.

Challenge 17: Get the subset of data that falls on a weekend.

Challenge 18: Create a histogram of the number of weekend OR cases.

Challenge 19: Create a histogram of the natural log of the number of weekend OR cases. ANALYZE: Perform analyses to understanding what is causing the behavior of the system.

Challenge 20: Perform an ANOVA of the number of OR cases to see if the variation in the number of cases is driven by year, month, week, weekend, and day of week. Print the summary table.

Data link:

https://docs.google.com/spreadsheets/d/1YEHVxHpNE2hirAhSYqkyYZkNwPrwYdvuqgiqKXqSGm4/edit#gid=0

Request for Solution File

Ask an Expert for Answer!!
Basic Statistics: Calculate the summary statistics of spread
Reference No:- TGS03036212

Expected delivery within 24 Hours