Tutorials › Propensity Score Matching and Instrumental Variables › Conditional Treatment Probability as the Propensity Score

The Balancing Property and Estimation · Tutorial 112 of 699

Conditional Treatment Probability as the Propensity Score

Learn to define and calculate a propensity score, understand what it represents, and recognize when a table-based calculation is not enough.

Intermediate 9 min read

What You'll Learn

  • Define the propensity score for binary treatment using the conditional treatment probability given covariates.
  • Distinguish a person’s treatment status from their propensity score and from their outcome risk.
  • Calculate empirical propensity scores from covariate-stratified treatment counts.
  • Understand how the definition applies to continuous covariates, including why individual covariate values need not have positive probability.
  • Identify sparse cells, coding problems, and near-zero or near-one scores that need careful interpretation.
  • Explain why the propensity score alone does not establish a causal effect.

What the Propensity Score Measures

In an observational study, people with different baseline characteristics may have different chances of receiving a treatment. The propensity score summarizes that assignment probability conditional on the measured covariates. It is a property of the treatment-assignment process in a specified population, not a label for the treatment a person actually received.

Let \(A\) be a binary treatment indicator, coded \(A=1\) for treated and \(A=0\) for untreated, and let \(X\) denote the set of measured covariates. For a person whose covariates are \(X\), the propensity score describes the conditional probability of treatment. The covariates used for this purpose should be defined at the relevant baseline, before treatment assignment or initiation. This timing makes the score a description of treatment assignment given prior information, rather than a description using consequences of treatment.

Definition: The propensity score is \(e(X)=P(A=1\mid X)\), the conditional probability of receiving treatment given the covariates \(X\). For discrete covariates, \(e(x)\) is defined for covariate values \(x\) with \(P(X=x)>0\). More generally, \(e(X)\) is a conditional expectation defined almost surely. For continuous covariates, a version of \(e(x)\) can be specified through a regular conditional distribution; its values at covariate points in a probability-zero set are not uniquely determined.

Because \(A\) takes only the values zero and one, its conditional mean is its conditional probability of being one: \(E[A\mid X]=P(A=1\mid X)\). Thus the propensity score can also be written \(e(X)=E[A\mid X]\). It is a probability, so it lies between zero and one, up to the usual almost-sure qualification for conditional expectations.

Three Quantities That Should Not Be Confused

The definition separates three different things. A person’s treatment status is the observed value \(A\), either zero or one. Their propensity score is the conditional probability \(e(X)\), which can be any value from zero to one. Their outcome risk is a probability involving an outcome, such as \(P(Y=1\mid X)\) for a binary outcome \(Y\). The score concerns treatment assignment; outcome risk concerns the outcome.

For example, two people with the same measured covariates have the same value of \(e(X)\) under a given population’s treatment-assignment distribution, even though one received treatment and the other did not. Their observed treatment statuses differ, but the conditional probability used to describe their assignment is the same. This does not mean their outcomes are the same, nor does it imply that the score is a probability of benefiting from treatment.

A propensity score is also not automatically a causal effect. Defining \(e(X)\) requires a binary treatment and a conditional distribution of treatment given covariates; it does not, by itself, require that treatment assignment be unconfounded or that a causal effect be identified. Those questions require additional assumptions and an appropriate analysis.

Worked Example: Calculating Scores From a Binary Covariate

Consider a hypothetical cohort of 100 eligible people. Let \(A=1\) indicate initiation of a treatment, and let \(X\) indicate whether a specified baseline risk factor is present. The table gives the treatment counts in each covariate group.

Baseline risk factor \(X\)Treated \(A=1\)Untreated \(A=0\)Total
Present184260
Absent32840
Total5050100

Under the empirical distribution represented by this table, the conditional treatment probability in each group is the treated count divided by that group’s total. For people with the risk factor present,

$$ \hat e(X=\text{present})=\frac{18}{18+42}=\frac{18}{60}=0.300. $$

For people with the risk factor absent,

$$ \hat e(X=\text{absent})=\frac{32}{32+8}=\frac{32}{40}=0.800. $$

The overall treated proportion is \(50/100=0.500\), but it is not the score for everyone: the table shows different empirical conditional treatment probabilities across the two covariate groups. The values \(0.300\) and \(0.800\) are not the individuals’ observed treatment statuses. Within each group, some people were treated and some were not.

Why the Table Calculation Works

For a discrete covariate pattern \(x\) with positive probability, the definition of conditional probability gives

$$ e(x)=P(A=1\mid X=x) =\frac{P(A=1,\ X=x)}{P(X=x)}. $$

In a finite data set, the corresponding empirical probabilities are joint and marginal proportions. Dividing the proportion with both \(A=1\) and \(X=x\) by the proportion with \(X=x\) cancels the common total sample size, leaving the number treated in that pattern divided by the number in that pattern. This is why a covariate table gives a direct empirical calculation for discrete cells.

That calculation describes the sample’s conditional treatment fraction. Treating it as an estimate of a population propensity score requires the data to provide relevant information about the target population and treatment process. For instance, a simple random sample from that population supports a straightforward frequency interpretation; a selected or otherwise nonrepresentative sample may not. A table calculation is not the same as fitting a model, and no model-fitting procedure is needed to define the propensity score.

Worked Example: Using Joint Covariate Patterns

In a second hypothetical cohort, treatment counts are cross-classified by baseline age group and comorbidity status. The score for a joint pattern is calculated within that pattern, not by using only one of the two covariates.

Age groupComorbidityTreated \(A=1\)Untreated \(A=0\)Total
OlderPresent12820
OlderAbsent62430
YoungerPresent92130
YoungerAbsent162440

For older people with comorbidity, the empirical score is \(12/(12+8)=12/20=0.600\). For older people without comorbidity, it is \(6/(6+24)=6/30=0.200\). For younger people with comorbidity, it is \(9/(9+21)=9/30=0.300\). For younger people without comorbidity, it is \(16/(16+24)=16/40=0.400\).

There are 43 treated people among 120 in total, so the overall treated proportion is \(43/120=0.3583\). That overall proportion does not retain the distinctions among the four joint patterns. Nor would calculating only an age-specific fraction necessarily give the conditional probability given both age and comorbidity. The conditioning set in the definition must match the covariates being considered.

Continuous Covariates and Conditional Probabilities

The table calculation is especially transparent when \(X\) is discrete and a covariate pattern occurs repeatedly. With continuous covariates such as age or a laboratory measurement, an exact value \(x\) will often occur with probability zero: \(P(X=x)=0\). The ratio \(P(A=1,X=x)/P(X=x)\) is then not a usable pointwise formula. This does not mean that the propensity score is undefined for continuous covariates. The conditional probability \(P(A=1\mid X)\) is defined as a conditional expectation, and a regular conditional distribution can represent it as a function \(e(x)\), with versions agreeing almost everywhere under the distribution of \(X\).

At values \(x\) outside the support of the covariate distribution, or in other probability-zero sets, the chosen version’s value is not determined by the observed population distribution. Consequently, the simple “count treated at exactly \(x\), divided by the count at \(x\)” calculation is a discrete-table calculation, not a general definition for continuous \(X\). Estimating a score from continuous covariates requires additional methods, which are separate from defining the score.

Worked Example: A Specified Score Function for Continuous Age

Suppose, purely hypothetically, that a treatment-assignment mechanism is specified for ages from 20 through 40 by \(e(x)=0.15+0.02x\), where \(x\) is age in years. This stipulated function is only an illustration of a conditional probability; it is not a recommendation for a model or an estimate from a table.

At age 30, the score under this mechanism is

$$ e(30)=0.15+0.02(30)=0.15+0.60=0.75. $$

Thus, among people with age 30 under the specified assignment mechanism, the conditional probability of treatment is 0.75. It does not say that a particular 30-year-old must be treated, and it is not the probability of a health outcome for that person. Across the stated age range, the function runs from \(e(20)=0.55\) to \(e(40)=0.95\), so all its values in that range are valid probabilities.

In a continuous population, there need not be a positive fraction of people whose age is exactly 30. The conditional probability at age 30 is understood through the specified regular conditional distribution (or, in this example, the stipulated function), not through a positive point probability \(P(X=30)\). Values outside the stated range are not defined by this example’s rule.

Checks, Comparisons, and Limitations

Before interpreting a calculated score, check that treatment coding is consistent, the denominator includes all eligible people in the covariate pattern, and the covariates are measured at the intended baseline. Verify that each table row sums to its stated total and that treated counts do not exceed totals. If an empirical cell has no observations, its within-cell treatment fraction cannot be calculated from that table. A zero cell count is not evidence that the population probability is exactly zero.

Scores close to zero or one deserve attention: they indicate covariate patterns for which the observed or specified treatment probability is very low or very high. In a finite table, an estimate of zero or one may simply reflect a small or sparse cell. Such values can flag limited information about treatment alternatives in that pattern, but a score calculation alone cannot establish why the pattern occurred or resolve the consequences for a causal analysis.

The main alternatives answer different questions. The overall treatment proportion describes treatment frequency without conditioning on covariates. The observed \(A\) describes which treatment a person received. An outcome-risk quantity such as \(P(Y=1\mid X)\) concerns the outcome, not treatment assignment. Directly describing covariate patterns preserves the individual covariate information rather than summarizing it as one probability. None of these quantities is interchangeable with the propensity score.

The score’s usefulness in later causal methods depends on assumptions and design choices beyond this definition. For example, the score does not guarantee that all confounders have been measured, that treatment groups are comparable, or that a causal effect is identified. The introductory material on causal inference treats the broader requirements for causal interpretation; here, the point is to identify exactly what the score itself represents.

Common Mistakes

  • Calling the score the treatment received. \(A\) is the observed zero-or-one status; \(e(X)\) is a conditional probability that can be between zero and one.
  • Using outcome risk as the score. A probability involving \(Y\) describes an outcome; the propensity score conditions treatment assignment on \(X\).
  • Using the overall treatment proportion for every person. That is a marginal proportion and need not equal the conditional treatment probability in a covariate pattern.
  • Requiring \(P(X=x)>0\) for every possible covariate value. This condition applies to the elementary discrete-table interpretation. For continuous \(X\), conditional probabilities are defined almost surely and may be represented by a regular conditional distribution.
  • Interpreting a score as proof of causal validity. The score is a treatment-assignment probability; it does not itself verify the assumptions needed for a causal conclusion.
Key takeaway: The propensity score is \(P(A=1\mid X)\): the probability of treatment conditional on covariates. In a discrete table, calculate it as treated count divided by the covariate-pattern total. For continuous covariates, use the conditional-distribution definition rather than requiring positive probability at each exact covariate value.

Check Your Understanding

Answer each question, then compare your reasoning with the solutions below.

  1. In a covariate group of 80 people, 20 received treatment. What is the empirical propensity score for this group?
  2. Explain why a person’s observed treatment status is not their propensity score.
  3. In a hypothetical cohort, a joint covariate cell has 7 treated and 13 untreated people. Calculate the empirical score for that cell.
  4. Why does \(P(X=x)=0\) for an exact continuous covariate value not make the general propensity-score definition invalid?
  5. Does a high propensity score mean that a person has a high probability of a favorable outcome? Explain.

Solutions. (1) \(20/80=0.250\), the treated fraction within that group. (2) Treatment status is the realized value \(A=0\) or \(A=1\); the score \(P(A=1\mid X)\) is the conditional probability given covariates and need not equal that realized value. (3) \(7/(7+13)=7/20=0.350\). (4) The general definition is a conditional expectation, defined almost surely; a regular conditional distribution can represent it as a function of continuous covariates, while values on null sets are not uniquely determined. (5) No. A high score concerns the probability of treatment conditional on covariates, not the probability of a favorable outcome.

Clinical Biostats