+ All Categories
Home > Documents > Introduction to Statistics & Probability - McMaster...

Introduction to Statistics & Probability - McMaster...

Date post: 07-Apr-2018
Category:
Upload: vodang
View: 225 times
Download: 1 times
Share this document with a friend
19
Chapter 6: Introduction to Inference (Part 2) Dr. Nahid Sultana
Transcript
Page 1: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of significance

Chapter 6:

Introduction to Inference

(Part 2) Dr. Nahid Sultana

Page 2: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of 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

Page 3: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of significance

6.2 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

3

Page 4: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of significance

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.

4

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: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of significance

5

The Reasoning of Tests of Significance Example (Cobra Cheese Company ): 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?

Page 6: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of 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 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

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: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of significance

7

One-sided and two-sided tests 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 ≠=

Page 8: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of 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: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of significance

9

Test Statistic

.H hupothesis null in thegiven parameter theof value theis where

/

00

0

µσ

µ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: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of 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: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of significance

11

Interpreting a P-value

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: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of 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: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of 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: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of significance

14

P-value in one-sided and two-sided tests 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: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of 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: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of significance

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

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: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of 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: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of significance

Two-Sided Significance Tests and Confidence Intervals

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

C: confidence level

α: significance level

18

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

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

Page 19: Introduction to Statistics & Probability - McMaster …ms.mcmaster.ca/~nahid/Stat207/LectureNotes/Chapter 6-part2.pdfIntroduction to Inference ... Statistical Inference . Test of significance

Two-Sided Significance Tests and Confidence Intervals

19

Decision Rule: Reject the null hypothesis if the sample mean x-bar 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.


Recommended