Notes:Statistical test results

From Maths
Jump to: navigation, search
[ilmath]\newcommand{\P}[2][]{\mathbb{P}#1{\left[{#2}\right]} } \newcommand{\Pcond}[3][]{\mathbb{P}#1{\left[{#2}\!\ \middle\vert\!\ {#3}\right]} } \newcommand{\Plcond}[3][]{\Pcond[#1]{#2}{#3} } \newcommand{\Prcond}[3][]{\Pcond[#1]{#2}{#3} }[/ilmath]
[ilmath]\newcommand{\E}[1]{ {\mathbb{E}{\left[{#1}\right]} } } [/ilmath][ilmath]\newcommand{\Mdm}[1]{\text{Mdm}{\left({#1}\right) } } [/ilmath][ilmath]\newcommand{\Var}[1]{\text{Var}{\left({#1}\right) } } [/ilmath][ilmath]\newcommand{\ncr}[2]{ \vphantom{C}^{#1}\!C_{#2} } [/ilmath]

Notes

Let [ilmath]T:\eq(u,v)[/ilmath] be a statistical test, and [ilmath]P\eq 1[/ilmath] denote the thing being tested for being "true", then:

  • [ilmath]\Pcond{T\eq 1}{P\eq 1}\eq u[/ilmath] and
  • [ilmath]\Pcond{T\eq 0}{P\eq 0}\eq v[/ilmath]

Here we will investigate [ilmath]\P{T\eq 1} [/ilmath], [ilmath]\Pcond{P\eq 1}{T\eq 1} [/ilmath], [ilmath]\Pcond{P\eq 0}{T\eq 1} [/ilmath] and so forth

Observations

To find say [ilmath]\P{P\eq i} [/ilmath] you'd have to have [ilmath]\P{T\eq j} [/ilmath] for [ilmath]j\eq 0[/ilmath] and [ilmath]j\eq 1[/ilmath] already known - these both require some knowledge about the population

Findings

  • [math]\P{T\eq j}\eq \P{P\eq 0}\Pcond{T\eq j}{P\eq 0}+ \P{P\eq 1}\Pcond{T\eq j}{P\eq 1} [/math]
  • [math]\Pcond{P\eq i}{T\eq j}:\eq\frac{\P{P\eq i\cap T\eq j} }{\P{T\eq j} } [/math][math]\eq \frac{\Pcond{T\eq j}{P\eq i}\P{P\eq i} }{\P{T\eq j} } [/math]
    • Which we develop:
      [math]\eq \frac{\Pcond{T\eq j}{P\eq i}\P{P\eq i} } { \P{P\eq 0}\Pcond{T\eq j}{P\eq 0} + \P{P\eq 1}\Pcond{T\eq j}{P\eq 1} } [/math] - notice the denominator only depends on [ilmath]j[/ilmath] - the value of [ilmath]T[/ilmath]
    • Notice:
      • We can find [ilmath]\Pcond{T\eq j}{P\eq i} [/ilmath] from the definition of [ilmath]T[/ilmath]
      • [ilmath]\P{P\eq i} [/ilmath] must come from somewhere
      • [ilmath]\P{T\eq j} [/ilmath] - we will find below

We make the following definitions:

  • Let [ilmath]\P{P\eq 1}:\eq p[/ilmath]

Then:

  • Results given the test evaluates to positive
    • [math]\Pcond{P\eq 1}{T\eq 1}\eq\frac{pu}{(1-p)(1-v)+pu} [/math]
      • Notice that next we could find [ilmath]\Pcond{P\eq 0}{T\eq 1} [/ilmath] as [ilmath]1-\Pcond{P\eq 1}{T\eq 1} [/ilmath]
    • [math]\Pcond{P\eq 0}{T\eq 1}\eq\frac{(1-p)(1-v)}{(1-p)(1-v)+pu} [/math]
  • Results given the test evaluates to negative
    • [math]\Pcond{P\eq 1}{T\eq 0}\eq\frac{p(1-u)}{(1-p)v+p(1-u)} [/math]
      • Notice that next we could find [ilmath]\Pcond{P\eq 0}{T\eq 0} [/ilmath] as [ilmath]1-\Pcond{P\eq 1}{T\eq 0} [/ilmath]
    • [math]\Pcond{P\eq 0}{T\eq 0}\eq\frac{(1-p)v}{(1-p)v+p(1-u)} [/math]

The result [ilmath]\Pcond{P\eq 1}{T\eq 0} [/ilmath] is very important in diagnostic tests as this would be a subject that has the property but failed the test, usually the function of a (preliminary at least) test is to not miss any possible subjects - usually at the costs of more false positives - which are cases where the test was positive, but the property is absent.


Specifically:

  • Notice that to have [ilmath]\Pcond{P\eq 1}{T\eq 0} \eq 0[/ilmath] - no chance of having the property if your test was negative - that we require [ilmath]p(1-u)\eq 0[/ilmath][Note 1]
    • if [ilmath]p\eq 0[/ilmath] (i.e. [ilmath]\P{P\eq 1} \eq 0[/ilmath]) then this is a pointless test.
      • Thus we observe we must have [ilmath]1-u\eq 0[/ilmath] or [ilmath]u\eq 1[/ilmath]
        • this is to say in order to have a subject with the property failing the test being an impossibility we require the probability of the test being positive given the subject has the property is complete certainty
        • we could also say that false negatives are an impossibility
  • a corollary to this is that if [ilmath]u\eq 1[/ilmath] then testing negative means you can be completely certain that the subject does not have the property

Under the conditions of false negatives being an impossibility

Then:

  • [math]\Pcond{P\eq 1}{T\eq 1}\eq\frac{p}{p+(1-p)(1-v)} [/math]
  • [math]\Pcond{P\eq 0}{T\eq 1}\eq\frac{(1-p)(1-v)}{p+(1-p)(1-v) } [/math]
  • [math]\Pcond{P\eq 1}{T\eq 0}\eq 0[/math] - as discussed above
  • [math]\Pcond{P\eq 0}{T\eq 0}\eq 1[/math]

Analysis

Here I document a form of analysis I like to apply in some areas of statistics and probability, it's not named but extremely useful

To study tests I like to make the following definitions:

  • [ilmath]p\eq 10^{-k} [/ilmath]
    • This means that "1 in [ilmath]10^k[/ilmath] subjects have the property", for [ilmath]k\eq 0[/ilmath] it's 1 in 1 (certainty), for [ilmath]k\eq 1[/ilmath] it's 1 in 10, for [ilmath]k\eq 2[/ilmath] it's 1 in 100, so on so forth
    • Notice how after [ilmath]k\eq 0[/ilmath] everything is quite "rare" (as 1 in 10 is certainly not common)
    • This is the rarity convention, as larger k means the property is rarer.
  • Conversely we could want "9 in 10" or "99 out of 100", in this case let [ilmath]q:\eq 1-p[/ilmath] now:
    • [ilmath]q\eq 1-10^{-k} [/ilmath] is how we'd define it, so [ilmath]k\eq 0[/ilmath] is 0 in 1 (impossibility), for [ilmath]k\eq 1[/ilmath] it's 9 in 10, for [ilmath]k\eq 2[/ilmath] it's 99 in 100, so on so forth
    • This is the commonality convention

These are also very useful when plotted, compared to a plot that shows [ilmath]p[/ilmath] directly on the range [ilmath][0,1][/ilmath] as it'll get very steep - by using [ilmath]k[/ilmath] for [ilmath]k\in\mathbb{R}_{\ge 0} [/ilmath] a lot of the situation is visible.

Notes

  1. The reader should convince himself that a limit where the denominator tends to positive infinity cannot happen