MIS 655 Grand Canyon University Understanding Mathematical Operations

Homework Help & Homework Answers

MIS 655 Grand Canyon University Understanding Mathematical Operations


MIS-655 Understanding Mathematical Operations and Descriptive Statistics in R

Directions: Use the information below to complete this assignment.

Part 1: Understanding Mathematical Operations in R  

Within the R environment, complete the following mathematical computations:

  1. Compute the sum of 100, 200, 300, and 400.
  2. Compute the average of all even numbers from 2-100.
  3. Obtain the average for the square root of all multiples for even numbers from 2-100. Compute the square root of all even numbers from 2-100, and then average them.
  4. Create a series of four vector objects called WeeklyTemps*. Note that the * will be a 1, 2, 3, or 4. Store the temperatures for the past 4 weeks (i.e., 7 days, Monday-Sunday) in each object. You can reference weather resources for your area, or you can create the temperature data on your own.
  5. Combine the four vectors created in step 4 into a dataset called MonthlyTemperatures.
  6. Use the write() function to export the MonthlyTemperatures dataset into a .csv file called MonthlyTemperatures.


Part 2: Descriptive Statistics in R


This part of the assignment relies on the “Loblolly” dataset in the R environment. Hint: you can use the function data() to see all available datasets in R. You can use the function ?Loblolly  or ?[any dataset name] to learn what the variables mean and their measurement scales.

  1. Load the Loblolly data into your R environment by storing it into an object called “lob.” Use the appropriate function to check the dimensions of the data frame (i.e., number of rows and columns).
  2. Use the appropriate functions to calculate the following values for each variable in the lob dataset.
  3. Maximum value
  4. Minimum value
  5. Length
  6. Mean
  7. Median
  8. Standard deviation
  9. Variance
  10. 75th % quartile


  1. Use the summary function on the data frame as well as on the height variable within the data frame. Describe the information that each summary provides as well as why you get different results when you apply the summary function to a data frame versus a variable within a data frame.
  2. Use the appropriate functions to determine whether there is a significant correlation between a Loblolly pine tree’s age and its height. Store the results of your correlation in an object called “age.height.cor.” Which correlational method is being used (e.g., Pearson, Spearman, Kendall) by the default correlation?
  3. Revise your code to specify that you want to run a Spearman correlation. Are your results the same or different than the default correlation? If so, how are they different?
  4. Use the hist and qqnorm functions to create a histogram and qq-plot for the height variable. Also run a Shapiro-Wilk test for normality. Is the data normally distributed? How can you tell? How do you interpret the results of the qq-plot and the Shapiro-Wilk test? How does the longitudinal structure of the data impact its distribution?