Regression Analysis
Definitions:
Regression Analysis: Used to find the relationship between two variables, and also to investigate the causation.
Coefficient of Determination (r2): shows how much X explains Y/ ranges from 0(no strength) to 1(very strong)
Coefficient of Determination (r2): shows how much X explains Y/ ranges from 0(no strength) to 1(very strong)
Regression Equation:
- a= the constant: the point where the best fit line crosses the Y axis or when x=0
- b= the slope of the line or the Regression Coefficient: shows how responsive the dependent variable is to change in the independent variable.
- Y= dependent variable
- X= independent variable
Ordinary Least Squares (OLS): Fighting a straight line through a set of points in such a way that the sum of the squared vertical distances from the observed points to the fitted line is minimized.
Dependent: What is explains by the independent variable always found on the Y axis.
Independent: What explains the dependent variable always found on the X axis.
Part I:
Introduction: There was a claim by Town X's local news that as the number of kids that receive free lunches increases so does crime. This claim was based on data from a study the town conducted on crime rates and poverty per 100,000 people. This claim seems to put a far stretch for the data given. Running a regression equation would be a good way to either falsify or approve this claim by the local news. SPSS is a good medium to run the regression equation of if 30% of a new area of town gets free lunch what would the corresponding crime rate be. As well as to find out how confident the results are from this question.
Methodology: To complete this task you would run a regression analysis in SPSS. First realize that crime rate is the dependent variable while kids with free lunches is the independent variable. Then you would find your regression equation from the analysis finding the constant and the slope, and then plug in the 30% for the X value to find the Y value of the corresponding crime rate.
Results: The results show a R squared of .173 which means that there very little strength showing that the independent variable (free lunches) explains the dependent variable (crime rate). Also from the results we see that the constant is 21.819 and the slope is a positive 1.685.


Conclusions: We can conclude by these results that the claim by the news station was incorrect. The coefficient of determination is .173 on a 0 to 1 scale of strength meaning that it is weak. Other factors to take into account is that the significance level is .005 meaning that the two are correlated, but you can not tell causation from this. In terms of the new are with 30% free lunch the corresponding crime rate would be 72.5%, but I am not very confident in the results because of how weak the coefficient of determination value was.
Part II:
Introduction: Being provided with 911 calls for Portland, OR , a company is curious as to what factors provide explanations about response times to these calls. With this information they are looking to build a new ER and would like to know how large to build it along with where the best location for it might be. The size of the ER is a question that is unanswerable with the data given, but the question that will be answered through this section is the best location to build this new ER.
The other data given was:
The other data given was:
- Number of 911 calls per census tract
- Jobs
- Renters
- Low education: Number of people with no High School Degree
- Alcohol sales
- Unemployed
- Foreign Born population
- Medium Income
- Number of College graduates
Choosing three of many data given analyze those three using a Regression Analysis to figure out the relationships.
Methods: I ran each independent variable through SPSS using the Regression Analysis where the dependent variable is the Calls data. Shown in Figure 1 is what is run in SPSS for each three with the independent variable being the one changed out.
![]() |
| Figure 1: Linear Regression Analysis Sample |
After going through all the Regression Analyzes then I found the variable with the highest R-squared value. Then I made a Choropleth Map of just the 911 calls along with a Residual Map of the the highest R-squared value which was for the variable of Renters. To make the Residual Map you go into the Spatial Statistics Tools and make it in Ordinary Least Squares.
Results:
-This was the Independent Variable with the highest Coefficient of Determination which was .616 as the r squared. The hypothesis for this would be:
![]() |
| Figure 2: Low Education Regression Analysis |
![]() |
| Figure 3: Renters Regression Analysis |
Null Hypothesis= There is no linear relationship between 911 Calls and Renters
Alternative Hypothesis= There is a linear relationship between 911 Calls and Renters
-This would reject the null hypothesis because of the significance being .000 meaning there is a linear relationship between the two. This is also true for the other two independent variables I chose, so they all had linear relationships with 911 Calls, but Renters just had a higher Coefficient of Determination.
![]() |
| Figure 4: Unemployment Regression Analysis |
![]() |
| Figure 5: Choropleth Map of 911 Calls |
![]() |
| Figure 6: Standard Deviation for Choropleth Map |
![]() |
| Figure 7: Standard Residuals Map of Renters |
The reddish to orange color is areas that above the trend-line meaning they are higher than the average for Renters. This correlates with Figure 5 where the blue colors are on that map of higher average 911 calls these two have a higher relationship in that area.
Conclusions: For the first question of what factors provide response times to 911 calls. My answer to that in terms of my independent variable would be that the number of response calls is highly correlated with the Renters in the area. The places of highest 911 calls is where the higher averages are for renters seen in Figure 7. For the second question about where the best location is for the ER I chose the spot represented by the circle on Figure 7. It was in between the two areas of the highest points from away from the trend-line like I discussed in the results section about the Standard Residuals Map along with it being centered among most of the reddish/peach areas. The ER should be fairly big in size compared to if it was located else where in Portland, but like stated in the Introduction there is no way to actually answer the size question.








No comments:
Post a Comment