Decision variable
A decision variable is a quantity whose value is chosen by an optimization model to represent an available decision.
Optimization Algorithms: AI techniques for design, planning, and control problems
A decision variable is a variable whose value is chosen to optimize an objective function subject to constraints.
- How it is used
- Frames controllable inputs as the choices optimization methods assign while searching for strong feasible solutions.
- How deep it goes
- Defines variables, bounds, and their effects on objectives, then applies them to pricing, vehicle design, and loading examples.
- Examples
- Uses ticket price, electric-vehicle design parameters, routing choices, and cargo-bike parcel selection as concrete decision variables.
- What you can do after
- Evaluate optimization models by identifying controllable inputs, their bounds, affected objectives, and applicable constraints.
Statistics Every Programmer Needs
A decision variable is an unknown quantity whose value represents a selectable decision in an optimization problem.
- How it is used
- Models selectable alternatives within linear optimization for project prioritization and resource allocation.
- How deep it goes
- Defines binary and continuous roles, specifies bounds, and connects variables to objectives and constraints without deriving solver algorithms.
- Examples
- Uses project-feature selection, feature cost and value data, and Python bounds of `(0, 1)` for each feature.
- What you can do after
- Apply it via `scipy.optimize.linprog` by defining variable bounds alongside objectives and linear constraints.
Read how Statistics Every Programmer Needs explains decision variable →
Related concepts
- binary random variableincludes · A binary random variable is a random variable that takes exactly two possible values, often represented as zero and one.
- optimizationpart of · Optimization is the systematic selection or adjustment of values, actions, or system designs to improve a specified objective, often subject to constraints.
- problem definitionpart of · A problem definition is a precise specification of a problem’s context, objectives, relevant inputs or conditions, constraints, and criteria to guide analysis or solution.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

