(Use Excel) Baseball has always been a favorite pastime in America and is rife w
ID: 3182699 • Letter: #
Question
(Use Excel) Baseball has always been a favorite pastime in America and is rife with statistics and theories. In a recent paper, researchers showed that major league players who have nicknames live 2½ years longer than those without them (The Wall Street Journal, July 16, 2009). You do not believe in this result and decide to collect data on the lifespan of 30 baseball players along with a nickname variable that equals 1 if the player had a nickname and 0 otherwise. The accompanying table shows a portion of the data. Use Table 2. ( http://lectures.mhhe.com/connect/0078020557/Table/table2.jpg )
Let Sample 1 be the sample of major-league players who have nicknames and Sample 2 be the sample of those without nicknames.
a. Create two subsamples consisting of players with and without nicknames. Calculate the average longevity for each subsample. (Round your answers to 2 decimal places.)
b. Specify the hypotheses to contradict the claim made by researchers.
Assume the population variances are unknown but equal.
c-1. Calculate the value of the test statistic. (Round your answer to 2 decimal places.)
Test statistic
c-2. Calculate the p-value. (Round your answer to 4 decimal places.)
p-value
c-3. State the conclusion of the test using a 5% level of significance.
Years Nickname Years Nickname Years Nickname 74 1 61 0 68 1 62 1 64 0 68 0 67 1 70 0 64 1 73 1 71 1 67 1 49 1 69 1 64 0 62 0 56 0 63 1 56 0 68 1 68 1 63 0 70 1 68 1 80 1 79 1 74 0 65 1 67 0 64 0Explanation / Answer
We shall analyse this using the open source statisitcal package R
The complete R snippet is as follows
# read the data into R dataframe
data.df<- read.csv("C:\Users\586645\Downloads\Chegg ickname.csv",header=TRUE)
str(data.df)
data.df$Nickname<- as.factor(data.df$Nickname)
## create subsamples
nickname <- data.df[which(data.df$Nickname=="1"),]
no.nickname <- data.df[which(data.df$Nickname=="0"),]
## average values are
mean(nickname$Years)
mean(no.nickname$Years)
The results are
> mean(nickname$Years)
[1] 68.05556
> mean(no.nickname$Years)
[1] 64.08333
The hypothesis is
H0: 1 2 2.5; HA: 1 2 > 2.5 , as we interested in knwoing whether the difference is greater than 2.5 years or not
# difference
diff<- nickname$Years-no.nickname$Years
t.test(diff,mu=2.5,alternative = "greater")
The result is
t.test(diff,mu=2.5,alternative = "greater")
One Sample t-test
data: diff
t = 1.1992, df = 17, p-value = 0.1234 # as the p value is not less than 0.05 , hence we fail to reject h0 and conclude that the sample data disaproves the claim made by the reseachers , hence A
alternative hypothesis: true mean is greater than 2.5
95 percent confidence interval:
1.623865 Inf
sample estimates:
mean of x
4.444444
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.