- 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

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
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
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
A First Course in Probability (10th Edition)
A First Course in Probability (10th Edition)
Probability
ISBN:
9780134753119
Author:
Sheldon Ross
Publisher:
PEARSON
A First Course in Probability
A First Course in Probability
Probability
ISBN:
9780321794772
Author:
Sheldon Ross
Publisher:
PEARSON