The number of named Atlantic storms for 9 consecutive years is: 7, 8, 14, 11, 12, 7, 6, 11, 13., We represent these as a vector x in R by making the assignment: x <- c(7, 8, 14, 11, 12, 7, 6, 11, 13) Define the variable w using the assignment w <- 2*x Define y by the assignment y <- cumsum(x) Define z with the assignment z <- c(x,Y,w) x, y, w and z are vectors. Answer the following using R code. a) What is the minimum value in the z vector? b) Calculate the sample mean of x. c) Calculate the sum of the squares of the elements in z.

Algebra & Trigonometry with Analytic Geometry
13th Edition
ISBN:9781133382119
Author:Swokowski
Publisher:Swokowski
Chapter8: Applications Of Trigonometry
Section8.4: The Dot Product
Problem 45E
icon
Related questions
Question

4

Need the R script for the whole problem (do not copy from another post)

The number of named Atlantic storms for 9 consecutive years is: 7, 8, 14, 11, 12, 7, 6, 11, 13., We represent these as a vector x in R by making the assignment:
x <- c(7, 8, 14, 11, 12, 7, 6, 11, 13)
Define the variable w using the assignment
w <- 2*x
Define y by the assignment
y <- cumsum(x)
Define z with the assignment
z <- c(x,y,w)
x, y, w and z are vectors. Answer the following using R code.
a) What is the minimum value in the z vector?
b) Calculate the sample mean of x.
c) Calculate the sum of the squares of the elements in z.
d) Calculate the sample variance of x
e) Calculate the sample standard deviation of x
f) Calculate the length (# of elements) of z?
g) Calculate the sample variance of z
h) Calculate the sample variance of 2*z
i) Calculate the length (# of elements) of 2*z?
j) How many unique(different) values are in z?
k) In the following paste your R script for this problem
Transcribed Image Text:The number of named Atlantic storms for 9 consecutive years is: 7, 8, 14, 11, 12, 7, 6, 11, 13., We represent these as a vector x in R by making the assignment: x <- c(7, 8, 14, 11, 12, 7, 6, 11, 13) Define the variable w using the assignment w <- 2*x Define y by the assignment y <- cumsum(x) Define z with the assignment z <- c(x,y,w) x, y, w and z are vectors. Answer the following using R code. a) What is the minimum value in the z vector? b) Calculate the sample mean of x. c) Calculate the sum of the squares of the elements in z. d) Calculate the sample variance of x e) Calculate the sample standard deviation of x f) Calculate the length (# of elements) of z? g) Calculate the sample variance of z h) Calculate the sample variance of 2*z i) Calculate the length (# of elements) of 2*z? j) How many unique(different) values are in z? k) In the following paste your R script for this problem
Expert Solution
steps

Step by step

Solved in 6 steps

Blurred answer