Notes:Statistical test results

From Maths
Jump to: navigation, search
\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} }
\newcommand{\E}[1]{ {\mathbb{E}{\left[{#1}\right]} } } \newcommand{\Mdm}[1]{\text{Mdm}{\left({#1}\right) } } \newcommand{\Var}[1]{\text{Var}{\left({#1}\right) } } \newcommand{\ncr}[2]{ \vphantom{C}^{#1}\!C_{#2} }

Notes

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

  • \Pcond{T\eq 1}{P\eq 1}\eq u and
  • \Pcond{T\eq 0}{P\eq 0}\eq v

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

Observations

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

Findings

  • \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}
  • \Pcond{P\eq i}{T\eq j}:\eq\frac{\P{P\eq i\cap T\eq j} }{\P{T\eq j} } \eq \frac{\Pcond{T\eq j}{P\eq i}\P{P\eq i} }{\P{T\eq j} }
    • Which we develop:
      \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} } - notice the denominator only depends on j - the value of T
    • Notice:
      • We can find \Pcond{T\eq j}{P\eq i} from the definition of T
      • \P{P\eq i} must come from somewhere
      • \P{T\eq j} - we will find below

We make the following definitions:

  • Let \P{P\eq 1}:\eq p

Then:

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

The result \Pcond{P\eq 1}{T\eq 0} 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 \Pcond{P\eq 1}{T\eq 0} \eq 0 - no chance of having the property if your test was negative - that we require p(1-u)\eq 0[Note 1]
    • if p\eq 0 (i.e. \P{P\eq 1} \eq 0) then this is a pointless test.
      • Thus we observe we must have 1-u\eq 0 or u\eq 1
        • 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 u\eq 1 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:

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

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:

  • p\eq 10^{-k}
    • This means that "1 in 10^k subjects have the property", for k\eq 0 it's 1 in 1 (certainty), for k\eq 1 it's 1 in 10, for k\eq 2 it's 1 in 100, so on so forth
    • Notice how after k\eq 0 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 q:\eq 1-p now:
    • q\eq 1-10^{-k} is how we'd define it, so k\eq 0 is 0 in 1 (impossibility), for k\eq 1 it's 9 in 10, for k\eq 2 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 p directly on the range [0,1] as it'll get very steep - by using k for k\in\mathbb{R}_{\ge 0} a lot of the situation is visible.

Notes

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