Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

First homework

This homework was just about to get familiar to R syntax


Let the vector x = (1, 8, 2, 6, 3, 8, 8, 5, 5, 5). Use R to calculate the following functions:

  1. (x1 + x2 + ··· + x10) / 10
  2. Find log2 (xi) for each i = 1, · · ·, 10
  3. Find the difference between the largest and the highest, and its lowest value
  4. Finds = (xi - 5.1) /2.514403 for each i = 1, · · ·, 10
  5. Calculated, and media, I deviated, the standard vector of y = (y1, y2, y1, y10)

The bill of your mobile varies monthly. Suppose that last year we paid the following values monthly:

46 33 39 37 46 30 48 32 49 35 30 48

Enter these values ​​into a variable called invoice. Use a small amount to find the amount annual mobile phone bill last year. What is the lowest value paid in a month? Which is the largest? How many months does the invoice exceed 40? What was the percentage of the bill? What about the total bills?


Reading on a keyboard a vector contains 6 real numbers:

  1. Calculate the maximum, minimum, average, median, and standard deviation corresponding to the readings
  2. Sort the read vector
  3. Standardize the vector above