Question
Step by step please
refer to the baseball 2009 data, which report information on the 30 major league baseball teams for the 2009 season. over the last decade, the mean attendance per team followed a normal distribution with a mean of 2.25 million per team and a standard deviation of 0.70 million. use statistical software to compute the mean attendance per team for the 2009 season. determine the likelihood of a sample mean this large or larger from the population?
Team, x1 League, x2 Built, x3 Size, x4 Salary, x5 Wins, x6 Attendance, x7 BA, x8 ERA, x9 Hr, x10 Errors, x11 SB x12 Year, x13 Average Player Salary, x14 Baltimore Orioles 1 1992 48,876 67.1 64 1.91 0.268 5.15 160 90 76 1989 $ 512,930.00 Boston Red Sox 1 1912 39,928 121.8 95 3.06 0.270 4.35 212 82 126 1990 $ 578,930.00 Chicago White Sox 1 1991 40,615 96.1 79 2.28 0.258 4.14 184 113 113 1991 $ 891,188.00 Cleveland Indians 1 1994 43,345 81.6 65 1.77 0.264 5.06 161 97 84 1992 $ 1,084,408.00 Detroit Tigers 1 2000 41,782 115.1 86 2.57 0.260 4.29 183 88 72 1993 $ 1,120,254.00 Kansas City Royals 1 1973 40,793 70.5 65 1.80 0.259 4.83 144 116 88 1994 $ 1,188,679.00 LA Angels 1 1966 45,050 113.7 97 3.24 0.285 4.45 173 85 148 1995 $ 1,071,029.00 Minnesota Twins 1 2010 40,000 65.3 87 2.42 0.274 4.50 172 76 85 1996 $ 1,176,967.00 New york Yankees 1 2009 52,325 201.5 103 3.72 0.283 4.26 244 86 111 1997 $ 1,383,578.00 Okland Athletics 1 1966 34,077 62.3 75 1.41 0.262 4.26 135 105 133 1998 $ 1,441,406.00 Seattle Mariners 1 1999 47,116 98.9 85 2.20 0.258 3.87 160 105 89 1999 $ 1,720,050.00 Tampa Bay Rays 1 1990 36,048 63.3 84 1.87 0.263 4.33 199 98 194 2000 $ 1,988,034.00 Texas Rangers 1 1994 49,115 68.2 87 2.16 0.260 4.38 224 106 149 2001 $ 2,264,403.00 Toronto Blue Jays 1 1989 50,516 80.5 75 1.88 0.266 4.47 209 76 73 2002 $ 2,383,235.00 Arizona Diamondbacks 0 1998 49,033 73.5 70 2.13 0.253 4.42 173 124 102 2003 $ 2,555,476.00 Atlanta Braves 0 1996 50,091 96.7 86 2.37 0.263 3.57 149 96 58 2004 $ 2,486,609.00 Chicago Cubs 0 1914 41,118 134.8 83 3.17 0.255 3.84 161 105 56 2005 $ 2,632,655.00 Cincinnati Reds 0 2003 42,059 73.6 78 1.75 0.247 4.18 158 89 96 2006 $ 2,866,544.00 Colorado Rockies 0 1995 50,445 75.2 92 2.67 0.261 4.22 190 87 106 2007 $ 2,944,556.00 Florida Marlins 0 1987 36,331 36.8 87 1.46 0.268 4.29 159 106 75 2008 $ 3,154,845.00 Houston Astros 0 2000 40,950 103.0 74 2.52 0.260 4.54 142 78 113 2009 $ 3,240,000.00 LA Dodgers 0 1962 56,000 100.4 95 3.76 0.270 3.41 145 83 116 Milwaukee Brewers 0 2001 42,200 80.2 80 3.04 0.263 4.83 182 98 68 New York Mets 0 2009 45,000 149.4 70 3.15 0.270 4.45 95 97 122 Philadelphia Phillies 0 2004 43,647 113.0 93 3.60 0.258 4.16 224 76 119 Pittsburgh Pirates 0 2001 38,496 48.7 62 1.58 0.252 4.59 125 73 90 San Diego Padres 0 2004 42,445 43.7 75 1.92 0.242 4.37 141 94 82 San Francisco Giants 0 2000 41,503 82.6 88 2.86 0.257 3.55 122 88 78 St. Louis Cardinals 0 2006 49,660 77.6 91 3.34 0.263 3.66 160 96 75 Washington Nationals 0 2008 41,888 60.3 59 1.82 0.258 5.00 156 143 73
Explanation / Answer
R code:
#To find the mean of attendance
mean(attendance)
#The z test function doesnt exist in R and therefore we create a function,
z.test = function(a, mu, stddev){
z = (mean(a) - mu) / (stddev / sqrt(length(a)))
return(z)
}
#The z statistic is,
z.test(attendance, 2.25, 0.7)
#This is a right tailed one-sample z test and therfore the area in the right tail is
1 - pnorm(z.test(attendance, 2.25, 0.7))
Output: