HYPOTHESIS TESTING



HYPOTHESIS TESTING

Introduction

• Basic idea? You have some theory that tells you what the value of a population mean (or other parameter) should be( you want to decide whether the theory is right or not( You will make a decision based on available sample data!

Hypothesis Testing Basics

• Hypotheses Competing theories that we want to test about a population are called Hypotheses instatistics. Specifically, we label these competing theories as Null Hypothesis and Alternative Hypothesis.

• Null hypothesis: a hypothesis that represents the status quo. Often takes the form no change, no difference or no effect.

• Alternative hypothesis: represents our suspicions about possible changes, differences or effects.

• Decision rule: a rule for deciding whether or not to reject the null hypothesis based on the results of a sample.

• Type I error: rejecting the null hypothesis when it is true.

• Type II error: not rejecting the null hypothesis when it is false.

The Null Hypothesis

• The Null Hypothesis, H0

• Begin with the assumption that the null hypothesis is true

• The thing you want to disprove

• Refers to the status quo

• Always contains “=” , “≤” or “≥” sign

• May or may not be rejected

The Alternative Hypothesis

• Challenges the status quo

• Never contains the “=” , “≤” or “≥” sign

• Is generally the hypothesis that is believed (or needs to be supported) by the researcher or the thing you want to prove

• Provides the “direction of extreme”

Example 1:

In an election, a candidate wins if they get more than 50% of the vote. Suppose a poll was taken before an election to see what proportion of people supported Candidate A, the value of special interest to candidate A is p=0.5. So specifically candidate A wants to know whether he is losing or he is winning.

In this example, the candidate wants to establish that he or she is ahead. Therefore, the null hypothesis is that he or she is behind, and the alternative is that he or she is ahead.

[pic]

Example 2:

In the past, an average household purchased 5.5 quarts of laundry detergent per year. A government board which monitors consumption of various products wants to know if the amount of laundry detergent used by Americans has changed in the last 20 years. The special value of [pic] in this case is 5.5. The board wishes to test whether [pic], i.e consumption levels remain unchanged or whether [pic], i.e consumption levels have changed.

In this example, the null hypothesis is that the status quo is being maintained i.e people still buy an average of 5.5 quarts of laundry detergent. The alternative is that the detergent consumption has changed.

[pic]

Formal hypothesis tests (p-values)

Step 1.

Identify the value of [pic] or [pic] that is of special interest to you. For example, in e.g 1 the value p=0.5 is of special interest because it corresponds with being ahead or behind.

Step 2.

Establish the null hypothesis [pic]and the alternative hypothesis [pic]. This must be done both at an intuitive level and a mathematical level. For example, in the problem where I toss a coin 100 times and counted the number of heads, my null hypothesis, in English, is that the coin is fair, and my alternative hypothesis is that it is not fair. In mathematical symbols, the null hypothesis is [pic] and the alternative hypothesis is [pic]

Step 3.

Decide on the significance level, alpha for the test. There are two kinds of errors you can make when you perform an hypothesis test. One is to reject the null hypothesis when the null hypothesis is correct. This is called Type I error. The second type of mistake you can make is to fail to reject the null hypothesis when in fact the null hypothesis is false. This is called Type II error.

Step 4

Compute the p-value: The p-value is the probability under the null hypothesis, of seeing a value as or more extreme than the value you actually observed.

For instance, suppose in the coin example, you observed 95 heads.

The values 96, 97, 98, 99, 100, 0, 1, 2, 3, 4, and 5 heads are all as far (or further) from the expected number, 50, as the observed value 95. The p-value is the probability of observing 0-5 or 95-100 heads if the coin is fair. If you did the computation, you would see that this is a very small probability indeed.

The p-value tells you how likely or unlikely what you observed is if the null hypothesis is true. Thus a very small p-value suggests that what you saw is unlikely, and hence that the null hypothesis is false. A high p-value suggests that what you saw is likely, and therefore consistent with the null hypothesis.

(A high p-value does NOT prove that the null hypothesis is TRUE. One example can never prove something is true.)

Step 5

Decide whether to accept or reject the null hypothesis based on the p-value

If you specified a significance level [pic], all you have to do is compare the p-value to [pic].

If the p-value is smaller than [pic] you reject H0.

If ihe p-value is greater than [pic] you fail to reject H0.

What is a small p-value?

The usual rule of thumb is that a p-value of .05 or smaller is small enough to reject the null hypothesis.

This is why [pic] = 0.05 is commonly used as the significance level for a test.

As a rule of thumb:

[pic]

[pic]

Standard pairs of null and alternative hypotheses for a single mean or proportion.

[pic]

Example #1 of Steps Involved.

A company wants to decide whether a particular training program speeds up the performance of the employees on their assembly line. They select a sample of n=25 employees, record the time it takes them to do a task, have them take the training program, and then time them at the task again. For each employee, they compute the reduction in time taken to do the task. The mean reduction for the sample is [pic] minutes and the sample standard deviation is s = 9 minutes. That is, on average, the employees do the task 2.5 minutes faster after training. Test the hypothesis that the training improves efficiency at a level [pic] = 0.05.

Steps I and II:

The company wants to know if the program helps its employees. The alternative is that it does nothing, or even slows them down. Thus, this is a one-sided hypothesis test. The mean reduction time corresponding to the test being useless is 0 minutes. Thus our null and alternative hypotheses are:

[pic]

Step III: The significance level was specified in the problem as [pic] = 0.05

Step IV: Compute the p-value.

we compute the probability under the null hypothesis of getting a value of [pic] greater than 2.5

[pic]

We fail to reject the null hypothesis at significance level [pic] = 0.05 because the p-value is greater than our specified significance level [pic] = 0.05. Thus the data is consistent with training program not being helpful at level [pic] = 0.05. However, this is a fairly close call. The p-value is 0.08. Thus if we had been given a significance level of [pic] we would have rejected the null hypothesis and concluded that the training program is useful.

Since this is not a life and death situation, we are probably willing to risk rejecting the null hypothesis fairly frequently when it is right. If I were the company managers, based on the p-value, I would be inclined to keep trying the training program. This is why p-values are more useful than significance levels. If you know the p-value, you know whether to reject or accept the null hypothesis at ANY significance level.

Additional example:

[pic]

[pic]

[pic]

................
................

In order to avoid copyright disputes, this page is only a partial summary.

Google Online Preview   Download