Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test...

19

Click here to load reader

description

Mathematics, Statistics, Introduction to Inference, Tests of Significance, The Reasoning of Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance Tests and Confidence Intervals

Transcript of Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test...

Page 1: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

INTRODUCTION TO STATISTICS & PROBABILITY

Chapter 6: Introduction to Inference

(Part 2)

Dr. Nahid Sultana

1

Page 2: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

Chapter 6 Introduction to Inference

6.1 Estimating with Confidence

6.2 Tests of Significance

6.3 Use and Abuse of Tests

6.4 Power and Inference as a Decision

2

Page 3: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

6.2 Tests of Significance 3

The Reasoning of Tests of Significance

Stating Hypotheses

Test Statistics

P-values

Statistical Significance

Test for a Population Mean

Two-Sided Significance Tests and Confidence Intervals

Page 4: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

4

1. Confidence intervals : One of the two most common types of inference. Goal: to estimate a population parameter.

2. tests of significance : The second common type of inference.

Goal: to assess the evidence provided by data about some claim concerning a population.

Statistical Inference

Test of significance is a formal procedure for comparing observed data with a claim (also called a hypothesis) whose truth we want to assess.

The hypothesis is a statement about a parameter, like p or µ.

We express the results of a significance test in terms of a probability that measures how well the data and the hypothesis agree.

Page 5: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

5

The Reasoning of Tests of Significance

Cobra Cheese Company buys milk from several suppliers as the essential raw material for its cheese. Cobra suspects that some producers are adding water to their milk to increase their profit.

Excess water can be detected by determining the freezing point of the milk. The freezing temperature of natural milk varies normally, with a mean µ = -0.545 degrees Celsius, and a standard deviation of σ = 0.008 degrees Celsius.

Added water raises the freezing temperature toward 0, the freezing point of water.

Cobra's laboratory manager measures the freezing temperature of five consecutive lots of milk from one producer. The mean measurement is -0.538.

Is this good evidence that the producer is adding water to the milk?

Example (Cobra Cheese Company ):

Page 6: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

6

Stating Hypotheses A significance test starts with a careful statement of the claims we want to compare.

The Null Hypothesis (Ho): The hypothesis we have to disprove - in order to prove our claim. The Alternative Hypothesis (Ha): The claim itself, that a change in the population has occurred or that an observed effect is the result of a treatment.

Example (Cobra Cheese Company ): Here, population mean µ = -0.545º C; sample mean = -0.538º C Is this good evidence that the producer is adding water to the milk?

Ho : The producer is not adding water to the milk Ho : Milk from this producer has the same freezing temperature as natural milk

i.e. Ho : µ = -0.545º C Ha : The producer is adding water to the milk Ha : Milk from this producer has a higher freezing temperature than natural milk

i.e. Ha : µ > -0.545º C

Page 7: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

7

7

A two-tail or two-sided test of the population mean has these null and alternative hypotheses:

Ho : µ = [a specific number] Ha : µ ≠ [a specific number]

A one-tail or one-sided test of a population mean has these null and alternative hypotheses:

Ho : µ = [a specific number]; Ha : µ < [a specific number] OR Ho : µ = [a specific number]; Ha : µ > [a specific number]

Example The FDA tests whether a generic drug has an absorption extent similar to the known absorption extent of the brand-name drug it is copying. Higher or lower absorption would both be problematic, thus we test:

sided- twoµ µ : H ; µ µ : H brandgenericabrandgeneric0 ≠=

One-sided and two-sided tests

Page 8: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

8

Test Statistic

A number that summarizes the data for a test of significance. Compares an estimate of the parameter from sample data with the value of the parameter given in the null hypothesis. Measures how far sample data diverge from the null hypothesis.

Large value indicate that the observed statistic (parameter estimate) is far from the parameter value claimed in the Ho. Large value give evidence against Ho (i.e. give evidence for Ha).

Formula for testing µ with known σ:

.H hupothesis null in thegiven parameter theof value theis where

/

00

0

µσ

µn

xz −=

A test of significance is based on a statistic that estimates the parameter that appears in the hypotheses

Page 9: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

9

Test Statistic (Cont…) .H hupothesis null in thegiven parameter theof value theis where,

/ 000 µ

σµn

xz −=

Example (Cobra Cheese Company ): Here, population mean µ = -0.545º C; standard deviation σ = 0.008º C; sample mean measurement= -0.538º C

Is this good evidence that the producer is adding water to the milk?

Ho : µ = -0.545º C; Ha : µ > -0.545º C

This probability is called the P-Value of the test

Page 10: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

10

Interpreting a P-value

P-value is a number between 0 and 1 With a small p-value we reject Ho. The true property of the population is significantly different from what was stated in H0. Thus, small P-values are strong evidence AGAINST Ho .

But how small is small…?

P- Value & Evidence Against Ho

A P-Value of 0.05 or less is typically considered statistically significant.

Page 11: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

11

11

Interpreting a P-value (Cont…)

Example (Cobra Cheese Company ): Here, population mean µ = -0.545º C; sample mean measurement= -0.538º C Is this good evidence that the producer is adding water to the milk?

Ho : The producer is not adding water to the milk, i.e. Ho : µ = -0.545º C Ha : The producer is adding water to the milk, i.e. Ha : µ > -0.545º C The P-value of the test is 0.0250 i.e. 2.5% < 5%.

We should reject the null hypothesis, i.e. reject the hypothesis that “The freezing temperature of the milk that came from this producer is the same as the freezing temperature of natural milk.” Therefore we can conclude that this producer is adding water to the milk!

Page 12: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

12

Four Steps of Tests of Significance

1. State the null and alternative hypotheses.

2. Calculate the value of the test statistic.

3. Find the P-value for the observed data.

4. State a conclusion.

Tests of Significance: Four Steps

Page 13: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

13

P-value in one-sided and two-sided tests

To calculate the P-value for a two-sided test, use the symmetry of the normal curve. Find the P-value for a one-sided test and double it.

Page 14: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

14

P-value in one-sided and two-sided tests (Cont…) Example: (packs of cherry tomatoes) You are in charge of quality control in your food company. You sample randomly four packs of cherry tomatoes, each labeled 1/2 lb. (227 g). The average weight (x-bar) from the four boxes that you examine is 222 g. Is this a good evidence that the calibrating machine that sorts cherry tomatoes into packs needs revision?

Step 1: Ho : μ = 227g versus Ha : μ ≠ 227g Step 2:

Step 3: the area under the standard normal curve to the left of z is 0.0228. Thus, P-value = 2*0.0228 = 4.56% . Step 4: P-value, 4.56% < 5%, so we reject Ho. The machine does need recalibration.

Page 15: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

15

We can compare the P-value with a fixed value that we regard as decisive, called the significance level. We write it as α, the Greek letter alpha. This value is decided arbitrarily before conducting the test. Typically small, usually 0.05 or smaller.

When our P-value is less than the chosen α, we say that the result is statistically significant.

If P ≤ α, then we reject Ho, conclude Ha , statistically significant. If P > α, then we fail to reject Ho. can’t conclude Ha , not statistically significant.

Statistical Significance

Page 16: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

16

16

If P ≤ α, then we reject Ho, conclude Ha , statistically significant.

If P > α, then we fail to reject Ho. can’t conclude Ha , not

statistically significant.

Statistical Significance (Cont…)

Example: (packs of cherry tomatoes) .

Is this a good evidence that the calibrating machine that sorts cherry

tomatoes into packs needs revision?

Two sided test, : Ho : μ = 227g versus Ha : μ ≠ 227g

P-value, 4.56%

If α had been set to 5%, then the P-value would be significant.

If α had been set to 1%, then the P-value would not be significant.

Page 17: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

17

Rejection region for a two-tail test of μ with α = 0.05 (5%) A two-sided test means that α is spread between both tails of the curve. Middle area C = 1 − α = 95% Upper tail area = α /2 = 0.025

Critical z-values:

Rejection Rule

Reject Ho if:

or

Page 18: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

18

Two-Sided Significance Tests and Confidence Intervals

In a two-sided test, C = 1 – α

C: confidence level

α: significance level

Decision Rule: Reject the null hypothesis if the parameter value µo ,

given in Ho , falls outside the C = 1 - α confidence interval.

Page 19: Chapter 6 part2-Introduction to Inference-Tests of Significance, Stating Hypotheses, Test Statistics, P-values, Statistical Significance, Test for a Population Mean, Two-Sided Significance

19

Two-Sided Significance Tests and Confidence Intervals (Cont…) Decision Rule: Reject the null hypothesis if the parameter value µo, given in Ho , falls outside the C = 1 - α confidence interval. Example: (packs of cherry tomatoes) .

Is this a good evidence that the calibrating machine that sorts cherry tomatoes into packs needs revision?

Two sided test, Ho : μ = 227g versus Ha : μ ≠ 227g

P-value, 4.56%

95% CI for μ :

Decision: Since µo = 227g does not fall inside the 95% CI, we reject Ho.