Jump to content

Type I and type II errors: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
No edit summary
Line 2: Line 2:
{{short description|Concepts from statistical hypothesis testing}}
{{short description|Concepts from statistical hypothesis testing}}
{{technical|date=April 2019}}
{{technical|date=April 2019}}
In [[statistical hypothesis testing]] a '''type I error''' is the rejection of a true null hypothesis (also known as a "false positive" finding or conclusion), while a '''type II error''' is the non-rejection of a false null hypothesis (also known as a "false negative" finding or conclusion).<ref>{{cite web|url=https://explorable.com/type-i-error|title=Type I Error and Type II Error - Experimental Errors|website=explorable.com|access-date=2016-05-30}}</ref> Much of statistical theory revolves around the [[Sensitivity and specificity|minimization of one or both]] of these errors, though the complete elimination of either is a [[Bayes error rate|statistical impossibility]] for [[non-deterministic algorithm]]s.
In statistical hypothesis testing a type I error is the rejection of a true null hypothesis (also known as a "false positive" finding or conclusion), while a type II error is the non-rejection of a false null hypothesis (also known as a "false negative" finding or conclusion<ref>{{Cite web|url=https://explorable.com/|title=Explorable - Think Outside The Box - Research, Experiments, Psychology, Self-Help|website=explorable.com|access-date=2019-12-14}}</ref>). Much of statistical theory revolves around the minimization of one or both of these errors, though the complete elimination of either is a statistical impossibility for non-deterministic algorithms. Through selecting threshold(cut-off) value and modifying the alpha(p) level, people could manage to improve the quality of hypothesis test. <ref>{{Cite journal|last=Chow|first=Y. W.|last2=Pietranico|first2=R.|last3=Mukerji|first3=A.|date=1975-10-27|title=Studies of oxygen binding energy to hemoglobin molecule|url=https://www.ncbi.nlm.nih.gov/pubmed/6|journal=Biochemical and Biophysical Research Communications|volume=66|issue=4|pages=1424–1431|doi=10.1016/0006-291x(75)90518-5|issn=0006-291X|pmid=6}}</ref>The knowledge of Type I error and Type II error is widely used in [[medical science]], [[biometrics]] and [[computer science]], resulting in the importance of distinguishing and controlling of these two types of errors.


==Definition==
== Definition ==
'''Statistical Background'''
In [[statistics]], a [[null hypothesis]] is a statement that one seeks to nullify (that is, to conclude is incorrect) with evidence to the contrary. Most commonly, it is presented as a statement that the phenomenon being studied produces no effect or makes no difference. An example of such a null hypothesis might be the statement, "A diet low in carbohydrates has no effect on people's weight." An experimenter usually frames a null hypothesis with the intent of rejecting it: that is, intending to run an experiment which produces data that shows that the phenomenon under study does indeed make a difference (in this case, that a diet low in carbohydrates over some specific time frame does in fact tend to lower the body weight of people who adhere to it).<ref name="Sheskin">{{cite book | title=Handbook of Parametric and Nonparametric Statistical Procedures | publisher=CRC Press | author=Sheskin, David | year=2004 | isbn=1584884401 | page=[https://books.google.com/books?id=ZvDLBQAAQBAJ&pg=PA54 54]}}</ref> In some cases there is a specific [[alternative hypothesis]] that is opposed to the null hypothesis, in other cases the alternative hypothesis is not explicitly stated, or is simply "the null hypothesis is false" — in either event, this is a binary judgment, but the interpretation differs and is a matter of significant dispute in statistics.
* A ''type&nbsp;I error'' (or ''error of the first kind'') is the rejection of a true null hypothesis. Usually a type I error leads to the conclusion that a supposed effect or relationship exists when in fact it does not. Examples of type I errors include a test that shows a patient to have a disease when in fact the patient does not have the disease, a fire alarm going on indicating a fire when in fact there is no fire, or an experiment indicating that a medical treatment should cure a disease when in fact it does not.
* A ''type II error'' (or ''error of the second kind'') is the failure to reject a false null hypothesis. Some examples of type II errors are a blood test failing to detect the disease it was designed to detect, in a patient who really has the disease; a fire breaking out and the fire alarm does not ring; or a clinical trial of a medical treatment failing to show that the treatment works when really it does.


In [[statistical test theory]], the notion of a [[Errors and residuals|statistical error]] is an integral part of [[Hypothesis Testing|hypothesis testing]]. The test goes about choosing about two competing propositions called [[null hypothesis]], denoted by H<sub>0</sub> and [[alternative hypothesis]], denoted by H<sub>1</sub> . This is conceptually similar to the judgement in a court trial. The null hypothesis corresponds to the position of defendant: just as he is presumed to be innocent until proven guilty, so is the null hypothesis presumed to be true until the data provide convincing evidence against it. The alternative hypothesis corresponds to the position against the defendant.
In terms of [[false positives and false negatives]], a positive result corresponds to rejecting the null hypothesis, while a negative result corresponds to failing to reject the null hypothesis; "false" means the conclusion drawn is incorrect. Thus a type I error is a false positive, and a type II error is a false negative.


If the result of the test corresponds with reality, then a correct decision has been made. However, if the result of the test does not correspond with reality, then an error has occurred. There are two situations in which the decision is wrong. The null hypothesis may be true, whereas we reject H0. On the other hand, the alternative hypothesis H1 may be true, whereas we do not reject H0. Two types of error are distinguished: Type I error and type II error. <ref>{{Cite book|url=https://www.worldcat.org/oclc/262680588|title=A modern introduction to probability and statistics : understanding why and how|date=2005|publisher=Springer|others=Dekking, Michel, 1946-|isbn=978-1-85233-896-1|location=London|oclc=262680588}}</ref>
When comparing two means, concluding the means were different when in reality they were not different is a type I error; concluding the means were not different when in reality they were different is a type II error. Various extensions have been suggested as "[[type III error]]s", though none have wide use{{according to whom|date=June 2019}}.


All [[statistical hypothesis testing|statistical hypothesis tests]] have a probability of making type I and type II errors. For example, all blood tests for a disease will falsely detect the disease in some proportion of people who do not have it, and will fail to detect the disease in some proportion of people who do have it. A test's probability of making a type I error is denoted by α. A test's probability of making a type II error is denoted by β. These error rates are traded off against each other: for any given sample set, the effort to reduce one type of error generally results in increasing the other type of error. For a given test, the only way to reduce both error rates is to increase the sample size, and this may not be feasible. A test statistic is robust if the Type I error rate is controlled.<ref name="Welch">{{cite journal|last1=Derrick|first1=B|last2=Toher|first2=D|last3=White|first3=P|title=Why Welchs test is Type I error robust|journal=The Quantitative Methods for Psychology|date=2016|volume=12|issue=1|pages=30–38|doi=10.20982/tqmp.12.1.p030|url=http://eprints.uwe.ac.uk/27232/27/p030.pdf}}</ref>{{why|date=June 2019}}


'''Type I error'''
These terms are also used in a more general way by social scientists and others to refer to flaws in reasoning.<ref name="Shermer 2002 455" />


The first kind of error is the rejection of a true null hypothesis as the result of a test procedure. This kind of error is called a type I error and is sometimes called an error of the first kind.
==Statistical test theory==
In [[statistical test]] theory, the notion of a ''statistical error'' is an integral part of [[hypothesis testing]]. The test requires an unambiguous statement of a null hypothesis, which usually corresponds to a default "state of nature", for example "this person is healthy", "this accused is not guilty" or "this product is not broken". An alternative hypothesis is the negation of null hypothesis, for example, "this person is not healthy", "this accused is guilty" or "this product is broken". The result of the test may be negative, relative to the null hypothesis (not healthy, guilty, broken) or positive (healthy, not guilty, not broken). If the result of the test corresponds with reality, then a correct decision has been made. However, if the result of the test does not correspond with reality, then an error has occurred. Due to the statistical nature of a test, the result is never, except in very rare cases, free of error. Two types of error are distinguished:
''type&nbsp;I error'' and ''type&nbsp;II error''.


In terms of the courtroom example, a type I error corresponds to convicting an innocent defendant.
===Type I error===<!--This section is linked from "Type I error" and "significance level"-->
A '''type&nbsp;I error''' occurs when the [[null hypothesis]] (''H''<sub>0</sub>) is true, but is rejected. It is asserting something that is absent, a ''false hit''. A type&nbsp;I error is often referred to as a [[false positive]] (a result that indicates that a given condition is present when it actually is not present).


In terms of folk tales, an investigator may see the wolf when there is none ("raising a false alarm") where the null hypothesis (''H''<sub>0</sub>) comprises the statement: "There is no wolf".


'''Type II error'''
The type&nbsp;I error rate or '''significance level''' is the probability of rejecting the null hypothesis given that it is true.<ref name = "Lindenmayer and Burgman">{{cite book | last1 = Lindenmayer | first1 = David | last2 = Burgman | first2 = Mark A. | chapter = Monitoring, assessment and indicators | title = Practical Conservation Biology | edition = PAP/CDR | publisher = CSIRO Publishing | location = Collingwood, Victoria, Australia | year = 2005 | isbn = 0-643-09089-4 | pages = 401–424}}</ref><ref name=Schlotzhauer>{{cite book |last1 = Schlotzhauer | first1 = Sandra | title = Elementary Statistics Using JMP (SAS Press) | edition = 1 |publisher = SAS Institute | location = Cary, NC | year = 2007 |isbn = 1-599-94375-1 | pages = 166–423}}</ref> It is denoted by the Greek letter α (alpha) and is also called the alpha level. Often, the significance level is set to 0.05 (5%), implying that it is acceptable to have a 5% probability of incorrectly rejecting the null hypothesis.<ref name = "Lindenmayer and Burgman" />


The second kind of error is the failure to reject a false null hypothesis as the result of a test procedure. This sort of error is called a type II error and is also referred to as an error of the second kind.
===Type II error===<!--This section is linked from "Type II error"-->
A '''type&nbsp;II error''' occurs when the null hypothesis is false, but erroneously fails to be rejected. It is failing to assert what is present, a ''miss''. A type&nbsp;II error is often called a [[false negative]] (where an actual hit was disregarded by the test and is seen as a miss) in a test checking for a single condition with a definitive result of true or false. A type II error is committed when a true alternative hypothesis is not believed.<ref name="Shermer 2002 455">{{cite book |title=The Skeptic Encyclopedia of Pseudoscience 2 volume set |last=Shermer |first=Michael |year=2002 |publisher=ABC-CLIO |isbn=1-57607-653-9 |page=455 |url=https://books.google.com/books?id=Gr4snwg7iaEC&pg=PA455&lpg=PA455&dq=type+ii+error+skepticism&source=bl&ots=bCBz8JJBTo&sig=FpB-13Igea9cS40ZZkP8CiAwxm8&hl=en&ei=3M4rTfq1EsWblgeK8oj_Cw&sa=X&oi=book_result&ct=result&resnum=5&ved=0CDQQ6AEwBA#v=onepage&q=type%20ii%20error%20skepticism&f=false |accessdate=10 January 2011}}</ref>


In terms of the courtroom example, a type II error corresponds to acquitting a criminal<ref>{{Cite book|url=https://www.worldcat.org/oclc/262680588|title=A modern introduction to probability and statistics : understanding why and how|date=2005|publisher=Springer|others=Dekking, Michel, 1946-|isbn=978-1-85233-896-1|location=London|oclc=262680588}}</ref>.
In terms of folk tales, an investigator may fail to detect the wolf when in fact a wolf is present (and therefore fail to raise an alarm). Again, ''H''<sub>0</sub>, the null hypothesis, comprises the statement: "There is no wolf", which, if a wolf is indeed present, is a type II error on the part of the investigator (the wolf either exists or does not exist within a given context—the only question is if it is correctly detected or not, either failing to detect it when it is present, or detecting it when it is not present).



The rate of the type&nbsp;II error is denoted by the Greek letter β (beta) and related to the [[Statistical power|power]] of a test (which equals 1−β).
'''False positive and false negative'''

''See more information in:[[False positives and false negatives|False positive and false negative]]''

In terms of false positives and false negatives, a positive result corresponds to rejecting the null hypothesis, while a negative result corresponds to failing to reject the null hypothesis; "false" means the conclusion drawn is incorrect. Thus, a type I error is equivalent to a false positive, and a type II error is equivalent to a false negative.


===Table of error types===
===Table of error types===


Tabularised relations between truth/falseness of the null hypothesis and outcomes of the test:<ref name=Sheskin />
Tabularised relations between truth/falseness of the null hypothesis and outcomes of the test:<ref name="Sheskin">{{cite book|title=Handbook of Parametric and Nonparametric Statistical Procedures|author=Sheskin, David|publisher=CRC Press|year=2004|isbn=1584884401|page=[https://books.google.com/books?id=ZvDLBQAAQBAJ&pg=PA54 54]}}</ref>


{| class="wikitable"
{| class="wikitable"
Line 61: Line 58:
|}
|}


=== Error rates ===
== Error Rate ==
[[File:ROC curves.svg|thumb|upright=2.5|left|The results obtained from positive sample (left curve) overlap with the results obtained from negative samples (right curve). By moving the result cutoff value (vertical bar), the rate of false positives (FP) can be decreased, at the cost of raising the number of false negatives (FN), or vice-versa.]]
[[File:ROC curves.svg|thumb|upright=2.5|left|The results obtained from positive sample (left curve) overlap with the results obtained from negative samples (right curve). By moving the result cutoff value (vertical bar), the rate of false positives (FP) can be decreased, at the cost of raising the number of false negatives (FN), or vice-versa.]]


A perfect test would have zero false positives and zero false negatives. However, Statistics is a game of probability, and we can never know for certain whether our statistical conclusions are correct. Whenever there is uncertainty, there is the possibility of making an error. Considering this nature of statistics science, all statistical hypothesis tests have a probability of making type I and type II errors.<ref>{{Cite journal|last=Smith|first=R. J.|last2=Bryant|first2=R. G.|date=1975-10-27|title=Metal substitutions incarbonic anhydrase: a halide ion probe study|url=https://www.ncbi.nlm.nih.gov/pubmed/3|journal=Biochemical and Biophysical Research Communications|volume=66|issue=4|pages=1281–1286|doi=10.1016/0006-291x(75)90498-2|issn=0006-291X|pmid=3}}</ref>
A perfect test would have zero false positives and zero false negatives. Most tests are, however, [[non-deterministic algorithm]]s, and will thus have a non-zero [[Bayes error rate]]. It is therefore necessary to set a threshold or cut-off value; results on one side of the threshold are deemed positive, and results on the other side negative. Setting the threshold value always involves a trade-off between:{{citation needed|date=June 2019}}
# the acceptable level of false positives (in which a non-match is declared to be a match) and
# the acceptable level of false negatives (in which an actual match is not detected).


·      The type I error rate or significance level is the probability of rejecting the null hypothesis given that it is true. It is denoted by the Greek letter α (alpha) and is also called the alpha level. Usually, the significance level is set to 0.05 (5%), implying that it is acceptable to have a 5% probability of incorrectly rejecting the true null hypothesis<ref>{{Cite book|url=https://www.worldcat.org/oclc/65216357|title=Practical conservation biology|last=Lindenmayer, David.|date=2005|publisher=CSIRO Pub|others=Burgman, Mark A.|isbn=0-643-09310-9|location=Collingwood, Vic.|oclc=65216357}}</ref>.
The same idea can be expressed in terms of the rate of correct results. A threshold (cutoff) value can be varied to make the test either [[Sensitivity and specificity|more specific or more sensitive]]. The specificity is proportion of positive results which are correct (true positives/all positives). The sensitivity is the rate of negative results which are correct (true negatives/all negatives). More specific tests increase the risk of false negatives, and the more sensitive tests increase the risk of false positives.


·      The rate of the type II error is denoted by the Greek letter β (beta) and related to the power of a test, denoted p-value, which equals 1−β. <ref>{{Cite journal|last=Chow|first=Y. W.|last2=Pietranico|first2=R.|last3=Mukerji|first3=A.|date=1975-10-27|title=Studies of oxygen binding energy to hemoglobin molecule|url=https://www.ncbi.nlm.nih.gov/pubmed/6|journal=Biochemical and Biophysical Research Communications|volume=66|issue=4|pages=1424–1431|doi=10.1016/0006-291x(75)90518-5|issn=0006-291X|pmid=6}}</ref>
If either positives or negatives are much more common, one curve may be much bigger than the other (see graph{{Image requested inline|similar diagram showing how frequency affects error rates}}), increasing the overlap and the number of false results. In this case moving the cut-off may increase accuracy.


These two types of error rates are traded off against each other: for any given sample set, the effort to reduce one type of error generally results in increasing the other type of error. <ref>{{Cite journal|last=Smith|first=R. J.|last2=Bryant|first2=R. G.|date=1975-10-27|title=Metal substitutions incarbonic anhydrase: a halide ion probe study|url=https://www.ncbi.nlm.nih.gov/pubmed/3|journal=Biochemical and Biophysical Research Communications|volume=66|issue=4|pages=1281–1286|doi=10.1016/0006-291x(75)90498-2|issn=0006-291X|pmid=3}}</ref>
The quality of the test is independent of the cut-off value; it is determined by the [[Receiver operating characteristic|shape and separation of the result curves]] from the positives and negatives. If the curves are identical, the test is useless; if they are close together, it is poor; and the more widely they are separated, the better it is. In a perfect test, the curves would not overlap at all, although
this is [[Bayes error rate|impossible]] for [[non-deterministic algorithm]]s.


== Examples ==


'''The quality of hypothesis test'''
===Example 1===


The same idea can be expressed in terms of the rate of correct results and therefore used to minimize error rates and improve the quality of hypothesis test. To reduce your chance of committing a Type I error, making the alpha(p) value more stringent is quite simple and efficient. To decrease your chance of committing a Type II error, which is closely associated to your analyses’ statistical power, either increasing the test’s sample size or relaxing the alpha level could increase the analyses’ power.<ref>{{Cite journal|last=Smith|first=R. J.|last2=Bryant|first2=R. G.|date=1975-10-27|title=Metal substitutions incarbonic anhydrase: a halide ion probe study|url=https://www.ncbi.nlm.nih.gov/pubmed/3|journal=Biochemical and Biophysical Research Communications|volume=66|issue=4|pages=1281–1286|doi=10.1016/0006-291x(75)90498-2|issn=0006-291X|pmid=3}}</ref> A test statistic is robust if the Type I error rate is controlled.
''Hypothesis:'' "Adding water to toothpaste protects against [[Dental caries|cavities]]."


Varying different threshold(cut-off) value could also be used to make the test either more specific or more sensitive, which in turn elevates the test quality. For example, imagine a medical test, in which experimenter might measure the concentration of a certain protein in the blood sample. Experimenter could adjust the threshold (black vertical line in the figure) and people would be diagnosed as having diseases if any number is detected above this certain threshold. According to the image, changing the threshold would result in changes in false positives and false negatives, corresponding to movement on the curve. <ref>{{Cite journal|last=Moroi|first=K.|last2=Sato|first2=T.|date=1975-08-15|title=Comparison between procaine and isocarboxazid metabolism in vitro by a liver microsomal amidase-esterase|url=https://www.ncbi.nlm.nih.gov/pubmed/8|journal=Biochemical Pharmacology|volume=24|issue=16|pages=1517–1521|doi=10.1016/0006-2952(75)90029-5|issn=1873-2968|pmid=8}}</ref>
''Null hypothesis (H<sub>0</sub>):'' "Adding water does not make toothpaste more effective in fighting cavities."


== Example ==
This null hypothesis is tested against experimental data with a view to nullifying it with evidence to the contrary.


Since in a real experiment, it is impossible to avoid all the type I and type II error, it is thus important to consider the amount of risk the one is willing to take to falsely reject H<sub>0</sub> or accept H<sub>0</sub>. The solution to this question would be to repot the [[p-value]] or [[Statistical significance|significance level]] α of the statistic. For example, if we say, the [[p-value]] of a test statistic result is 0.0596,then there is a probability of 5.96% that we falsely reject H<sub>0</sub>.Or, if we say, the statistic is performed at level α, like 0.05, then we allow to falsely reject H<sub>0</sub> at 5%. Usually, the significance level α will be set to 0.05, but there is not general rule.
A type&nbsp;I error occurs when detecting an effect (adding water to toothpaste protects against cavities) that is not present. The null hypothesis is true (i.e., it is true that adding water to toothpaste does not make it more effective in protecting against cavities), but this null hypothesis is rejected based on bad experimental data or an extreme outcome of chance alone.


===Example 2===


'''Vehicle speed measuring'''
''Hypothesis:'' "Adding [[fluoride]] to toothpaste protects against cavities."


The speed limit of a freeway in United State is 120 kilometers per hour. A device is set to measure the speed of passing vehicles. Suppose that the device will conduct three measurements of the speed a passing vehicle, recording as a random sample X<sub>1</sub> , X<sub>2</sub>, X<sub>3</sub>. The traffic police will or will not fine the drivers depending on the average speed ¯X3. That is to say, the test statistic
''Null hypothesis (H<sub>0</sub>):'' "Adding fluoride to toothpaste has no effect on cavities."


<math>T=\frac{X_1+X_2+X_3}{3}=\bar X</math>
This null hypothesis is tested against experimental data with a view to nullifying it with evidence to the contrary.


In addition, we suppose that the measurements X<sub>1</sub> , X<sub>2</sub>, X<sub>3</sub> are modeled as normal distribution N(μ,4). Then,  should follow N(μ,3/4) and the parameter μ represents the true speed of passing vehicle. In this experiment, the null hypothesis H<sub>0</sub> and the alternative hypothesis H<sub>1</sub> should be
A type&nbsp;II error occurs when failing to detect an effect (adding fluoride to toothpaste protects against cavities) that is present. The null hypothesis is false (i.e., adding fluoride is actually effective against cavities), but data from the given experiment are such that the null hypothesis cannot be rejected.


H<sub>0</sub>: μ=120     against      H<sub>1</sub>: μ<sub>1</sub>>120.
===Example 3===


If we perform the statistic level at α=0.05, then a [[critical value]] c should be calculated to solve
''Hypothesis:'' "The evidence produced before the court proves that this man is guilty."


<math>P=(Z\geqslant\frac{c-120}{\frac{2}{\sqrt{3}}})=0.05</math>
''Null hypothesis (H<sub>0</sub>):'' "This man is not guilty."


According to change-of-units rule for the normal distribution. Referring to [[Z table|Z-table]], we can get
A type&nbsp;I error occurs when convicting an innocent person (a [[miscarriage of justice]]). A type&nbsp;II error occurs when letting a guilty person go free (an [[errors of impunity|error of impunity]]).


<math>\frac{c-120}{\frac{2}{\sqrt{3}}}=1.645</math> <math>c=121.9</math>
A positive correct outcome occurs when convicting a guilty person. A negative correct outcome occurs when letting an innocent person go free.


Here, the critical region . That is to say, if the recored speed of a vehicle is greater than critical value 121.9, the driver will be fined.However, there are still 5% of the drivers are falsely fined since the recorded average speed is greater than 121.9 but the true speed does not pass 120, which we say, a type I error.
=== Example 4 ===


The type II error corresponds to the case that the true speed of a vehicle is over 120 kilometers per hour but the driver is not fined. For example, if the true speed of a vehicle μ=125, the probability that the driver is not fined can be calculated as
''Hypothesis:'' "A patient's symptoms improve after treatment A more rapidly than after a [[placebo]] treatment."


<math>P=(T<129.1|\mu=125)=P(\frac{T-125}{\frac{2}{\sqrt{3}}}<\frac{121.9-125}{\frac{2}{\sqrt{3}}})=\phi(-2.68)=0.0036</math>
''Null hypothesis (H<sub>0</sub>):'' "A patient's symptoms after treatment A are indistinguishable from a placebo."


which means, if the true speed of a vehicle is 125, the drive has the probability of 0.36% to avoid the fine when the statistic is performed at level 125 since the recorded average speed  is lower than 121.9. If the true speed is closer to 121.9 than 125, then the probability of avoiding the fine will also be higher.
A Type I error would falsely indicate that treatment A is more effective than the placebo, whereas a Type II error would be a failure to demonstrate that treatment A is more effective than placebo even though it actually is more effective.


The tradeoffs between type I error and type II error should also be considered. That is, in this case, if the traffic police do not want to falsely fine innocent drivers, the level α can be set to a smaller value, like 0.01.However, if that is the case, more drivers whose true speed is over 120 kilometers per hour, like 125, would be more likely to avoid the fine.
==Etymology==
In 1928, [[Jerzy Neyman]] (1894–1981) and [[Egon Pearson]] (1895–1980), both eminent statisticians, discussed the problems associated with "''deciding whether or not a particular sample may be judged as likely to have been randomly drawn from a certain population''"<ref name="neyman1928">{{Cite book|last1=Neyman |first1=J. |last2=Pearson |first2=E.S. |title=Joint Statistical Papers |chapter=On the Use and Interpretation of Certain Test Criteria for Purposes of Statistical Inference, Part I |pages=1–66 |publisher=Cambridge University Press |year=1967 |origyear=1928}}</ref><sup>p.&nbsp;1</sup>: and, as [[Florence Nightingale David]] remarked, "''it is necessary to remember the adjective 'random' [in the term 'random sample'] should apply to the method of drawing the sample and not to the sample itself''".<ref>{{Cite book|last=David |first=F.N. |title=Probability Theory for Statistical Methods |publisher=Cambridge University Press |year=1949 |page=28 |url=https://archive.org/details/probabilitytheor033214mbp}}</ref>


== Etymology ==
They identified "''two sources of error''", namely:
In 1928, [[Jerzy Neyman]] (1894–1981) and [[Egon Pearson]] (1895–1980), both eminent statisticians, discussed the problems associated with "deciding whether or not a particular sample may be judged as likely to have been randomly drawn from a certain population"<ref>{{Cite journal|last=NEYMAN|first=J.|last2=PEARSON|first2=E. S.|date=1928|title=ON THE USE AND INTERPRETATION OF CERTAIN TEST CRITERIA FOR PURPOSES OF STATISTICAL INFERENCE PART I|url=http://dx.doi.org/10.1093/biomet/20a.1-2.175|journal=Biometrika|volume=20A|issue=1-2|pages=175–240|doi=10.1093/biomet/20a.1-2.175|issn=0006-3444}}</ref>: and, as [[Florence Nightingale David]] remarked, "it is necessary to remember the adjective 'random' [in the term 'random sample'] should apply to the method of drawing the sample and not to the sample itself".<ref>{{Cite journal|last=C.I.K.F.|date=1951-07|title=Probability Theory for Statistical Methods. By F. N. David. [Pp. ix + 230. Cambridge University Press. 1949. Price 155.]|url=http://dx.doi.org/10.1017/s0020269x00004564|journal=Journal of the Staple Inn Actuarial Society|volume=10|issue=03|pages=243–244|doi=10.1017/s0020269x00004564|issn=0020-269X}}</ref>
:(a) the error of rejecting a hypothesis that should have not been rejected, and
:(b) the error of failing to reject a hypothesis that should have been rejected.<ref name=neyman1928/><sup>p.31</sup>


In 1930, they elaborated on these ''two sources of error'', remarking that:
They identified "two sources of error", namely:
::''...in testing hypotheses two considerations must be kept in view, (1) we must be able to reduce the chance of rejecting a true hypothesis to as low a value as desired; (2) the test must be so devised that it will reject the hypothesis tested when it is likely to be false''.<ref>{{Cite book|last2=Neyman |first2=J. |last1=Pearson |first1=E.S. |title=Joint Statistical Papers |chapter=On the Problem of Two Samples |page=100 |publisher=Cambridge University Press |year=1967 |origyear=1930}}</ref>


(a) the error of rejecting a hypothesis that should have not been rejected, and
In 1933, they observed that these "''problems are rarely presented in such a form that we can discriminate with certainty between the true and false hypothesis''" (p.&nbsp;187). They also noted that, in deciding whether to fail to reject, or reject a particular hypothesis amongst a "''set of alternative hypotheses''" (p.&nbsp;201), ''H''<sub>1</sub>, ''H''<sub>2</sub>, . . ., it was easy to make an error:
:''...[and] these errors will be of two kinds:
::''(I) we reject'' ''H''<sub>0</sub> ''[i.e., the hypothesis to be tested] when it is true,''
::''(II) we fail to reject'' ''H''<sub>0</sub> ''when some alternative [[hypothesis]]'' ''H''<sub>A</sub> or ''H''<sub>1</sub> ''is true.''<ref name="neyman1933">{{Cite book|last1=Neyman |first1=J. |last2=Pearson |first2=E.S. |title=Joint Statistical Papers |chapter=The testing of statistical hypotheses in relation to probabilities a priori |pages=186–202 |publisher=Cambridge University Press |year=1967 |origyear=1933}}</ref><sup>p.187</sup> (There are various notations for the alternative).


(b) the error of failing to reject a hypothesis that should have been rejected.
In all of the papers co-written by Neyman and Pearson the expression ''H''<sub>0</sub> always signifies "the hypothesis to be tested".


In 1930, they elaborated on these two sources of error, remarking that:
In the same paper<ref name=neyman1933/><sup>p.&nbsp;190</sup> they call these ''two sources of error'', '''errors of type&nbsp;I''' and '''errors of type&nbsp;II''' respectively.

...in testing hypotheses two considerations must be kept in view, we must be able to reduce the chance of rejecting a true hypothesis to as low a value as desired; the test must be so devised that it will reject the hypothesis tested when it is likely to be false.

In 1933, they observed that these "problems are rarely presented in such a form that we can discriminate with certainty between the true and false hypothesis" (p. 187). They also noted that, in deciding whether to fail to reject, or reject a particular hypothesis amongst a "set of alternative hypotheses" (p. 201), H<sub>1</sub>, H2, . . ., it was easy to make an error:

...[and] these errors will be of two kinds:

(I) we reject H0 [i.e., the hypothesis to be tested] when it is true,

(II) we fail to reject H0 when some alternative hypothesis HA or H1 is true. (There are various notations for the alternative).

In all of the papers co-written by Neyman and Pearson the expression H0 always signifies "the hypothesis to be tested".

In the same paperp. 190 they call these two sources of error, errors of type I and errors of type II respectively.<ref>{{Cite journal|last=Neyman|first=J.|last2=Pearson|first2=E. S.|date=1933-10-30|title=The testing of statistical hypotheses in relation to probabilities a priori|url=http://dx.doi.org/10.1017/s030500410001152x|journal=Mathematical Proceedings of the Cambridge Philosophical Society|volume=29|issue=4|pages=492–510|doi=10.1017/s030500410001152x|issn=0305-0041}}</ref>


==Related terms==
==Related terms==
Line 156: Line 156:
==Application domains==
==Application domains==


'''Medicine'''
===Inventory control===
An automated inventory control system that rejects high-quality goods of a consignment commits a type&nbsp;I error, while a system that accepts low-quality goods commits a type&nbsp;II error.


In the practice of medicine, there is a significant difference between the applications of [[screening]] and [[Test (assessment)|testing]].
===Computers===
The notions of false positives and false negatives have a wide currency in the realm of computers and computer applications, as follows.


====Computer security====
{{main|computer security|computer insecurity}}
Security vulnerabilities are an important consideration in the task of keeping computer data safe, while maintaining access to that data for appropriate users. In the context of authentication, "Reject" is the "positive" outcome, which may be counterintuitive to experts in other fields. Put another way, the null hypothesis is that the user is authorized. Moulton (1983), stresses the importance of:
* avoiding the type&nbsp;I errors (or false positives) that classify ''authorized users'' as ''imposters''.
* avoiding the type&nbsp;II errors (or false negatives) that classify ''imposters'' as ''authorized users''.


'''Medical screening'''
====Spam filtering====
A false positive occurs when [[spam filtering]] or spam blocking techniques wrongly classify a legitimate email message as [[e-mail spam|spam]] and, as a result, interferes with its delivery. While most anti-spam tactics can block or filter a high percentage of unwanted emails, doing so without creating significant false-positive results is a much more demanding task.


Screening involves relatively cheap tests that are given to large populations, none of whom manifest any clinical indication of disease (e.g., [[Pap test|Pap smears]]).
A false negative occurs when a spam email is not detected as spam, but is classified as ''non-spam''. A low number of false negatives is an indicator of the efficiency of spam filtering.


Testing involves far more expensive, often invasive, procedures that are given only to those who manifest some clinical indication of disease, and are most often applied to confirm a suspected diagnosis.
====Malware====
The term "false positive" is also used when [[antivirus software]] wrongly classifies a harmless file as a [[Computer virus|virus]]. The incorrect detection may be due to [[heuristic (computer science)|heuristics]] or to an incorrect [[virus signature]] in a database. Similar problems can occur with [[antitrojan]] or [[antispyware]] software.


For example, most states in the USA require newborns to be screened for [[phenylketonuria]] and [[hypothyroidism]], among other [[congenital disorders]].
====Optical character recognition====
Detection [[algorithm]]s of all kinds often create false positives. [[Optical character recognition]] (OCR) software may detect an "a" where there are only some dots that ''appear'' to be an "a" to the algorithm being used.


Hypothesis: “The newborns have phenylketonuria and hypothyroidism”
===Security screening===
{{main|explosive detection|metal detector}}
False positives are routinely found every day in [[Computer Assisted Passenger Prescreening System#False positives and alleged misuses|airport security screening]], which are ultimately [[visual inspection]] systems. The installed security alarms are intended to prevent weapons being brought onto aircraft; yet they are often set to such high [[Sensitivity (electronics)|sensitivity]] that they alarm many times a day for minor items, such as keys, belt buckles, loose change, mobile phones, and tacks in shoes.


Null Hypothesis (H<sub>0</sub>): “The newborns do not have phenylketonuria and hypothyroidism,”
The ratio of false positives (identifying an innocent traveller as a terrorist) to true positives (detecting a would-be terrorist) is, therefore, very high; and because almost every alarm is a false positive, the [[positive predictive value]] of these screening tests is very low.


Type I error (false positive): The true fact is that the newborns do not have phenylketonuria and hypothyroidism but we consider they have the disorders according to the data.
The relative cost of false results determines the likelihood that test creators allow these events to occur. As the cost of a false negative in this scenario is extremely high (not detecting a bomb being brought onto a plane could result in hundreds of deaths) whilst the cost of a false positive is relatively low (a reasonably simple further inspection) the most appropriate test is one with a low statistical [[Sensitivity and specificity|specificity]] but high statistical [[Sensitivity and specificity|sensitivity]] (one that allows a high rate of false positives in return for minimal false negatives).


Type II error (false negative): The true fact is that the newborns have phenylketonuria and hypothyroidism but we consider they do not have the disorders according to the data.
===Biometrics===

[[Biometric]] matching, such as for [[fingerprint recognition]], [[facial recognition system|facial recognition]] or [[iris recognition]], is susceptible to type&nbsp;I and type&nbsp;II errors. The null hypothesis is that the input ''does'' identify someone in the searched list of people, so:
Although they display a high rate of false positives, the screening tests are considered valuable because they greatly increase the likelihood of detecting these disorders at a far earlier stage.
* the probability of type&nbsp;I errors is called the "false reject rate" ([[Biometrics#Performance|FRR]]) or false non-match rate (FNMR),

* while the probability of type&nbsp;II errors is called the "false accept rate" (FAR) or false match rate (FMR).<ref>{{cite web |url= http://debut.cis.nctu.edu.tw/~ching/Face/Articles/Biometric%20Identification/00551842.pdf |title= Iris Recognition Technology |publisher= debut.cis.nctu.edu.tw |year= 1996 |page= 56 |accessdate= 2010-05-23 |quote= crossover error rate (that point where the probabilities of False Reject (Type I error) and False Fail to reject (Type II error) are approximately equal) is .00076% |last= Williams |first= G.O. |archive-url= https://web.archive.org/web/20110426171505/http://debut.cis.nctu.edu.tw/~ching/Face/Articles/Biometric%20Identification/00551842.pdf |archive-date= 26 April 2011 |url-status= dead |df= dmy-all }}</ref>
The simple [[Blood test|blood tests]] used to screen possible [[Blood donation|blood donors]] for [[HIV]] and [[hepatitis]] have a significant rate of false positives; however, physicians use much more expensive and far more precise tests to determine whether a person is actually infected with either of these viruses.

Perhaps the most widely discussed false positives in medical screening come from the breast cancer screening procedure [[mammography]]. The US rate of false positive mammograms is up to 15%, the highest in world. One consequence of the high false positive rate in the US is that, in any 10-year period, half of the American women screened receive a false positive mammogram. False positive mammograms are costly, with over $100 million spent annually in the U.S. on follow-up testing and treatment. They also cause women unneeded anxiety. As a result of the high false positive rate in the US, as many as 90–95% of women who get a positive mammogram do not have the condition. The lowest rate in the world is in the Netherlands, 1%. The lowest rates are generally in Northern Europe where mammography films are read twice and a high threshold for additional testing is set (the high threshold decreases the power of the test).

The ideal population screening test would be cheap, easy to administer, and produce zero false-negatives, if possible. Such tests usually produce more false-positives, which can subsequently be sorted out by more sophisticated (and expensive) testing.


'''Medical testing'''

False negatives and false positives are significant issues in [[Medical testing on animals|medical testing]].

Hypothesis: “The patients have the specific disease.”

Null hypothesis (H<sub>0</sub>): “The patients do not have the specific disease.”

Type I error (false positive): “The true fact is that the patients do not have a specific disease but the physicians judges the patients was ill according to the test reports.”

False positives can also produce serious and counter-intuitive problems when the condition being searched for is rare, as in screening. If a test has a false positive rate of one in ten thousand, but only one in a million samples (or people) is a true positive, most of the positives detected by that test will be false. The probability that an observed positive result is a false positive may be calculated using [[Bayes' theorem]].

Type II error (false negative): “The true fact is that the disease is actually present but the test reports provide a falsely reassuring message to patients and physicians that the disease is absent.”

False negatives produce serious and counter-intuitive problems, especially when the condition being searched for is common. If a test with a false negative rate of only 10% is used to test a population with a true occurrence rate of 70%, many of the negatives detected by the test will be false.

This sometimes leads to inappropriate or inadequate treatment of both the patient and their disease. A common example is relying on cardiac stress tests to detect coronary atherosclerosis, even though [[Cardiac stress test|cardiac stress]] tests are known to only detect limitations of [[Coronary arteries|coronary artery]] blood flow due to advanced [[stenosis]].


'''Biometrics'''

Biometric matching, such as for [[fingerprint recognition]], [[facial recognition]] or [[iris recognition]], is susceptible to type I and type II errors.

Hypothesis: “The input does not identify someone in the searched list of people”

Null hypothesis: “The input does identify someone in the searched list of people”

Type I error (false reject rate): “The true fact is that the person is someone in the searched list but the system concludes that the person is not according to the data.”

Type II error (false match rate): “The true fact is that the person is not someone in the searched list but the system concludes that the person is someone whom we are looking for according to the data.”

The probability of type I errors is called the "false reject rate" (FRR) or false non-match rate (FNMR), while the probability of type II errors is called the "false accept rate" (FAR) or false match rate (FMR).


If the system is designed to rarely match suspects then the probability of type II errors can be called the "[[false alarm]] rate". On the other hand, if the system is used for validation (and acceptance is the norm) then the FAR is a measure of system security, while the FRR measures user inconvenience level.
If the system is designed to rarely match suspects then the probability of type II errors can be called the "[[false alarm]] rate". On the other hand, if the system is used for validation (and acceptance is the norm) then the FAR is a measure of system security, while the FRR measures user inconvenience level.


===Medicine===
{{further|False positives and false negatives}}


====Medical screening====
'''Security screening'''
In the practice of medicine, there is a significant difference between the applications of ''[[Screening (medicine)|screening]]'' and ''[[Medical test|testing]]''.
* ''Screening'' involves relatively ''cheap'' tests that are given to large populations, none of whom manifest any clinical indication of disease (e.g., [[Pap smear]]s).
* ''Testing'' involves far more ''expensive'', often invasive, procedures that are given only to those who manifest some clinical indication of disease, and are most often applied to confirm a suspected diagnosis.


Main articles: [[explosive detection]] and [[metal detector]]
For example, most states in the USA require newborns to be screened for [[phenylketonuria]] and [[hypothyroidism]], among other [[congenital disorder]]s. Although they display a high rate of false positives, the screening tests are considered valuable because they greatly increase the likelihood of detecting these disorders at a far earlier stage.<ref>In relation to this newborn screening, recent studies have shown that there are more than 12&nbsp;times more false positives than correct screens (Gambrill, 2006. [http://news.healingwell.com/index.php?p=news1&id=533064])</ref>


False positives are routinely found every day in [[Airport security screening|airport security screening,]] which are ultimately [[visual inspection]] systems. The installed security alarms are intended to prevent weapons being brought onto aircraft; yet they are often set to such high sensitivity that they alarm many times a day for minor items, such as keys, belt buckles, loose change, mobile phones, and tacks in shoes.
The simple blood tests used to ''screen'' possible [[blood transfusion|blood donors]] for HIV and [[hepatitis]] have a significant rate of false positives; however, physicians use much more expensive and far more precise ''tests'' to determine whether a person is actually infected with either of these viruses.


Here, the hypothesis is: “The item is a weapon.”
Perhaps the most widely discussed false positives in medical screening come from the breast cancer screening procedure [[mammography]]. The US rate of false positive mammograms is up to 15%, the highest in world. One consequence of the high false positive rate in the US is that, in any 10-year period, half of the American women screened receive a false positive mammogram. False positive mammograms are costly, with over $100&nbsp;million spent annually in the U.S. on follow-up testing and treatment. They also cause women unneeded anxiety. As a result of the high false positive rate in the US, as many as 90–95% of women who get a positive mammogram do ''not'' have the condition. The lowest rate in the world is in the [[Netherlands]], 1%. The lowest rates are generally in Northern Europe where mammography films are read twice and a high threshold for additional testing is set (the high threshold decreases the [[Statistical power|power]] of the test).


The null hypothesis: “The item is not a weapon.”
The ideal population screening test would be cheap, easy to administer, and produce ''zero'' false-negatives, if possible. Such tests usually produce more false-positives, which can subsequently be sorted out by more sophisticated (and expensive) testing.


Type I error (false positive): “The true fact is that the item is not a weapon but the system still alarms.”
====Medical testing====
False negatives and false positives are significant issues in [[medical test]]ing. False negatives may provide a falsely reassuring message to patients and physicians that disease is absent, when it is actually present. This sometimes leads to inappropriate or inadequate treatment of both the patient and their disease. A common example is relying on [[cardiac stress test]]s to detect coronary [[atherosclerosis]], even though cardiac stress tests are known to only detect limitations of [[coronary artery]] blood flow due to advanced [[stenosis]].


Type II error (false negative) “The true fact is that the item is a weapon but the system keeps silent at this time.”
False negatives produce serious and counter-intuitive problems, especially when the condition being searched for is common. If a test with a ''false negative rate'' of only 10% is used to test a population with a ''true occurrence rate'' of 70%, many of the negatives detected by the test will be false.


The ratio of false positives (identifying an innocent traveler as a terrorist) to true positives (detecting a would-be terrorist) is, therefore, very high; and because almost every alarm is a false positive, the [[Positive Predictive Value|positive predictive value]] of these screening tests is very low.
False positives can also produce serious and counter-intuitive problems when the condition being searched for is rare, as in screening. If a test has a ''false positive rate'' of one in ten thousand, but only one in a million samples (or people) is a ''true positive'', most of the positives detected by that test will be false. The probability that an observed positive result is a false positive may be calculated using [[Bayes' theorem]].

The relative cost of false results determines the likelihood that test creators allow these events to occur. As the cost of a false negative in this scenario is extremely high (not detecting a bomb being brought onto a plane could result in hundreds of deaths) whilst the cost of a false positive is relatively low (a reasonably simple further inspection) the most appropriate test is one with a low statistical specificity but high statistical sensitivity (one that allows a high rate of false positives in return for minimal false negatives).


'''Computers'''

The notions of false positives and false negatives have a wide currency in the realm of computers and computer applications, including [[computer security]], [[spam filtering]], [[Malware]], [[Optical character recognition]] and many others.

For example, in the case of spam filtering the hypothesis here is that the message is a spam.

Thus, null hypothesis: “The message is not a spam.”

Type I error (false positive: “Spam filtering or spam blocking techniques wrongly classify a legitimate email message as spam and, as a result, interferes with its delivery.”

While most anti-spam tactics can block or filter a high percentage of unwanted emails, doing so without creating significant false-positive results is a much more demanding task.

Type II error (false negative): “Spam email is not detected as spam, but is classified as non-spam.” A low number of false negatives is an indicator of the efficiency of spam filtering.

Type I error: The true fact is that adding water does not protect against cavities but we reject H0 (adding water to toothpaste does not fight against cavities more effectively) according to experimental data.

Type II error: The true fact is that adding water can protect against cavities but we accept H0 (adding water to toothpaste does not fight against cavities more effectively) according to experimental data.


==See also==
==See also==
Line 240: Line 282:
{{div col end}}
{{div col end}}


==Footnotes==
==References==
{{Reflist|2}}
{{Reflist|2}}


==References==
== Bibliograghy ==
{{div col}}
{{div col}}
* Betz, M.A. & [[K. Ruben Gabriel|Gabriel, K.R.]], "Type IV Errors and Analysis of Simple Effects", ''Journal of Educational Statistics'', Vol.3, No.2, (Summer 1978), pp.&nbsp;121–144.
* Betz, M.A. & [[K. Ruben Gabriel|Gabriel, K.R.]], "Type IV Errors and Analysis of Simple Effects", ''Journal of Educational Statistics'', Vol.3, No.2, (Summer 1978), pp.&nbsp;121–144.

Revision as of 03:12, 14 December 2019

In statistical hypothesis testing a type I error is the rejection of a true null hypothesis (also known as a "false positive" finding or conclusion), while a type II error is the non-rejection of a false null hypothesis (also known as a "false negative" finding or conclusion[1]). Much of statistical theory revolves around the minimization of one or both of these errors, though the complete elimination of either is a statistical impossibility for non-deterministic algorithms. Through selecting threshold(cut-off) value and modifying the alpha(p) level, people could manage to improve the quality of hypothesis test. [2]The knowledge of Type I error and Type II error is widely used in medical science, biometrics and computer science, resulting in the importance of distinguishing and controlling of these two types of errors.

Definition

Statistical Background

In statistical test theory, the notion of a statistical error is an integral part of hypothesis testing. The test goes about choosing about two competing propositions called null hypothesis, denoted by H0 and alternative hypothesis, denoted by H1 . This is conceptually similar to the judgement in a court trial. The null hypothesis corresponds to the position of defendant: just as he is presumed to be innocent until proven guilty, so is the null hypothesis presumed to be true until the data provide convincing evidence against it. The alternative hypothesis corresponds to the position against the defendant.

If the result of the test corresponds with reality, then a correct decision has been made. However, if the result of the test does not correspond with reality, then an error has occurred. There are two situations in which the decision is wrong. The null hypothesis may be true, whereas we reject H0. On the other hand, the alternative hypothesis H1 may be true, whereas we do not reject H0. Two types of error are distinguished: Type I error and type II error. [3]


Type I error

The first kind of error is the rejection of a true null hypothesis as the result of a test procedure. This kind of error is called a type I error and is sometimes called an error of the first kind.

In terms of the courtroom example, a type I error corresponds to convicting an innocent defendant.


Type II error

The second kind of error is the failure to reject a false null hypothesis as the result of a test procedure. This sort of error is called a type II error and is also referred to as an error of the second kind.

In terms of the courtroom example, a type II error corresponds to acquitting a criminal[4].


False positive and false negative

See more information in:False positive and false negative

In terms of false positives and false negatives, a positive result corresponds to rejecting the null hypothesis, while a negative result corresponds to failing to reject the null hypothesis; "false" means the conclusion drawn is incorrect. Thus, a type I error is equivalent to a false positive, and a type II error is equivalent to a false negative.

Table of error types

Tabularised relations between truth/falseness of the null hypothesis and outcomes of the test:[5]

 Table of error types
Null hypothesis (H0) is
 
True False
Decision
about null
hypothesis (H0)
Don't
reject

Correct inference
(true negative)

(probability = 1 - α)

Type II error
(false negative)
(probability = β
Reject Type I error
(false positive)

(probability = α)


Correct inference
(true positive)

(probability = 1 - β)
 

Error Rate

The results obtained from positive sample (left curve) overlap with the results obtained from negative samples (right curve). By moving the result cutoff value (vertical bar), the rate of false positives (FP) can be decreased, at the cost of raising the number of false negatives (FN), or vice-versa.

A perfect test would have zero false positives and zero false negatives. However, Statistics is a game of probability, and we can never know for certain whether our statistical conclusions are correct. Whenever there is uncertainty, there is the possibility of making an error. Considering this nature of statistics science, all statistical hypothesis tests have a probability of making type I and type II errors.[6]

·      The type I error rate or significance level is the probability of rejecting the null hypothesis given that it is true. It is denoted by the Greek letter α (alpha) and is also called the alpha level. Usually, the significance level is set to 0.05 (5%), implying that it is acceptable to have a 5% probability of incorrectly rejecting the true null hypothesis[7].

·      The rate of the type II error is denoted by the Greek letter β (beta) and related to the power of a test, denoted p-value, which equals 1−β. [8]

These two types of error rates are traded off against each other: for any given sample set, the effort to reduce one type of error generally results in increasing the other type of error. [9]


The quality of hypothesis test

The same idea can be expressed in terms of the rate of correct results and therefore used to minimize error rates and improve the quality of hypothesis test. To reduce your chance of committing a Type I error, making the alpha(p) value more stringent is quite simple and efficient. To decrease your chance of committing a Type II error, which is closely associated to your analyses’ statistical power, either increasing the test’s sample size or relaxing the alpha level could increase the analyses’ power.[10] A test statistic is robust if the Type I error rate is controlled.

Varying different threshold(cut-off) value could also be used to make the test either more specific or more sensitive, which in turn elevates the test quality. For example, imagine a medical test, in which experimenter might measure the concentration of a certain protein in the blood sample. Experimenter could adjust the threshold (black vertical line in the figure) and people would be diagnosed as having diseases if any number is detected above this certain threshold. According to the image, changing the threshold would result in changes in false positives and false negatives, corresponding to movement on the curve. [11]

Example

Since in a real experiment, it is impossible to avoid all the type I and type II error, it is thus important to consider the amount of risk the one is willing to take to falsely reject H0 or accept H0. The solution to this question would be to repot the p-value or significance level α of the statistic. For example, if we say, the p-value of a test statistic result is 0.0596,then there is a probability of 5.96% that we falsely reject H0.Or, if we say, the statistic is performed at level α, like 0.05, then we allow to falsely reject H0 at 5%. Usually, the significance level α will be set to 0.05, but there is not general rule.


Vehicle speed measuring

The speed limit of a freeway in United State is 120 kilometers per hour. A device is set to measure the speed of passing vehicles. Suppose that the device will conduct three measurements of the speed a passing vehicle, recording as a random sample X1 , X2, X3. The traffic police will or will not fine the drivers depending on the average speed ¯X3. That is to say, the test statistic

In addition, we suppose that the measurements X1 , X2, X3 are modeled as normal distribution N(μ,4). Then,  should follow N(μ,3/4) and the parameter μ represents the true speed of passing vehicle. In this experiment, the null hypothesis H0 and the alternative hypothesis H1 should be

H0: μ=120     against      H1: μ1>120.

If we perform the statistic level at α=0.05, then a critical value c should be calculated to solve

According to change-of-units rule for the normal distribution. Referring to Z-table, we can get

Here, the critical region . That is to say, if the recored speed of a vehicle is greater than critical value 121.9, the driver will be fined.However, there are still 5% of the drivers are falsely fined since the recorded average speed is greater than 121.9 but the true speed does not pass 120, which we say, a type I error.

The type II error corresponds to the case that the true speed of a vehicle is over 120 kilometers per hour but the driver is not fined. For example, if the true speed of a vehicle μ=125, the probability that the driver is not fined can be calculated as

which means, if the true speed of a vehicle is 125, the drive has the probability of 0.36% to avoid the fine when the statistic is performed at level 125 since the recorded average speed  is lower than 121.9. If the true speed is closer to 121.9 than 125, then the probability of avoiding the fine will also be higher.

The tradeoffs between type I error and type II error should also be considered. That is, in this case, if the traffic police do not want to falsely fine innocent drivers, the level α can be set to a smaller value, like 0.01.However, if that is the case, more drivers whose true speed is over 120 kilometers per hour, like 125, would be more likely to avoid the fine.

Etymology

In 1928, Jerzy Neyman (1894–1981) and Egon Pearson (1895–1980), both eminent statisticians, discussed the problems associated with "deciding whether or not a particular sample may be judged as likely to have been randomly drawn from a certain population"[12]: and, as Florence Nightingale David remarked, "it is necessary to remember the adjective 'random' [in the term 'random sample'] should apply to the method of drawing the sample and not to the sample itself".[13]

They identified "two sources of error", namely:

(a) the error of rejecting a hypothesis that should have not been rejected, and

(b) the error of failing to reject a hypothesis that should have been rejected.

In 1930, they elaborated on these two sources of error, remarking that:

...in testing hypotheses two considerations must be kept in view, we must be able to reduce the chance of rejecting a true hypothesis to as low a value as desired; the test must be so devised that it will reject the hypothesis tested when it is likely to be false.

In 1933, they observed that these "problems are rarely presented in such a form that we can discriminate with certainty between the true and false hypothesis" (p. 187). They also noted that, in deciding whether to fail to reject, or reject a particular hypothesis amongst a "set of alternative hypotheses" (p. 201), H1, H2, . . ., it was easy to make an error:

...[and] these errors will be of two kinds:

(I) we reject H0 [i.e., the hypothesis to be tested] when it is true,

(II) we fail to reject H0 when some alternative hypothesis HA or H1 is true. (There are various notations for the alternative).

In all of the papers co-written by Neyman and Pearson the expression H0 always signifies "the hypothesis to be tested".

In the same paperp. 190 they call these two sources of error, errors of type I and errors of type II respectively.[14]

Null hypothesis

It is standard practice for statisticians to conduct tests in order to determine whether or not a "speculative hypothesis" concerning the observed phenomena of the world (or its inhabitants) can be supported. The results of such testing determine whether a particular set of results agrees reasonably (or does not agree) with the speculated hypothesis.

On the basis that it is always assumed, by statistical convention, that the speculated hypothesis is wrong, and the so-called "null hypothesis" that the observed phenomena simply occur by chance (and that, as a consequence, the speculated agent has no effect) – the test will determine whether this hypothesis is right or wrong. This is why the hypothesis under test is often called the null hypothesis (most likely, coined by Fisher (1935, p. 19)), because it is this hypothesis that is to be either nullified or not nullified by the test. When the null hypothesis is nullified, it is possible to conclude that data support the "alternative hypothesis" (which is the original speculated one).

The consistent application by statisticians of Neyman and Pearson's convention of representing "the hypothesis to be tested" (or "the hypothesis to be nullified") with the expression H0 has led to circumstances where many understand the term "the null hypothesis" as meaning "the nil hypothesis" – a statement that the results in question have arisen through chance. This is not necessarily the case – the key restriction, as per Fisher (1966), is that "the null hypothesis must be exact, that is free from vagueness and ambiguity, because it must supply the basis of the 'problem of distribution,' of which the test of significance is the solution."[15] As a consequence of this, in experimental science the null hypothesis is generally a statement that a particular treatment has no effect; in observational science, it is that there is no difference between the value of a particular measured variable, and that of an experimental prediction.

Statistical significance

If the probability of obtaining a result as extreme as the one obtained, supposing that the null hypothesis were true, is lower than a pre-specified cut-off probability (for example, 5%), then the result is said to be statistically significant and the null hypothesis is rejected.

British statistician Sir Ronald Aylmer Fisher (1890–1962) stressed that the "null hypothesis":

... is never proved or established, but is possibly disproved, in the course of experimentation. Every experiment may be said to exist only in order to give the facts a chance of disproving the null hypothesis.

— Fisher, 1935, p.19

Application domains

Medicine

In the practice of medicine, there is a significant difference between the applications of screening and testing.


Medical screening

Screening involves relatively cheap tests that are given to large populations, none of whom manifest any clinical indication of disease (e.g., Pap smears).

Testing involves far more expensive, often invasive, procedures that are given only to those who manifest some clinical indication of disease, and are most often applied to confirm a suspected diagnosis.

For example, most states in the USA require newborns to be screened for phenylketonuria and hypothyroidism, among other congenital disorders.

Hypothesis: “The newborns have phenylketonuria and hypothyroidism”

Null Hypothesis (H0): “The newborns do not have phenylketonuria and hypothyroidism,”

Type I error (false positive): The true fact is that the newborns do not have phenylketonuria and hypothyroidism but we consider they have the disorders according to the data.

Type II error (false negative): The true fact is that the newborns have phenylketonuria and hypothyroidism but we consider they do not have the disorders according to the data.

Although they display a high rate of false positives, the screening tests are considered valuable because they greatly increase the likelihood of detecting these disorders at a far earlier stage.

The simple blood tests used to screen possible blood donors for HIV and hepatitis have a significant rate of false positives; however, physicians use much more expensive and far more precise tests to determine whether a person is actually infected with either of these viruses.

Perhaps the most widely discussed false positives in medical screening come from the breast cancer screening procedure mammography. The US rate of false positive mammograms is up to 15%, the highest in world. One consequence of the high false positive rate in the US is that, in any 10-year period, half of the American women screened receive a false positive mammogram. False positive mammograms are costly, with over $100 million spent annually in the U.S. on follow-up testing and treatment. They also cause women unneeded anxiety. As a result of the high false positive rate in the US, as many as 90–95% of women who get a positive mammogram do not have the condition. The lowest rate in the world is in the Netherlands, 1%. The lowest rates are generally in Northern Europe where mammography films are read twice and a high threshold for additional testing is set (the high threshold decreases the power of the test).

The ideal population screening test would be cheap, easy to administer, and produce zero false-negatives, if possible. Such tests usually produce more false-positives, which can subsequently be sorted out by more sophisticated (and expensive) testing.


Medical testing

False negatives and false positives are significant issues in medical testing.

Hypothesis: “The patients have the specific disease.”

Null hypothesis (H0): “The patients do not have the specific disease.”

Type I error (false positive): “The true fact is that the patients do not have a specific disease but the physicians judges the patients was ill according to the test reports.”

False positives can also produce serious and counter-intuitive problems when the condition being searched for is rare, as in screening. If a test has a false positive rate of one in ten thousand, but only one in a million samples (or people) is a true positive, most of the positives detected by that test will be false. The probability that an observed positive result is a false positive may be calculated using Bayes' theorem.

Type II error (false negative): “The true fact is that the disease is actually present but the test reports provide a falsely reassuring message to patients and physicians that the disease is absent.”

False negatives produce serious and counter-intuitive problems, especially when the condition being searched for is common. If a test with a false negative rate of only 10% is used to test a population with a true occurrence rate of 70%, many of the negatives detected by the test will be false.

This sometimes leads to inappropriate or inadequate treatment of both the patient and their disease. A common example is relying on cardiac stress tests to detect coronary atherosclerosis, even though cardiac stress tests are known to only detect limitations of coronary artery blood flow due to advanced stenosis.


Biometrics

Biometric matching, such as for fingerprint recognition, facial recognition or iris recognition, is susceptible to type I and type II errors.

Hypothesis: “The input does not identify someone in the searched list of people”

Null hypothesis: “The input does identify someone in the searched list of people”

Type I error (false reject rate): “The true fact is that the person is someone in the searched list but the system concludes that the person is not according to the data.”

Type II error (false match rate): “The true fact is that the person is not someone in the searched list but the system concludes that the person is someone whom we are looking for according to the data.”

The probability of type I errors is called the "false reject rate" (FRR) or false non-match rate (FNMR), while the probability of type II errors is called the "false accept rate" (FAR) or false match rate (FMR).

If the system is designed to rarely match suspects then the probability of type II errors can be called the "false alarm rate". On the other hand, if the system is used for validation (and acceptance is the norm) then the FAR is a measure of system security, while the FRR measures user inconvenience level.


Security screening

Main articles: explosive detection and metal detector

False positives are routinely found every day in airport security screening, which are ultimately visual inspection systems. The installed security alarms are intended to prevent weapons being brought onto aircraft; yet they are often set to such high sensitivity that they alarm many times a day for minor items, such as keys, belt buckles, loose change, mobile phones, and tacks in shoes.

Here, the hypothesis is: “The item is a weapon.”

The null hypothesis: “The item is not a weapon.”

Type I error (false positive): “The true fact is that the item is not a weapon but the system still alarms.”

Type II error (false negative) “The true fact is that the item is a weapon but the system keeps silent at this time.”

The ratio of false positives (identifying an innocent traveler as a terrorist) to true positives (detecting a would-be terrorist) is, therefore, very high; and because almost every alarm is a false positive, the positive predictive value of these screening tests is very low.

The relative cost of false results determines the likelihood that test creators allow these events to occur. As the cost of a false negative in this scenario is extremely high (not detecting a bomb being brought onto a plane could result in hundreds of deaths) whilst the cost of a false positive is relatively low (a reasonably simple further inspection) the most appropriate test is one with a low statistical specificity but high statistical sensitivity (one that allows a high rate of false positives in return for minimal false negatives).


Computers

The notions of false positives and false negatives have a wide currency in the realm of computers and computer applications, including computer security, spam filtering, Malware, Optical character recognition and many others.

For example, in the case of spam filtering the hypothesis here is that the message is a spam.

Thus, null hypothesis: “The message is not a spam.”

Type I error (false positive: “Spam filtering or spam blocking techniques wrongly classify a legitimate email message as spam and, as a result, interferes with its delivery.”

While most anti-spam tactics can block or filter a high percentage of unwanted emails, doing so without creating significant false-positive results is a much more demanding task.

Type II error (false negative): “Spam email is not detected as spam, but is classified as non-spam.” A low number of false negatives is an indicator of the efficiency of spam filtering.

Type I error: The true fact is that adding water does not protect against cavities but we reject H0 (adding water to toothpaste does not fight against cavities more effectively) according to experimental data.

Type II error: The true fact is that adding water can protect against cavities but we accept H0 (adding water to toothpaste does not fight against cavities more effectively) according to experimental data.

See also

References

  1. ^ "Explorable - Think Outside The Box - Research, Experiments, Psychology, Self-Help". explorable.com. Retrieved 14 December 2019.
  2. ^ Chow, Y. W.; Pietranico, R.; Mukerji, A. (27 October 1975). "Studies of oxygen binding energy to hemoglobin molecule". Biochemical and Biophysical Research Communications. 66 (4): 1424–1431. doi:10.1016/0006-291x(75)90518-5. ISSN 0006-291X. PMID 6.
  3. ^ A modern introduction to probability and statistics : understanding why and how. Dekking, Michel, 1946-. London: Springer. 2005. ISBN 978-1-85233-896-1. OCLC 262680588.{{cite book}}: CS1 maint: others (link)
  4. ^ A modern introduction to probability and statistics : understanding why and how. Dekking, Michel, 1946-. London: Springer. 2005. ISBN 978-1-85233-896-1. OCLC 262680588.{{cite book}}: CS1 maint: others (link)
  5. ^ Sheskin, David (2004). Handbook of Parametric and Nonparametric Statistical Procedures. CRC Press. p. 54. ISBN 1584884401.
  6. ^ Smith, R. J.; Bryant, R. G. (27 October 1975). "Metal substitutions incarbonic anhydrase: a halide ion probe study". Biochemical and Biophysical Research Communications. 66 (4): 1281–1286. doi:10.1016/0006-291x(75)90498-2. ISSN 0006-291X. PMID 3.
  7. ^ Lindenmayer, David. (2005). Practical conservation biology. Burgman, Mark A. Collingwood, Vic.: CSIRO Pub. ISBN 0-643-09310-9. OCLC 65216357.
  8. ^ Chow, Y. W.; Pietranico, R.; Mukerji, A. (27 October 1975). "Studies of oxygen binding energy to hemoglobin molecule". Biochemical and Biophysical Research Communications. 66 (4): 1424–1431. doi:10.1016/0006-291x(75)90518-5. ISSN 0006-291X. PMID 6.
  9. ^ Smith, R. J.; Bryant, R. G. (27 October 1975). "Metal substitutions incarbonic anhydrase: a halide ion probe study". Biochemical and Biophysical Research Communications. 66 (4): 1281–1286. doi:10.1016/0006-291x(75)90498-2. ISSN 0006-291X. PMID 3.
  10. ^ Smith, R. J.; Bryant, R. G. (27 October 1975). "Metal substitutions incarbonic anhydrase: a halide ion probe study". Biochemical and Biophysical Research Communications. 66 (4): 1281–1286. doi:10.1016/0006-291x(75)90498-2. ISSN 0006-291X. PMID 3.
  11. ^ Moroi, K.; Sato, T. (15 August 1975). "Comparison between procaine and isocarboxazid metabolism in vitro by a liver microsomal amidase-esterase". Biochemical Pharmacology. 24 (16): 1517–1521. doi:10.1016/0006-2952(75)90029-5. ISSN 1873-2968. PMID 8.
  12. ^ NEYMAN, J.; PEARSON, E. S. (1928). "ON THE USE AND INTERPRETATION OF CERTAIN TEST CRITERIA FOR PURPOSES OF STATISTICAL INFERENCE PART I". Biometrika. 20A (1–2): 175–240. doi:10.1093/biomet/20a.1-2.175. ISSN 0006-3444.
  13. ^ C.I.K.F. (1951-07). "Probability Theory for Statistical Methods. By F. N. David. [Pp. ix + 230. Cambridge University Press. 1949. Price 155.]". Journal of the Staple Inn Actuarial Society. 10 (03): 243–244. doi:10.1017/s0020269x00004564. ISSN 0020-269X. {{cite journal}}: Check date values in: |date= (help)
  14. ^ Neyman, J.; Pearson, E. S. (30 October 1933). "The testing of statistical hypotheses in relation to probabilities a priori". Mathematical Proceedings of the Cambridge Philosophical Society. 29 (4): 492–510. doi:10.1017/s030500410001152x. ISSN 0305-0041.
  15. ^ Fisher, R.A. (1966). The design of experiments. 8th edition. Hafner:Edinburgh.

Bibliograghy

  • Betz, M.A. & Gabriel, K.R., "Type IV Errors and Analysis of Simple Effects", Journal of Educational Statistics, Vol.3, No.2, (Summer 1978), pp. 121–144.
  • David, F.N., "A Power Function for Tests of Randomness in a Sequence of Alternatives", Biometrika, Vol.34, Nos.3/4, (December 1947), pp. 335–339.
  • Fisher, R.A., The Design of Experiments, Oliver & Boyd (Edinburgh), 1935.
  • Gambrill, W., "False Positives on Newborns' Disease Tests Worry Parents", Health Day, (5 June 2006). [1]
  • Kaiser, H.F., "Directional Statistical Decisions", Psychological Review, Vol.67, No.3, (May 1960), pp. 160–167.
  • Kimball, A.W., "Errors of the Third Kind in Statistical Consulting", Journal of the American Statistical Association, Vol.52, No.278, (June 1957), pp. 133–142.
  • Lubin, A., "The Interpretation of Significant Interaction", Educational and Psychological Measurement, Vol.21, No.4, (Winter 1961), pp. 807–817.
  • Marascuilo, L.A. & Levin, J.R., "Appropriate Post Hoc Comparisons for Interaction and nested Hypotheses in Analysis of Variance Designs: The Elimination of Type-IV Errors", American Educational Research Journal, Vol.7., No.3, (May 1970), pp. 397–421.
  • Mitroff, I.I. & Featheringham, T.R., "On Systemic Problem Solving and the Error of the Third Kind", Behavioral Science, Vol.19, No.6, (November 1974), pp. 383–393.
  • Mosteller, F., "A k-Sample Slippage Test for an Extreme Population", The Annals of Mathematical Statistics, Vol.19, No.1, (March 1948), pp. 58–65.
  • Moulton, R.T., “Network Security”, Datamation, Vol.29, No.7, (July 1983), pp. 121–127.
  • Raiffa, H., Decision Analysis: Introductory Lectures on Choices Under Uncertainty, Addison–Wesley, (Reading), 1968.
  • Bias and Confounding – presentation by Nigel Paneth, Graduate School of Public Health, University of Pittsburgh