# Stats: Hypothesis Testing

## Introduction

Be sure to read through the definitions for this section before trying to make sense out of the following.

The first thing to do when given a claim is to write the claim mathematically (if possible), and decide whether the given claim is the null or alternative hypothesis. If the given claim contains equality, or a statement of no change from the given or accepted condition, then it is the null hypothesis, otherwise, if it represents change, it is the alternative hypothesis.

The following example is not a mathematical example, but may help introduce the concept.

## Example

"He's dead, Jim," said Dr. McCoy to Captain Kirk.

Mr. Spock, as the science officer, is put in charge of statistically determining the correctness of Bones' statement and deciding the fate of the crew member (to vaporize or try to revive)

His first step is to arrive at the hypothesis to be tested.

Does the statement represent a change in previous condition?

• Yes, there is change, thus it is the alternative hypothesis, H1
• No, there is no change, therefore is the null hypothesis, H0

The correct answer is that there is change. Dead represents a change from the accepted state of alive. The null hypothesis always represents no change. Therefore, the hypotheses are:

• H0 : Patient is alive.
• H1 : Patient is not alive (dead).

States of nature are something that you, as a statistician have no control over. Either it is, or it isn't. This represents the true nature of things.

Possible states of nature (Based on H0)

• Patient is alive (H0 true - H1 false )
• Patient is dead (H0 false - H1 true)

Decisions are something that you have control over. You may make a correct decision or an incorrect decision. It depends on the state of nature as to whether your decision is correct or in error.

Possible decisions (Based on H0 ) / conclusions (Based on claim )

• Reject H0 / "Sufficient evidence to say patient is dead"
• Fail to Reject H0 / "Insufficient evidence to say patient is dead"

There are four possibilities that can occur based on the two possible states of nature and the two decisions which we can make.

Statisticians will never accept the null hypothesis, we will fail to reject. In other words, we'll say that it isn't, or that we don't have enough evidence to say that it isn't, but we'll never say that it is, because someone else might come along with another sample which shows that it isn't and we don't want to be wrong.

### Statistically (double) speaking ...

 State of Nature Decision H0 True H0 False Reject H0 Patient is alive, Sufficient evidence of death Patient is dead, Sufficient evidence of death Fail to reject H0 Patient is alive, Insufficient evidence of death Patient is dead, Insufficient evidence of death

### In English ...

 State of Nature Decision H0 True H0 False Reject H0 Vaporize a live person Vaporize a dead person Fail to reject H0 Try to revive a live person Try to revive a dead person

### Were you right ? ...

 State of Nature Decision H0 True H0 False Reject H0 Type I Error alpha Correct Assessment Fail to reject H0 Correct Assessment Type II Error beta

Which of the two errors is more serious? Type I or Type II ?

Since Type I is the more serious error (usually), that is the one we concentrate on. We usually pick alpha to be very small (0.05, 0.01). Note: alpha is not a Type I error. Alpha is the probability of committing a Type I error. Likewise beta is the probability of committing a Type II error.

### Conclusions

Conclusions are sentence answers which include whether there is enough evidence or not (based on the decision), the level of significance, and whether the original claim is supported or rejected.

Conclusions are based on the original claim, which may be the null or alternative hypotheses. The decisions are always based on the null hypothesis
 Original Claim Decision H0 "REJECT" H1 "SUPPORT" Reject H0 "SUFFICIENT" There is sufficient evidence at the alpha level of significance to reject the claim that (insert original claim here) There is sufficient evidence at the alpha level of significance to support the claim that (insert original claim here) Fail to reject H0 "INSUFFICIENT" There is insufficient evidence at the alpha level of significance to reject the claim that (insert original claim here) There is insufficient evidence at the alpha level of significance to support the claim that (insert original claim here)