Question: Please help with the following. It is ok to solve using Python. PROBLEM 6. Five friends try a new health club to try to lose
Please help with the following. It is ok to solve using Python.
PROBLEM 6. Five friends try a new health club to try to lose weight. They record how many pounds each lost and the number of weeks it took. Assume there is a linear relationship between the pounds lost and the number of weeks. What is the slope of the regression line? What is its y-intercept? Generate a scatter graph of the data and the regression line.
| Friend #: | 1 | 2 | 3 | 4 | 5 |
|---|---|---|---|---|---|
| Weeks: | 3 | 2 | 1 | 4 | 5 |
| Pounds: | 6 | 5 | 4 | 9 | 11 |
PROBLEM 7. Use the data from Problem 6. Calculate and print:
- the variation in the pounds lost that cannot be explained by the weeks on the diet
- the total variation in the pounds lost
- the percentage of variation that is explained by the weeks on the diet
- the correlation coefficient
PROBLEM 8. The table below shows annual snowfall. Generate a time series graph and plot the linear trend.
| Year | Snowfall |
|---|---|
| 1993 | 9.9 |
| 1994 | 22.2 |
| 1995 | 11.4 |
| 1996 | 14.8 |
| 1997 | 19.7 |
| 1998 | 14.9 |
| 1999 | 15.9 |
| 2000 | 13.4 |
| 2001 | 12.0 |
| 2002 | 7.9 |
| 2003 | 12.9 |
| 2004 | 16.8 |
| 2005 | 11.6 |
| 2006 | 14.9 |
| 2007 | 13.3 |
| 2008 | 20.2 |
| 2009 | 14.3 |
| 2010 | 20.4 |
| 2011 | 13.0 |
| 2012 | 10.0 |
| 2013 | 15.9 |
| 2014 | 17.4 |
| 2015 | 18.7 |
| 2016 | 14.3 |
| 2017 | 16.2 |
| 2018 | 21.1 |
PROBLEM 9. Using the table from Problem 8, plot the 3- and 5-year moving averages.
PROBLEM 10. Using the table from Problem 8, exponentially smooth the data using alpha values 0.3 and 0.1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
