┌─ Monte Carlo simulation ────────────────────────────────────────

For each vehicle query, the engine runs 10,000 simulated ownership periods. In each iteration, every component is evaluated for failure probability based on the log-normal cumulative distribution function:

P(fail) = [CDF(future_mi) - CDF(current_mi)] / [1 - CDF(current_mi)]

This gives the conditional probability of failure in the projection window, given that the component has survived to the current mileage. If a random draw triggers failure, a repair cost is sampled uniformly from the component's cost range.

Results are aggregated across all iterations to produce percentile-based cost projections (P10, P25, P50, P75, P90).

simulation parameters
┌────────────────────┬──────────────────────────────┐
Parameter           Value                         
├────────────────────┼──────────────────────────────┤
Iterations          10,000 per query              
Failure model       Log-normal CDF                
Cost sampling       Uniform (low..high)           
Projection          1-5 years, 8000mi/yr default  
└────────────────────┴──────────────────────────────┘
┌─ Failure distributions ────────────────────────────────────────

Each component has a log-normal failure distribution characterised by mean failure mileage and standard deviation. These are derived from real MOT failure data:

Component        Mean mi    Std dev    Source
─────────────────────────────────────────────────
Ball joints       80,000    30,000     MOT data
Coil springs      85,000    32,000     MOT data
Shock absorbers   90,000    28,000     MOT data
Brake pads        55,000    20,000     MOT data
Timing chain     120,000    35,000     Estimated
Turbo            100,000    30,000     Estimated

MOT-derived values use actual mileage-at-failure distributions from 4.9M test records. Non-MOT items use industry estimates calibrated per model.

┌─ Depreciation model ────────────────────────────────────────

Market valuation uses an exponential decay model with segment-specific parameters. Year 1 has a larger drop, subsequent years decay at a reducing rate. A value floor prevents estimates below scrap value.

Mileage adjustments apply a per-mile penalty/reward for deviation from expected mileage. High mileage is penalised more heavily than low mileage is rewarded.

depreciation parameters by segment
┌────────────────────┬────────────┬────────────┬────────────┐
Parameter           Budget      Mainstream  Premium     
├────────────────────┼────────────┼────────────┼────────────┤
Year 1 drop         25%         22%         20%         
Annual rate         12%         14%         16%         
Value floor         5%          8%          10%         
└────────────────────┴────────────┴────────────┴────────────┘
┌─ Total Cost of Ownership ────────────────────────────────────────

TCO projections estimate annual running costs including:

Category        Source
──────────────────────────────────
VED (road tax)  CO2 band / flat rate
Fuel            MPG + DfT fuel prices
MOT             Fixed £54.85/yr (3+ yrs)
Insurance       Group-based estimate
Servicing       Model-specific annual cost
Repair risk     Monte Carlo P50 amortised