Exercise: Simple statistics and contingency tables
- Find at least two ways to calculate the product of all numbers 1 to 8 with the help of R (Tipp cumprod()).
- Store the values for the two variables
USArrests) in two vectors
y. Calculate for both vectors
y the mean, the maximum, the minimum and the variance and save all the results in two objects
statistics.y. Name the elements of these two objects “Mean”, “Max” etc. Save
statistics.y as list elements in one list. Finally, check wether the two vectors
y strongly correlate with each other.