maths.freeStatistics & Probability › Inference › Type I and type II errors

Type I and type II errors

Type I error, or a false positive, is the incorrect rejection of a true null hypothesis in statistical hypothesis testing.

Type I and type II errors

Type I error, or a false positive, is the incorrect rejection of a true null hypothesis in statistical hypothesis testing. A type II error, or a false negative, is the incorrect acceptance of a false null hypothesis.

An analysis commits a Type I error when some baseline assumption is incorrectly rejected because of new, misleading information. Meanwhile, a Type II error is made when such an assumption is maintained, due to flawed or insufficient data, when better measurements would have shown it to be untrue. For example, in the context of medical testing, if we consider the null hypothesis to be "This patient does not have the disease," a diagnosis that the disease is present when it is not is a Type I error, while a diagnosis that the patient does not have the disease when it is present would be a Type II error. The manner in which a null hypothesis frames contextually default expectations influences the specific ways in which type I errors and type II errors manifest, and this varies by context and application. Generally the risk of such errors cannot be entirely eliminated, only traded-off between the two types, by for example changing the significance threshold.

Knowledge of type I errors and type II errors is applied widely in fields of medical science, biometrics and computer science. Minimising these errors is an object of study within statistical theory, though complete elimination of either is impossible when relevant outcomes are not determined by known, observable, causal processes.

Statistical background

In statistical test theory, the notion of a statistical error is an integral part of hypothesis testing. The test goes about choosing two competing propositions called null hypothesis, denoted by \(H_0\) and alternative hypothesis, denoted by \(H_1\). This is conceptually similar to the judgement in a court trial. The null hypothesis corresponds to the position of the 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. Specifically, the null hypothesis also involves the absence of a difference or the absence of an association. Thus, the null hypothesis can never be that there is a difference or an association.

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 \(H_0\). On the other hand, the alternative hypothesis \(H_1\) may be true, whereas we do not reject \(H_0\). Two types of error are distinguished: type I error and type II error.

Type I error

The first kind of error is the mistaken rejection of a null hypothesis as the result of a test procedure. This kind of error is called a type I error (false positive) 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 the null hypothesis as the result of a test procedure. This sort of error is called a type II error (false negative) 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.

Crossover error rate

The crossover error rate (CER) is the point at which type I errors and type II errors are equal. A system with a lower CER value provides more accuracy than a system with a higher CER value. With all else being equal, having the rate of type I errors and type II errors being equal (i.e. the CER) will result in the lowest overall error rate.

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.

Error rate

A perfect test would have zero false positives and zero false negatives. However, statistical methods are probabilistic, and it cannot be known for certain whether statistical conclusions are correct. Whenever there is uncertainty, there is the possibility of making an error. Considering this, all statistical hypothesis tests have a probability of making type I and type II errors.

  • The type I error rate is the probability of rejecting the null hypothesis given that it is true. The test is designed to keep the type I error rate below a prespecified bound called the significance level, usually 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.
  • The rate of the type II error is denoted by the Greek letter β (beta) and related to the power of a test, which equals 1−β.

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.

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 the probability of committing a type I error, making the alpha value more stringent is both simple and efficient. For example, setting the alpha value at 0.01, instead of 0.05. To decrease the probability of committing a type II error, which is closely associated with analyses' power, either increasing the test's sample size or relaxing the alpha level, ex. setting the alpha level to 0.1 instead of 0.05, could increase the analyses' power. A test statistic is robust if the type I error rate is controlled.

Varying different threshold (cut-off) values 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 an experimenter might measure the concentration of a certain protein in the blood sample. The 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.

Example

Since in a real experiment it is impossible to avoid all type I and type II errors, it is important to consider the amount of risk one is willing to take to falsely reject H0 or accept H0. The solution to this question would be to report the p-value or significance level α of the statistic. For example, if the p-value of a test statistic result is 0.0596, then, assuming H0 is true, there is a probability of 5.96% of obtaining a result at least as extreme as the one observed. Or, if we say, the statistic is performed at level α, like 0.05, then we allow to falsely reject H0 at 5%. A significance level α of 0.05 is relatively common, but there is no general rule that fits all scenarios.

Vehicle speed measuring

The speed limit of a freeway in the United States is 120 kilometers per hour (75 mph). A device is set to measure the speed of passing vehicles. Suppose that the device will conduct three measurements of the speed of 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 \(\bar X\). That is to say, the test statistic

\(T=\frac{X_1+X_2+X_3}{3}=\bar X\)

In addition, we suppose that the measurements X1, X2, X3 are modeled as normal distribution N(μ,2). Then, T should follow N(μ,2/\(\sqrt{3}\)) 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: μ>120.

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

\(P\left(Z\geqslant\frac{c-120}{\frac{2}{\sqrt{3}}}\right)=0.05\)

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

Condensed: the full section is in Wikipedia.

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." 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

, Fisher, 1935, p.19

Type S and M errors

To address issues with null hypothesis testing, Andrew Gelman, John Carlin and others have suggested Type S and Type M errors to add to consideration of significant results.

Type S errors are errors of sign. The Type S error rate corresponds to the probability that if a significant result is obtained, the effect is estimated in the wrong direction of the true effect. This can occur often with low powered testing setups.

Type M errors are errors of magnitude. This is addressed through an "exaggeration factor", an assessment of the expected ratio of the absolute values of the estimate to the true value, conditional on a significant result being obtained. This is important because using a significance test to screen results in selection bias, which can lead to drastically overestimating effect sizes.

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.

Teraz ty Žiadna kalkulačka túto rovnicu nevyrieši, ale jej časti sú vypočítateľné.Skúste niektorú z nižšie uvedených, alebo napíšte vlastnú.

Udržujte svoje vlastné pracovné

Bezplatný účet pridáva poznámky ku každej lekcii, záznam o tom, čo ste dokončili, vaše vyriešené problémy na jednom mieste, a učiteľa, ktorého sa môžete opýtať na túto stránku.Math samotná je otvorená pre každého, prihlásený alebo nie.

Zaregistrovať sa Prihlásenie

Symboly použité tu

Ťuknutím na ľubovoľný symbol zobrazíte úplnú definíciu, obrázok a význam každého písmena.

Otázky, ktoré ľudia kladú

Mean or median, which should I use?

Median when the data have outliers or a long tail (incomes, house prices); mean when the data are roughly symmetric and you want every value to count. Report both if they disagree. The gap is itself information.

What does a p-value actually say?

The probability of seeing data at least this extreme if the null hypothesis were true. It is not the probability that the null hypothesis is true.

Why divide by n − 1 for the sample variance?

The sample mean sits closer to the sample than the true mean does, so squared deviations from it are slightly too small on average; dividing by n − 1 instead of n corrects the bias.

Časti tejto stránky sú upravené z Wikipedia (CC BY-SA 4.0). Tu sú zhrnuté a znovu vysvetlené; chyby sú naše.

Viac v kategórii Statistics & Probability