# Notes:Statistical test random variable

[ilmath]\newcommand{\B}{ {\mathbb{B} } } [/ilmath][ilmath]\newcommand{\O}{ {\mathcal{O} } } [/ilmath]
[ilmath]\newcommand{\P}[]{\mathbb{P}#1{\left[{#2}\right]} } \newcommand{\Pcond}[]{\mathbb{P}#1{\left[{#2}\!\ \middle\vert\!\ {#3}\right]} } \newcommand{\Plcond}[]{\Pcond[#1]{#2}{#3} } \newcommand{\Prcond}[]{\Pcond[#1]{#2}{#3} }[/ilmath]
[ilmath]\newcommand{\E}{ {\mathbb{E}{\left[{#1}\right]} } } [/ilmath][ilmath]\newcommand{\Mdm}{\text{Mdm}{\left({#1}\right) } } [/ilmath][ilmath]\newcommand{\Var}{\text{Var}{\left({#1}\right) } } [/ilmath][ilmath]\newcommand{\ncr}{ \vphantom{C}^{#1}\!C_{#2} } [/ilmath]

## Notice

This actually might just be the definition of joint probability applied to tests....

## Starting point

Let [ilmath](S,\Omega,\mathbb{P})[/ilmath][Note 1] be the probability space we take subjects from (so each subject takes a value in [ilmath]S[/ilmath], so forth); then:

• Let: [ilmath]\mathbb{B}:\eq\{0,\ 1\} [/ilmath] (or [ilmath]\mathbb{B}:\eq\{-,\ +\} [/ilmath]) for "negative" and "positive" respectively.
• We imbue [ilmath]\B[/ilmath] with the sigma-algebra [ilmath]\mathcal{P}(\mathbb{B})[/ilmath], which is: [ilmath]\big\{\emptyset,\{0\},\{1\},\{0,1\}\big\} [/ilmath]

We introduce a random variable, [ilmath]P:S\rightarrow\B [/ilmath],

• such that: [ilmath]P:S\rightarrow\B [/ilmath] is an "oracle" of sorts, specifically we have:
1. [ilmath]P:s\mapsto 1[/ilmath] for a subject with the property being tested for, and,
2. [ilmath]P:s\mapsto 0[/ilmath] if the property is absent.
• We assume [ilmath]P[/ilmath] is never wrong.
• Note:
• The random variable requirements imbue that [ilmath]P^{-1}(\{i\})\in\Omega[/ilmath] for [ilmath]i\in\B[/ilmath] - this should be enough as per generator of a sigma-algebra (
TODO: check
), but if not implicit we add:
1. [ilmath]P^{-1}(\{0,1\})\eq S\in\Omega[/ilmath] and
2. [ilmath]P^{-1}(\emptyset)\eq\emptyset\in\Omega[/ilmath] too

## Step 1

We now introduce another random variable:

• [ilmath]T:S\rightarrow\B[/ilmath] - for the same sigma-algebras as already covered, however [ilmath]T[/ilmath] need not have any "oracular" properties, it represents our test.

We now introduce:

• [ilmath]\O:S\rightarrow\B\times\B [/ilmath] given by [ilmath]\O:s\mapsto\big(P(s),T(s)\big) [/ilmath]
• We claim this is a random variable itself.
• We claim that: [ilmath]\O^{-1}(\{i,j\})\eq P^{-1}(\{i\})\cap T^{-1}(\{j\})[/ilmath]

## Finally

We can now talk about [ilmath]\P{P\eq i\text{ and }T\eq j} [/ilmath], thus about conditional probabilities like [ilmath]\Pcond{P\eq 1}{T\eq 1} [/ilmath] as a result - which is the goal.