xuebaunion@vip.163.com
3551 Trousdale Rkwy, University Park, Los Angeles, CA
留学生论文指导和课程辅导
无忧GPA:https://www.essaygpa.com
工作时间:全年无休-早上8点到凌晨3点

微信客服:xiaoxionga100

微信客服:ITCS521
APSTA-GE 2003 Homework 1 Due: 09-27-2021. Total Points: 100. Instructions. Your submission should be a zip file called hw1_[firstname]_[lastname].zip (e.g., hw1_ravi_shroff.zip). You may discuss this assignment with your professor, course assistant, and classmates, but you must turn in your own work. In particular, you may not directly copy anyone else’s code; that would constitute plagiarism. In what follows, “RAOS” refers to the course textbook, “Regression and Other Stories.” The unzipped folder should contain only the following files (in particular, do not submit any data files): 1. analysis.R 2. written_responses.pdf Written Responses. Submit a pdf file containing your written responses called written_responses.pdf. Include your full name, and indicate the question number for each written answer. By default, you should provide a brief explanation for any written response even if none is explicitly asked for. Code. Please comment your code clearly and extensively and make sure it runs without error. If we can’t understand what you’re doing, we won’t be able to grade that part of your assignment. If you are including the answer to multiple questions in the same R script, indicate the question number that each chunk of code corresponds to. Grading. Submit your zipped assignment folder on Brightspace. Assignments submitted after the beginning of class (5:00pm) on the due date are considered late. Please see the syllabus for the late policy. You will be graded on the following: how accurately you followed instructions; correctness, completeness, and clarity of your code and written answers; creativity (when applicable); and quality of visualizations (when applicable). Question 1: RAOS 1.2 [14 points] Sketching a regression model and data: The figure above shows data corresponding to the fitted line y = 46.3 + 3.0x with residual standard deviation 3.9, and values of x ranging roughly from 0 to 4. 1 (a) Sketch hypothetical data with the same range of x but corresponding to the line y = 30 + 10x with residual standard deviation 3.9. (b) Sketch hypothetical data with the same range of x but corresponding to the line y = 30 + 10x with residual standard deviation 10. Your sketches in parts (a) and (b) should be done by hand. Include a high-resolution scan or photo of your sketches in written_responses.pdf. Question 2: RAOS 1.5 [16 points] Goals of regression: Give examples of applied statistics problems of interest to you in which the goals are: (a) Forecasting/classification. (b) Exploring associations. (c) Extrapolation. (d) Causal inference. Explain your answers (write at least 1-2 sentences for each of parts (a)-(d)). Question 3: RAOS 3.1 [5 points] Weighted averages I : A survey is conducted in a certain city regarding support for increased property taxes to fund schools. In this survey, higher taxes are supported by 50% of respondents aged 18-29, 60% of respondents aged 30-44, 40% of respondents aged 45-64, and 30% of respondents aged 65 and up. Assume there is no nonresponse. Suppose the sample includes 200 respondents aged 18-29, 250 aged 30-44, 300 aged 45-64, and 250 aged 65+. Use the weighted average formula to compute the proportion of respondents in the sample who support higher taxes. Question 4: RAOS 3.2 [10 points] Weighted averages II : Continuing the previous exercise, suppose you would like to estimate the proportion of all adults in the population who support higher taxes, so you take a weighted average (as in Section 3.1 of your textbook). Give a set of weights for the four age categories so that the estimated proportion who support higher taxes for all adults in the city is 40%. Question 5: RAOS 3.5 [10 points] Probability distributions: Using a bar plot in R, graph the binomial distribution with n = 20 and p = 0.3. Include your code in analysis.R. Question 6: RAOS 3.6 [15 points] Linear transformations: A test is graded from 0 to 50, with an average score of 35 and a standard deviation of 10. For comparison to other tests, it would be convenient to rescale to a mean of 100 and standard deviation of 15. (a) Labeling the original test scores as x and the desired rescaled test score as y, come up with a linear transformation, that is, values of a and b so that the rescaled scores y = a+ bx have a mean of 100 and a standard deviation of 15. 2 (b) What is the range of possible values of this rescaled score y? (c) Plot the line showing y vs. x. Question 7: RAOS 3.8 [10 points] Correlated random variables: Suppose that the heights of husbands and wives have a correlation of 0.3, husbands’ heights have a distribution with mean 69.1 and standard deviation 2.9 inches, and wives’ heights have mean 63.7 and standard deviation 2.7 inches. Let x and y be the heights of a married couple chosen at random. What are the mean and standard deviation of the average height, (x+ y)/2? Question 8 [20 points] Using the attached data on smallmouth bass (bass_data.csv), compute the means and the variances for the lengths of each of the eight subpopulations in the smallmouth bass data (i.e., the subpopulation of bass that are one year old, the subpopulation that are two years old, etc). Make a plot of the standard deviations versus age and include it in written_responses.pdf along with a brief explanation of what you see in the plot. Include your code in analysis.R. 3