kb:hypothesis_testing

Hypothesis testing

Hypothesis testing involves deducing the quantity of a hypothesis H, which takes on one of the values H0,H1, from a measurement R=r.

We can do this by making the decision that minimizes the probability of error *conditional* on the measurement R=r.

  • If P(H1|R=r)>P(H0|R=r), that is, if it is more likely that H=H1 than H=H0 given that R=r, we decide H1.
  • Otherwise, if P(H1|R=r)<P(H0|R=r), that is, if it is more likely that H=H1 than H=H0 given that R=r, we decide H0.

The resulting conditional probability of error is:

P(error|R=r)=min{1P(H0|R=r),1P(H1|R=r)}

The conditional probabilities P(H1|R=r) and P(H0|R=r) are the a posteriori probabilities, as opposed to P(H1) and P(H0), the a priori probabilities.

The a posteriori probabilities can be calculated using Bayes' rule:

P(H0|R=r)=P(H0)fR|H(r|H0)fR(r)

P(H1|R=r)=P(H1)fR|H(r|H1)fR(r)

where fR|H is the conditional PDF of the random variable R given a certain H, and fR is the PDF of R.

Since we are just comparing P(H0|R=r) and P(H1|R=r), we can cancel out the fR(r) on both sides, so it is equivalent to comparing P(H0)fR|H(r|H0) and P(H1)fR|H(r|H1):

  • If P(H0)fR|H(r|H0)>P(H0)fR|H(r|H0), then announce H0.
  • If P(H0)fR|H(r|H0)<P(H1)fR|H(r|H1), then announce H1.

The likelihood ratio Λ(r) is defined as:

Λ(r)=fR|H(r|H1)fR|H(r|H0)

We can compare this likelihood ratio to the threshold η, which is the ratio between the a priori probabilities:

η=P(H1)P(H0)

If Λ(r)>η, then announce H1. Otherwise, announce H0.

Probability of miss (probability we announce H=H0, when in reality H=H1):

PM=P(H0|H1)

Probability of false alarm (probability we announce H=H1, when in reality H=H0):

PFA=P(H1|H0)

Probability of detection (probability we announce H=H1 given that H=H1):

PD=P(H1|H1)

True negative rate/specificity (probability we announce H=H0 given that H=H0):

1PFA=P(H0|H0)

Positive predictive value (probability that H=H1 given that we announce H=H1):

P(H1|H1)

Negative predictive value (probability that H=H0 given that we announce H=H0):

P(H0|H0)

  • kb/hypothesis_testing.txt
  • Last modified: 2024-04-30 04:03
  • by 127.0.0.1