4) Baseball Data: a) Using the teams as psus (N = with equal 30), draw a one-stage cluster sample of 6 teams (n = 6) probabilities. Your sample should have approximately 150 players altogether. b) Use your sample to estimate the mean of logsal = log(salary) along with its SE. Hint: Create a new dataset with an additional column for logsal. If samo is your sample, then saml = data.frame (sam0, logsal=log (sam0$ salary)) Here is the data A B C D E F G H J K L M N о P Q R S T U V W X Y AA AB AC AD AE AF team leagueID player salary POS G GS InnOuts PO A E DP PB GB AB R H SecB ThiB HR RBI SB CS BB SO IBB HBP SH SF GIDP pitcher 2 ANA AL anderga0 6200000 CF 112 3 ANA AL colonba0 1.1E+07 P 4 ANA AL davanjeO 375000 CF 108 5 ANA AL donnebro 375000 P 6 ANA AL eckstda0 7 ANA AL erstada0 8 ANA AL 2150000 SS 7750000 1B escobke0 5750000 P 142 125 9 ANA AL figgicho 320000 3B 148 10 ANA AL glaustro 9900000 3B 11 ANA AL greggke0 301500 P 12 ANA AL guerrvl0 1.1E+07 RF 156 13 ANA 14 ANA AL AL guilljoo 2200000 LF 148 haltesho 575000 3B 15 ANA AL 16 ANA AL kenneado 2500000 2B lackejo0 375000 P 144 17 ANA AL molinbe0 2025000 C 18 ANA AL molinjo0 335000 C 19 ANA AL ortizra0 20 ANA AL pauljo01 3266667 P 335000 C 21 ANA AL percitro 7833333 P 22 ANA AL rodrifro 375000 P 23 ANA AL salmotio 24 ANA AL seleaa01 9900000 RF 8666667 P 25 ANA AL shielsc0 375000 P 26 ANA AL washbja0 5450000 P 27 ANA AL weberbe0 900000 P 28 ARI NL alomaro0 1000000 2B 29 ARI NL baergca0 1000000 1B 30 ARI 31 ARI NL bautidao 4000000 RF NL choatra0 325750 P 32 ARI NL cintralo 335000 SS 33 ARI NL colbrgro 2750000 1B 34 ARI NL daiglca0 300000 P 35 ARI NL desseel0 4000000 P 36 ARI NL ADI estalbo0 baseball 550000 C ༄^8༞¥8ཨྠཧྨ^ 8ཨྠ¥ཝཱ"b " " ྴ "ng - nn༅%ę¥818E 8" 3 5 136 124 1 58 5 143 135 46 2 97 1 46 3 3 60 3 3 38 79 141 69 154 20 11 36 8#h°⌘ཟླ⌘⌘9°⌘d⌘ལྐ⌘h!༠༠༠༠ཟླ°༢°ཀླསྒྱུg °⌘--༠ 92 2375 211 34 625 27 743 0 126 3575 3196 986 33 625 80 2116 19 495 0 263 3702 3471 22 640 138 3675 32 595 2286 57 1573 14 384 16 504 0 149 0 252 5 117 24 396 0 316 25 448 0 67 23 610 4 135 107 3536 0 152 ་ྒུ༩མྦྷཝ༔༤༦=ས ༔ ༔ 8 ཧྨ ཎྷེ ་ྒུ ཙྩུ ཎྜ ༞ ཤྩ ༠ ༠ ąསྙ༠ ཉྩཱ 5 2 1 NA 112 442 57 133 20 1 14 75 2 1 29 75 8 30 3 4 NA 3 3 0 0 0 0 0 0 0 0 0 75 1 0 1 NA 108 285 41 79 11 4 7 34 18 3 46 2 2 0 Ο ΝΑ 5 0 0 0 0 0 0 0 0 0 0 198 309 6 75 NA 142 566 92 156 24 1 2 35 16 5 42 49 66 4 83 NA 125 495 79 146 29 1 7 69 16 1 37 16 24 0 1 NA 1 2 0 0 0 0 0 0 0 0 0 57 129 11 9 NA 148 577 83 171 22 17 5 60 34 13 49 11 27 2 2 NA 58 207 47 52 11 1 18 42 2 3 31 2 5 0 1 NA 5 0 0 0 0 0 0 0 0 0 0 308 13 9 2 NA 156 612 124 206 39 2 39 126 15 3 52 266 9 6 1 NA 148 565 88 166 28 3 27 104 5 4 37 26 46 10 2 NA 46 114 10 23 5 0 4 13 1 1 7 255 388 12 71 NA 144 468 70 130 20 5 10 48 15 5 41 15 23 0 1 NA 2 2 0 0 0 0 0 0 0 0 0 597 56 3 5 6 97 337 36 93 13 0 10 54 0 1 18 441 37 3 4 3 73 203 26 53 10 2 3 25 4 1 10 6 13 2 1 NA 1 3 0 0 0 0 0 0 0 0 0 134 9 1 2 2 46 70 11 17 3 0 2 10 2 1 7 1 3 0 Ο ΝΑ 3 0 0 0 0 0 0 0 0 0 0 5 9 0 Ο ΝΑ 3 0 0 0 0 0 0 0 0 0 0 15 1 0 Ο ΝΑ 60 186 15 47 7 0 2 23 1 0 14 gp- ་॰༠!=་ལྟ°!88སྐྱ- ad° °°{¥ 6 1 0 3 3 0 1 0 0 0 0 0 1 54 2 0 1 5 2 0 0 0 0 0 0 0 1 1 13 14 2 11 0 74 1 4 3 4 9 0 0 0 0 0 0 0 1 94 0 0 10 2 6 0 52 3 3 0 1 6 0 0 0 0 0 0 0 1 74 14 8 0 8 19 0 92 5 15 0 3 14 0 30 0 0 0 0 3 0 92 13 9 2 10 0 1 0 0 0 0 0 1 35 1 2 2 4 18 0 52 0 0 5 0 6 0 0 0 0 0 0 1 1 17 0 0 3 1 2 0 0 Ο ΝΑ 0 0 0 1 0 0 0 0 0 0 1 41 0 2 0 4 2 0 3 10 2 2 NA 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 13 1 Ο ΝΑ 3 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 3 22 1 2 NA 3 5 0 2 0 0 0 1 0 0 0 0 0 0 2 0 0 1 0 0 Ο ΝΑ 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 48 53 3 10 NA 38 110 14 34 5 2 3 16 0 2 12 18 0 1 2 0 2 0 32 4 0 2 NA 79 85 6 20 2 0 2 11 0 0 6 12 0 3 0 0 7 0 265 8 4 1 NA 141 539 64 154 27 1 11 65 6 2 35 66 2 4 1 3 20 0 3 10 0 1 NA 69 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 125 3297 141 383 15 61 NA 154 564 56 148 31 7 4 49 3 3 31 59 2 2 12 4 11 0 1 27 7 1 0 Ο ΝΑ 20 27 1 3 0 0 0 1 0 0 1 5 0 0 0 0 0 0 10 147 5 6 0 Ο ΝΑ 11 17 2 2 2 0 0 0 0 0 0 7 0 0 1 0 1 1 9 256 5 12 1 Ο ΝΑ 36 18 0 3 2 0 0 0 0 0 3 3 0 0 4 0 1 1 Insassa er 7 100 3 92 19 2 0 0 0 7 14 2 2 0 0 2 4 0 0 0 6 0 0 0 0 0 0 + 23 - - c = - 3 ་ ་
4) Baseball Data: a) Using the teams as psus (N = with equal 30), draw a one-stage cluster sample of 6 teams (n = 6) probabilities. Your sample should have approximately 150 players altogether. b) Use your sample to estimate the mean of logsal = log(salary) along with its SE. Hint: Create a new dataset with an additional column for logsal. If samo is your sample, then saml = data.frame (sam0, logsal=log (sam0$ salary)) Here is the data A B C D E F G H J K L M N о P Q R S T U V W X Y AA AB AC AD AE AF team leagueID player salary POS G GS InnOuts PO A E DP PB GB AB R H SecB ThiB HR RBI SB CS BB SO IBB HBP SH SF GIDP pitcher 2 ANA AL anderga0 6200000 CF 112 3 ANA AL colonba0 1.1E+07 P 4 ANA AL davanjeO 375000 CF 108 5 ANA AL donnebro 375000 P 6 ANA AL eckstda0 7 ANA AL erstada0 8 ANA AL 2150000 SS 7750000 1B escobke0 5750000 P 142 125 9 ANA AL figgicho 320000 3B 148 10 ANA AL glaustro 9900000 3B 11 ANA AL greggke0 301500 P 12 ANA AL guerrvl0 1.1E+07 RF 156 13 ANA 14 ANA AL AL guilljoo 2200000 LF 148 haltesho 575000 3B 15 ANA AL 16 ANA AL kenneado 2500000 2B lackejo0 375000 P 144 17 ANA AL molinbe0 2025000 C 18 ANA AL molinjo0 335000 C 19 ANA AL ortizra0 20 ANA AL pauljo01 3266667 P 335000 C 21 ANA AL percitro 7833333 P 22 ANA AL rodrifro 375000 P 23 ANA AL salmotio 24 ANA AL seleaa01 9900000 RF 8666667 P 25 ANA AL shielsc0 375000 P 26 ANA AL washbja0 5450000 P 27 ANA AL weberbe0 900000 P 28 ARI NL alomaro0 1000000 2B 29 ARI NL baergca0 1000000 1B 30 ARI 31 ARI NL bautidao 4000000 RF NL choatra0 325750 P 32 ARI NL cintralo 335000 SS 33 ARI NL colbrgro 2750000 1B 34 ARI NL daiglca0 300000 P 35 ARI NL desseel0 4000000 P 36 ARI NL ADI estalbo0 baseball 550000 C ༄^8༞¥8ཨྠཧྨ^ 8ཨྠ¥ཝཱ"b " " ྴ "ng - nn༅%ę¥818E 8" 3 5 136 124 1 58 5 143 135 46 2 97 1 46 3 3 60 3 3 38 79 141 69 154 20 11 36 8#h°⌘ཟླ⌘⌘9°⌘d⌘ལྐ⌘h!༠༠༠༠ཟླ°༢°ཀླསྒྱུg °⌘--༠ 92 2375 211 34 625 27 743 0 126 3575 3196 986 33 625 80 2116 19 495 0 263 3702 3471 22 640 138 3675 32 595 2286 57 1573 14 384 16 504 0 149 0 252 5 117 24 396 0 316 25 448 0 67 23 610 4 135 107 3536 0 152 ་ྒུ༩མྦྷཝ༔༤༦=ས ༔ ༔ 8 ཧྨ ཎྷེ ་ྒུ ཙྩུ ཎྜ ༞ ཤྩ ༠ ༠ ąསྙ༠ ཉྩཱ 5 2 1 NA 112 442 57 133 20 1 14 75 2 1 29 75 8 30 3 4 NA 3 3 0 0 0 0 0 0 0 0 0 75 1 0 1 NA 108 285 41 79 11 4 7 34 18 3 46 2 2 0 Ο ΝΑ 5 0 0 0 0 0 0 0 0 0 0 198 309 6 75 NA 142 566 92 156 24 1 2 35 16 5 42 49 66 4 83 NA 125 495 79 146 29 1 7 69 16 1 37 16 24 0 1 NA 1 2 0 0 0 0 0 0 0 0 0 57 129 11 9 NA 148 577 83 171 22 17 5 60 34 13 49 11 27 2 2 NA 58 207 47 52 11 1 18 42 2 3 31 2 5 0 1 NA 5 0 0 0 0 0 0 0 0 0 0 308 13 9 2 NA 156 612 124 206 39 2 39 126 15 3 52 266 9 6 1 NA 148 565 88 166 28 3 27 104 5 4 37 26 46 10 2 NA 46 114 10 23 5 0 4 13 1 1 7 255 388 12 71 NA 144 468 70 130 20 5 10 48 15 5 41 15 23 0 1 NA 2 2 0 0 0 0 0 0 0 0 0 597 56 3 5 6 97 337 36 93 13 0 10 54 0 1 18 441 37 3 4 3 73 203 26 53 10 2 3 25 4 1 10 6 13 2 1 NA 1 3 0 0 0 0 0 0 0 0 0 134 9 1 2 2 46 70 11 17 3 0 2 10 2 1 7 1 3 0 Ο ΝΑ 3 0 0 0 0 0 0 0 0 0 0 5 9 0 Ο ΝΑ 3 0 0 0 0 0 0 0 0 0 0 15 1 0 Ο ΝΑ 60 186 15 47 7 0 2 23 1 0 14 gp- ་॰༠!=་ལྟ°!88སྐྱ- ad° °°{¥ 6 1 0 3 3 0 1 0 0 0 0 0 1 54 2 0 1 5 2 0 0 0 0 0 0 0 1 1 13 14 2 11 0 74 1 4 3 4 9 0 0 0 0 0 0 0 1 94 0 0 10 2 6 0 52 3 3 0 1 6 0 0 0 0 0 0 0 1 74 14 8 0 8 19 0 92 5 15 0 3 14 0 30 0 0 0 0 3 0 92 13 9 2 10 0 1 0 0 0 0 0 1 35 1 2 2 4 18 0 52 0 0 5 0 6 0 0 0 0 0 0 1 1 17 0 0 3 1 2 0 0 Ο ΝΑ 0 0 0 1 0 0 0 0 0 0 1 41 0 2 0 4 2 0 3 10 2 2 NA 1 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 13 1 Ο ΝΑ 3 1 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 3 22 1 2 NA 3 5 0 2 0 0 0 1 0 0 0 0 0 0 2 0 0 1 0 0 Ο ΝΑ 18 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 48 53 3 10 NA 38 110 14 34 5 2 3 16 0 2 12 18 0 1 2 0 2 0 32 4 0 2 NA 79 85 6 20 2 0 2 11 0 0 6 12 0 3 0 0 7 0 265 8 4 1 NA 141 539 64 154 27 1 11 65 6 2 35 66 2 4 1 3 20 0 3 10 0 1 NA 69 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 125 3297 141 383 15 61 NA 154 564 56 148 31 7 4 49 3 3 31 59 2 2 12 4 11 0 1 27 7 1 0 Ο ΝΑ 20 27 1 3 0 0 0 1 0 0 1 5 0 0 0 0 0 0 10 147 5 6 0 Ο ΝΑ 11 17 2 2 2 0 0 0 0 0 0 7 0 0 1 0 1 1 9 256 5 12 1 Ο ΝΑ 36 18 0 3 2 0 0 0 0 0 3 3 0 0 4 0 1 1 Insassa er 7 100 3 92 19 2 0 0 0 7 14 2 2 0 0 2 4 0 0 0 6 0 0 0 0 0 0 + 23 - - c = - 3 ་ ་
MATLAB: An Introduction with Applications
6th Edition
ISBN:9781119256830
Author:Amos Gilat
Publisher:Amos Gilat
Chapter1: Starting With Matlab
Section: Chapter Questions
Problem 1P
Related questions
Question
Could you solve it with R only?
Since the program does not let me upload the data I took a screenshot of the data, So just solve the question with the given data (take max as 36 instead of 150).
Thank you.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 1 steps
Recommended textbooks for you
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
MATLAB: An Introduction with Applications
Statistics
ISBN:
9781119256830
Author:
Amos Gilat
Publisher:
John Wiley & Sons Inc
Probability and Statistics for Engineering and th…
Statistics
ISBN:
9781305251809
Author:
Jay L. Devore
Publisher:
Cengage Learning
Statistics for The Behavioral Sciences (MindTap C…
Statistics
ISBN:
9781305504912
Author:
Frederick J Gravetter, Larry B. Wallnau
Publisher:
Cengage Learning
Elementary Statistics: Picturing the World (7th E…
Statistics
ISBN:
9780134683416
Author:
Ron Larson, Betsy Farber
Publisher:
PEARSON
The Basic Practice of Statistics
Statistics
ISBN:
9781319042578
Author:
David S. Moore, William I. Notz, Michael A. Fligner
Publisher:
W. H. Freeman
Introduction to the Practice of Statistics
Statistics
ISBN:
9781319013387
Author:
David S. Moore, George P. McCabe, Bruce A. Craig
Publisher:
W. H. Freeman