DSCC 201/401 Homework Assignment #5 Due: March 24, 2021 at 9 a.m. EDT
Answers to these questions should be submitted via Blackboard. Only one submission for this assignment will be allowed. Revised submissions will not be allowed. So please make sure you only submit your final answers. All answers must be shown with the corresponding code using R. It is recommended that version 3.6.1 used to complete the assignment on BlueHive. Please provide a text file or PDF of your R code showing BOTH input and output.
1.
Given two matrices as follows:
8 1 3 −1 3 8 𝑋=#5 3 11+ 𝑌=#7 −6 4+
−6 7 1 −8 3 1
a) Compute the matrix algebra product (i.e. not the element-wise product) of X and the transpose of Y. Store the output in a matrix Z.
b) Calculate the trace of the multiplicative inverse of matrix Z.
A group of 20 doctors was sampled for their systolic blood pressure and the following values were recorded: 119, 119, 124, 123, 132, 109, 113, 129, 124, 126, 124, 115, 138, 140, 135, 154, 118, 119, 144, 128.
a) Given that the mean systolic blood pressure is 120 (μ = 120), is there a statistical significance for the mean of systolic blood pressures for this particular group of doctors? Check at the 95% confidence levels using R’s t-test functionality.
b) Now check the statistical significance at the 99% confidence level. Based on the data, should we be concerned about the blood pressure readings of this group of doctors?
Copy the file /public/bmort/R/winter2015.csv to your own directory on BlueHive. The column labeled “SNW” represents the daily snowfall (in inches) for Rochester on the day indicated. “HI” and “LO” represent the high and low temperatures recorded in Rochester on a given day. Load the data into an R data frame and answer the following questions:
a) Is there any missing data for the column that contains the data for the high temperatures? If so, what is the date that has missing data?
2.
3.
b) What are the mean and standard deviation of the low temperatures from December 1, 2014 to February 28, 2015?
c) Which month showed lesser variation in high temperatures: January or February? What is the difference in standard deviation for the high temperatures for the two months?
d) What is the average daily snowfall and standard deviation for the period
Feb. 1, 2015 – Mar. 31, 2015? How did you consider days when a trace (T) of snow fell?
e) On which day did Rochester receive the most snowfall between Jan. 1, 2015 and Jan. 31, 2015? What was the amount of snow that fell?
4. Copy the file /public/bmort/R/vector.RData to your own directory on BlueHive. Create a function that will take a vector of numbers as an input and output an R list that contains the mean as the first element of the list and a vector containing the sum of each element of the input vector as the second element of the list. Load the vector.RData file into your R environment and show the output of the function you just created after calling the function using the data stored in vector.RData.