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. a) Calculate the minimum value of z. b) Calculate the sum of the squares of the elements in z. c) Calculate the sample mean of z.

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.
a) Calculate the minimum value of z.
b) Calculate the sum of the squares of the elements in z.
c) Calculate the sample mean of z. [
d) Calculate the sample variance of z.
e) Calculate the sample standard deviation of z
f) What is the 18th element of w? (value of w[18])
g) Calculate the sample variance of x.
h) Calculate the sample variance of 5*x|
i) What is the length(# of elements) in 5*x
j) How many unique(different) values are in z?
k) In the following paste your R script for this problem
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. a) Calculate the minimum value of z. b) Calculate the sum of the squares of the elements in z. c) Calculate the sample mean of z. [ d) Calculate the sample variance of z. e) Calculate the sample standard deviation of z f) What is the 18th element of w? (value of w[18]) g) Calculate the sample variance of x. h) Calculate the sample variance of 5*x| i) What is the length(# of elements) in 5*x j) How many unique(different) values are in z? k) In the following paste your R script for this problem
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer