Calculate confidence intervals#
- assesspy.boot_ci(fun, estimate: list[int] | list[float] | Series, sale_price: list[int] | list[float] | Series, nboot: int = 1000, alpha: float = 0.05) tuple[float, float] #
Calculate the non-parametric bootstrap confidence interval for a given set of numeric values and a chosen function.
- Parameters:
fun (function) – Function to bootstrap. Must return a single float value.
estimate (Array-like numeric values) – A list or
pd.Series
of estimated values. Must be the same length assale_price
.sale_price (Array-like numeric values) – A list or
pd.Series
of sale prices. Must be the same length asestimate
.nboot (int) – Default 1000. Number of iterations to use to estimate the output statistic confidence interval.
alpha (float) – Default
0.05
. Float value indicating the significance level of the returned confidence interval.0.05
will return the 95% confidence interval.
- Returns:
A tuple of floats containing the bootstrapped confidence interval of the input values.
- Return type:
tuple[float, float]
- Example:
# Calculate PRD confidence interval: import assesspy as ap ap.boot_ci( ap.prd, estimate = ap.ccao_sample().estimate, sale_price = ap.ccao_sample().sale_price, nboot = 1000 )
- assesspy.cod_ci(estimate: list[int] | list[float] | Series, sale_price: list[int] | list[float] | Series, nboot: int = 1000, alpha: float = 0.05) tuple[float, float]
Calculate the non-parametric bootstrap confidence interval for COD.
- See also:
- assesspy.prd_ci(estimate: list[int] | list[float] | Series, sale_price: list[int] | list[float] | Series, nboot: int = 1000, alpha: float = 0.05) tuple[float, float]
Calculate the non-parametric bootstrap confidence interval for PRD.
- See also:
- assesspy.prb_ci(estimate: list[int] | list[float] | Series, sale_price: list[int] | list[float] | Series, nboot: int = 1000, alpha: float = 0.05) tuple[float, float]
Calculate the closed-form confidence interval for PRB. Unlike COD and PRB, this does not use bootstrapping.
- See also: