Difference between revisions of "Notes:Statistical test results"
(Created page with "{{ProbMacros}}__TOC__ ==Notes== Let {{M|T:\eq(u,v)}} be a statistical test, and {{M|P\eq 1}} denote the thing being tested for being "true", then: * {{M|\Pcond{T\eq 1}{P\e...") |
(Adding more stuff) |
||
Line 38: | Line 38: | ||
*** Thus we observe we must have {{M|1-u\eq 0}} or {{M|u\eq 1}} | *** Thus we observe we must have {{M|1-u\eq 0}} or {{M|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''' | **** 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 {{M|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: | ||
+ | * {{MM|\Pcond{P\eq 1}{T\eq 1}\eq\frac{p}{p+(1-p)(1-v)} }} | ||
+ | * {{MM|\Pcond{P\eq 0}{T\eq 1}\eq\frac{(1-p)(1-v)}{p+(1-p)(1-v) } }} | ||
+ | * {{MM|\Pcond{P\eq 1}{T\eq 0}\eq 0}} - as discussed above | ||
+ | * {{MM|\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: | ||
+ | * {{M|p\eq 10^{-k} }} | ||
+ | ** This means that "1 in {{M|10^k}} subjects have the property", for {{M|k\eq 0}} it's 1 in 1 (certainty), for {{M|k\eq 1}} it's 1 in 10, for {{M|k\eq 2}} it's 1 in 100, so on so forth | ||
+ | ** Notice how after {{M|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 {{M|q:\eq 1-p}} now: | ||
+ | ** {{M|q\eq 1-10^{-k} }} is how we'd define it, so {{M|k\eq 0}} is 0 in 1 (impossibility), for {{M|k\eq 1}} it's 9 in 10, for {{M|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 {{M|p}} directly on the range {{M|[0,1]}} as it'll get very steep - by using {{M|k}} for {{M|k\in\mathbb{R}_{\ge 0} }} a lot of the situation is visible. | ||
==Notes== | ==Notes== | ||
<references group="Note"/> | <references group="Note"/> |
Latest revision as of 09:17, 29 January 2018
Contents
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
- Which we develop:
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]
- [math]\Pcond{P\eq 1}{T\eq 1}\eq\frac{pu}{(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]
- [math]\Pcond{P\eq 1}{T\eq 0}\eq\frac{p(1-u)}{(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
- Thus we observe we must have [ilmath]1-u\eq 0[/ilmath] or [ilmath]u\eq 1[/ilmath]
- if [ilmath]p\eq 0[/ilmath] (i.e. [ilmath]\P{P\eq 1} \eq 0[/ilmath]) then this is a pointless test.
- 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
- ↑ The reader should convince himself that a limit where the denominator tends to positive infinity cannot happen