In statistical classification the Bayes classifier minimizes the probability of misclassification. In statistical classification the Bayes classifier minimizes the probability of misclassification. Suppose a pair ( X , Y ) {displaystyle (X,Y)} takes values in R d × { 1 , 2 , … , K } {displaystyle mathbb {R} ^{d} imes {1,2,dots ,K}} , where Y {displaystyle Y} is the class label of X {displaystyle X} . This means that the conditional distribution of X, given that the label Y takes the value r is given by where ' ∼ {displaystyle sim } ' means 'is distributed as', and where P r {displaystyle P_{r}} denotes a probability distribution. A classifier is a rule that assigns to an observation X=x a guess or estimate of what the unobserved label Y=r actually was. In theoretical terms, a classifier is a measurable function C : R d → { 1 , 2 , … , K } {displaystyle C:mathbb {R} ^{d} o {1,2,dots ,K}} , with the interpretation that C classifies the point x to the class C(x). The probability of misclassification, or risk, of a classifier C is defined as