In: Statistics and Probability
CAN YOU PLEASE POST R-SCRIPT ONLY!!
In Major League baseball, the speed of a pitch is very
important. How fast is the speed of a major league pitchers average
pitch? A researcher took a random sample of the speed of 15 pitches
from the 2019 Major League baseball season. The following are the
speeds of these pitches in miles per hour:
92.8, 87.0, 89.1, 96.2, 75.6, 89.6, 92.5, 83.3, 86.5, 95.6, 94.1,
91.6, 94.2, 93.4, 90.0
It is reasonable to treat these measurements as coming from a
normal distribution with unknown mean μ and unknown
standard deviation σ
CAN YOU PLEASE POST R-SCRIPT ONLY!!
a)Use the data to calculate an unbiased point estimate of the true
mean, μ, of pitch speeds in the 2019 Major League baseball
season.
b)Use the data to find an unbiased point estimate of the population
variance, σ2 of pitch speeds in the 2019 Major
League baseball season.
c) Use the data to find the maximum likelihood estimate of the
population variance, σ2, of pitch speeds in the
2019 Major League baseball season.
d) Find the sample standard deviation of the above data
e) Find the sample median of the above data.
f)Create a 90% confidence interval for μ.
( , )
g) What critical value did you use to calculate the 90% confidence
interval in part f)?
h)Create a 90% prediction interval for μ.
( , )
Solution
In Major League baseball, the speed of a pitch is very important. How fast is the speed of a major league pitchers average pitch? A researcher took a random sample of the speed of 15 pitches from the 2019 Major League baseball season. The following are the speeds of these pitches in miles per hour:
a) Unbiased point estimate is sample mean=90.1
b) Unbiased point estimate is sample variance=29.05571
c) MLE is sample variance with divisor n, which is 27.11867
d) Sample SD=5.390335
e) Sample median=91.6
f) 90% CI for mu is LCL=87.64865 , UCL=92.55135
g) critical value=t(.05,14)= 1.76131
h) 90% Prediction interval for mu is 80.29459<mu< 99.90541
i) R Code
x=c(92.8,87,89.1,96.2,75.6,89.6,92.5,83.3,86.5,95.6,94.1,91.6,94.2,93.4,90)
mean(x) ## a
var(x)## b
(14/15)*var(x) ## c
sd(x) ## d
median(x) ## e
t.test(x,conf.level=.9) ## f
qt(.95,14) ## g
w=lm(x~1)
predict.lm(w,interval="predict",level=.90) ## h