Methods & Results#
Full statistical analysis comparing amenity access at core vs. peripheral Bay Area transit stations.
Not sure where to start? Each tab below answers a different question about transit equity in the Bay Area. Start with Permutation Tests for the big-picture gap, then explore the other tabs for deeper context.
A permutation test asks a simple question: could the difference we see between two groups have happened just by chance? We randomly shuffle the station labels 10,000 times and check how often a gap as large as the one we observed shows up by accident. If that almost never happens (p < 0.05), we treat the difference as meaningful rather than random noise. This method is especially useful here because it does not rely on strong assumptions about the data, which makes it a good fit for a small real-world dataset like ours.
How “core” and “peripheral” were actually defined: These labels were based on FY2025 ridership across BART and Caltrain stations rather than geography alone. In this project, core stations are those consistently identified as higher-ridership stations, while peripheral stations are those in the lower-ridership group.
Core mean amenities
21.9
n = 40 stations
Peripheral mean
9.8
n = 39 stations
Raw gap
12.0
Core minus peripheral
Glass Delta (total)
2.17
Very large effect
Significant after FDR
6 / 10
B-H correction
Core vs peripheral: permutation test results (10,000 resamples)
Reading the columns: “p (raw)” = probability the observed gap happened by chance. “q (FDR)” = a stricter threshold after correcting for running 10 tests at once using the Benjamini-Hochberg method. “Glass Delta” = the practical size of the difference (0.5+ = moderate, 0.8+ = large, 2.0+ = very large). “n.s.” = not statistically significant after correction.
| Amenity category | Core mean | Peripheral mean | Difference | p (raw) | q (FDR) | Glass Delta | Result |
|---|
Glass Delta by amenity category
Delta ≥ 0.8 = large effect; ≥ 2.0 = very large. Gray bars = not statistically significant after FDR correction.
Having a transit station is not the same thing as having equitable access. If the stations serving the most disadvantaged communities also have the fewest nearby services, that creates a compounding disadvantage.
We used Spearman rank correlations to test whether three demographic variables are related to how amenity-rich a station’s neighborhood is. Spearman is more appropriate than Pearson here because our amenity counts are skewed and not normally distributed. It works off rankings rather than raw values, so it is less sensitive to outliers. A positive rho means more of that group is associated with more amenities; a negative rho means more of that group is associated with fewer amenities.
Core: no vehicle
22.5%
Transit-dependent
Peripheral: no vehicle
6.5%
Transit-dependent
Core median income
$119k
Household
Peripheral median income
$164k
Household
Spearman correlations with total amenity count
Bars extending right of center mean more of that group is associated with more amenities. Bars extending left of center mean more of that group is associated with fewer amenities. Significance badges reflect q-values after FDR correction.
What the correlations mean in plain language
% zero-vehicle households (rho = +0.476, p < 0.001) — strongest signal: Stations with more car-free households nearby tend to have more amenities around them. On the surface, that sounds encouraging, but it is mostly a density effect: car-free households cluster in the urban core, where things are already closer together. The Unmet Need tab shows that some of these same stations still rank poorly for actual access gaps, which means physical proximity alone does not guarantee that the available services are affordable, safe, or sufficient.
% non-white residents (rho = −0.243, p = 0.047) — equity concern: There is a statistically significant negative relationship here: stations in majority non-white neighborhoods tend to have fewer services within walking distance. In practical terms, a 10-percentage-point increase in non-white share is associated with roughly 2–3 fewer walkable amenities. That can mean the difference between being able to reach a pharmacy or grocery store on foot and needing a car or another transit trip.
Median household income (rho = −0.064, p = 0.575) — not significant: Income is not a meaningful predictor in this dataset. That is important because it suggests the amenity gap is not simply a wealthy-versus-poor neighborhood story. In the Bay Area, the pattern seems to be shaped more by urban form and racial geography than by income alone. Interventions based only on income thresholds could miss some of the places with the greatest need.
A station can have a handful of amenities nearby and still not serve its riders well if the surrounding population is highly transit-dependent and those amenities are limited relative to that level of need. The unmet need index combines two things into one score: how many people around a station are car-free (the need) and how few amenities that station has nearby (the gap). A high score means many people who depend on this station have relatively little within walking distance.
The Gini coefficient is borrowed from economics, where it measures inequality (0 = perfectly equal, 1 = everything concentrated in one place). Applied here, a Gini of 0 would mean every station has the same amenity count, while a Gini of 1 would mean amenities are concentrated at a single station. Our network Gini of 0.428 suggests that access to amenities is unevenly distributed across the Bay Area transit network.
Gini: full network
0.428
95% CI: 0.361–0.478
Gini: core
0.410
95% CI: 0.338–0.461
Gini: peripheral
0.315
95% CI: 0.238–0.385
Highest unmet need
Coliseum
Index score: 0.801
Top 10 stations by unmet need index
Ranked by how much the car-free population around a station exceeds what the surrounding neighborhood can offer on foot. A score near 1.0 means a very large gap between need and supply. Higher scores point to the strongest equity concerns.
| # | Station | Agency | Type | Amenities | % No vehicle | Unmet need index |
|---|
Unmet need index = % no-vehicle × (1 − normalized amenity count), min-max normalized across all stations.
Gini coefficient reference
A station surrounded by 10 convenience stores is not equivalent to one with a clinic, a pharmacy, a grocery store, and a park, even if the total number of amenities is the same. Shannon entropy measures how evenly amenities are spread across different categories. A high entropy score means a strong mix of types; a low score means the neighborhood is dominated by only one or two kinds of amenities.
We used a Mann-Whitney U test to compare entropy between core and peripheral stations. This is a non-parametric alternative to the t-test and is appropriate here because entropy values are not normally distributed. The result (p = 0.041) suggests that the diversity gap between core and peripheral stations is unlikely to be due to chance.
Core mean entropy
1.335
Shannon entropy
Peripheral mean entropy
1.124
Shannon entropy
Difference
0.212
Core minus peripheral
Mann-Whitney p
0.041
U = 989.0
Top 10 most diverse stations by amenity entropy
How to read: Entropy is highest when amenities are spread evenly across all 8 categories (max possible ≈ 2.08). Heat shading by column shows relative abundance: darker blue means more of that category relative to other stations. A station can rank highly here even without the highest total count; what matters is balance.
| Station | Total | Entropy | Groc | Park | Clinic | Phar | Care | Doc | Hosp | Conv |
|---|
Shannon entropy across amenity categories. Max theoretical entropy = ln(8) ≈ 2.08 (perfectly even spread across all 8 types).
Methodology notes#
Spatial unit and buffer choice. Amenities were extracted from OpenStreetMap within a 0.5-mile walking radius of each station centroid. The half-mile threshold is the standard walkability cutoff in urban planning research, representing roughly a 10-minute walk. We used census tract boundaries for demographic joins because tract-level ACS estimates are the finest resolution at which variables like vehicle access and median income are reliably stable. Block group estimates exist but carry higher margins of error for small populations.
Modifiable Areal Unit Problem (MAUP). Our results are sensitive to the choice of spatial unit. The core-peripheral amenity gap we observe at the station-buffer level could look different if we aggregated to ZIP codes (masking within-ZIP variation) or disaggregated to block groups (introducing noise from small cell counts). The demographic correlations we report using census tract data should not be interpreted as individual-level relationships. A tract with a high non-white share having fewer amenities does not mean individual non-white residents specifically lack access. This is the ecological fallacy. Our findings describe neighborhood-level patterns, not individual outcomes.
Unmet need index. The index multiplies the tract-level percentage of zero-vehicle households by one minus the min-max normalized amenity count, producing a score between 0 and 1. A score near 1 means a large share of surrounding households are car-free and the station has very few walkable amenities. Stations were normalized across the full 79-station sample.
Spearman vs. Pearson. Demographic correlations use Spearman rank correlation rather than Pearson because amenity counts are right-skewed. A handful of downtown SF stations have 50+ amenities while the median is 11. Spearman ranks the values before computing correlation, making it robust to these outliers.
How we built this#
The full code is in our GitHub repository.
Data collection. Station coordinates were compiled manually from BART and Caltrain published stop lists. Amenities were pulled from OpenStreetMap using the Overpass API, querying each of the eight amenity types within a bounding box around each station, then filtering to exactly 0.5 miles using haversine distance. Census variables came from the ACS 5-year API using the requests library, joined to stations via a spatial join with 2024 TIGER/Line tract boundaries in GeoPandas.
Station classification. We classified stations as core or peripheral using three independent methods: percentile split, k-means clustering on log-transformed ridership, and Jenks natural breaks. We labeled a station core if at least 2 of 3 methods agreed. This consensus approach avoids over-relying on any single threshold.
Statistical tests. All permutation tests used 10,000 resamples. Multiple comparisons were corrected using the Benjamini-Hochberg method at q < 0.05. Effect sizes use Glass’s Delta rather than Cohen’s d because peripheral station amenity counts have lower variance than core stations, and Glass’s Delta uses only the control group standard deviation, making it more appropriate here.
Visualizations. Interactive maps were built in Plotly. The station amenity explorer pre-computes all amenity locations at build time and passes them to the browser as JSON, so the dropdown switching is instant with no live API calls.