Use R functions to conduct the following 1. Calculate the following quantities: i) the sum of 80.3, 34.9 and 112.01 ii) The square root of 121 iii) 10-based logarithm of 1000, and multiply the result with the sin of 2

A First Course in Probability (10th Edition)
10th Edition
ISBN:9780134753119
Author:Sheldon Ross
Publisher:Sheldon Ross
Chapter1: Combinatorial Analysis
Section: Chapter Questions
Problem 1.1P: a. How many different 7-place license plates are possible if the first 2 places are for letters and...
icon
Related questions
Question
Use R functions to conduct the following
1. Calculate the following quantities:
i) the sum of 80.3, 34.9 and 112.01
ii) The square root of 121
iii) 10-based logarithm of 1000, and multiply the result with the sin of 2n
2. Use the function cumsum() to calculate the cumulative sumation of the elements of the vector v = (2.3, 5.7, 1*10-7, e)
3. Calculate the cumulative sum of the previous numbers in reverse order. Hint: use the rev function
4. Assigns numbers 10 and 20 to varaibles s x and y, then write R commands for the following
i) store the result of multiplying x and y in a new variable z.
ii) Creat a vector My Vec of the objects x, y and z.
iii) Find the minimum, maximum, length, and variance of MyVec
5. The follwing numbers are the error in measurment in an expriemnt 0.1 0.6 33.8 1.9 9.6 4.3 33.7 0.3 0.0 0.1, store them into a vector MesErr.
1) What is the mean and the standard deviation of the errores
ii) which item has maximum error
ii) calculate the cost of correcting the error according to the equation coast = Err * 0.2
6.
i) Generate 100 standard-normally distributed random numbers, assigne them to vector r,
ii) plot the histogram for the vector r
iii) convert the numbers into integers, then assign the new values to ri vector
iv) reshape the vector into 10x10 matrix, then assign it to variable rm
v) find the sum of the columns and rows of rm
Transcribed Image Text:Use R functions to conduct the following 1. Calculate the following quantities: i) the sum of 80.3, 34.9 and 112.01 ii) The square root of 121 iii) 10-based logarithm of 1000, and multiply the result with the sin of 2n 2. Use the function cumsum() to calculate the cumulative sumation of the elements of the vector v = (2.3, 5.7, 1*10-7, e) 3. Calculate the cumulative sum of the previous numbers in reverse order. Hint: use the rev function 4. Assigns numbers 10 and 20 to varaibles s x and y, then write R commands for the following i) store the result of multiplying x and y in a new variable z. ii) Creat a vector My Vec of the objects x, y and z. iii) Find the minimum, maximum, length, and variance of MyVec 5. The follwing numbers are the error in measurment in an expriemnt 0.1 0.6 33.8 1.9 9.6 4.3 33.7 0.3 0.0 0.1, store them into a vector MesErr. 1) What is the mean and the standard deviation of the errores ii) which item has maximum error ii) calculate the cost of correcting the error according to the equation coast = Err * 0.2 6. i) Generate 100 standard-normally distributed random numbers, assigne them to vector r, ii) plot the histogram for the vector r iii) convert the numbers into integers, then assign the new values to ri vector iv) reshape the vector into 10x10 matrix, then assign it to variable rm v) find the sum of the columns and rows of rm
Expert Solution
steps

Step by step

Solved in 4 steps with 3 images

Blurred answer