me3620 spring 2020 me3620 theory of engineering...

63
Spring 2020 ME3620 Chapter IV ME3620 Theory of Engineering Experimentation Spring 2020 Chapter IV. Decision Making for a Single Sample 1

Upload: others

Post on 07-Jul-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV

ME3620 Theory of Engineering Experimentation

Spring 2020

Chapter IV. Decision Making for a Single Sample

1

Page 2: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 2

4–1 Statistical Inference

• The field of statistical inference consists of those methods used to make decisions or draw conclusions about a population.

• These methods utilize the information contained in a random sample from the population in drawing conclusions.

Page 3: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 3

4–1 Statistical Inference

• Statistical Inference is divided into two areas: a) Parameter Estimation and b) Hypothesis Testing

• Parameter Estimation- Parameters are descriptive measures of an entire population.- Their values are usually unknown because it is unfeasible to measure an entire population. - Instead, a random sample from the population is taken in order to obtain parameter estimates. - Statistical analysis deals with finding estimates of the population parameters along with the amount of error associated with these estimates. These estimates are also known as sample statistics.

Page 4: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 4

4–1 Statistical Inference

• Parameter Estimation- There are several types of parameter estimates: Point estimates are the single, most likely value of a parameter.For example, the point estimate of population mean (the parameter) is the sample mean (the parameter estimate).- Confidence intervals are a range of values likely to contain the population parameter.As an example of parameter estimates, consider that a spark plug manufacturer is studying a problem in their spark plug gap. It would be too costly to measure every single spark plug that is made. Instead, a random sample of 100 spark plugs is collected and the gap ismeasured to be 9.2 mm [this is the point estimate for the population mean (μ)]. Additionally, a 95% confidence interval for μ which is (8.8, 9.6) is determined. This means that with a 95% confidence the true value of the average gap for all the spark plugs is between 8.8 and 9.6.

Page 5: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 5

4–3 Hypothesis Testing

• Many of the problems in engineering require to determine whether to accept or reject a statement about a given parameter.

• The statement is called hypothesis and the decision-making procedure about the hypothesis is called hypothesis testing.

• Statistical hypothesis testing is the data analysis stage of a comparative experiment, in which we might be interested in, for example, comparing the mean of a population to a specified value.

•In this chapter, we will consider comparative experiments involving one population, and with focus on is testing hypothesis concerning the parameters of the population (mean, standard deviation).

4–3.1 Statistical Hypothesis

Page 6: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 6

• A statistical hypothesis can arise from physical laws, theoretical knowledge, past experience, or external considerations, such as engineering requirements.

• Since probability distributions are used to represent populations, a statistical hypothesis can be stated in terms of the probability distribution of a random variable.

•The hypothesis usually involves one or more parameters of this distribution.

4–3.1 Statistical Hypothesis

Page 7: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 7

For example, suppose that we are interested in the burning rate of a solid propellant used to power aircraft escape systems.

• The burning rate is a random variable that can be described by a probability distribution.

• We are interested on the mean burning rate (a parameter of this distribution).

• Specifically, we want to determine whether or not the mean burning rate is 50 cm3/s.

• This can be expressed as

• The statements H0 and H1 are called null hypothesis and alternative hypothesis, respectively.

4–3.1 Statistical Hypothesis

3

3

Page 8: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 8

• In this particular case, since the alternative hypothesis states H1: μ ≠ 50 cm3/s, H1 is called a two–sided alternative hypothesis.

• A one–sided alternative hypothesis would be stated as, for example in this case:

H0: μ = 50 cm3/s H1: μ < 50 cm3/s

or

H0: μ = 50 cm3/s H1: μ > 50 cm3/s

• Hypothesis are always statements about the population or distribution under study, not statements about the sample.

4–3.1 Statistical Hypothesis

Page 9: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 9

• The value of the population parameter in the null hypothesis is usually determined as:

a) The result of past experience or knowledge of the process, in this case the hypothesis statement will be about whether the parameter has changed.

b) Being drawn from some theory or model regarding the process under study, the hypothesis will be about verifying the theory or model.

c) The result of external considerations, such as design or engineering considerations.

4–3.1 Statistical Hypothesis

• A procedure leading to a decision about a particular hypothesis is called Test of a Hypothesis.

• Hypothesis-testing procedures rely on using the information in a random sample from the population of interest.

Page 10: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 10

4–3.1 Statistical Hypothesis• A procedure leading to a decision about a particular hypothesis is called Test of a Hypothesis.

• Hypothesis-testing procedures rely on using the information in a random sample from the population of interest.

• If this information is consistent with the hypothesis, then the hypothesis is true.

• If this information is inconsistent with the hypothesis, then the hypothesis is false.

• In general, what it is tested is the null hypothesis, where, the rejection of the null hypothesis leads to accepting the alternative hypothesis.

• Null hypothesis are always stated such that an exact value of the parameter is expressed, for example H0: μ = 50 cm3/s

Page 11: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 11

4–3.1 Statistical Hypothesis• In general, what it is tested is the null hypothesis, where, the rejection of the null hypothesis leads to accepting the alternative hypothesis.

• Null hypothesis are always stated such that an exact value of the parameter is expressed, for example H0: μ = 50 cm3/s.

• Alternative hypothesis allows the parameter to take several values, for example H0: μ < 50 cm3/s.

• Testing of a hypothesis requires taking a random sample, computing a test statistic from the sample data, and then using the test statistic to make a decision about the null hypothesis.

Page 12: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 12

4–3.2 Testing Statistical Hypothesis• Consider the burning rate problem, used previously:

• A sample of 10 specimens is taken and the mean of the sample, 𝑥, is determined (𝑥 is an estimation of μ).

• If 𝑥 is close to μ, then there is evidence to support H0. • If 𝑥 is considerably different to μ, then there is evidence to support H1, instead.

• Since the sample mean, 𝑥, can take many values, a range around μ is determined, such that if 𝑥 falls within this range then H0 is not rejected (that is H0is accepted).

• Otherwise if 𝑥 falls outside this pre-established range then H0 rejected (that is H1 is accepted).

3

3

Page 13: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 13

4–3.2 Testing Statistical Hypothesis• Consider the case discussed where

• Assume that the decision rule is: 48.5 < 𝑥 < 51.5. Thus values of 𝑥 less than 48.5 or larger that 51.5 constitute the critical region for the test.

• The values that define the critical region are called critical values.

3

3

Page 14: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 14

4–3.2 Testing Statistical Hypothesis• This decision process can result in two erroneous conclusions:

a) The true mean burning rate might be 50 cm3/s but the randomly selected testing specimens resulted in a 𝑥 within the critical region, resulting in the rejection of H0 in favor of H1. This type of erroneous conclusion is called Type I Error.

b) Assume that μ ≠ 50 cm3/s but 𝑥 falls outside the critical region, in this case we would fail to reject H0 (that is H0 is accepted), when H0 is false. This type of erroneous conclusion is called Type II Error.

Page 15: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 15

• These observations are summarized in the following table:

• Now, the probability of making a Type I error is represented by α:α = P(type I error) = P(reject H0 when H0 is true)

• In the propellant burning example, a type I error occurs if μ = 50 but 𝑥 < 48.5, or 𝑥 > 51.5

(accepted)

4–3.2 Testing Statistical Hypothesis

Page 16: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 16

• Assume now that σ = 2.5 cm3/s, then if H0: μ = 50 cm3/s is true, the distribution of the sample mean, 𝑥, is approximately normal with mean μ = 50 and standard deviation σ/ 10 = 2.5/ 10 = 0.79.

• Thus, the probability of making a Type I error is:

α = P(𝑋 < 48.5 when μ = 50 ) + P (𝑋 > 51.5 when μ = 50 )

• Then, the z values corresponding to the critical values of 48.5 and 51.5 are

• Which results in, α = P(Z < - 1.90) + P (Z > 1.90) = 0.0287 + 0.0287 = 0.0574

4–3.2 Testing Statistical Hypothesis

𝑧48.5 50

0.79 1.90 𝑧51.5 50

0.79 1.90

Page 17: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 17

• Which results in, α = P(Z < - 1.90) + P (Z > 1.90) = 0.0287 + 0.0287 = 0.0574 4–3.2 Testing Statistical Hypothesis

• This result implies that 5.74 % of all random samples will lead to rejection of H0 when the true mean is actually 50.

• That is, it is expected to make a type I error 5.74 % of the time, provided that the true mean is actually 50 .

Page 18: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 18

• α can be reduced by using critical values that are farther from the mean μ say for example 48 and 52

4–3.2 Testing Statistical Hypothesis

𝛼 𝑃 𝑍48 50

0.79 𝑃 𝑍52 50

0.79 𝑃 𝑍 2.53 𝑃 𝑍 2.53

𝛼 0.0057 0.0057 0.0114

Page 19: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 19

• α can also be reduced by increasing the sample size, say, n = 16 instead 10.• Thus, σ/ 16 = 2.5/ 16 = 0.625

4–3.2 Testing Statistical Hypothesis

𝛼 𝑃 𝑍48.5 50

0.625 𝑃 𝑍51.5 50

0.625 𝑃 𝑍 2.4 𝑃 𝑍 2.4

𝛼 0.0082 0.0082 0.0164

Page 20: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 20

• It is also important to study the probability of Type II error, β:

β = P(type II error) = P(fail to reject H0 when H0 is false)

• That is, H0 is accepted when H0 is false.

• To find β it is necessary to have a specific alternative hypothesis, that is a particular value for μ.

• Suppose that it is important to reject H0: μ = 50 when the burning rate is greater than 52 or less than 48.

• We could calculate the probability of a type II error β for the values μ = 48 and μ = 52 and use this result to draw some conclusions about the test procedure.

4–3.2 Testing Statistical Hypothesis

Page 21: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 21

• That is, how would the test procedure work if it is needed to detect –that is reject H0 – for a mean value of μ = 48 or μ = 52?

• Because of symmetry, it is only necessary to evaluate one of the two cases – say finding the probability of not rejecting H0: μ = 50 when the true mean is μ = 52.

4–3.2 Testing Statistical Hypothesis

• The normal distribution on the left corresponds to the test statistics 𝑋 when H0: μ = 50 is true.

• The normal distribution on the right is the distribution of 𝑋when H1 is true and the value of μ = 52.

• A type II error will occur when the sample mean 𝑥 falls between 48.5 and 51.5 (the critical region boundaries) when μ = 50.

Page 22: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 22

4–3.2 Testing Statistical Hypothesis• This is the probability that 48.5 𝑋 51.5 when the true

mean is μ = 52. Which is the shaded area of the normal distribution on the right.

• Therefore: β = P(48.5 𝑋 51.5 when μ = 52)

• Then, the z values corresponding 48.5 and 51.5 when μ = 52 are

• Resulting in

𝑧48.5 52

0.79 4.43 𝑧51.5 52

0.79 0.63

𝛽 𝑃 4.43 𝑍 0.63 𝑃 𝑍 0.63 𝑃 𝑍 4.43

𝛽 0.2643 0.0000 0.2643

Page 23: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 23

4–3.2 Testing Statistical Hypothesis

𝛽 0.2643 0.0000 0.2643• In this case, testing H0: μ = 50 against H1: μ ≠ 50 with n = 10 and critical values of 48.5

and 51.5, and true mean value of 52 will result in a probability of 0.2643 of failing to reject (that is accept) a false H0.

• Due to symmetry if the true value of the mean is μ = 48 then β = 0.2643

• The probability of making a Type II error increases rapidly as the true value of μapproaches the hypothesized value.

• For example, if the true value of μ is 50.5 and H0: μ = 50, then

β = P(48.5 𝑋 51.5 when μ = 50.5)

𝑧48.5 50.5

0.79 2.53 𝑧51.5 50.5

0.79 1.27

Page 24: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 24

𝛽 𝑃 2.53 𝑍 1.27 𝑃 𝑍 1.27 𝑃 𝑍 2.53𝛽 0.8980 0.0057 0.8923

4–3.2 Testing Statistical Hypothesis• Which results in

• Type II error probability also depends on the size of the sample.

• Thus, the following conclusions can be obtained regarding type I and II errors:a) The size of the critical region, and thus the probability of a type I error α can be reduced

by adjusting the critical valuesb) Type I and II errors are related. A decrease in the probability of one type of error results in

an increase in the probability of the other (if n remains constant)c) Increases in the sample size will reduce α and β if the critical values are constant.d) When H0 is false β increases as the true value of the parameter approaches the value

hypothesized in H0.

Page 25: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 25

4–3.2 Testing Statistical Hypothesis• Type I error probability α is controlled through the selection of the critical values.

• In general a value of α = 0.05 is used in most situations unless there is information available indicating that this is an inappropriate value

• Finally, we define the Power of test as:

• Thus, the power is defined as 1 – β

Page 26: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 26

4–3.2 Testing Statistical Hypothesis• Type I error probability α is controlled through the selection of the critical values.

• In general a value of α = 0.05 is used in most situations unless there is information available indicating that this is an inappropriate value

4–3.3 P–Values in Hypothesis Testing

• The P–value is the probability that the sample average, 𝑥, will take on a value that is at least as extreme as the observed value when H0 is true.

• That is, P–value conveys information about the weight of evidence against H0.• The smaller the P–value is, the greater the evidence against H0.• If P–value is small enough the H0 is rejected in favor of H1.• P–value approach allows a decision maker to draw conclusions at any level of significance

that is appropriate.

Page 27: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 27

4–3.3 P–Values in Hypothesis Testing

• The P–value measures the plausibility of H0.

• The smaller the P–value is, the greater the evidence against H0.

• The P–value is the probability of obtaining a sample “more extreme” than the one observed in the data assuming that H0 is true.

Page 28: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 28

4–3.3 P–Values in Hypothesis Testing

• It is also necessary to consider z–value being negative (z = –2.28), corresponding to 48.2. Because of symmetry, P(z –2.28) = 0.0113

• Therefore, the P value for this hypothesis testing case is

P = 0.0113 + 0.0113 = 0.0226

Calculation and Interpretation of the P–Value3

3

𝑧𝑥 𝜇𝜎/ 𝑛

51.8 500.79 2.28, thus, the probability of P(z ≥ 2.28) = 0.0113.

• Consider the propellant burning rate example, with σ = 2.5 cm3/s:

• Suppose that a random sample with n = 10 and 𝑥 = 51.8 cm3/s is collected.• For this example

Page 29: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 29

Calculation and Interpretation of the P–Value

• P–value states whether H0 is true. In this case, the probability of getting a random sample whose mean is at least as far from 50 as 51.8 (or 48.2) is 0.026 (very small).

• Then, a random sample with 51.8 as mean is very rare if the actual mean is 50.• Using a level of significance of 0.05 (Confidence interval of 5%), in this case H0 would be

rejected.

Page 30: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 30

Calculation and Interpretation of the P–Value

• In a practical application, once the P–value is computed, its value is compared to a predetermined level of significance to make a conclusion regarding H0.

• Typically the level of significance used is 0.05 (Confidence interval of 95%).

• Thus, the P–value provides a level of the credibility for H0 by measuring the weight of evidence against H0.

Example. Problem 4–16. Set n = 8 Problem 4–25. c) Find P – value if 𝒙 𝟗. 𝟎𝟗Problem 4–113. a)

Page 31: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 31

4–4 Inference on the Mean of a Population. Variance Known

The Quantity Z:

has a standard normal distribution.

Under the following Assumptions

4–4.1 Hypothesis Testing on the Population Mean (μ)• Consider the case in which:

Page 32: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 32

4–4.1 Hypothesis Testing on the Population Mean (μ)• Consider the case in which:

• And a random sample X1, X2, …, Xn, of the population is collected. Using the z–test, the P–value for this sample can be determined provided that the variance (σ2) of the population is known.

• The test statistic for the z–test is defined by:

• 𝑋 is the mean of the sample whereas 𝜎/ 𝑛 is known as the Standard Error of the Mean (S.E.M)

• The determination of the P–value is function of the definition of H1.

Page 33: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 33

4–4.1 Hypothesis Testing on the Population Mean (μ)

• If H1 is two sided: H1 ≠ μ0, then P = 2[1 - (z0)]

• If H1 is upper–tailed: H1 > μ0, then P = 1 - (z0)

• If H1 is lower–tailed: H1 < μ0, then P = (z0)

Page 34: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 34

4–4.1 Hypothesis Testing on the Population Mean (μ)

• To use fixed level testing with z–test, it is only necessary to determine the critical regions for H1, whether H1 is two–sided or one–sided.

– If H0: μ = μ0 is true:a) H1 is two–sided: The probability that Z0 falls between –zα/2 and zα/2 is 1 – α.

Thus, the probability, α, of: Z0<–zα/2 or Z0 > zα/2 when H0: μ = μ0 is true is very small then H0 must be rejected.b) H1 is one–sided: The probability that Z0 > –zα or Z0 < zα is 1 – α.

Thus, the probability, α, of: Z0<–zα or Z0 > zα when H0: μ = μ0 is true is very small then H0 must be rejected.

Page 35: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 35

4–4.1 Hypothesis Testing on the Population Mean (μ)

• These results are summarized in the following table, and on Table • The significance level, α, is

going to be considered 0.05, unless otherwise stated.

• Thus if P–value, is less than 0.05, H0 must be rejected in favor of H1.

• In summary, using P–valuecriteria, if:P > 0.05 then accept H0

P < 0.05 then reject H0

Page 36: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 36

4–4.1 Hypothesis Testing on the Population Mean (μ)• In summary, using the significance level testing criteria, if:

– For H1: μ ≠ μ0 reject H0 if Z0<–1.96 or Z0 > 1.96. (α/2 = 0.05/2 = 0.025)

– For H1: μ > μ0 reject H0 if Z0 > 1.645. (α = 0.05)

– For H1: μ < μ0 reject H0 if Z0 < – 1.645.

Page 37: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 37

4–4.2 Type II Error and Choice of Sample size

• Consider the case in which the alternative hypothesis is two–sided :

• Where δ = μtrue – μhypothesized and z.05/2 = 1.96

Page 38: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 38

• Consider now, the case in which the H1 is one–sided, upper–tail:

• In this case:

• Finally, if H1 : μ < μ0 then, the probability of type II error, β, is:

• Where δ = μtrue – μhypothesized and zα=.05 = 1.645

>

𝛽 Φ 𝑍𝛿 𝑛

𝜎

𝛽 1 Φ 𝑍𝛿 𝑛

𝜎

• Where δ = μtrue – μhypothesized and zα=.05 = 1.645

Page 39: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 39

4–4.2 Type II Error and Choice of Sample size

• If it is necessary to determine the sample size, n, to reduce the probability of type II error, to a given value β, then, for H1: μ ≠ μ0 :

Determination of sample size

Page 40: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 40

4–4.2 Type II Error and Choice of Sample size

• If it is necessary to determine the sample size, n, to reduce the probability of type II error, to a given value β, when H1 is one–sided:

Determination of sample size

Page 41: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 41

4–4.3 Large–Sample Test• The test procedure developed for the null hypothesis H0: μ = μ0 was under the assumption

that the variance of the population, σ2, is known.

• In most practical situations this is not the case, that is σ2 is unknown.

• However, if the number of samples is n 30, the sample variance s2 will be close to σ2 for most samples, and so s can be substituted for σ in the test procedures without any significant effect.

• The appropriate approach for the analysis of H0 when σ2 is unknown and the sample is small will be discussed in section 4–5.

Page 42: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 42

4–4.5 Confidence Interval on the Mean• In many situations, when making a decision about the mean, H0: μ = μ0 it is more practical

to have an interval than a point estimate.

• One way to finding this interval is by determining a Confidence Interval (CI).

• A confidence interval is defined, for a two–sided alternative hypothesis H1: μ ≠ μ0, as:

• Where

• Resulting in

• Which can be rearranged as

𝑃 𝑧 / 𝑍 𝑧 / 1 𝛼

𝑍𝑋 μ𝜎/ 𝑛

𝑃 𝑧 /𝑋 μ𝜎/ 𝑛

𝑧 / 1 𝛼

𝑃 𝑋𝑧 𝜎

𝑛μ 𝑋

𝑧 / 𝜎𝑛

1 𝛼

Page 43: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 43

Page 44: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 44

4–4.5 Confidence Interval on the Mean• For the case in which the two–sided case of H1 has a CI is 1 – α = 95%, zα/2 = 1.96, thus

the previous equation becomes

• If the alternative hypothesis is lower–tailed, H1: μ < μ0, then the confidence interval for the upper confidence bound is determined as

• If the alternative hypothesis is upper–tailed, H1: μ > μ0, then the confidence interval for the lower confidence bound is determined as

• For a CI, (1–α), of 95%, zα = 1.645

𝑋1.96 𝜎

𝑛μ 𝑋

1.96𝜎𝑛

μ 𝑋𝑧 𝜎

𝑛

𝑋𝑧 𝜎

𝑛μ

Example. Problem 4–29 (a) and (b)Problem 4–32Problem 4–37

Page 45: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 45

4–5 Inference on the Mean of a Population, Variance Unknown

• Consider a population with normal distribution for which the mean, μ, and the standard deviation, σ, are unknowns.

• Assume that it is necessary to test the two–sided alternative hypothesis:

• For the cases in which the sample size is large, n ≥ 30, the test statistic is very similar to that of the case in which σ is known:

𝑍𝑋 𝜇𝑆/ 𝑛

• In this case S is the standard deviation of the sample. (Eqn. 4–39).

• That is for samples with large number of elements σ ≈ S.

Page 46: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 46

4–5 Inference on the Mean of a Population, Variance Unknown

• When the sample is small (n 30) and σ2 unknown, testing the hypothesis on the mean, μ, is performed using the T–test.

• t–distribution depends on the number of samples and therefore the t–table is function the number of items sampled, n.

k = = (n – 1)

• Where k (or ) is the degree of freedom

Page 47: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 47

4–5 Inference on the Mean of a Population, Variance Unknown

• t–distribution is symmetric about zero, and unlike normal distribution, the probability values, α, provided in tables correspond to the right side of the curve.

• A t–distribution table is presented in Table II (Appendix A).

• tα, k is the value of the random variable T with k degrees of freedom above which we find a probability α.

• Since t–distribution is symmetric t1–α = – tα

• Example. Problem 4–48 (a), (e); Problem 4–49 (d)

Page 48: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 48

• Finally, a summary of the testing hypotheses on the Mean of a Normal Distribution when the Standard Deviation of the Population is Unknown and the number of samples n 30, is presented next.

4–5 Inference on the Mean of a Population, Variance Unknown

Page 49: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 49

4–5 Inference on the Mean of a Population, Variance Unknown

4–5.2 Type Error II and Choice of Sample Size• Remember, Type II Error is the probability, β, of “Fail to Reject H0 when H0 is false”.

• In order to determine β for problems involving the t–test a set of charts, called Operating Characteristic (OC) charts have been compiled (Appendix A, charts a, b, c, d).

• β is function of the type alternative hypothesis (two–sided, right– or left–tail), the level of significance α, and a scale factor defined, for two–sided alternative hypothesis as:

• If H1: μ > μ0, then . Use chart c) if α = .05, and chart d) if α = .01.

• If H1: μ < μ0, then

𝑑𝜇 𝜇

𝜎

𝑑𝜇 𝜇

𝜎

𝑑𝜇 𝜇

𝜎

Use chart a) if α = .05, and chart b) if α = .01.

μ1 is the true mean value and μ0 is the hypothesized value.

Page 50: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 50

4–5 Inference on the Mean of a Population, Variance Unknown

4–5.3 Confidence Interval on the Mean• The probability of the test statistic T, where –tα/2, n-1 T tα/2, n-1 is (1 – α) and can be

written as

where 𝑇/

• Thus resulting in

• Which after rearranging yields

𝑃 –tα/2, n−1  T  tα/2, n−1 1 𝛼

𝑃 –tα/2, n−1 𝑋 𝜇𝑆/ 𝑛

 tα/2, n−1 1 𝛼

𝑃 𝑋 𝑡 ,𝑆𝑛

𝜇 𝑋 𝑡 ,𝑆𝑛

1 𝛼

Page 51: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 51

4–5.3 Confidence Interval on the Mean

• If H1: μ > μ0, then

• If H1: μ < μ0, then

𝑋 𝑡 ,𝑆𝑛

𝜇

𝜇 𝑋 𝑡 ,𝑆𝑛 Example. Problem 4–54;

Problem 4–61Problem 4–65

Page 52: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV

• Consider the Null and Alternative Hypothesis to be:

• The test statistic for this type of problem is:

• This test statistic is called “Chi-Square” statistic.

52

4–6.1 Hypothesis Testing on the Variance of a Normal Population

4–6 Inference on the Variance of a Normal Population

Page 53: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 53

• The distribution of the Chi–square is defined as follows:

• k is the number of degrees of freedom and Γ is the gamma function.

4–6.1 Hypothesis Testing on the Variance of a Normal Population

4–6 Inference on the Variance of a Normal Population

Page 54: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 54

• Chi–square is not a symmetrical distribution and the shape of the curve is function of the degree of freedom k = = n – 1

4–6.1 Hypothesis Testing on the Variance of a Normal Population

4–6 Inference on the Variance of a Normal Population

Page 55: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 55

4–6.1 Hypothesis Testing on the Variance of a Normal Population

• The null and alternative hypothesis tests for the 2–test are expressed as:H0: σ2 = σ0

2

Two–sided alternative hypothesis H1: σ2 ≠ σ02

Upper–sided alternative hypothesisH1: σ2 > σ02

Lower–sided alternative hypothesisH1: σ2 < σ02

• Similarly as for hypothesis test on the mean, there are three possibilities to evaluate the null hypothesis, H0, the P–value and Fixed–Level criteria are shown next.

Page 56: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 56

4–6.1 Hypothesis Testing on the Variance of a Normal Population

• Additionally, the confidence interval criterion can also be applied to test H0 on the variance. For H1: σ2 ≠ σ0

2

Page 57: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 57

4–6.1 Hypothesis Testing on the Variance of a Normal Population

• If H1: σ2 > σ02:

• If H1: σ2 < σ02

𝑛 1 𝑆𝜒 ,

𝜎

𝜎𝑛 1 𝑆

𝜒 ,

Example. Problem 4–66; Problem 4–68

Skip Sections 4.7 through 4.9

Page 58: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 58

4–10 Testing for Goodness of Fit

• Hypothesis testing procedures are designed for problems in which the population or probability distribution is known and the hypotheses involve parameters of the distribution.

• If instead it is necessary to determine whether a given sample can be considered to fall within a given probability distribution, an option is to plot the data on probability paper corresponding to the hypothesized distribution.

• Another formal procedure to determine whether a given set of data follows a hypothesized distribution is the goodness–of–fit test procedure and it is based on the Chi–square distribution.

• The procedure requires a random sample of size n from the population whose probability distribution is to be investigated.

Page 59: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 59

4–10 Testing for Goodness of Fit

• The goodness–of–fit test procedure requires a random sample of size n from the population whose probability distribution is to be investigated.

• The n data points are arranged in a histogram with k–bins or class intervals.

• Being Oi the observed frequency in the i–th interval.

• The expected frequency (Ei) for the i–th interval is computed using the hypothesized probability distribution.

• Thus, the test statistic for the goodness–of–fit test is:

O is the observed count E is the expected count

Page 60: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 60

4–10 Testing for Goodness of Fit• If the population follows the hypothesized distribution, Xo

2 follows approximately a Chi–square distribution with k – p – 1 degrees of freedom

k is the number of bins p is the number of parameters of the hypothesized distribution estimated by sample

statistics

• To test the null hypothesis: H0: Data follows hypothesized distributionH1: Data do not follows hypothesized distribution

• P–value as well as fixed level test can be used.

The decision on H0 is made using P–value criteria, for a level of significance of 0.05

If P–value > 0.05 then fail to reject H0.

If P–value < 0.05 then H0 is rejected.

Page 61: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 61

4–10 Testing for Goodness of Fit

• On the other hand, using fixed level test, the null hypothesis is rejected at the α level of significance if:

𝜒 𝜒 ,

In Summary

• The test statistic for the goodness–of–fit test is:

O is the observed count E is the expected count

• E can be found using the hypothesized probability distribution followed by the population. For Example: Poisson Distribution or Normal Distribution

• E can also be estimated from historical count (previous records).

Page 62: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 62

4–10 Testing for Goodness of Fit

• 2–table (Table III, p. 489) is used to determine P – value or 02 based on the degree

of freedom (DoF): = k – p – 1k is the number of bins

p is the number of parameters of the hypothesized distribution estimated by sample statistics

The decision on H0 is made using P–value criteria, for a level of significance of 0.05

If P–value > 0.05 then H0 is accepted (fail to reject).

If P–value < 0.05 then H0 is rejected.

• Or using fixed level test, the null hypothesis is rejected at the α level of significance if:𝜒 𝜒 ,

Example. Problem 4–97, Problem 3–83

Page 63: ME3620 Spring 2020 ME3620 Theory of Engineering ...homepages.wmich.edu/~s9montef/ME3620PresentationChapterIV.pdf · ME3620 Spring 2020 Chapter IV 7 For example, suppose that we are

Spring 2020ME3620

Chapter IV 63

4–10 Testing for Goodness of Fit

Example. A car dealer wants to know whether the sales by color of a particular car model followed this year the expected trend based on historical data, so it can make a proper estimation when placing next year’s the order.

Car Color Observed Expected (O – E)2/EBrown 8 6.5Silver 6 7Red 9 6.5Blue 10 12Black 13 10Green 4 8Total 50