Part 1
Introduction: The goal of this assignment is to understand how to use regression to determine correlations between two variables. The regression statistic is similar to the correlation statistic; however, it utilizes Ordinary Least Square (OLS) to compute a line of best fit for the given data. OLS is a process where a line on a scatterplot is computed so total amount of distances from points on a trend line is minimized, giving the scatterplot the line of best fit.
In understanding regression analysis, there is generally a dependent and a independent variable. The dependent variable is based off of the independent variable--not the other way around. So for example: in analyzing rainfall, lets say there are two variables: the amount of rainfall, and distance from from the equator. In determining which variables are the dependent and independent variable, the amount of rainfall would be based off of distance from the equator, so distance from the equator would be the independent variable and amount of rainfall would be the dependent variable (it wouldn't make sense the other way around. Could distance from the equator be determined by rainfall? Probably not).
In computing the OLS, the result produces a "line of best fit" equation, or a linear equation. The linear equation is y = a + bx, where "a" is the constant (where the line crosses the y-axis), and b is the regression coefficient (the slope of the line). The slope determines how the dependent variable is impacted by the independent variable. The relationship can be either positive (when independent variable increases, dependent variable increases) or negative (when independent variable increases, dependent variable decreases).
In utilizing regression, strength also needs to be assessed. Strength is determined by a statistic called the coefficient of determination. The coefficient of determination is determined by r^2 (r is a statistic computed during regression analysis, in which one needs to square it to obtain the coefficient of determination). The coefficient of determination is between 0-1; numbers closer to 1 meaning a stronger relationship between the two variables, numbers closer to 0 meaning a weaker one.
In computing regression statistics, there is also a statistic called the residual. The residual determines the distance between the actual point on the scatterplot, and the line of best fit. The residual computes the distance for each point, and the sum of the standard deviation for each residual is called the standard error of the estimate. In analyzing the standard error of the estimate, the smaller the number, the more accurate the prediction.
For the first problem, we were given an excel sheet that displayed percent of kids that get free lunch in certain areas, and the crime rate per 100,000 people. The research question for the given data, is does the crime rate increase as the number of kids who obtain free lunch increase.
Methods: In determining whether or not the crime rate increases as the number of kids who obtain free lunch increases, the program SPSS was utilized to run a linear regression analysis. In this case, the crime rate is the dependent variable while the number of kids that get free lunch is the independent variable (because in theory, the crime rate is based off of the "free lunch" rate).
Results: The results for the linear regression model are found in Figure 1 and Figure 2.
![]() |
| Figure 1: Regression Analysis Equation of the Model |
![]() |
| Figure 2: R-Square model of the Regression Analysis |
In analyzing Figure 1 figures, the equation for the regression analysis is y = 21.819 + 1.685x. 21.819 is the constant, meaning that is where the equation crosses the y-axis, and 1.685 is the regression coefficient. The equation is a positive equation, meaning when the number of kids who obtain free lunch increases, the crime rate tends to increase. Also, the equation is significant at .005, meaning that the equation is significant at the 99% level and that there is a linear relationship between the number of kids who obtain free lunch, and the crime rate.
In analyzing Figure 2, the r-squared is .173, which on the 0-1 scale isn't the strongest trend line for the given data. However, in relating the r-squared back to the equation, the equation is significant at the 99% level, so even though the relationship isn't the strongest, it is significant.
Discussion: In analyzing the regression analysis done on the two variables, there seems to be a linear relationship between the number of kids who receive free lunch, and the crime rate despite the fact the r-squared is weak. So for example; if a new area of town was identified as having 30% kids with free lunch, in plugging the number into the equation y = 21.819 + 1.685(30), the crime rate would be 72.369 per 100,000 people. Despite the fact that the relationship between the two variables is significant at the 99% level, the r-squared is only .173, meaning its a weak relationship. If the r-squared were closer to 1, there might be more confidence in the relationship between free lunch and the crime rate, however because it's so low there isn't much confidence in the relationship.
Part 2
Introduction: For this part, we were given data associated with 911 calls per census tract in Portland, Oregon. The data set included variables such as the number of 911 calls per census tract, jobs, renters, number of people with no high school degree, alcohol sales, number of people unemployed, foreign born population, median income, and number of college grads, with the goal of seeing if there is any explanation for where higher proportion of calls come from. In this case, knowing if there's a relationship between the number of calls and other variables is useful for companies who want to know what factors influence 911 calls, and where to build a new hospital.
Methods: In order to see which variables influence 911 calls the greatest three separate regression analysis's were done. The dependent variable in each of the regression analysis's was the number of 911 calls per census tract, while the independent variable varied per analysis. For the purposes of this assignment, the independent variables were chosen at random.
The statistical software program SPSS was utilized to run regression analysis's. Once the three separate analysis's were run, the regression with the highest significant correlation was utilized to create a residual map in ArcMap. The highest significant correlation was utilized because it shows the greatest potential in explaining the relationship between 911 calls and other contributing factors.
Results: The three independent variables used were the number of people with no high school degree, number unemployed, and alcohol sales. In Figure 3 and Figure 4, the figures are analyzing the linearity between alcohol sales and 911 calls.
![]() |
| Figure 3: R-Squared Model of Relationship between Alcohol Sales and 911 calls |
![]() |
| Figure 4: Linear Equation and Significance of the Model |
In Figure 5 and Figure 6, the figures are analyzing the relationship between the number of unemployed people per census tract, and 911 calls.
![]() |
| Figure 5: R-Squared Model of Relationship between Number of Unemployed and 911 Calls |
![]() |
| Figure 6: Linear Equation and Significance of the Model |
In Figure 7 and Figure 8, these figures are analyzing the relationship between the number of people without high school diplomas and the number of 911 calls.
In analyzing Figure 7, there seems to be a moderate linear relationship between the number of people without a high school diploma and 911 calls. The coefficient of determination is .567, which is the strongest out of all of the other regression analysis's; however, on a 0-1 scale it's about midway between 0 and 1, which means it isn't the strongest relationship. In analyzing Figure 8, the significance level is less than .05, meaning that the relationship is significant at the 95% level. Because the regression is significant at the 95% level, we reject the null hypothesis (that there is no significant linear relationship between the number of people who don't have high school diplomas and 911 calls), and state there is a linear relationship between the two variables. Also, the relationship is a positive one. The b-value is .166, which means when the number of calls goes up by 1, the number of people who don't have a high school diploma increases by .166.
In comparing the three regression analysis's together, they all were significant at the 95% level and they all were positive relationships. However, the number of unemployed and the number of people without a high school diploma's coefficient of determination were noticeably higher than the alcohol sales, meaning there seems to be a stronger relationship between those two variables and the number of 911 calls. The highest coefficient of determination was the relationship between the number of people without high school diplomas and the number of 911 calls, which means companies should be most confident with number of people without high school diplomas determining the number of 911 calls (at least compared to the other two analyses).
In knowing the strongest linear relationship was between people without high school diplomas and 911 calls, a residual map was created showing the variability of each census tract. Figure 9 is a choropleth map showing the number of 911 calls per census tract, while Figure 10 is a residual map of the number of people without high school diplomas and 911 calls.
In analyzing Figure 9, there seems to be a concentration of a high number of 911 calls in the north-central part of the city, and one on the south-east part of the city. There also seems to be lower concentrations of 911 calls on the outer ends of the city, at least comparatively. In adding a variable to the mix to see how each census tract's point corresponds to the linear trend line, Figure 10 shows some high variability on the two census tracts on the north side of town (the two dark red ones). The dark red census tracts means that the two values are a good amount greater than what their corresponding value should be on the trend line. However, in analyzing the map as a whole, a majority of the tracts wall within the -1.5-1.5 range (or either light blue, yellow, or light red), which means the residual values are relatively close to fitting the trend line. In relating these map values back to the regression statistics, the coefficient of determination seems to correlate with what is displayed on the map. The coefficient of determination value was .567-showing a moderate linear relationship-and what shows on the map is a majority of residuals between -1.5 and 1.5 with a couple of outliers, which seems representative of the coefficient of determination value.
Conclusion: Overall, there seemed to be the strongest linear relationship with the number of people without high school diplomas and 911 calls. The number of people unemployed and 911 class also had a moderate relationship competitive to the high school diploma one, however the linear relationship between alcohol sales and 911 calls was by far the weakest relationship, due to its low coefficient of determination. If a company were to utilize these statistics to determine factors that contribute to a high 911 call rate, the number of people without high school diplomas has the strongest linear relationship out of the three independent variables analyzed.
![]() |
| Figure 7: R-Squared Model of Relationship between Number of People without High School Degrees, and 911 calls |
![]() |
| Figure 8: Linear Equation and Significance of the Model |
In comparing the three regression analysis's together, they all were significant at the 95% level and they all were positive relationships. However, the number of unemployed and the number of people without a high school diploma's coefficient of determination were noticeably higher than the alcohol sales, meaning there seems to be a stronger relationship between those two variables and the number of 911 calls. The highest coefficient of determination was the relationship between the number of people without high school diplomas and the number of 911 calls, which means companies should be most confident with number of people without high school diplomas determining the number of 911 calls (at least compared to the other two analyses).
In knowing the strongest linear relationship was between people without high school diplomas and 911 calls, a residual map was created showing the variability of each census tract. Figure 9 is a choropleth map showing the number of 911 calls per census tract, while Figure 10 is a residual map of the number of people without high school diplomas and 911 calls.
![]() |
| Figure 9: Choropleth Map of the Number of 911 Calls per Census Tract |
![]() |
| Figure 10: Residual Map of Low Education Levels versus Number of 911 Calls |
Conclusion: Overall, there seemed to be the strongest linear relationship with the number of people without high school diplomas and 911 calls. The number of people unemployed and 911 class also had a moderate relationship competitive to the high school diploma one, however the linear relationship between alcohol sales and 911 calls was by far the weakest relationship, due to its low coefficient of determination. If a company were to utilize these statistics to determine factors that contribute to a high 911 call rate, the number of people without high school diplomas has the strongest linear relationship out of the three independent variables analyzed.




















