SlideShare a Scribd company logo
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
 
'Spreadsheet'
'Spreadsheet''Spreadsheet'
'Spreadsheet'
Rashmi Gowda
 
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
IMGS
 
3 inner plumbing Excel tips
3 inner plumbing Excel tips3 inner plumbing Excel tips
3 inner plumbing Excel tips
Martin van Wunnik
 
Creation of spreadsheets
Creation of spreadsheetsCreation of spreadsheets
Creation of spreadsheets
NITISH SADOTRA
 
Ds important questions
Ds important questionsDs important questions
Ds important questions
LavanyaJ28
 
2 marks- DS using python
2 marks- DS using python2 marks- DS using python
2 marks- DS using python
LavanyaJ28
 
Informatica faq's
Informatica faq'sInformatica faq's
Informatica faq's
Rajasekhar Cherukuri
 
Unit 1 linked list
Unit 1 linked listUnit 1 linked list
Unit 1 linked list
LavanyaJ28
 
Introduction to spreadsheets
Introduction to spreadsheetsIntroduction to spreadsheets
Introduction to spreadsheets
Tracy 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 API
ukcorr
 
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
 
Spreadsheet
SpreadsheetSpreadsheet
Spreadsheet
Harish Nayak
 
Introduction to spreadsheets
Introduction to spreadsheetsIntroduction to spreadsheets
Introduction to spreadsheets
Casey Robertson
 
Spreadsheet Purposes
Spreadsheet PurposesSpreadsheet Purposes
Spreadsheet Purposes
mike2018
 
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.docx
faithxdunce63732
 
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
wkyra78
 
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
henrymartin15260
 
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
adampcarr67227
 
toolkit13_sec9.pdf
toolkit13_sec9.pdftoolkit13_sec9.pdf
toolkit13_sec9.pdf
Afrim 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 me
joney4
 
CIS 336 Wonderful Education--cis336.com
CIS 336 Wonderful Education--cis336.comCIS 336 Wonderful Education--cis336.com
CIS 336 Wonderful Education--cis336.com
Jaseetha16
 
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
Gramener
 
Microsoft Office Excel
Microsoft Office ExcelMicrosoft Office Excel
Microsoft Office Excel
hyzhashorsh
 
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
sleeperharwell
 
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
SOUMIQUE 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.docx
wendolynhalbert
 
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.docx
orlandov3
 
A c program of Phonebook application
A c program of Phonebook applicationA c program of Phonebook application
A c program of Phonebook application
svrohith 9
 
Hive(ppt)
Hive(ppt)Hive(ppt)
Hive(ppt)
Abhinav Tyagi
 

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 key
Song 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 key
Song 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 key
Song 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 key
Song 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 slideshare
Song 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 slideshare
Song 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 slideshare
Song 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 slideshare
Song 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 slideshare
Song 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 slideshare
Song 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 slideshare
Song 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 slideshare
Song 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 key
Song 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 key
Song 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 slideshare
Song 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 slideshare
Song 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 slideshare
Song 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

Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
Criminal IP
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
ahzuo
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
NABLAS株式会社
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
enxupq
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
axoqas
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
ocavb
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
slg6lamcq
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
nscud
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
ewymefz
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Boston Institute of Analytics
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
Subhajit Sahu
 

Recently uploaded (20)

Criminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdfCriminal IP - Threat Hunting Webinar.pdf
Criminal IP - Threat Hunting Webinar.pdf
 
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
一比一原版(UIUC毕业证)伊利诺伊大学|厄巴纳-香槟分校毕业证如何办理
 
Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单一比一原版(YU毕业证)约克大学毕业证成绩单
一比一原版(YU毕业证)约克大学毕业证成绩单
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
哪里卖(usq毕业证书)南昆士兰大学毕业证研究生文凭证书托福证书原版一模一样
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单一比一原版(TWU毕业证)西三一大学毕业证成绩单
一比一原版(TWU毕业证)西三一大学毕业证成绩单
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
一比一原版(Adelaide毕业证书)阿德莱德大学毕业证如何办理
 
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
一比一原版(CBU毕业证)不列颠海角大学毕业证成绩单
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
一比一原版(UPenn毕业证)宾夕法尼亚大学毕业证成绩单
 
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project PresentationPredicting Product Ad Campaign Performance: A Data Analysis Project Presentation
Predicting Product Ad Campaign Performance: A Data Analysis Project Presentation
 
Adjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTESAdjusting primitives for graph : SHORT REPORT / NOTES
Adjusting primitives for graph : SHORT REPORT / NOTES
 

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.