Speed Tire wear Uncertainty
Today: a small regression model + clean visuals + interactive Plotly.
Question: How do average speed and tire wear relate to lap time?
n = 180 laps speed ≈ 220 km/h wear: 0–100%
We model lap time using multiple linear regression:
\[ Y = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \varepsilon \]
Where:Goal: estimate how much lap time changes when speed or wear changes.
For inference (CIs / p-values), common assumptions are:
\[ E(\varepsilon)=0,\qquad Var(\varepsilon)=\sigma^2 \]
Sometimes also:
\[ \varepsilon \sim \mathcal{N}(0,\sigma^2) \]
Practical check: residual plots should look like random scatter.
##
## Call:
## lm(formula = lap_time ~ speed + tire_wear, data = f1)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.9528 -1.0828 -0.0938 1.0606 4.6001
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 122.092041 3.126371 39.05 <2e-16 ***
## speed -0.167935 0.014259 -11.78 <2e-16 ***
## tire_wear 0.065538 0.004327 15.15 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 1.691 on 177 degrees of freedom
## Multiple R-squared: 0.6589, Adjusted R-squared: 0.655
## F-statistic: 170.9 on 2 and 177 DF, p-value: < 2.2e-16
Expected signs: speed coefficient negative; wear coefficient positive.
Hover to see detailed values. Zoom/pan with the mouse.
Clear Visual Interactive