# Wynik skłonności: dopasowanie i ważenie (propensity score)

EN: **Propensity score matching and weighting** · id `propensityscore` · aliases: propensity score, propensity-score methods, metody wyniku skłonności, wynik skłonności

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Fundamenty i rozumowanie](https://aiatlasgraph.com/t/foundations.md) › [Modele probabilistyczne](https://aiatlasgraph.com/t/probabilistic.md) › [Wnioskowanie przyczynowe](https://aiatlasgraph.com/t/causalinference.md) › Wynik skłonności: dopasowanie i ważenie (propensity score)

## Description

- PL: Prawdopodobieństwo otrzymania interwencji przy danych cechach, e(x) = P(T=1|X), używane do dopasowania, stratyfikacji lub ważenia w danych obserwacyjnych.
- EN: The probability of receiving treatment given covariates, e(x) = P(T=1|X), used for matching, stratification or weighting in observational data.

## In one sentence

- PL: Szacujesz, jak bardzo każda osoba była skłonna skorzystać z oferty, i porównujesz ludzi o podobnej skłonności.
- EN: You estimate how likely each person was to take up an offer and compare people with similar likelihoods.

## Problem it solves

- PL: Z oferty częściej korzystają ludzie, którzy i tak różnią się od reszty, więc prosta różnica wyników myli skutek z doborem.
- EN: People who take up an offer often differ from the rest anyway, so a simple outcome gap confuses the effect with who chose it.

## What it does

- PL: Zastępuje dziesiątki cech jedną liczbą, a potem paruje lub waży ludzi tak, by obie porównywane grupy wyglądały podobnie.
- EN: It replaces dozens of characteristics with one number, then pairs or weights people so the two compared groups look alike.

## Everyday example

- PL: Firma sprawdza, czy szkolenie podniosło sprzedaż. Porównuje uczestników z osobami, które miały podobne szanse zapisu, ale nie przyszły.
- EN: A company checks whether a training course raised sales, comparing attendees with people who had similar chances of signing up but did not come.

## This concerns you if you…

- PL: masz dane historyczne zamiast eksperymentu
- PL: porównujesz tych, którzy coś wybrali, z resztą
- EN: have historical data instead of an experiment
- EN: compare people who chose something with everyone else

## Keywords

propensity score matching · inverse probability weighting · IPTW · doubly robust estimation · AIPW · covariate balance · positivity · unconfoundedness · MatchIt

## How it works

- PL: Wynik skłonności jest wynikiem równoważącym: przy nieuwikłaniu warunkowanie na e(x) wystarcza zamiast na wszystkich cechach X. Model, np. regresja logistyczna lub boosting, szacuje e(x); potem paruje się jednostki o podobnym wyniku albo waży je odwrotnością prawdopodobieństwa otrzymanej opcji (IPW). Estymatory podwójnie odporne łączą ważenie z modelem wyniku.
- EN: The propensity score is a balancing score: under unconfoundedness, conditioning on e(x) suffices instead of all covariates X. A model such as logistic regression or boosting estimates e(x); units are then matched on it or weighted by the inverse probability of the option received (IPW). Doubly robust estimators combine weighting with an outcome model.

## Limits

- PL: Działa tylko, gdy zmierzono wszystkie zakłócacze. Wymaga nakładania grup (0 < e(x) < 1); skrajne wagi zwiększają wariancję, a ich obcinanie dodaje błąd. Model ma zawierać zakłócacze, nie maksymalizować trafności. Błędy standardowe dopasowania trudno oszacować.
- EN: Works only if all confounders are measured. Requires overlap (0 < e(x) < 1); extreme weights inflate variance and trimming adds bias. The model should include confounders, not maximise accuracy. Standard errors for matching are hard to obtain.

## Key terms

- PL: **nakładanie (overlap)**: Każdy ma realną szansę trafić do obu grup.
- PL: **IPW**: Ważenie obserwacji odwrotnością szansy na otrzymaną opcję.
- PL: **podwójna odporność**: Estymator poprawny, gdy trafny jest model skłonności albo model wyniku.
- PL: **balans cech**: Sprawdzenie, czy po ważeniu grupy mają podobne cechy.
- EN: **overlap**: Everyone has a real chance of ending up in either group.
- EN: **IPW**: Weighting observations by the inverse chance of the option received.
- EN: **double robustness**: Estimator is correct if either the propensity or outcome model is right.
- EN: **covariate balance**: Checking that groups have similar characteristics after weighting.

## Know first

- [Regresja liniowa i logistyczna (Linear and logistic regression)](https://aiatlasgraph.com/t/linearmodels.md)

## Sources

- [Matheus Facure · Causal Inference for the Brave and True (online handbook with Python code)](<https://matheusfacure.github.io/python-causality-handbook/>) `facure-brave-true` · by Matheus Facure

---

AI Atlas revision 131 (2026-11-07) · HTML: https://aiatlasgraph.com/t/propensityscore · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-11-07
