Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

Statistics 2120: Introduction to Statistical Analysis

Homework 2

Instructions:

Be sure to provide your full name and computing ID at the top of your work.

Write out the Honor Pledge under your name and computing ID:  “On my honor, I did not give nor receive aid on this assignment beyond the listed collaboration.”

List the names of students with whom you collaborated under the Honor Pledge.   If you  did not collaborate, write ‘None’ .

Respond to each problem below thoroughly, showing all relevant work.

Use Python for all calculations. Include a screen shot showing relevant code and output for each part using Python.

Save your completed work as a PDF and upload it to Gradescope.  Be sure to select the appropriate page(s) for each answer. Unselected work will not be graded.

Problems:

1.  Download (but do not open) the le fastfood.csv, which contains information about fast food availability and obesity for each of the 50 states in the United States.  These data will be used to explore the relationship between the number of fast food restaurants  (per  capita)  and the rate of obesity  (in percentage) for each state.

1. Without looking at the data, do you think that the number of fast food restaurants (per capita) and the rate of obesity have a positive or negative correlation? Explain.

2. Which variable is the response variable and which variable is the explanatory variable?

3.  Create a scatterplot for the number of fast food restaurants (per capita) and the rate of obesity. Describe the form, direction, and strength of the relationship.

4.  Determine the correlation between the number of fast food restaurants (per capita) and the rate

of obesity. Is the correlation an appropriate numerical summary to use in this case? Explain.

5.  Locate the data point for Mississippi on the scatterplot.  Based only on the scatterplot, is Mis- sissippi outlying in terms of

a. the relationship between the two variables?

b. the variable measuring the number of restaurants per capita?

c. the variable measuring the obesity rate?

6.  Determine the least-squares regression equation using these data.

7. Interpret the values for the slope and intercept in context.  Discuss whether the interpretation for the intercept is practical.

8. Virginia has 4.3 fast food restaurants per capita. Use the least-squares regression equation deter-mined in part 6. to find the predicted rate of obesity for Virginia.

9.  Determine the residual for Virginia.

10.  Determine the value of the coefficient of determination, r2 , for the regression line from part 6. Interpret this value.

2. Data on the number of work days missed and the annual salary increase for a company’s employees show that, in general, employees who missed more days of work during the year received smaller raises than those who missed fewer days. A detailed analysis shows that the number of days missed explains 60% of the variation in salary increases. What is the correlation between the number of days missed and salary increase?

3. In Professor Smith’s statistics course, the correlation between students’total scores before the final exam and their final exam scores is T = 0.68. The pre-exam course totals for all students in the course have a mean of 260 and a standard deviation of 33. The final exam scores have a mean of 70 and a standard deviation of 6. Jane’s final exam is missing and Professor Smith decides to predict her final exam score based on her pre-exam course total, which is 279.

1. Use least-squares regression to predict Jane’s final exam score.

2. If Jane felt that she earned a higher score on her final exam that she had on the midterm exams, would Professor Smith’s decision positively or negatively a↵ect her final course grade?

4. Authors of an article in the Interdisciplinary Journal of E-Learning and Learning Objects (IJELLO) conducted a study on procrastination among students of di↵erent college academic levels.  For the study, a group of 1,544 students was given an online assignment at the beginning of the week and were told to submit it by Sunday at midnight. The following table provides a summary of the academic levels and the day that the assignment was submitted by the students.

1. Recreate the table and fill in the marginal totals.

2. Find the marginal distribution for the variable measuring the day that the assignment was sub- mitted. Show the distribution in percentages rounded to one decimal point.

3. Find the marginal distribution for the variable measuring the academic level. Show the distribu- tion in percentages rounded to one decimal point.

4. For each academic level, find the conditional distribution of the day that the students submitted the assignment. Show the distribution in percentages rounded to one decimal point.

5. A quote from the IJELLO article states: “We found that, percentage-wise, a significant number of students procrastinated, specifically sophomores.”Based on the previous parts, do you think that there is a relationship between academic level and whether students procrastinate (classify students who submit the assignment on Sunday as procrastinators)? Explain.

HW2

Jessica Xiong (pqf6rd)

‘On my honor, I did not give nor receive aid on this assignment beyond listed collaboration.’

Problem 1

1. Without looking at the data, I predict that the number of fast food restaurants and the rate of obesity have a positive correlation. As the number of fast food restaurants increases, the rate of obesity also increases.

2. The rate of obesity is the response variable and the number of fast food restaurant is the explanatory variable.

3. This scatterplot has a slightly strong positive linear relationship.

4. The correlation between the number of fast food restaurants and the rate of obesity is 0.5176. This correlation is an appropriate numerical summary to use in this case as it is a positive value. Therefore it indicated that the two variables are positively associated.

5.  I circled the data point for Mississippi (2.1, 37.3) in the scatterplot below.

a) It is outlying in terms of the relationship between the 2 variables as it has a very high y value but also a very low x value, which falls outside of the general pattern of relationship between 2 variables.

b) It is not an outlier in terms of the variable measuring the number of restaurant. c) It is not an outlier in terms of the variable measuring the obesity rate.

6. The regression equation is y = 22.4026 + 1.8995x

7.

Slope = 1.8995, Intercept = 22.4026

The slope, 1.8995, is the amount of change in the predicted response, y, when the explanatory variable (number of fast food restaurants) increases by one unit.

The intercept, 22.4026, is the predicted response, when the explanatory variable (number of fast food restaurant) is 0. It is not practical as there would rarely be 0 fast food restaurant in this society.

8. By inserting 4.3 as the x value into the regression equation, we can predict that rate of obesity is 30.5705%.

9. The residual for Virginia is - 1.5704.

10. The value of coefficient of determination is 0.268.

Problem 2

The correlation between the number of days missed and salary increase is 0.7746


Problem 3

1. The regression equation is y = 37.864 + 0.1236x in this case. Therefore, by inserting the

predicted value of pre-exam 279 into the equation, we can get the predicted final exam score to be  72.3484.

2. Professor Smith's decision would positively affect Jane's final course grade. This is because the predicted final exam score is considerably higher than the mean final exam score of 70,    indicating that Jane might have performed as well as she hoped on the final exam.

Problem 4

1.

2. The marginal distribution for the variable measuring the day that the assignment was sub- mitted is: Monday to Sat = 0.4, Sunday = 0.6.

3. The marginal distribution for the variable measuring the academic level is: sophomore = 0.3, junior = 0.6, senior = 0.1.

4. The conditional distribution of the day that the students submitted the assignment are:

Work submitted on Monday to Saturday by sophomores : 0.3

Work submitted on Sunday by sophomores: 0.7

Work submitted on Monday to Saturday by juniors: 0.4

Work submitted on Sunday by juniors: 0.6

Work submitted on Monday to Saturday by seniors: 0.4

Work submitted on Sunday by seniors: 0.6

5. There is no relationship between academic level and whether students procrastinate. Because when academic level rises, there is no observed rise in the number of procrastinators on Sunday.