Classes
VerticalEquityStudy
Perform vertical equity analysis and summarize the results. Attributes:rows(int): Total number of rows in the input DataFrameconfidence_interval(float): The confidence interval (e.g. 0.95 for 95% confidence)prd(ConfidenceStat): The price-related differential with confidence intervalsprb(ConfidenceStat): The price-related bias with confidence intervalsquantiles(pd.DataFrame): A DataFrame containing the median ratio with confidence intervals for all ten price quantile tiersgrouped_quantiles(pd.DataFrame): A DataFrame containing the median ratio with confidence intervals for location-grouped price quantile tiers
__init__
Input sales DataFrame
Column name for sale prices
Column name for predicted/assessed values
Column name for location grouping (e.g., neighborhood)
The confidence interval for bootstrap resampling (default 0.95 for 95% confidence)
Number of bootstrap iterations to perform
Random seed for reproducibility
summary()
Generate a summary DataFrame of vertical equity statistics.
DataFrame containing PRD and PRB statistics with confidence intervals, statistical significance indicators, and IAAO standard compliance
- Point value for each statistic
- Upper and lower confidence bounds
- Statistical significance (whether confidence interval excludes neutral value)
- IAAO recommended range compliance
- IAAO passing range compliance
plot_quantiles()
Plot median ratios across price quantiles to visualize vertical equity.
If True, plots confidence interval bounds in addition to point estimates
Y-axis limits. Can be:
- None: Uses default range (0.0 to 2.0)
- “min”: Auto-scales to data range
- tuple of (min, max): Custom range
If True, uses location-grouped quantiles instead of direct price quantiles
Metrics
Price-Related Differential (PRD)
The PRD measures whether assessments vary systematically with property values. Formula:- PRD = 1.00: No price-related differential (perfect vertical equity)
- PRD > 1.00: Regressive (higher-value properties are under-assessed relative to lower-value properties)
- PRD < 1.00: Progressive (lower-value properties are under-assessed relative to higher-value properties)
- Recommended: 0.98 ≤ PRD ≤ 1.03
- The same range applies for both recommended and passing
Price-Related Bias (PRB)
The PRB measures systematic bias in assessments related to sale price using a more sophisticated regression approach. Formula:- PRB = 0: No price-related bias (perfect vertical equity)
- PRB > 0: Regressive bias (higher-value properties are under-assessed)
- PRB < 0: Progressive bias (lower-value properties are under-assessed)
- PRB is expressed as a decimal (e.g., 0.05 = 5% bias)
- Recommended: -0.05 ≤ PRB ≤ 0.05
- Acceptable/Passing: -0.10 ≤ PRB ≤ 0.10
- More sensitive to bias at the extremes of the price range
- Less affected by outliers
- Preferred by IAAO for detecting vertical inequity
Quantile Analysis
The vertical equity study divides sales into 10 quantiles (deciles) based on sale price and calculates the median assessment ratio for each quantile. Two Approaches:-
Direct Quantiles (
quantilesattribute):- Properties sorted directly by sale price
- Each property assigned to a price tier
- Shows raw price-related patterns
-
Grouped Quantiles (
grouped_quantilesattribute):- Properties first grouped by location
- Each location assigned to a price tier based on its modal quantile
- All properties in that location inherit the tier
- Accounts for location-based price differences
- Flat line across quantiles indicates good vertical equity
- Upward slope indicates regressive assessment (higher-value properties over-assessed)
- Downward slope indicates progressive assessment (lower-value properties over-assessed)
- The
plot_quantiles()method visualizes these patterns