32
L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single Sample, part 2

L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

Embed Size (px)

Citation preview

Page 1: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

1

MER301:Engineering Reliability

LECTURE 9:

Chapter 4:Decision Making for a Single Sample, part 2

Page 2: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

2

Summary

Hypothesis Testing Procedure

Inference on the Mean,Known Variance (z-test) Hypothesis Test Criteria P-value Choice of sample size Confidence interval

Page 3: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

3

Populations and Parameters, Samples and Statistics….

A Population has a Distribution that is characterized by Parameters and that give the Mean and Variance, respectively.

The intent of drawing a Sample is to make estimates of either the Population Mean or the Variance, or Both The Sample Mean is a Statistic used to estimate the

value of the Population Mean

The Sample Variance is a Statistic that may be used to estimate the Population Variance

A larger number of samples gives a more precise estimate

2

X

2S 2

Page 4: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

4

Summary of Hypothesis Testing

Comments on Hypothesis Testing Null Hypothesis is what is tested Rejection of the Null Hypothesis always leads to

accepting the Alternative Hypothesis Test Statistic is computed from Sample data Critical region is the range of values for the test

statistic where we reject the Null Hypothesis in favor of the Alternative Hypothesis

Rejecting when it is true is a Type I error Failing to reject when it is false is a Type II

error 0H0H

Page 5: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

5

Hypothesis Testing Procedure

....or

ftz ,,, 2

See inside front and back flaps of text…

,,2

1,2/1,2/2/ ,,,,, unn ftzLSLUSL

Page 6: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

6

Example 9.1 A computer system currently has 10 terminals

and uses a single printer. The average turnaround time for the system is 15 minutes.

10 new terminals and a second printer are added to the system.

We want to determine whether or not the mean turnaround time is affected.

Describe the hypothesis.

Page 7: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

7

Example 9.2 The acceptable level for exposure to

microwave radiation in the US is taken as 10 microwatts per square centimeter. It is feared that a large television transmitter may be pushing the the level of microwave radiation above the acceptable level.

Write the appropriate hypothesis test.

Page 8: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

8

Example 9.3 Design engineers are working on a low-

effort steering system that can be used in vans modified to fit the needs of disabled drivers. The old-type steering system required a force of 54 ounces to turn the van’s 15in diameter steering wheel. The new design is intended to reduce the average force required to turn the wheel.

State the appropriate hypothesis.

Page 9: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

Inference on the Mean, Variance Known (z-test)

Page 10: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

10

Inference on the Mean, Variance Known

This case typically arises when samples are being drawn from a population with known mean and standard deviation but subject to variation in processes, for example as in manufacturing.

For such cases, samples are drawn to test whether the process is producing parts with the required quality.

Random Samples of size n are drawn from the population to give a test statistic

n

XZ

/0

0

Page 11: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

11

Inference on the Mean, Variance Known

The test may be to establish that a process remains centered (two sided) or that the process does not drift beyond a critical upper or lower bound (one sided).

4-10

Page 12: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

12

Inference on the Mean, Variance Known

For a two sided test to see if a process is centered, the hypothesis is

Reject H0 if the observed value of the test statistic z0 is either:

z0 > z/2 or z0 < -z/2

Fail to reject H0 if

-z/2 < z0 < z/2

Page 13: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

13

Hypothesis Testing Summary Inference on the Mean, Variance Known

Page 14: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

14

Example 9.4

Continuing with the Example 9.1 30 samples of turnaround time are

taken with the following results Sample Average = 14.0 (Population)Standard deviation = 3

Can we reject the null hypothesis? Set the probability of making a Type 1 error at 1.0

Page 15: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

15

P-Value

L Ber kle y DavisCop yrig ht 20 09

Page 16: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

16

What does P-value tell you? It is customary to call the test statistic and

the data significant when the null hypothesis is rejected…..therefore, the p-value is the smallest at which the data are significant.

Another way to think of the p-value is the probability that is true and the sample results (the value of the test statistic) were obtained by pure chance…

0H

Page 17: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

17

Two tailed P-Values

Page 18: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

18

Example 9.5

What is the P value for the results of Examples 9.1/9.4?

Page 19: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

19

Type II Error

L Ber kle y DavisCop yrig ht 20 09

4-11

Page 20: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

20

Example 9.6

For the previous Example 9.4, what was the probability of failing to reject the null hypothesis when it is false? Assume the true mean is equal to the Sample Mean=14

Compute the power of this statistical test.

Page 21: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

21

Impact of Sample Size on Type II Error, Two Sided Test

L Ber kle y DavisCopyright 2009

Page 22: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

22

Impact of Sample Size on Type II Error, One Sided Test

L Ber kle y DavisCop yrig ht 2009

Page 23: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

23

Example 9.7 Consider Example 9.1/9.4/9.5/9.6… again.

The engineer wishes to design a test so that if the true mean turnaround time differs from 15 minutes by at least 0.9 minutes, the test will detect this with probability of 0.9. The Population Standard Deviation is 3min.

What number of samples is required?

Page 24: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

24

Distribution of the Mean

4-13

Page 25: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

25

Confidence Intervals on the Mean

L Ber kle y DavisCop yrig ht 2009

4-12

Page 26: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

26

Confidence Intervals on MeanKnown Variance

Page 27: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

27

One-Sided Confidence Intervalon Mean with Variance Known

Page 28: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

28

Example 9.8

The lifetime of a mechanical relay in a heating system is assumed to be a normal random variable with variance 6.4 days2.

Five items are tested and fail at 104.1, 86.2, 94.1, 112.7, and 98.8 days

What is the 95% confidence interval on the mean.

Page 29: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 10

29

Estimating Sample Size for a Given Error

L Ber kle y DavisCop yrig ht 2009

Page 30: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 10

30

Estimating Sample Size for a Given Error

In general, a sample size n necessary to ensure a confidence interval of length L is given by

The smaller the desired L, the larger n must be…

n increases as the square of More population variability requires a larger

sample size n is an increasing function of confidence

interval since as decreases increases

2

2/2

LZn

2/Z

LSLUSLL

LSLUSLL

Page 31: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 10

31

Example 10.1 Extensive monitoring of a computer time sharing

system has suggested that response time to a particular edit command is normally distributed with standard deviation 25 msec.

A new operating system has been installed and it is desired to estimate the true average response time µ for the new environment.

Assume that the response times are still normally distributed with σ=25 msec.

What sample size is necessary to ensure that the resulting 95% confidence interval has a length of, at most, 10 msec.

Page 32: L Berkley Davis Copyright 2009 MER301: Engineering Reliability Lecture 9 1 MER301:Engineering Reliability LECTURE 9: Chapter 4: Decision Making for a Single

L Berkley DavisCopyright 2009

MER301: Engineering ReliabilityLecture 9

32

Summary

Hypothesis Testing Procedure

Inference on the Mean,Known Variance Criteria P-value Choice of sample size Confidence interval