381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

13
38 1 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

Transcript of 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

Page 1: 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

381

Hypothesis Testing(Introduction-II)

QSCI 381 – Lecture 26(Larson and Farber, Sect 7.1)

Page 2: 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

381

Overview To test a claim using data, we:

Develop two statistical hypotheses (the null and alternative hypotheses).

Select a level of significance (which determines the level of type I error – the probability of (unintentionally) rejecting the null hypothesis when it is true).

Page 3: 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

381 We now need to summarize the data in

the form of a . Common examples of test statistics and their associated sampling distributions are:

Statistics Tests -I

PopulationParameter

TestStatistic

SamplingDistributio

n

Standardized test statistic

Normal (n30)

Student t

zt

p Normal z

Chi-square2

x

p̂2s 2

Page 4: 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

381

Statistics Tests -II

Therefore, given a claim related to , p or 2: We select the appropriate test

statistic from the previous table. We choose the appropriate sampling

distribution. We standardize the test statistic.

Page 5: 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

381

Examples-I We wish to test the claim that 30%

of the diet of Pacific cod is walleye pollock. Test statistic = Sampling distribution = Standardized test statistic =

Page 6: 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

381

Examples-II Identify the null and alternative hypotheses,

the test statistic, the sampling distribution, and comment on the appropriate levels of type I and type II error: The probability of a building by a given

contractor collapsing is less than 1%. The density of a fish species based on a survey

consisting of 15 trawls is 15 kg / ha. The standard deviation of the survey is 5 kg / ha.

Page 7: 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

381

p-values Assuming that the null hypothesis

is true, the (or probability value) of a hypothesis test is the probability of obtaining a sample statistic with a value as extreme or more extreme than the one determined from the sample data.

Page 8: 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

381

p-values and Tests-I The nature of a hypothesis test depends on

whether it is left-, right- or two-tailed. This in turn depends on the nature of the alternative hypothesis (one- or two-sided alternatives).

There are three cases: The alternative hypothesis contains the symbol

“<“ (i.e. the null hypothesis involves the symbol “”).

The alternative hypothesis contains the symbol “>” (i.e. the null hypothesis involves the symbol “”).

The alternative hypothesis contains the symbol “” (i.e. the null hypothesis involves the symbol “=”).

Page 9: 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

381

p-values and Tests-II

Left-tailed test

-2 0 2

Right-tailed test

-2 0 2

Two-tailed test

-2 0 2

Left tailed test: Null hypothesis involves a

population parameter something

The p-value is the total shaded areaand measures the probability of

getting a test statistic as extreme ormore extreme than the observed

value.

Page 10: 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

381

Making Decisions Based on p-values-I

1. State the claim mathematically and verbally. Identify the null and alternative hypotheses.

H0 = ?; Ha = ?

2. Specify the level of significance.=?

3. Determine the standardized sampling distribution if the hypothesis is true (sketch it)

-2 0 2

Page 11: 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

381

Making Decisions Based on p-values-II

4. Calculate the test statistic and its standardized value (z in this case). (add it your sketch).

5. Find the p-value6. Apply the decision rule:

7. Interpret the results

0 z

Is the p-value less than or equal to ?

Yes

Reject H0 Fail to reject H0

No

Page 12: 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

381

Making Decisions Based on p-values-III

Note that rejection of the null hypothesis is not proof that the null hypothesis is false, just that it is (very) unlikely.

Rejection of the null hypothesis is also not proof that the alternative hypothesis is true.

The following lectures cover various situations in which the algorithm outlined above is used to make decisions regarding hypotheses.

Page 13: 381 Hypothesis Testing (Introduction-II) QSCI 381 – Lecture 26 (Larson and Farber, Sect 7.1)

381

Caveat The inability to reject the null

hypothesis can arise because: The null hypothesis is true (is a null

hypothesis ever true?) The sample size is too small to show

that the null hypothesis is false. The null hypothesis may be rejected

even if it is not substantially false.