SlideShare a Scribd company logo
1 of 2
Statistics 141 - Homework 6 complete solutions correct answers key
Find the solution at
http://www.coursemerit.com/solution-details/15143/Statistics-141---Homework-6-complete-solutions-correct-answers-key
NO LATE SUBMISSIONS
Write a report showing the code, results and plots for the questions below.
Put a printed version in Charles Arnold's mailbox in the Statistics department o_ce,4th oor of
the Mathematical Sciences Building, and
send an electronic version to dtemplelang@ucdavis.edu with the subject STA141 Assignment 6.
Place the following text at the top of your report and sign it on the physical version you submit:
I certify that I have acknowledged any code that I used from any other person in the class, from
Piazza or any Web site or book or other source. Any other work is my own.
1 UNIX Shell Tools
In this part of the assignment, you will use UNIX shell tools to process data outside of R and also
to get data into R.
In the Data directory on the class Web site, there is a collection of CSV _les for the monthly airline
delay data from July 2012 to June 2013, inclusive. This is a compressed tar _le Airline2012_13.tar.gz.
Within this archive, each _le name is of the form year_Month.csv,e.g. 2013_January.csv.
Download this _le and extract the _les into a single directory. Use a shell command not a point-
and-click GUI (graphical user interface).
We want to count the number of ights for the 5 airports OAK,SFO, SMF, LAX and JFK. The
tasks are simple to state.
i) Compute the number of outbound ights for each of the _ve airports OAK,SMF, LAX, SFO
and JFK, and sort these counts from largest to smallest.
Perform the same computations in R. Compare the total time for each approach.
ii) Compute the total number of ights in and out of the _ve airports, i.e., the sume of both the
inbound and outbound ights. You can do this however you want using a mix of the shell and R
code. One way is to _rst obtain the lines in the _les which involve any of these _ve airports. Then
obtain a count for each pair of airports, i.e., ORIGIN, DESTINATION pairs. At most, how many
will there be? Then read these counts by ORIGIN, DESTINATION pairs into R and compute the
total number of ights for each of the 5 airports.
Use only the UNIXshell tools to do i). For ii), use the shell tools to greatly reduce the data and
then _nish o_ the computations in R.
Work on a small subset of the data _rst to get the code working correctly. You can check the results
by doing the equivalent computations in R. Then run it on the larger data set. Make certain to try
this regardless of how powerful and capable your computer is. If your computer is not capable of
running on the full data set, run it for di_erent size input and show a plot of the time taken as a
function of number of lines processed.
Shell commands that may be useful include: sed, egrep,wc, sort, uniq, cut, man, ls, gunzip, tr,
head, tail, echo, cat, xargs. You probably don't need them all.
2 Basebal, Databases and SQL
In this part of the assignment, you will gain experience with databases and SQL, and of course R,
data manipulation and visualization.
2.1 Data
We will use data about many, many aspects of baseball. This data has been compiled by Sean
Leahman and he has kindly made them available for use by many. Je_ Knecht has made the
data, up to 2011, available as an SQLite database. It is available via cloning a git repository
(https://github.com/jknecht/lahmann-2013.sqlite) You can also retrieve from the class Web
site at http://eeyore.ucdavis.edu/stat141/Data/lahman2013.sqlite. As we saw in class,
there are 24 tables in this database. Each table has columns and rows. Documentation for each of
the tables is available at http://seanlahman.com/files/database/readme2013.txt.
2.2 Software
You will need to install the RSQLite package,typically using install.packages().
2.3 Questions
You can answer these questions with a combination of SQL commands and R manipulation of the
results, if necessary.
Give the answer and show the SQL and R code used to answer each question.
1. What years does the data cover? are there data for each of these years?
2. How many (unique) people are included in the database? How many are players, managers, etc?
3. What team won the World Series in 2000?
4. What team lost the World Series each year?
5. Do you see a relationship between the number of games won in a season and winning the World
Series?
6. In 2003, what were the three highest salaries? (We refer here to unique salaries, i.e., more than
one player might be paid one of these salaries.)
7. For 1999, compute the total payroll of each of the di_erent teams. Next compute the team
payrolls for all years in the database for which we have salary information. Display these in a plot.
8. Study the change in salary over time. Have salaries kept up with ination, fallen behind, or
grown faster?
9. Compare payrolls for the teams that are in the same leagues, and then in the same divisions.
Are there any interesting characteristics? Have certain teams always had top payrolls over the
years? Is there a connection between payroll and performance?
10. Has the distribution of home runs for players increased over the years?
When answering the questions, try to summarize the results in convenient and informative form
(e.g. tables and/or plots) that illustrate the key features.
2.4 Bonus Questions
Students who are looking for bonus points (e.g., to makeup for other assignments) can compose
additional questions and answer these. Make certain to explicitly state each question, indicate why
it is interesting, and answer it using the data,providing conclusions, evidence and the code used
to answer the question.

More Related Content

What's hot

Data Structures by Yaman Singhania
Data Structures by Yaman SinghaniaData Structures by Yaman Singhania
Data Structures by Yaman SinghaniaYaman Singhania
 
FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013
FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013
FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013IMGS
 
Creation of spreadsheets
Creation of spreadsheetsCreation of spreadsheets
Creation of spreadsheetsNITISH SADOTRA
 
Ds important questions
Ds important questionsDs important questions
Ds important questionsLavanyaJ28
 
2 marks- DS using python
2 marks- DS using python2 marks- DS using python
2 marks- DS using pythonLavanyaJ28
 
Unit 1 linked list
Unit 1 linked listUnit 1 linked list
Unit 1 linked listLavanyaJ28
 
Introduction to spreadsheets
Introduction to spreadsheetsIntroduction to spreadsheets
Introduction to spreadsheetsTracy Gilmer
 
Analyzing social media networks with NodeXL - Chapter-03 images
Analyzing social media networks with NodeXL - Chapter-03 imagesAnalyzing social media networks with NodeXL - Chapter-03 images
Analyzing social media networks with NodeXL - Chapter-03 imagesMarc Smith
 
In press checking with crossref API
In press checking with crossref APIIn press checking with crossref API
In press checking with crossref APIukcorr
 
CREATING SAVING & OPENING SPREADSHEET USING WORKSHEET https://youtu.be/r8Qj5D...
CREATING SAVING & OPENING SPREADSHEET USING WORKSHEET https://youtu.be/r8Qj5D...CREATING SAVING & OPENING SPREADSHEET USING WORKSHEET https://youtu.be/r8Qj5D...
CREATING SAVING & OPENING SPREADSHEET USING WORKSHEET https://youtu.be/r8Qj5D...Tasneem Ahmad
 
Introduction to spreadsheets
Introduction to spreadsheetsIntroduction to spreadsheets
Introduction to spreadsheetsCasey Robertson
 
Spreadsheet Purposes
Spreadsheet PurposesSpreadsheet Purposes
Spreadsheet Purposesmike2018
 
Spreadsheet formulas ppt (1)
Spreadsheet formulas ppt (1)Spreadsheet formulas ppt (1)
Spreadsheet formulas ppt (1)Tammy Carter
 

What's hot (20)

Data Structures by Yaman Singhania
Data Structures by Yaman SinghaniaData Structures by Yaman Singhania
Data Structures by Yaman Singhania
 
'Spreadsheet'
'Spreadsheet''Spreadsheet'
'Spreadsheet'
 
FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013
FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013
FME Data Analytics, Lightning Talk_Ken Bragg - Safe Software FME World Tour 2013
 
3 inner plumbing Excel tips
3 inner plumbing Excel tips3 inner plumbing Excel tips
3 inner plumbing Excel tips
 
Creation of spreadsheets
Creation of spreadsheetsCreation of spreadsheets
Creation of spreadsheets
 
Ds important questions
Ds important questionsDs important questions
Ds important questions
 
2 marks- DS using python
2 marks- DS using python2 marks- DS using python
2 marks- DS using python
 
Vlookup
VlookupVlookup
Vlookup
 
Informatica faq's
Informatica faq'sInformatica faq's
Informatica faq's
 
Unit 1 linked list
Unit 1 linked listUnit 1 linked list
Unit 1 linked list
 
Introduction to spreadsheets
Introduction to spreadsheetsIntroduction to spreadsheets
Introduction to spreadsheets
 
Analyzing social media networks with NodeXL - Chapter-03 images
Analyzing social media networks with NodeXL - Chapter-03 imagesAnalyzing social media networks with NodeXL - Chapter-03 images
Analyzing social media networks with NodeXL - Chapter-03 images
 
In press checking with crossref API
In press checking with crossref APIIn press checking with crossref API
In press checking with crossref API
 
CREATING SAVING & OPENING SPREADSHEET USING WORKSHEET https://youtu.be/r8Qj5D...
CREATING SAVING & OPENING SPREADSHEET USING WORKSHEET https://youtu.be/r8Qj5D...CREATING SAVING & OPENING SPREADSHEET USING WORKSHEET https://youtu.be/r8Qj5D...
CREATING SAVING & OPENING SPREADSHEET USING WORKSHEET https://youtu.be/r8Qj5D...
 
Spreadsheet
SpreadsheetSpreadsheet
Spreadsheet
 
Introduction to spreadsheets
Introduction to spreadsheetsIntroduction to spreadsheets
Introduction to spreadsheets
 
Spreadsheet Purposes
Spreadsheet PurposesSpreadsheet Purposes
Spreadsheet Purposes
 
WELCOME TO BIG DATA TRANING
WELCOME TO BIG DATA TRANINGWELCOME TO BIG DATA TRANING
WELCOME TO BIG DATA TRANING
 
Spreadsheet formulas ppt (1)
Spreadsheet formulas ppt (1)Spreadsheet formulas ppt (1)
Spreadsheet formulas ppt (1)
 
Actuate sections
Actuate sectionsActuate sections
Actuate sections
 

Similar to Statistics 141 homework 6 complete solutions correct answers key

Cover PageComplete and copy the following to Word for your cover p.docx
Cover PageComplete and copy the following to Word for your cover p.docxCover PageComplete and copy the following to Word for your cover p.docx
Cover PageComplete and copy the following to Word for your cover p.docxfaithxdunce63732
 
Program 1 – CS 344This assignment asks you to write a bash.docx
Program 1 – CS 344This assignment asks you to write a bash.docxProgram 1 – CS 344This assignment asks you to write a bash.docx
Program 1 – CS 344This assignment asks you to write a bash.docxwkyra78
 
New folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docx
New folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docxNew folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docx
New folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docxhenrymartin15260
 
HW2.pdfCSEEEE 230 Computer Organization and Assembly La.docx
HW2.pdfCSEEEE 230 Computer Organization and Assembly La.docxHW2.pdfCSEEEE 230 Computer Organization and Assembly La.docx
HW2.pdfCSEEEE 230 Computer Organization and Assembly La.docxadampcarr67227
 
toolkit13_sec9.pdf
toolkit13_sec9.pdftoolkit13_sec9.pdf
toolkit13_sec9.pdfAfrim Alili
 
Excel analysis assignment this is an independent assignment me
Excel analysis assignment this is an independent assignment meExcel analysis assignment this is an independent assignment me
Excel analysis assignment this is an independent assignment mejoney4
 
CIS 336 Wonderful Education--cis336.com
CIS 336 Wonderful Education--cis336.comCIS 336 Wonderful Education--cis336.com
CIS 336 Wonderful Education--cis336.comJaseetha16
 
Don't Repeat Yourself, and Automated Code Reviews
Don't Repeat Yourself, and Automated Code ReviewsDon't Repeat Yourself, and Automated Code Reviews
Don't Repeat Yourself, and Automated Code ReviewsGramener
 
Microsoft Office Excel
Microsoft Office ExcelMicrosoft Office Excel
Microsoft Office Excelhyzhashorsh
 
In Section 1 on the Data page, complete each column of the spreads.docx
In Section 1 on the Data page, complete each column of the spreads.docxIn Section 1 on the Data page, complete each column of the spreads.docx
In Section 1 on the Data page, complete each column of the spreads.docxsleeperharwell
 
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdfSTAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdfSOUMIQUE AHAMED
 
Building data fusion surrogate models for spacecraft aerodynamic problems wit...
Building data fusion surrogate models for spacecraft aerodynamic problems wit...Building data fusion surrogate models for spacecraft aerodynamic problems wit...
Building data fusion surrogate models for spacecraft aerodynamic problems wit...Shinwoo Jang
 
Unit 1.3 Introduction to Programming (Part 2)
Unit 1.3 Introduction to Programming (Part 2)Unit 1.3 Introduction to Programming (Part 2)
Unit 1.3 Introduction to Programming (Part 2)Intan Jameel
 
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docx
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docxCase Study Analysis 2The Cholesterol.xls records cholesterol lev.docx
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docxwendolynhalbert
 
5 structured programming
5 structured programming 5 structured programming
5 structured programming hccit
 
Students should work individually on the Mid-Term Students are enco.docx
Students should work individually on the Mid-Term Students are enco.docxStudents should work individually on the Mid-Term Students are enco.docx
Students should work individually on the Mid-Term Students are enco.docxorlandov3
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook applicationsvrohith 9
 

Similar to Statistics 141 homework 6 complete solutions correct answers key (20)

Cover PageComplete and copy the following to Word for your cover p.docx
Cover PageComplete and copy the following to Word for your cover p.docxCover PageComplete and copy the following to Word for your cover p.docx
Cover PageComplete and copy the following to Word for your cover p.docx
 
Program 1 – CS 344This assignment asks you to write a bash.docx
Program 1 – CS 344This assignment asks you to write a bash.docxProgram 1 – CS 344This assignment asks you to write a bash.docx
Program 1 – CS 344This assignment asks you to write a bash.docx
 
New folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docx
New folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docxNew folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docx
New folderCSE2AIF 2015 Assignment 2.pdfCSE2AIF - Artifi.docx
 
HW2.pdfCSEEEE 230 Computer Organization and Assembly La.docx
HW2.pdfCSEEEE 230 Computer Organization and Assembly La.docxHW2.pdfCSEEEE 230 Computer Organization and Assembly La.docx
HW2.pdfCSEEEE 230 Computer Organization and Assembly La.docx
 
toolkit13_sec9.pdf
toolkit13_sec9.pdftoolkit13_sec9.pdf
toolkit13_sec9.pdf
 
Excel analysis assignment this is an independent assignment me
Excel analysis assignment this is an independent assignment meExcel analysis assignment this is an independent assignment me
Excel analysis assignment this is an independent assignment me
 
CIS 336 Wonderful Education--cis336.com
CIS 336 Wonderful Education--cis336.comCIS 336 Wonderful Education--cis336.com
CIS 336 Wonderful Education--cis336.com
 
Don't Repeat Yourself, and Automated Code Reviews
Don't Repeat Yourself, and Automated Code ReviewsDon't Repeat Yourself, and Automated Code Reviews
Don't Repeat Yourself, and Automated Code Reviews
 
Microsoft Office Excel
Microsoft Office ExcelMicrosoft Office Excel
Microsoft Office Excel
 
In Section 1 on the Data page, complete each column of the spreads.docx
In Section 1 on the Data page, complete each column of the spreads.docxIn Section 1 on the Data page, complete each column of the spreads.docx
In Section 1 on the Data page, complete each column of the spreads.docx
 
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdfSTAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
STAT-522 (Data Analysis Using R) by SOUMIQUE AHAMED.pdf
 
pm1
pm1pm1
pm1
 
Building data fusion surrogate models for spacecraft aerodynamic problems wit...
Building data fusion surrogate models for spacecraft aerodynamic problems wit...Building data fusion surrogate models for spacecraft aerodynamic problems wit...
Building data fusion surrogate models for spacecraft aerodynamic problems wit...
 
Unit 1.3 Introduction to Programming (Part 2)
Unit 1.3 Introduction to Programming (Part 2)Unit 1.3 Introduction to Programming (Part 2)
Unit 1.3 Introduction to Programming (Part 2)
 
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docx
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docxCase Study Analysis 2The Cholesterol.xls records cholesterol lev.docx
Case Study Analysis 2The Cholesterol.xls records cholesterol lev.docx
 
5 structured programming
5 structured programming 5 structured programming
5 structured programming
 
Students should work individually on the Mid-Term Students are enco.docx
Students should work individually on the Mid-Term Students are enco.docxStudents should work individually on the Mid-Term Students are enco.docx
Students should work individually on the Mid-Term Students are enco.docx
 
ELAVARASAN.pdf
ELAVARASAN.pdfELAVARASAN.pdf
ELAVARASAN.pdf
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook application
 
Hive(ppt)
Hive(ppt)Hive(ppt)
Hive(ppt)
 

More from Song Love

Psyc 355 lab project overview and instructions complete solutions correct ans...
Psyc 355 lab project overview and instructions complete solutions correct ans...Psyc 355 lab project overview and instructions complete solutions correct ans...
Psyc 355 lab project overview and instructions complete solutions correct ans...Song Love
 
Economics 248 assignment 2 (version a) complete solutions correct answers key
Economics 248 assignment 2 (version a) complete solutions correct answers keyEconomics 248 assignment 2 (version a) complete solutions correct answers key
Economics 248 assignment 2 (version a) complete solutions correct answers keySong Love
 
Acc330 cumulative project complete solutions correct answers key
Acc330 cumulative project complete solutions correct answers keyAcc330 cumulative project complete solutions correct answers key
Acc330 cumulative project complete solutions correct answers keySong Love
 
Itm310 problem solving #7 complete solutions correct answers key
Itm310 problem solving #7 complete solutions correct answers keyItm310 problem solving #7 complete solutions correct answers key
Itm310 problem solving #7 complete solutions correct answers keySong Love
 
Case study instructions director’s request for p cs complete solutions correc...
Case study instructions director’s request for p cs complete solutions correc...Case study instructions director’s request for p cs complete solutions correc...
Case study instructions director’s request for p cs complete solutions correc...Song Love
 
Tutorial 8 based on lectures 22 24 (tg) complete solutions correct answers key
Tutorial 8 based on lectures 22 24 (tg) complete solutions correct answers keyTutorial 8 based on lectures 22 24 (tg) complete solutions correct answers key
Tutorial 8 based on lectures 22 24 (tg) complete solutions correct answers keySong Love
 
Ece175 computer programming for engineering applications homework assignment ...
Ece175 computer programming for engineering applications homework assignment ...Ece175 computer programming for engineering applications homework assignment ...
Ece175 computer programming for engineering applications homework assignment ...Song Love
 
Liberty university busi 313 quiz 4 complete solutions correct answers slideshare
Liberty university busi 313 quiz 4 complete solutions correct answers slideshareLiberty university busi 313 quiz 4 complete solutions correct answers slideshare
Liberty university busi 313 quiz 4 complete solutions correct answers slideshareSong Love
 
Liberty university busi 313 quiz 3 complete solutions correct answers slideshare
Liberty university busi 313 quiz 3 complete solutions correct answers slideshareLiberty university busi 313 quiz 3 complete solutions correct answers slideshare
Liberty university busi 313 quiz 3 complete solutions correct answers slideshareSong Love
 
Liberty university busi 313 quiz 2 complete solutions correct answers slideshare
Liberty university busi 313 quiz 2 complete solutions correct answers slideshareLiberty university busi 313 quiz 2 complete solutions correct answers slideshare
Liberty university busi 313 quiz 2 complete solutions correct answers slideshareSong Love
 
Liberty university busi 311 quiz 8 complete solutions correct answers slideshare
Liberty university busi 311 quiz 8 complete solutions correct answers slideshareLiberty university busi 311 quiz 8 complete solutions correct answers slideshare
Liberty university busi 311 quiz 8 complete solutions correct answers slideshareSong Love
 
Liberty university busi 311 quiz 7 complete solutions correct answers slideshare
Liberty university busi 311 quiz 7 complete solutions correct answers slideshareLiberty university busi 311 quiz 7 complete solutions correct answers slideshare
Liberty university busi 311 quiz 7 complete solutions correct answers slideshareSong Love
 
Liberty university busi 311 quiz 5 complete solutions correct answers slideshare
Liberty university busi 311 quiz 5 complete solutions correct answers slideshareLiberty university busi 311 quiz 5 complete solutions correct answers slideshare
Liberty university busi 311 quiz 5 complete solutions correct answers slideshareSong Love
 
Liberty university busi 311 quiz 4 complete solutions correct answers slideshare
Liberty university busi 311 quiz 4 complete solutions correct answers slideshareLiberty university busi 311 quiz 4 complete solutions correct answers slideshare
Liberty university busi 311 quiz 4 complete solutions correct answers slideshareSong Love
 
Liberty university busi 311 quiz 3 complete solutions correct answers slideshare
Liberty university busi 311 quiz 3 complete solutions correct answers slideshareLiberty university busi 311 quiz 3 complete solutions correct answers slideshare
Liberty university busi 311 quiz 3 complete solutions correct answers slideshareSong Love
 
Psyc 355 spss homework 2 complete solutions correct answers key
Psyc 355 spss homework 2 complete solutions correct answers keyPsyc 355 spss homework 2 complete solutions correct answers key
Psyc 355 spss homework 2 complete solutions correct answers keySong Love
 
1 3 my statlab module one problem set complete solutions correct answers key
1 3 my statlab module one problem set complete solutions correct answers key1 3 my statlab module one problem set complete solutions correct answers key
1 3 my statlab module one problem set complete solutions correct answers keySong Love
 
Liberty university psyc 101 quiz 14 solutions answers slideshare
Liberty university psyc 101 quiz 14 solutions answers slideshareLiberty university psyc 101 quiz 14 solutions answers slideshare
Liberty university psyc 101 quiz 14 solutions answers slideshareSong Love
 
Liberty university psyc 101 quiz 13 solutions answers slideshare
Liberty university psyc 101 quiz 13 solutions answers slideshareLiberty university psyc 101 quiz 13 solutions answers slideshare
Liberty university psyc 101 quiz 13 solutions answers slideshareSong Love
 
Liberty university psyc 101 quiz 12 solutions answers slideshare
Liberty university psyc 101 quiz 12 solutions answers slideshareLiberty university psyc 101 quiz 12 solutions answers slideshare
Liberty university psyc 101 quiz 12 solutions answers slideshareSong Love
 

More from Song Love (20)

Psyc 355 lab project overview and instructions complete solutions correct ans...
Psyc 355 lab project overview and instructions complete solutions correct ans...Psyc 355 lab project overview and instructions complete solutions correct ans...
Psyc 355 lab project overview and instructions complete solutions correct ans...
 
Economics 248 assignment 2 (version a) complete solutions correct answers key
Economics 248 assignment 2 (version a) complete solutions correct answers keyEconomics 248 assignment 2 (version a) complete solutions correct answers key
Economics 248 assignment 2 (version a) complete solutions correct answers key
 
Acc330 cumulative project complete solutions correct answers key
Acc330 cumulative project complete solutions correct answers keyAcc330 cumulative project complete solutions correct answers key
Acc330 cumulative project complete solutions correct answers key
 
Itm310 problem solving #7 complete solutions correct answers key
Itm310 problem solving #7 complete solutions correct answers keyItm310 problem solving #7 complete solutions correct answers key
Itm310 problem solving #7 complete solutions correct answers key
 
Case study instructions director’s request for p cs complete solutions correc...
Case study instructions director’s request for p cs complete solutions correc...Case study instructions director’s request for p cs complete solutions correc...
Case study instructions director’s request for p cs complete solutions correc...
 
Tutorial 8 based on lectures 22 24 (tg) complete solutions correct answers key
Tutorial 8 based on lectures 22 24 (tg) complete solutions correct answers keyTutorial 8 based on lectures 22 24 (tg) complete solutions correct answers key
Tutorial 8 based on lectures 22 24 (tg) complete solutions correct answers key
 
Ece175 computer programming for engineering applications homework assignment ...
Ece175 computer programming for engineering applications homework assignment ...Ece175 computer programming for engineering applications homework assignment ...
Ece175 computer programming for engineering applications homework assignment ...
 
Liberty university busi 313 quiz 4 complete solutions correct answers slideshare
Liberty university busi 313 quiz 4 complete solutions correct answers slideshareLiberty university busi 313 quiz 4 complete solutions correct answers slideshare
Liberty university busi 313 quiz 4 complete solutions correct answers slideshare
 
Liberty university busi 313 quiz 3 complete solutions correct answers slideshare
Liberty university busi 313 quiz 3 complete solutions correct answers slideshareLiberty university busi 313 quiz 3 complete solutions correct answers slideshare
Liberty university busi 313 quiz 3 complete solutions correct answers slideshare
 
Liberty university busi 313 quiz 2 complete solutions correct answers slideshare
Liberty university busi 313 quiz 2 complete solutions correct answers slideshareLiberty university busi 313 quiz 2 complete solutions correct answers slideshare
Liberty university busi 313 quiz 2 complete solutions correct answers slideshare
 
Liberty university busi 311 quiz 8 complete solutions correct answers slideshare
Liberty university busi 311 quiz 8 complete solutions correct answers slideshareLiberty university busi 311 quiz 8 complete solutions correct answers slideshare
Liberty university busi 311 quiz 8 complete solutions correct answers slideshare
 
Liberty university busi 311 quiz 7 complete solutions correct answers slideshare
Liberty university busi 311 quiz 7 complete solutions correct answers slideshareLiberty university busi 311 quiz 7 complete solutions correct answers slideshare
Liberty university busi 311 quiz 7 complete solutions correct answers slideshare
 
Liberty university busi 311 quiz 5 complete solutions correct answers slideshare
Liberty university busi 311 quiz 5 complete solutions correct answers slideshareLiberty university busi 311 quiz 5 complete solutions correct answers slideshare
Liberty university busi 311 quiz 5 complete solutions correct answers slideshare
 
Liberty university busi 311 quiz 4 complete solutions correct answers slideshare
Liberty university busi 311 quiz 4 complete solutions correct answers slideshareLiberty university busi 311 quiz 4 complete solutions correct answers slideshare
Liberty university busi 311 quiz 4 complete solutions correct answers slideshare
 
Liberty university busi 311 quiz 3 complete solutions correct answers slideshare
Liberty university busi 311 quiz 3 complete solutions correct answers slideshareLiberty university busi 311 quiz 3 complete solutions correct answers slideshare
Liberty university busi 311 quiz 3 complete solutions correct answers slideshare
 
Psyc 355 spss homework 2 complete solutions correct answers key
Psyc 355 spss homework 2 complete solutions correct answers keyPsyc 355 spss homework 2 complete solutions correct answers key
Psyc 355 spss homework 2 complete solutions correct answers key
 
1 3 my statlab module one problem set complete solutions correct answers key
1 3 my statlab module one problem set complete solutions correct answers key1 3 my statlab module one problem set complete solutions correct answers key
1 3 my statlab module one problem set complete solutions correct answers key
 
Liberty university psyc 101 quiz 14 solutions answers slideshare
Liberty university psyc 101 quiz 14 solutions answers slideshareLiberty university psyc 101 quiz 14 solutions answers slideshare
Liberty university psyc 101 quiz 14 solutions answers slideshare
 
Liberty university psyc 101 quiz 13 solutions answers slideshare
Liberty university psyc 101 quiz 13 solutions answers slideshareLiberty university psyc 101 quiz 13 solutions answers slideshare
Liberty university psyc 101 quiz 13 solutions answers slideshare
 
Liberty university psyc 101 quiz 12 solutions answers slideshare
Liberty university psyc 101 quiz 12 solutions answers slideshareLiberty university psyc 101 quiz 12 solutions answers slideshare
Liberty university psyc 101 quiz 12 solutions answers slideshare
 

Recently uploaded

VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiSuhani Kapoor
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...Suhani Kapoor
 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computationsit20ad004
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998YohFuh
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Sapana Sha
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingNeil Barnes
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxFurkanTasci3
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfLars Albertsson
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Callshivangimorya083
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubaihf8803863
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdfHuman37
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPramod Kumar Srivastava
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfSocial Samosa
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSAishani27
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...Suhani Kapoor
 

Recently uploaded (20)

VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service AmravatiVIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
VIP Call Girls in Amravati Aarohi 8250192130 Independent Escort Service Amravati
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
VIP High Class Call Girls Bikaner Anushka 8250192130 Independent Escort Servi...
 
Data Warehouse , Data Cube Computation
Data Warehouse   , Data Cube ComputationData Warehouse   , Data Cube Computation
Data Warehouse , Data Cube Computation
 
RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998RA-11058_IRR-COMPRESS Do 198 series of 1998
RA-11058_IRR-COMPRESS Do 198 series of 1998
 
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
Saket, (-DELHI )+91-9654467111-(=)CHEAP Call Girls in Escorts Service Saket C...
 
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Brighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data StorytellingBrighton SEO | April 2024 | Data Storytelling
Brighton SEO | April 2024 | Data Storytelling
 
Data Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptxData Science Jobs and Salaries Analysis.pptx
Data Science Jobs and Salaries Analysis.pptx
 
Industrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdfIndustrialised data - the key to AI success.pdf
Industrialised data - the key to AI success.pdf
 
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
VIP Call Girls Service Charbagh { Lucknow Call Girls Service 9548273370 } Boo...
 
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
꧁❤ Greater Noida Call Girls Delhi ❤꧂ 9711199171 ☎️ Hard And Sexy Vip Call
 
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
꧁❤ Aerocity Call Girls Service Aerocity Delhi ❤꧂ 9999965857 ☎️ Hard And Sexy ...
 
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls DubaiDubai Call Girls Wifey O52&786472 Call Girls Dubai
Dubai Call Girls Wifey O52&786472 Call Girls Dubai
 
20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf20240419 - Measurecamp Amsterdam - SAM.pdf
20240419 - Measurecamp Amsterdam - SAM.pdf
 
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptxPKS-TGC-1084-630 - Stage 1 Proposal.pptx
PKS-TGC-1084-630 - Stage 1 Proposal.pptx
 
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdfKantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
Kantar AI Summit- Under Embargo till Wednesday, 24th April 2024, 4 PM, IST.pdf
 
Ukraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICSUkraine War presentation: KNOW THE BASICS
Ukraine War presentation: KNOW THE BASICS
 
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
VIP High Class Call Girls Jamshedpur Anushka 8250192130 Independent Escort Se...
 

Statistics 141 homework 6 complete solutions correct answers key

  • 1. Statistics 141 - Homework 6 complete solutions correct answers key Find the solution at http://www.coursemerit.com/solution-details/15143/Statistics-141---Homework-6-complete-solutions-correct-answers-key NO LATE SUBMISSIONS Write a report showing the code, results and plots for the questions below. Put a printed version in Charles Arnold's mailbox in the Statistics department o_ce,4th oor of the Mathematical Sciences Building, and send an electronic version to dtemplelang@ucdavis.edu with the subject STA141 Assignment 6. Place the following text at the top of your report and sign it on the physical version you submit: I certify that I have acknowledged any code that I used from any other person in the class, from Piazza or any Web site or book or other source. Any other work is my own. 1 UNIX Shell Tools In this part of the assignment, you will use UNIX shell tools to process data outside of R and also to get data into R. In the Data directory on the class Web site, there is a collection of CSV _les for the monthly airline delay data from July 2012 to June 2013, inclusive. This is a compressed tar _le Airline2012_13.tar.gz. Within this archive, each _le name is of the form year_Month.csv,e.g. 2013_January.csv. Download this _le and extract the _les into a single directory. Use a shell command not a point- and-click GUI (graphical user interface). We want to count the number of ights for the 5 airports OAK,SFO, SMF, LAX and JFK. The tasks are simple to state. i) Compute the number of outbound ights for each of the _ve airports OAK,SMF, LAX, SFO and JFK, and sort these counts from largest to smallest. Perform the same computations in R. Compare the total time for each approach. ii) Compute the total number of ights in and out of the _ve airports, i.e., the sume of both the inbound and outbound ights. You can do this however you want using a mix of the shell and R code. One way is to _rst obtain the lines in the _les which involve any of these _ve airports. Then obtain a count for each pair of airports, i.e., ORIGIN, DESTINATION pairs. At most, how many will there be? Then read these counts by ORIGIN, DESTINATION pairs into R and compute the total number of ights for each of the 5 airports. Use only the UNIXshell tools to do i). For ii), use the shell tools to greatly reduce the data and then _nish o_ the computations in R. Work on a small subset of the data _rst to get the code working correctly. You can check the results by doing the equivalent computations in R. Then run it on the larger data set. Make certain to try this regardless of how powerful and capable your computer is. If your computer is not capable of running on the full data set, run it for di_erent size input and show a plot of the time taken as a function of number of lines processed. Shell commands that may be useful include: sed, egrep,wc, sort, uniq, cut, man, ls, gunzip, tr, head, tail, echo, cat, xargs. You probably don't need them all. 2 Basebal, Databases and SQL In this part of the assignment, you will gain experience with databases and SQL, and of course R, data manipulation and visualization. 2.1 Data We will use data about many, many aspects of baseball. This data has been compiled by Sean Leahman and he has kindly made them available for use by many. Je_ Knecht has made the data, up to 2011, available as an SQLite database. It is available via cloning a git repository (https://github.com/jknecht/lahmann-2013.sqlite) You can also retrieve from the class Web site at http://eeyore.ucdavis.edu/stat141/Data/lahman2013.sqlite. As we saw in class, there are 24 tables in this database. Each table has columns and rows. Documentation for each of the tables is available at http://seanlahman.com/files/database/readme2013.txt. 2.2 Software
  • 2. You will need to install the RSQLite package,typically using install.packages(). 2.3 Questions You can answer these questions with a combination of SQL commands and R manipulation of the results, if necessary. Give the answer and show the SQL and R code used to answer each question. 1. What years does the data cover? are there data for each of these years? 2. How many (unique) people are included in the database? How many are players, managers, etc? 3. What team won the World Series in 2000? 4. What team lost the World Series each year? 5. Do you see a relationship between the number of games won in a season and winning the World Series? 6. In 2003, what were the three highest salaries? (We refer here to unique salaries, i.e., more than one player might be paid one of these salaries.) 7. For 1999, compute the total payroll of each of the di_erent teams. Next compute the team payrolls for all years in the database for which we have salary information. Display these in a plot. 8. Study the change in salary over time. Have salaries kept up with ination, fallen behind, or grown faster? 9. Compare payrolls for the teams that are in the same leagues, and then in the same divisions. Are there any interesting characteristics? Have certain teams always had top payrolls over the years? Is there a connection between payroll and performance? 10. Has the distribution of home runs for players increased over the years? When answering the questions, try to summarize the results in convenient and informative form (e.g. tables and/or plots) that illustrate the key features. 2.4 Bonus Questions Students who are looking for bonus points (e.g., to makeup for other assignments) can compose additional questions and answer these. Make certain to explicitly state each question, indicate why it is interesting, and answer it using the data,providing conclusions, evidence and the code used to answer the question.