In all problems on this page and the next, we are going to run a linear regression model on a portion of a dataset from www.kaggle.com. This dataset contains information on the number of crimes that occurred in particular years in several US cities and the non seasonal housing price indices in those cities. Load the data set House_Prices_and_Crime_1.csv which contains the following variables: • Year: The year in question • index_ nsa: The non seasonal housing price index which is our dependent variable • City, State: The location • Homicides: The number of homicides per 1000 people • Robberies: The number of robberies per 1000 people • Assaults: The number of assaults per 1000 people Housing Price Index and Crime 2.0 points possible (graded, results hidden) Compute the following quantities from the data using R. • Sample mean of Homicides: (Enter an answer correct to at least 3 decimal places.) • 75th percentile of Homicides: (Enter an answer correct to at least 3 decimal places.) • Sample standard deviation of Homicides: (Enter an answer correct to at least 3 decimal places. Both the biased or unbiased sample standard deviation will be accepted.)
Added by Erica R.
Close
Step 1
csv into R. We can do this using the read.csv() function. ```R data <- read.csv("House_Prices_and_Crime_1.csv") ``` Show more…
Show all steps
Your feedback will help us improve your experience
Dominador Tan and 84 other Intro Stats / AP Statistics educators are ready to help you.
Ask a new question
Labs
Want to see this concept in action?
Explore this concept interactively to see how it behaves as you change inputs.
Key Concepts
Recommended Videos
The following data represent property crime rate against individuals (crimes per 1000 households) and their household income (in dollars) in the United States in 2009 . $$ \begin{array}{|cc|} \hline \begin{array}{l} \text { Income } \\ \text { Level } \end{array} & \begin{array}{c} \text { Property } \\ \text { Crime Rate } \end{array} \\ \hline 5000 & 201.1 \\ 11,250 & 157.0 \\ 20,000 & 141.6 \\ 30,000 & 134.1 \\ 42,500 & 139.7 \\ 62,500 & 120.0 \\ \hline \end{array} $$ (a) Using a graphing utility, draw a scatter diagram of the data using income, $x$, as the independent variable and crime rate, $y,$ as the dependent variable. (b) Based on the scatter diagram drawn in part (a), decide on a model (linear, quadratic, cubic, exponential, logarithmic, or logistic) that you think best describes the relation between income and crime rate. Be sure to justify your choice of model. (c) Using a graphing utility, find the model of best fit. (d) Using a graphing utility, draw the model of best fit on the scatter diagram you drew in part (a). (e) Use your model to predict the crime rate of a household whose income is $\$ 55,000$.
Jerelyn N.
Linear Regression Application, Interpolation and Extrapolation Use the data and story to answer the following questions The table below shows the number of state-registered automatic weapons and the murder rate for several Northwestern states. x | 11.3 | 8.2 | 6.7 | 3.4 | 2.8 | 2.8 | 2.6 | 0.7 y | 13.9 | 11.3 | 9.7 | 7 | 6.3 | 6.7 | 6.2 | 4.4 x = thousands of automatic weapons y = murders per 100,000 residents Use your calculator to determine the equation of the regression line. (Round to 2 decimal places) Determine the regression equation in y = ax + b form and write it below. A) How many murders per 100,000 residents would you predict in a state with 1.7 thousand automatic weapons? Answer = Round to 3 decimal places. B) How many murders per 100,000 residents would you predict in a state with 12 thousand automatic weapons? Answer = Round to 3 decimal places. C) Which of the predictions above is an example of extrapolation? A B
A regression model to predict Y, the state-by-state burglary crime rate per 100,000 people, used the following four state predictors: X1 = median age, X2 = number of bankruptcies per 1,000 people, X3 = federal expenditures per capita, and X4 = high school graduation percentage. Predictor Coefficient Intercept 4,743.8633 AgeMed -25.373 Bankrupt 15.634 FedSpend -0.0342 HSGrad% -27.0640 (a) Write the fitted regression equation. (Round your answers to 4 decimal places. Negative values should be indicated by a minus sign.) y = [ ] + [ ] AgeMed + [ ] Bankrupt + [ ] FedSpend + [ ] HSGrad% (b-1) The state-by-state crime rate per 100,000 - increases by about 25 as the state median age increases. - decreases by about 25 as the state median age increases. (b-2) The state-by-state crime rate per 100,000 - increases by about 15 for every 1,000 new bankruptcies filed. - decreases by about 15 for every 1,000 new bankruptcies filed. (b-3) The state-by-state crime rate per 100,000 - decreases by 0.0342 for each dollar increase in federal funding per person. - increases by 0.0342 for each dollar increase in federal funding per person. (b-4) The state-by-state crime rate per 100,000 - decreases by about 27 for each 1% increase in high school graduations. - increases by about 27 for each 1% increase in high school graduations. (c) Would the intercept seem to have meaning in this regression? - Yes - No (d) Make a prediction for Burglary when X1 = 37 years, X2 = 6.7 bankruptcies per 1,000, X3 = $7,863, and X4 = 72 percent. (Round your answers to 4 decimal places.) Burglary Rate [ ]
Adi S.
Recommended Textbooks
Elementary Statistics a Step by Step Approach
The Practice of Statistics for AP
Introductory Statistics
Transcript
Watch the video solution with this free unlock.
EMAIL
PASSWORD