chapter 4- hypothesis testing

47
Hypothesis Testing MTH 2212

Upload: razman-bijan

Post on 05-Dec-2015

31 views

Category:

Documents


2 download

DESCRIPTION

JBAJBUBSUBBSUBAUBS

TRANSCRIPT

Page 1: Chapter 4- Hypothesis Testing

Hypothesis TestingMTH 2212

Page 2: Chapter 4- Hypothesis Testing

Recap• In the previous chapter we illustrated how to construct a

confidence interval estimate of a parameter from a sample data. However, many problems in engineering require that we decide whether to accept or to reject a statement about some parameter.

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

• it is important to note that hypotheses are always statements about the population or distribution under study, not statements about sample.

Page 3: Chapter 4- Hypothesis Testing

Statistical Hypothesis

• -The null hypothesis (H0 ) is a statistical hypothesis that states that there is no difference between a parameter and a specified value, or that there is no difference between two parameters.

• - The alternative hypothesis (H1) is a statistical hypothesis that

states the existence of a difference between a parameter and a specified value, or states that there is a difference between two parameters.

Page 4: Chapter 4- Hypothesis Testing

• translate conjecture/claim from word into mathematical symbol. The null and alternative hypothesis are stated together and the null hypothesis contains the equal sign as shown.

Two-tailed test right-tailed test left-tailed test H0 : = H0 : = H0 : = H1 : ≠ H1 : > H1 : <

Page 5: Chapter 4- Hypothesis Testing

Examples

Eg1: A medical researcher is interested in finding out whether a new medication will have any undesirable side effects. The researcher is particularly concerned with the pulse rate of the patients who take the medication. The researcher knows that the mean pulse rate for the population under study is 82 beats/ min. Will the pulse rate increase, decrease or remain unchanged after a patient takes the medication?

H0 : μ = 82 cm/sec (null hypothesis) H1 : μ ≠ 82 cm/sec (alternative hypothesis)

two sided-alternative hypothesis/ two-tailed

Page 6: Chapter 4- Hypothesis Testing

Eg 2: A chemist invents an additive to increase the life of an automobile battery. If the mean lifetime of the automobile battery without the additive is 36 months, then the hypotheses are

H0 : μ = 36 months (null hypothesis) H1 : μ > 36 months (alternative hypothesis)

Upper bound/ right-tailed

Eg 3: A contractor wishes to lower electricity bills by using a special type of appliance in houses. If the average of the monthly electricity bills is RM78, his hypotheses about electricity costs with the use of the special appliance are

H0 : μ = RM78/month (null hypothesis) H1 : μ < RM78 /month (alternative hypothesis) *look at the alternative hypothesis (claim) to decide whether it is right /left/ two-tailed test.

Lower bound/ left-tailed

Page 7: Chapter 4- Hypothesis Testing

Eg 6: A psychologist feels that playing soft music during a test will change the results of the test. The psychologist is not sure whether the grades will be higher or lower. In the past, the mean of scores was 73.   

• Eg 4: A researcher thinks that if expectant mothers use vitamin pills, the birth weight of the babies will increase. The average of the birth weights of the population is 3.2 kg.

• Eg 5: An engineer hypothesizes that the mean number of defects can be decreased in a manufacturing process of compact discs by using robots instead of humans for certain tasks. The mean number of defective discs per 1000 is 18.

Page 8: Chapter 4- Hypothesis Testing

Test of Statistical HypothesesCritical region: It is a set of values of the test statistics for which the null hypothesis will be rejected. Critical value (point): It is the first (or boundary) value in the critical region. In the hypothesis-testing the decision can lead to four possible outcomes (two are right decisions and two are wong decisions).

H0 true H0 false Reject H0 Decision Do not reject H0

Error Type I

Error Type II

Page 9: Chapter 4- Hypothesis Testing

A type I error occurs if you reject the null hypothesis when it is true. A type II error occurs if you accept the null hypothesis when it is false.

- Because our decision is based on random variables, the decision then is made on the basis of probabilities. These probabilities can be associated with type I or type II errors.

- The probability of making type I error is denoted by α (significant level) and the probability of making type II error is denoted by β.

- In a hypothesis-testing situation the researcher decides what level of significance α to use. The most common values for the significance error are 0.1, 0.05 and 0.01.

What does α= 0.1, 0.05 and 0.01 mean?

Page 10: Chapter 4- Hypothesis Testing

For Example:Let the null hypothesis H0: This drug will cure an illness. A Type I error would be concluding that the drug does not work when it actually does. A Type II error would conclude that the drug does work when it actually doesn't.

Page 11: Chapter 4- Hypothesis Testing

Examples

•Eg 7: The burning rate of a solid propellant used to power aircrew escape system is approximately normally distributed. The true mean burning rate is 50 cm/sec and the standard deviation of the burning rate is 2.5 cm/sec. The manufacturer wishes to test H0 :

μ=50 cm/sec against H1 : μ ≠ 5 cm/sec using n = 10 specimens.

(i) If the acceptance region is defined as 4 find type I error (α).(ii) If the acceptance region is defined as 4 find type II error (β)

where the true mean burning rate is 52 cm/sec. (iii)If the acceptance region is defined as 4 find type II error (β)

where the true mean burning rate is 52 cm/sec and the number of specimens n = 16.

Page 12: Chapter 4- Hypothesis Testing
Page 13: Chapter 4- Hypothesis Testing

Eg 8: The heat evolved in calories per gram of a cement mixture is approximately normally distributed. The mean is thought to be 100 and the standard deviation is 2. We wish to test H0 : μ=100 versus H1 : μ ≠ 100 with a sample of n = 5 specimens.

a) If the acceptance region is defined as find

(i) type I error (α) (ii) type II error (β) for the case where the true mean heat evolved is 103.

b) Find the boundary of the critical region if the type I error probability is α=0.05. Hence, find the probability of type II error if the true mean evolved is 103.

Page 14: Chapter 4- Hypothesis Testing
Page 15: Chapter 4- Hypothesis Testing

Eg 9: A textile fiber manufacturer is investigating a new drapery yarn, which the company claims has a mean thread elongation of 12 kg with a standard deviation 0.5kg. The company wishes to test the hypothesis H0 : μ=12 against H1 :

μ <12 using a random sample of 4 specimens.

a) What is the type I error probability if the critical region is defined as

b) Find β for the case where the true mean elongation is 11.25 kg.

c) Find β for the case where the true mean elongation is 11.5 kg.

Page 16: Chapter 4- Hypothesis Testing
Page 17: Chapter 4- Hypothesis Testing

Eg 10: A consumer products company is formulating a new shampoo and is interested in foam height (in mm). Foam height is approximately normally distributed and has a standard deviation of 20 mm. The company wishes to test H0 : μ=175mm versus H1 : μ >175mm using the results of 10

samples.

a) Find the type I error probability α if the critical region is b) What is the probability of type II error if the true mean

foam height is 185mm?c) Find β for the true mean of 195mm.

Page 18: Chapter 4- Hypothesis Testing
Page 19: Chapter 4- Hypothesis Testing

POWERPower is a very descriptive and concise measure of the sensitivity of a statistical test; ability of the test to detect differences.

The power of statistical test is the probability of rejecting the null hypothesis H0 when the alternative hypothesis is true. The power

computed as 1 – β.

Eg 11: Consider the propellant burning rate problem when we are testing H0 : μ=50 cm/sec versus H1 : μ ≠ 50 cm/sec. Suppose that the mean is μ =

52. When n = 10, we found that β = 0.2643, so the power of this test is 1 – β = 1-0.2643 = 0.7357.

• The sensitivity of the test for detecting the difference between a mean burning rate of 50cm/sec and 52 cm/sec is 0.7357.

Page 20: Chapter 4- Hypothesis Testing

Procedure for solving hypothesis-testing problem ① using the critical value approach (classical approach) Step 1: State the hypotheses; and identify the

claim. Step 2: Find the critical value(s) from the table. Step 3: Compute the test value 𝑧= 𝑥ҧ− 𝜇𝜎/ξ𝑛 or 𝑡 = 𝑥ҧ− 𝜇𝑠/ξ𝑛

Step 4: Make the decision to reject or not reject the null hypothesis.

Step 5: Summarize the results.

②Using the P-value approach Step 1: State the hypotheses; and identify the

claim. Step 2: Compute the test value 𝑧= 𝑥ҧ− 𝜇𝜎/ξ𝑛 or 𝑡 = 𝑥ҧ− 𝜇𝑠/ξ𝑛

Step 3: Find the p-value Step 4: Make the decision to reject or not reject

the null hypothesis. Step 5: Summarize the results.

Page 21: Chapter 4- Hypothesis Testing

Guidline of using z or t-test

Is σ known?

No

Yes

Yes

No

ݖ ൌ��ߤ�ҧൌݔȀ�ξߪ ݊�

Use

ݖ ൌ��ߤ�ҧൌݔȀ�ξݏ ݊�

Use Is n ≥ 30 ?

ݐ ൌ��ߤ�ҧൌݔȀ�ξݏ ݊�

Use

Page 22: Chapter 4- Hypothesis Testing

Some guideline to summarize the results:

Claim H0

There is enough evidence to reject the claim

There is not enough evidence to reject the claim

Reject H0 Do not reject H0

Claim H1

There is enough evidence to support the claim

There is not enough evidence to support the claim

Reject H0 Do not reject H0

Page 23: Chapter 4- Hypothesis Testing

Critical value from valueα

In hypothesis-testing situation, the researcher decides what level of significance (α) to use. It does not have to be 0.1, 0.05 or 0.01 level. It can be any level, depending on the seriousness of the type I error. After a significance level is chosen, a critical value is selected from a table for the appropriate test. The critical value determines the critical and non critical region (acceptance region).

Page 24: Chapter 4- Hypothesis Testing

Eg 12: Find the critical value for each situation:

.

Page 25: Chapter 4- Hypothesis Testing
Page 26: Chapter 4- Hypothesis Testing

P-values• The P-value is the actual area under the standard normal

distribution curve (or some other curve, depending on what statistical test is being used) representing the probability of a particular sample mean if the null hypothesis is true. In this approach we calculate the p-value for the test, which is defined as the smallest level of significance at which the given null hypothesis is rejected. Using this p-value, we compare the value of p with α and make a decision.

The p-value is the smallest significance level α at which the null hypothesis H0 can be rejected.

Page 27: Chapter 4- Hypothesis Testing

Determination of the p-value for a z-test

Page 28: Chapter 4- Hypothesis Testing

Example

•Eg 13: Find the p-value for each of the hypothesis tests:

Page 29: Chapter 4- Hypothesis Testing
Page 30: Chapter 4- Hypothesis Testing

Determination of the p-value for a t-test

Page 31: Chapter 4- Hypothesis Testing

Example

Eg 14: Find the p-value for each of the hypothesis tests with

Page 32: Chapter 4- Hypothesis Testing
Page 33: Chapter 4- Hypothesis Testing

Hypothesis test about mean : μ

Eg15: Aircrew escape systems are powered by a solid propellant. The burning rate of this propellant is an important product characteristic. Specifications require that the mean burning rate must be 50 cm/sec. We know that the standard deviation of burning rate is σ = 2 cm/sec. The experimenter decides to specify a type I error probability or significance level of α = 0.05 and selects a random sample of n = 25 and obtains a sample average burning rate of 𝑥ҧ= 51.3 cm/sec. What conclusion should be drawn? Use

a) p-value method. b) the critical value method.

Page 34: Chapter 4- Hypothesis Testing
Page 35: Chapter 4- Hypothesis Testing

•Eg 16: Urban storm can be contaminated by many sources, including discarded batteries. When ruptured, these batteries release metals of environmental significance. The article “Urban Battery Litter” (J. of Environ. Engr., 2009: 46-57) presented summary data for characteristics of a variety of batteries found in urban areas around Cleveland. A sample of 51 Panasonic AAA batteries gave a sample mean zine mass of 2.06g and a sample standard deviation of 0.141g. Does this data provide compelling evidence for concluding that the population mean zinc mass exceed 2.0g if the significant level is 0.0015?

Page 36: Chapter 4- Hypothesis Testing
Page 37: Chapter 4- Hypothesis Testing

•Eg 17: A production supervisor at a chemical company, wants to be sure that the Super-Duper can is filled with an average of 16 ounces of product. If the mean volume is significantly less than 16 ounces, customers will likely to complain, prompting undesirable publicity. The physical size of the can doesn’t allow a mean volume significantly above 16 ounces. A random sample of 36 cans shows a sample mean of 15.7 ounces. Production records show that σ is 0.2 ounce. Use this to conduct a hypothesis test with α=0.01.

Page 38: Chapter 4- Hypothesis Testing
Page 39: Chapter 4- Hypothesis Testing

Hypothesis test about mean : μ

•Eg18: In attempting to control the strength of the wastes discharged into nearby river, an industrial firm has taken a number of restorative measures. The firm believes that they have lowered the oxygen consuming power of their wastes from a previous mean of 450 manganate in parts per million. To test this belief, readings are taken on n=20 successive days. A sample mean of 312.5 and the sample standard deviation 106.23 are obtained. Assume that these 20 values can be treated as a random sample from a normal population. Test the appropriate hypothesis using (a) the critical approach and (b) the p-value approach. Use α = 0.05.

Page 40: Chapter 4- Hypothesis Testing
Page 41: Chapter 4- Hypothesis Testing

• Eg 19: Azman Abdullah, owner of Karisma Employment Agency believes that the agency receives an average of 16 complaints per month from the companies that hire the agency’s people. Sidek Ali, an interviewer, is concerned that the true mean is higher than Azman believes. If Azman’s hypothesis is an understatement, something must be done about the agency’s employee screening procedures. A sample of 10 months yields an average of 18 complaints with a standard deviation of 3 complains. Conduct a test at the 0.01 level.

Page 42: Chapter 4- Hypothesis Testing
Page 43: Chapter 4- Hypothesis Testing

•Eg 20: Transcutaneous electrical nerve stimulation (TENS) devices are frequently used in the management of acute and chronic pain. An important component of the TENS system is the skin electrode. A study reported in Journal of Physical Therapy was made to determine conductive differences among electrodes used with TENS devices. A random sample of 11 electrodes in the low-impedance group produced impedance measures in ohms of

1200, 1200, 1000, 1600, 1400, 1400, 1200, 1700, 1600, 1300, 1600

Assuming a population of normally distributed values, test the hypothesis that the population mean impedance measure for all such electrodes is 1400. Use the 0.05 level of significance.

Page 44: Chapter 4- Hypothesis Testing
Page 45: Chapter 4- Hypothesis Testing

Type II error and sample of choice

If type I error (α) is given, then we can calculate the type II error (β) by

and the sample size n is given by

Page 46: Chapter 4- Hypothesis Testing

Eg 21a) Consider the rocket propellant problem in the above Eg

11. Suppose that the true burning rate is 49cm/sec. What is β for the two sided test with α=0.05, σ=2, n=25?

b) Suppose that the analyst wishes to design the test so that if the true mean burning rate is differs from 50 cm/sec by as much as 1cm/sec. What sample size would be required to ensure that β does not exceed 0.10?

Page 47: Chapter 4- Hypothesis Testing