Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Business Economics Expert

Question:

This is sports data analysis class. please help me out with this assignment.

Background

Bill James created a career projection system he called his "favorite toy," presumably because he liked projecting the career totals of major league baseball players. As usually described, the formula predicts the likelihood of the player achieving a particular goal, such as 500 home runs or 3000 hits.

Procedure

Write a program (or a Jupyter/Python notebook) to predict the career totals for major league baseball players.

The favorite toy formula is described at http://www.baseball-reference.com/bullpen/Favorite_toy. The user will enter the name or Lahman id of the player*, the year on which to base the projection, the statistic being projected (you may restrict your program to projecting home runs, hits, and rbi; for additional credit (up to 3 points/10), you may extend your program to the pitching statistics wins, complete games, and strikeouts), and the goal. Your program will calculate other necessary factors - the number needed to reach the goal, the number of seasons remaining for the player, established level, and projected remaining total. Output will be the estimated probability of reaching the goal. You should consider the first caveat listed on the baseball-reference.com description (a player can't have a likelihood greater than .97 * the estimated number of seasons it will take him) but do not worry about whether the player is a "below average offensive player." You may assume the user will enter a base year that gives the player at least three seasons of past data; recover gracefully if the user enters an invalid player (a name or id that does not appear in the data).

You need not develop a sophisticated user interface - you may use simple input statements; if you do that, expect the Lahman abbreviations for statistics (HR for home runs, H for hits, etc). The base year and goal will be integers, and the player name or id will be a string (but don't expect the user to put quotes around it).

Be sure your code is commented well to help me understand your implementation.

Deliverables

Put your program in your upload folder within 5 minutes after class time on the due date.

* You may choose whether to take the name or id but make it clear in the user interface which is expected. If you use name, the name should be the first and last name as recorded in the Lahman master file (Master.csv). You may resolve duplicate names as you see fit but, if only one player with a given name is playing during the base year, use that player.

Business Economics, Economics

  • Category:- Business Economics
  • Reference No.:- M92261567
  • Price:- $30

Priced at Now at $30, Verified Solution

Have any Question?


Related Questions in Business Economics

You have an opportunity to buy a bond with a face value of

You have an opportunity to buy a bond with a face value of $10,000 and coupon rate of 14%, payable semi-annually. NOTE: Interest per 6-month period is 7% of Face Value (i.e. $10,000x0.07 = $700 per 6-month period). (i) I ...

1 a certain compact disc player randomly plays each of 10

1. A certain compact disc player randomly plays each of 10 songs on a CD. Once a song is played, it is not repeated until all the songs on the CD have been played. In how many different ways can the CD player play the 10 ...

A magazine provided results from a poll A magazine provided results from a poll

A magazine provided results from a poll of 1500 adults who were asked to identify their favorite pie. Among the 1500 ?respondents, 14?% chose chocolate? pie, and the margin of error was given as plus or minus ±3 percenta ...

Last years budget for the legislative branch of a certain

Last years budget for the legislative branch of a certain government was 4938 million, and this year was 5320 million. Consider last year budget of 4938 million to be the reference value. 1. What will the absolute change ...

Explain a situation using the supply and demand for skilled

Explain a situation using the supply and demand for skilled labor in which the increased number of college graduates leads to depressed wages. Given the rising cost of going to college, explain why a college education wi ...

How does the learning environment effect the success of

How does the learning environment effect the success of students? Provide examples.

In 1975 the price of gasoline per gallon was 563 cents with

In 1975 the price of gasoline per gallon was 56.3 cents. With the 1975 price as a reference value, the gasoline price index for 1998 is 198.7. What would the cost of a gallon of gasoline be in 1998.

A single card is randomly drawn from one standard 52-card

A single card is randomly drawn from one standard 52-card deck of playing cards, and events C and D are as follows: C=the card drawn is a king; D-the card drawn is a heart. Find the probability of event C or event D occu ...

Question 1find the area between -88 standard deviations

Question 1 Find the area between .-88 standard deviations below the mean and 2.35 standard deviations above the mean. '88=.3106 and 2.3=.4906 Both figures are added .3106+.4906= .8012 which is 80.12% Question 2 The area ...

How might profit maximization lead to higher demand for

How might profit maximization lead to higher demand for female workers and result in female workers earning higher wages than male workers in the same firm?

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As