- c(13, 23, 21, 27, 37, 52, 34, 42, 31, 40, 54, 30, 15, 35, 19, 23, 22, 18) Fine the vector y by the assignment - cumsum(x) fine the variable w using the assignment <-714-y

Algebra & Trigonometry with Analytic Geometry
13th Edition
ISBN:9781133382119
Author:Swokowski
Publisher:Swokowski
Chapter8: Applications Of Trigonometry
Section8.4: The Dot Product
Problem 48E
icon
Related questions
Question
Mickey Mantle played for the New York Yankees for 18 years from 1951 to 1968. Year by year he hit the following numbers of home runs: 13, 23,
21, 27, 37, 52, 34, 42, 31, 40, 54, 30, 15, 35, 19, 23, 22, 18. We represent these as a vector x in R by making the following assignmemt:
x <-c(13, 23, 21, 27, 37, 52, 34, 42, 31, 40, 54, 30, 15, 35, 19, 23, 22, 18)
Define the vector y by the assignment
y <- cumsum(x)
Define the variable w using the assignment
w <-714-y
Define z with the assignment
z <-c(X,Y,W)
x, y, w and z are vectors. Answer the following using R code.
f) What is the 18th element of w? (value of w[18]) 1
h) Calculate the sample variance of 5*x 713.268
i) What is the length(# of elements) in 5*x|
j) How many unique(different) values are in z? 49
X
X
Transcribed Image Text:Mickey Mantle played for the New York Yankees for 18 years from 1951 to 1968. Year by year he hit the following numbers of home runs: 13, 23, 21, 27, 37, 52, 34, 42, 31, 40, 54, 30, 15, 35, 19, 23, 22, 18. We represent these as a vector x in R by making the following assignmemt: x <-c(13, 23, 21, 27, 37, 52, 34, 42, 31, 40, 54, 30, 15, 35, 19, 23, 22, 18) Define the vector y by the assignment y <- cumsum(x) Define the variable w using the assignment w <-714-y Define z with the assignment z <-c(X,Y,W) x, y, w and z are vectors. Answer the following using R code. f) What is the 18th element of w? (value of w[18]) 1 h) Calculate the sample variance of 5*x 713.268 i) What is the length(# of elements) in 5*x| j) How many unique(different) values are in z? 49 X X
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Algebra & Trigonometry with Analytic Geometry
Algebra & Trigonometry with Analytic Geometry
Algebra
ISBN:
9781133382119
Author:
Swokowski
Publisher:
Cengage
Linear Algebra: A Modern Introduction
Linear Algebra: A Modern Introduction
Algebra
ISBN:
9781285463247
Author:
David Poole
Publisher:
Cengage Learning
Elementary Linear Algebra (MindTap Course List)
Elementary Linear Algebra (MindTap Course List)
Algebra
ISBN:
9781305658004
Author:
Ron Larson
Publisher:
Cengage Learning
Algebra: Structure And Method, Book 1
Algebra: Structure And Method, Book 1
Algebra
ISBN:
9780395977224
Author:
Richard G. Brown, Mary P. Dolciani, Robert H. Sorgenfrey, William L. Cole
Publisher:
McDougal Littell
Intermediate Algebra
Intermediate Algebra
Algebra
ISBN:
9780998625720
Author:
Lynn Marecek
Publisher:
OpenStax College