National studies have indicated that in some regions of the country, such as in Massachusetts, municipalities have restricted the supply of housing through regulation, thus driving up prices of housing. The broad term “land use regulations” encompasses a variety of bylaws, ordinances and regulations that proscribe or restrict the ways in which land can be developed. The lack of zoning for multi-family housing is a barrier for new housing developments in the Greater Boston Area (as well as in many other U.S. cities Links to an external site.). In August 2022, the Department of Housing and Community Development of Massachusetts released Multi-Family Zoning Requirements for MBTA Communities Links to an external site.. A new Section 3A of Chapter 40A (the Zoning Act), requires MBTA communities to have at least one zoning district of reasonable size near a transit station in which multifamily housing is permitted as of right. The zoning district shall meet the following criteria: • Minimum gross density of 15 units per acre • Located not more than 0.5 miles from a commuter rail station, subway station, ferry terminal or bus station, if applicable • No age restrictions and suitable for families with children
In total, 175 MBTA communities are subject to the new requirements of Section 3A of the Zoning Act.
Let’s use the MASS ZONING Dataset (“MASSZONING.xls”), which reflects the zoning requirements of towns/cities in the Greater Boston Area in 2005, to evaluate how difficult it is to meet the 2022 new requirements.
##
## Attaching package: 'janitor'
## The following objects are masked from 'package:stats':
##
## chisq.test, fisher.test
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2 ──
## ✔ ggplot2 3.3.6 ✔ purrr 0.3.4
## ✔ tibble 3.1.7 ✔ dplyr 1.0.9
## ✔ tidyr 1.2.0 ✔ stringr 1.4.0
## ✔ readr 2.1.2 ✔ forcats 0.5.1
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
##
## Attaching package: 'scales'
##
##
## The following object is masked from 'package:purrr':
##
## discard
##
##
## The following object is masked from 'package:readr':
##
## col_factor
Create a new table of data from the “MASSZONG.xls”
masszoning <- read_xls("MASSZONING.xls")
mbtacommunity <- read_xls("MBTA_Communities.xls")
colnames(mbtacommunity)[1] <- "townname"
sum(mbtacommunity$townname %in% masszoning$townname)
## [1] 168
newtab <- left_join(mbtacommunity, masszoning, by = "townname")
sum(na.omit(newtab$mfallow %in% c(1,4,5,7)))/nrow(newtab)
## [1] 0.3542857
#1. Please write the null hypothesis and the alternative hypothesis for this test. #2. What stats are you going to use for this test? Is this a one-tail or two-tail test? #3. Are we able to reject the null hypothesis at a 1% significance level? (hint: be careful with missing values)
1.null hypothesis: mean 2005 density requirements the same from the new requirement; alternative hypothesis: mean 2005 density requirements is different from the new requirement 2.I will be using mean, standard error, significance level, and sample size. It is a two tail test
#3
min_lot_area <- na.omit(newtab$unitarea)
#why can't I get to use nrow(min_lot_area)???
#find the sample mean
x_hat <- mean(min_lot_area)
x_hat
## [1] 8483.887
#know values
n=100
a <- 0.01
mu <- 2904
#find sd and se
sd <- sd(min_lot_area)
se <- sd/sqrt(n)
#qnorm: numeric range -> can we just compare values here?
qnorm(c(a/2, (1-a/2)), x_hat, se)
## [1] 4873.952 12093.821
#t value
t <- (x_hat - mu)/se
t #3.98
## [1] 3.981467
#find the critical range
qt(c(a/2, 1-a/2), df = n-1)
## [1] -2.626405 2.626405
#reject?
t > qt(c(a/2, 1-a/2), df = n-1)
## [1] TRUE TRUE
we are able to reject the null hypothesis at a 1% significance level because 2.63 < 3.98
#We make it an one tail test
qt(1-a, df = n-1)
## [1] 2.364606
t > qt(1-a, df = n-1)
## [1] TRUE
Null hypothesis: The number of permits allowed annually in accordance with the targeted growth rate of the MBTA communities is not lower than the state average.
Alternative hypothesis: The number of permits allowed annually in accordance with the targeted growth rate of the MBTA communities is lower than the state average
#construct a 99% confidence interval one tail test
build_permit <- newtab$grownum %>% na.omit()
a_bp = 0.01
n_bp = 32
mu_bp = 70
x_hat_bp = mean(build_permit)
x_hat_bp
## [1] 61.53125
sd_bp = sd(build_permit)
sd_bp
## [1] 36.00536
se_bp = sd_bp/sqrt(n_bp)
se_bp
## [1] 6.364909
#t test
t <- (x_hat_bp - mu_bp)/se_bp
t
## [1] -1.330538
#critical level
qt(a_bp, df=n-1)
## [1] -2.364606
#reject?
t < qt(a_bp, df=n-1)
## [1] FALSE
Since -2.364606 < -1.330538, we fail to reject the null hypothesis with 99% confidence interval