liveBook · Manning

Independent variable

As explained in Grokking Statistics

An independent variable is a predictor or input variable whose relationship with an outcome is modeled.

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

How Grokking Statistics covers it

How deep it goes
Defines the variable and illustrates its modeling role, but stops short of deriving regression mathematics or estimation algorithms.
Examples
Uses temperature and sports-drink sales, plus hours without a nap and toddler meltdowns.
What it assumes
Assumes only the distinction between an input and an outcome, while introducing regression terminology through concrete examples.
What you can do after
Evaluate predictor choices and interpret modeled relationships without treating correlation as causation or extrapolating beyond observed data.
How it connects
Connects independent variables to predictors, dependent variables, linear regression, logistic regression, correlation, and probability.

Also explained in

Compare how 4 books explain independent variable →

Related concepts

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