An independent variable is a predictor or input variable used to model an outcome. In a regression, it helps predict the dependent variable; it is not automatically a cause. section 7.13 section 7.6
Spot an independent variable by asking what the model uses as an input:
- A linear regression can use one or more independent variables to predict a continuous dependent variable, such as using temperature to predict sports-drink sales. section 7.13 section 7.6
- A logistic regression can use an input such as hours without a nap to estimate the probability of a binary outcome. section 8.2
- Treat the variable as a hypothesis-driven choice, not proof of causation; check the data visually and avoid extrapolating beyond its observed range. section 7.13
Hours without a nap
Suppose observations record hours since a toddler’s last nap and whether a meltdown occurred. Hours without a nap is the independent variable; meltdown or no meltdown is the dependent variable. The model estimates how the input relates to meltdown probability, but the result applies only within the observed child and observation context. section 8.2
Figure 8.1 Data showing time without a nap and whether a toddler had a meltdown
Use the figure to see the independent variable plotted against observed binary outcomes before fitting a logistic model. section 8.2



