In: Statistics and Probability
Please Use R studio and show all the steps to answer this question
NY Marathon 2013 the table below shows the winning times (in minutes) for men and women in the new york city marathon between 1978 and 2013. (the race was not run in 2012 because of superstorm sandy.) assuming that performances in the big apple resemble performances elsewhere, we can think of these data as a sample of performance in marathon competitions. Create a 90% confidence interval for the mean difference in winning times for male and female marathon competitors.
Year |
Men |
Women |
Year |
Men |
Women |
1978 |
132.2 |
152.5 |
1996 |
129.9 |
148.3 |
1979 |
131.7 |
147.6 |
1997 |
128.2 |
148.7 |
1980 |
129.7 |
145.7 |
1998 |
128.8 |
145.3 |
1981 |
128.2 |
145.5 |
1999 |
129.2 |
145.1 |
1982 |
129.5 |
147.2 |
2000 |
130.2 |
145.8 |
1983 |
129.0 |
147.0 |
2001 |
127.7 |
144.4 |
1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 |
134.9 131.6 131.1 131.0 128.3 128.0 132.7 129.5 129.5 130.1 131.4 131.1 |
149.5 148.6 148.1 150.3 148.1 145.5 150.8 147.5 144.7 146.4 147.6 148.1 |
2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 |
128.1 130.5 129.5 129.5 130.0 129.1 128.7 129.3 128.3 125.1 Cancelled 128.4 |
145.9 142.5 143.2 144.7 145.1 143.2 143.9 148.9 148.3 143.3 Cancelled 140.1 |
Result:
Data are paired on year. paired t test command is used to get confidence interval for mean difference.
RStudio code:
men<-c(132.2,131.7,129.7,128.2,129.5,129,134.9,131.6,131.1,131,128.3,128,132.7,129.5,129.5,130.1,131.4,131.1,129.9,128.2,128.8,129.2,130.2,127.7,128.1,130.5,129.5,129.5,130,129.1,128.7,129.3,128.3,125.1,128.4)
women<-c(152.5,147.6,145.7,145.5,147.2,147,149.5,148.6,148.1,150.3,148.1,145.5,150.8,147.5,144.7,146.4,147.6,148.1,148.3,148.7,145.3,145.1,145.8,144.4,145.9,142.5,143.2,144.7,145.1,143.2,143.9,148.9,148.3,143.3,140.1)
t.test(men,women, paired = TRUE,conf.level=0.90)
output:
t.test(men,women, paired = TRUE,conf.level=0.90)
Paired t-test
data: men and women
t = -46.236, df = 34, p-value < 2.2e-16
alternative hypothesis: true difference in means is not equal to 0
90 percent confidence interval:
-17.39663 -16.16908
sample estimates:
mean of the differences
-16.78286
90% confidence interval for the mean difference in winning times for male and female marathon competitors= (-17.39663, -16.16908)