liveBook · Manning

Conditional logic

As explained in Statistics Slam Dunk

An if-else rule is a conditional decision rule that selects one result when a condition holds and another result otherwise.

Conditional logic uses if-else rules to select outcomes from data. In a regression tree, each split asks whether a predictor is above or below a threshold, then sends observations along different branches. section 5.8

NBA wins and hustle statistics

A team averaging more than 26.05 points off screens per game is expected to win 50 or 51 regular-season games. Below that threshold, a second rule checks deflections: fewer than 12.85 suggests 27–37 wins, while more than 12.85 suggests 31–51 wins. section 5.8

fit3 <- tree(formula = wins ~ screen_assists_pts + deflections + 
              loose_balls + contested_2pt + contested_shots, data = train)
summary(fit3)
## 
## Regression tree:
## tree(formula = wins ~ screen_assists_pts + deflections + loose_balls + 
##     contested_2pt + contested_shots, data = train)
## Number of terminal nodes:  10 
## Residual mean deviance:  82.83 = 4722 / 57 
## Distribution of residuals:
##     Min.  1st Qu.   Median     Mean  3rd Qu.     Max. 
## -17.2500  -5.6670   0.2857   0.0000   6.3330  21.0000

Inspect the fitted regression tree and its terminal-node summary to see how conditional splits produce grouped predictions. section 5.8

How Statistics Slam Dunk covers it

How deep it goes
Connects each rule to a tree split and traces multiple thresholds, but does not formalize conditional logic beyond regression-tree interpretation.
Examples
Uses points off screens, deflections, and predicted NBA regular-season win ranges as nested conditional examples.
What it assumes
Assumes familiarity with regression predictors and introduces conditional rules through concrete basketball-statistic splits.
What you can do after
Evaluate regression-tree predictions by following predictor thresholds and comparing the resulting outcome ranges.
How it connects
Connects conditional logic with regression trees, multiple regression, predictors, and statistical significance.

Also explained in

Compare how 21 books explain conditional logic →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Statistics Slam Dunk. The section links point to the parts of the book it draws on.