Salta al contenuto
Note per Studenti Empirical Probabilities and Diagnostic Tests Report

Empirical Probabilities and Diagnostic Tests

Empirical probability measure

When the experiment modelled by a probability space can be repeated many times under similar conditions, one can assign an empirical probability measure instead of choosing a measure by theoretical arguments. Let (Ω,F)(\Omega, \mathcal{F}) be already chosen. To define the empirical measure P^n\hat P_n:

  1. repeat the experiment nn times and record the outcomes ω1,ω2,…,ωn\omega_1, \omega_2, \dots, \omega_n;
  2. to every event E∈FE \in \mathcal{F} assign the probability P^n(E)=1n∑i=1nχE(ωi)=nEn,\hat P_n(E) = \frac{1}{n} \sum_{i=1}^{n} \chi_E(\omega_i) = \frac{n_E}{n}, where χE\chi_E is the indicator function of EE, nEn_E is the number of recorded outcomes ωi\omega_i that belong to EE, and nn is the total number of recorded outcomes.

It has already been checked (in the earlier lectures, see Empirical and Equiprobable MeasuresProbability theory does not say how to choose P; two common choices are the empirical measure built from repeated trials and, on a finite sample space, the equiprobable measure P(E) = favourable cases over all cases.Empirical and Equiprobable Measures →) that P^n\hat P_n is a probability measure. Conditional probabilities are treated in Conditional ProbabilityThe conditional probability P(E|F) = P(E and F)/P(F) updates the probability of E after learning that F occurred; it is itself a probability measure and yields the multiplication formula for intersections.Conditional Probability →.

Intersections and conditional empirical probabilities

For E,F∈FE, F \in \mathcal{F} the empirical probability of the intersection is P^n(E∩F)=nE∩Fn,\hat P_n(E \cap F) = \frac{n_{E \cap F}}{n}, where nE∩Fn_{E\cap F} is the number of recorded outcomes in E∩FE \cap F.

The empirical conditional probability of EE given FF follows from the definition of conditional probability: P^n(E∣F)=P^n(E∩F)P^n(F)=nE∩Fn⋅nnF=nE∩FnF.\hat P_n(E \mid F) = \frac{\hat P_n(E \cap F)}{\hat P_n(F)} = \frac{n_{E \cap F}}{n}\cdot\frac{n}{n_F} = \frac{n_{E \cap F}}{n_F}. So it is simply the fraction of the outcomes in FF that also lie in EE.

Diagnostic tests

In many practical situations, for example to model diagnostic tests, the sample space contains four elementary outcomes: Ω={T+,T−}×{D+,D−}={T+D+, T+D−, T−D+, T−D−}.\Omega = \{T_+, T_-\} \times \{D_+, D_-\} = \{T_+D_+,\ T_+D_-,\ T_-D_+,\ T_-D_-\}. Here T+T_+ / T−T_- mean that the test is positive / negative, and D+D_+ / D−D_- mean that the individual does / does not have the condition.

To characterise the test, i.e. to specify its sensitivity and specificity, the test is administered to

  • a number nD+n_{D_+} of individuals with the condition D+D_+ (as determined in the lab with exact procedures), and
  • a number nD−n_{D_-} of individuals without the condition (again determined by an exact procedure).

After the test is given to the nD+n_{D_+} individuals, one records

  • nT+D+n_{T_+D_+}: individuals with the condition who test positive,
  • nT−D+n_{T_-D_+}: individuals with the condition who test negative,

and clearly nT+D++nT−D+=nD+n_{T_+D_+} + n_{T_-D_+} = n_{D_+}. In the same way, for the D−D_- individuals one records nT+D−n_{T_+D_-} and nT−D−n_{T_-D_-} with nT+D−+nT−D−=nD−n_{T_+D_-} + n_{T_-D_-} = n_{D_-}.

The four numbers are organised in a contingency table (the last row contains the column sums):

            D+            D-
  T+     n(T+D+)       n(T+D-)
  T-     n(T-D+)       n(T-D-)
  sum      n(D+)         n(D-)

From the table: P^n(T+∣D+)=nT+D+nD+(sensitivity),P^n(T−∣D−)=nT−D−nD−(specificity).\hat P_n(T_+ \mid D_+) = \frac{n_{T_+D_+}}{n_{D_+}} \quad \text{(sensitivity)}, \qquad \hat P_n(T_- \mid D_-) = \frac{n_{T_-D_-}}{n_{D_-}} \quad \text{(specificity)}.

Sensitivity is the empirical probability that the test is positive for someone who has the condition; specificity is the empirical probability that it is negative for someone who does not.

Versione ripasso

  • Repeat the experiment nn times, outcomes ω1,…,ωn\omega_1,\dots,\omega_n. Empirical measure: P^n(E)=1n∑iχE(ωi)=nEn\hat P_n(E) = \frac{1}{n}\sum_i \chi_E(\omega_i) = \frac{n_E}{n}; it is a probability measure.
  • P^n(E∩F)=nE∩F/n\hat P_n(E \cap F) = n_{E\cap F}/n and P^n(E∣F)=P^n(E∩F)/P^n(F)=nE∩F/nF\hat P_n(E \mid F) = \hat P_n(E\cap F)/\hat P_n(F) = n_{E\cap F}/n_F.
  • Diagnostic test: Ω={T+,T−}×{D+,D−}\Omega = \{T_+,T_-\}\times\{D_+,D_-\}. Test nD+n_{D_+} individuals known to have the condition and nD−n_{D_-} known not to; fill the contingency table of nT+D+,nT−D+,nT+D−,nT−D−n_{T_+D_+}, n_{T_-D_+}, n_{T_+D_-}, n_{T_-D_-} (column sums nD+n_{D_+}, nD−n_{D_-}).
  • Sensitivity =P^n(T+∣D+)=nT+D+/nD+=\hat P_n(T_+\mid D_+) = n_{T_+D_+}/n_{D_+}; specificity =P^n(T−∣D−)=nT−D−/nD−=\hat P_n(T_-\mid D_-) = n_{T_-D_-}/n_{D_-}.
  • Typical mistake: dividing by the grand total nn instead of the column sum nD±n_{D_\pm} when computing sensitivity or specificity.

Teoria collegata