# Chapter 9: Hypothesis Tests: Introduction, Basic Concepts, and an Example

The following exercises test your understanding of hypothesis testing in the context of the triangle taste test described in Chapter 9. In this case, the test consists of 14 identical trials on which the subject attempts to identify the odd sample on each trial. Assume that there are two possible rejection regions: RR8 = {8, 9, 10 11, 12, 13, 14} and RR10 = {10, 11, 12, 13, 14}.

RR10 = {10, 11, 12, 13, 14}

1. With a rejection region of RR8 = {8, 9, 10, 11, 12, 13,14}, what is the probability of a Type I error? Recall that since a Type I error occurs when the subject has no taste-discrimination ability, p = 1/3.title

Answer: 0.05762. This is equal to the probability of 8 or more correct identifications if the subject has no taste discrimination ability (and p = 1/3).

1 - pbinom(7, 14, 1/3)

## [1] 0.0576163

#or

sum(dbinom(8 : 14, 14, 1/3))

##  [1]   0.0576163

2. With a rejection region of RR8 = {8, 9, 10, 11, 12, 13, 14 }, what is the probability of a Type II error, if the subject has a probability of p = 0.80 of identifying the odd sample?

Answer: 0.01161; this is the probability of 7 or fewer correct identifications if the subject is able to identify the odd sample with 0.80 probability.

pbinom(7, 14, 0.80)

## [1] 0.01160991

#or

sum(dbinom(0 : 7, 14, 0.80))

## [1] 0.01160991

3. With a rejection region of RR10 = {10, 11, 12, 13, 14 }, what is the probability of a Type I error?

Answer: 0.00404. This is equal to the probability of 10 or more correct identifications if the subject has no taste discrimination ability (and p = 1/3).

1 - pbinom(9, 14, 1/3

##   [1]   0.004039541

#or

sum(dbinom(10 : 14, 14, 1/3))

##   [1]  0.004039541

4. With a rejection region of RR10 = {10, 11, 12, 13, 14}, what is the probability of a Type II error, if the subject has a probability of p = 0.80 of identifying the odd sample?

Answer: 0.1298. This is the probability of 9 or fewer correct identifications if the subject is able to identify the odd sample with 0.80 probability.

pbinom(9, 14, 0.80)

## [1] 0.1298396

#or

sum(dbinom(0 : 9, 14, 0.80))

## [1] 0.1298396