Methods & Results

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.

What are permutation tests, and why use them?
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 stations have on average more than twice as many nearby amenities as peripheral stations (21.9 vs. 9.8). This gap held up across 6 out of 10 amenity types after correcting for multiple comparisons. The effect size (Glass's Delta of 2.17) is extremely large: the average core station is better served than roughly 98% of peripheral stations. This is not a small difference and points to a real structural gap.

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 categoryCore meanPeripheral mean Differencep (raw)q (FDR)Glass DeltaResult

Glass Delta by amenity category

Delta ≥ 0.8 = large effect; ≥ 2.0 = very large. Gray bars = not statistically significant after FDR correction.

Real-world meaning: The biggest gaps are in convenience stores (D = 2.47) and clinics (D = 2.00), which are the kinds of everyday resources riders often depend on. A peripheral station like Pittsburg/Bay Point or Antioch may have a BART stop, but the surrounding area offers far fewer places to pick up groceries, fill a prescription, or see a doctor without a car. Hospitals and childcare did not show significant gaps, likely because both are relatively scarce across the network. In other words, equality there may reflect low access everywhere, not good access anywhere.
Are stations serving higher proportions of non-white residents, low-income households, or zero-vehicle households more likely to be amenity-poor?
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.

Answer: Partially yes. Stations in majority non-white neighborhoods face a measurable amenity disadvantage. Zero-vehicle households show the opposite pattern, but that mostly reflects urban density rather than true equity. Income alone does not explain the gap, which suggests that equity-focused planning needs to account for racial geography and long-term neighborhood investment patterns, not just income.
What is the “unmet need index” and why does it matter?
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

Why the peripheral Gini is lower, and why that is not necessarily good news: Peripheral stations have a lower Gini (0.315 vs. 0.410 for core) because they are uniformly underserved. There is less inequality among them because most of them are similarly sparse. Core stations show more internal variation: some are very well-served (such as Montgomery St. or 12th St. Oakland), while others are surprisingly under-resourced (such as Coliseum or Bay Fair). The Gini measures spread, not overall level. Peripheral stations may look more equal simply because access is low across the board.

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.

#StationAgencyType Amenities% No vehicleUnmet need index

Unmet need index = % no-vehicle × (1 − normalized amenity count), min-max normalized across all stations.

Gini coefficient reference

A Gini of 0 means perfectly equal access; 1 means all amenities are concentrated at one station. The network-wide Gini of 0.428 indicates a fairly uneven distribution of amenities. The lower peripheral Gini (0.315) should not be read as better access. It mainly reflects that peripheral stations are consistently low in amenity access.
Real-world meaning: Coliseum station in East Oakland tops the list with an unmet need score of 0.801. Nearly 30% of surrounding households are car-free, yet the station has only 3 nearby amenities. Bay Fair, MacArthur, and El Cerrito del Norte show a similar pattern: high transit dependence and low walkable supply. These are the places where targeted investments in grocery access, clinics, and pharmacies would likely have the strongest equity payoff.
Why diversity of amenities matters, not just raw count
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

Core stations are not only surrounded by more amenities, they also tend to have a more balanced mix of them (p = 0.041). Peripheral riders do not just have fewer options; they also have less variety. That matters because if the only thing nearby is a convenience store, riders may still need to travel farther for a prescription, a doctor, or basic groceries.

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.

StationTotalEntropy GrocParkClinic PharCareDocHospConv

Shannon entropy across amenity categories. Max theoretical entropy = ln(8) ≈ 2.08 (perfectly even spread across all 8 types).

Real-world meaning: Fremont ranks highest on diversity despite having only 15 total amenities, because those 15 are spread across 7 different categories. A rider there can reach a pharmacy, a grocery store, a doctor, and a hospital. Compare that with a station that has 20 amenities but 15 of them are convenience stores: the raw count looks strong, but the range of daily needs met is much narrower. For transit equity, diversity of access matters just as much as volume.

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.