Top Banner
HYPOTHESIS TESTING HYPOTHESIS TESTING CHAPTER 4 CHAPTER 4 BCT 2053 APPLIED STATISTICS BCT 2053 APPLIED STATISTICS
42

HYPOTHESIS TESTING

Jan 04, 2016

Download

Documents

basia-cash

HYPOTHESIS TESTING. CHAPTER 4 BCT 2053 APPLIED STATISTICS. CONTENT. 4.1 Introduction to Hypothesis Testing 4.2 Hypothesis Testing for Mean with known and unknown Variance 4.3 Hypothesis Testing for Difference Means with known and unknown Population Variance - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: HYPOTHESIS TESTING

HYPOTHESIS TESTINGHYPOTHESIS TESTING

CHAPTER 4CHAPTER 4BCT 2053 APPLIED STATISTICSBCT 2053 APPLIED STATISTICS

Page 2: HYPOTHESIS TESTING

2

CONTENTCONTENT• 4.1 Introduction to Hypothesis Testing

• 4.2 Hypothesis Testing for Mean with known and unknown

Variance

• 4.3 Hypothesis Testing for Difference Means with known

and unknown Population Variance

• 4.4 Hypothesis Testing for Proportion

• 4.5 Hypothesis Testing for the Difference between Two Proportions

• 4.6 Hypothesis Testing for Variances and Standard Deviations

• 4.7 Hypothesis Testing for Two Variances and Standard Deviations

Page 3: HYPOTHESIS TESTING

4.1 Introduction to 4.1 Introduction to Hypothesis TestingHypothesis Testing

OBJECTIVESOBJECTIVES : After completing this chapter, you should be able to

1. Describe the meaning of terms used in hypothesis testing.

2. State the Null and Alternative Hypothesis

Page 4: HYPOTHESIS TESTING

4

General Terms in Hypothesis General Terms in Hypothesis TestingTesting

• Hypothesis – A statement that something TRUE

• Statistical Hypothesis– A statement about the parameters of one or

more populations.

• Null Hypothesis (Ho) – A hypothesis to be tested

• Alternative Hypothesis (H1) – A hypothesis to be considered as an alternative

to the null hypothesis

Page 5: HYPOTHESIS TESTING

5

How to make Null hypothesisHow to make Null hypothesis

• Should have an ‘equal’ sign• Generally,

: two tailed test

: right tailed test

: left tailed test

o o

o o

o o

H

H

H

parameter A value

Page 6: HYPOTHESIS TESTING

6

How to make Alternative How to make Alternative hypothesishypothesis

• Should reflect the purpose of the hypothesis test and different from the null hypothesis

• Generally (3 types);

1

1

1

: two tailed test

: right tailed test

: left tailed test

o

o

o

H

H

H

Page 7: HYPOTHESIS TESTING

7

Basic logic of Hypothesis Basic logic of Hypothesis TestingTesting

• Accept null hypothesis – if the sample data are consistent with the null

hypothesis

• Reject null hypothesis – if the sample data are inconsistent with the

null hypothesis, so accept Alternative hypothesis

• Test statistics – the statistics used as a basis for deciding

whether the null hypothesis should be rejected (z, t, Chi, F)

Page 8: HYPOTHESIS TESTING

8

Basic logic of Hypothesis Basic logic of Hypothesis TestingTesting

• Rejection (Critical) Region, (α)– the set of values for the test statistics that leads

to rejection of the null hypothesis

• Nonrejection (NonCritical) Region,(1 – α)– the set of values for the test statistics that leads

to nonrejection of the null hypothesis

• Critical values – the values of the test statistics that separate the

rejection and nonrejection regions. – A critical value is considered part of the rejection

region– In general, Reject Ho if test statistics > critical

value

Page 9: HYPOTHESIS TESTING

9

Rejection RegionRejection Region

Accept Ho

1 – αCritical value Critical value

Critical value

Critical value

Reject Ho Reject Ho

Reject Ho

Reject Ho

Accept Ho

1 – α

Accept Ho

1 – α

Page 10: HYPOTHESIS TESTING

10

Type I and II ErrorType I and II Error

Ho is

True False

Do not reject Ho

Correct decision

Type II Error

Reject Ho Type I Error Correct Decision Type I Error

- Rejecting the null hypothesis when it is in fact true

Reject is true significance levelo oP H H

Type II Error -Not rejecting the null hypothesis when it is in fact false

Accept is falseo oP H H

Page 11: HYPOTHESIS TESTING

11

Hypothesis Testing Common Hypothesis Testing Common PhrasePhrase

H1 H1

H1

H0 H0

H0

Page 12: HYPOTHESIS TESTING

12

EXERCISE 4.1EXERCISE 4.1State the null and alternative hypotheses for each

conjecture.

a. A researcher thinks that if expectant mothers use vitamin pills, the birth weight of the babies will increase. The average birth weight of the population is 8.6 pounds.

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

c. 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 the scores was 73.

Page 13: HYPOTHESIS TESTING

13

Steps In Hypothesis TestingSteps In Hypothesis Testing

1. Define the parameter used2. Define the null and alternative

hypothesis 3. Define all the given information4. Chose appropriate Test Statistics

(z,t,chi,F)5. Find Critical value6. Test the hypothesis (rejection region)7. Make conclusion – there is enough

evidence to reject/accept the claim at α

Page 14: HYPOTHESIS TESTING

4.2 Hypothesis Testing for 4.2 Hypothesis Testing for Mean Mean with known and unknown with known and unknown Variance Variance

OBJECTIVESOBJECTIVES : After completing this chapter, you should be able to

1. Test mean when σ ² is known.

2. Test mean when σ ² is unknown.

Page 15: HYPOTHESIS TESTING

15

Hypothesis Testing for Mean Hypothesis Testing for Mean μμ

test

Xz

n

test

Xz

s n

test

Xt

s n

Where: o population mean

NOTE: Ztest and ttest are test statistics

Page 16: HYPOTHESIS TESTING

16

Example 1: Hypothesis testing for Example 1: Hypothesis testing for mean mean μμ with known with known σσ²²

• A lecturer state that the IQ score for IPT students must be more higher than other people IQ’s which is known to be normally distributed with mean 110 and standard deviation 10. To prove his hypothesis, 25 IPT students were chosen and were given an IQ test. The result shows that the mean IQ score for 25 IPT students is 114. Can we accept his hypothesis at significance level, α = 0.05?

Page 17: HYPOTHESIS TESTING

17

Example 2: Example 2: Hypothesis testing for Hypothesis testing for mean mean μμ with unknown with unknown σσ²² and and n ≥n ≥ 30 30

• UMP students said that they have no enough time to sleep. A sample of 36 students give that, the mean of sleep time is 6 hours and the standard deviation is 0.9 hours. It is known that the mean sleep time for adult is 6.5 hours. Can we accept their hypothesis at significance level, α = 0.01?

Page 18: HYPOTHESIS TESTING

18

Example 3: Example 3: Hypothesis testing for Hypothesis testing for mean mean μμ with unknown with unknown σσ²² and and n < n < 3030

• In a wood cutting process to produce rulers, the mean of rulers height is set to be equal 100 cm at all times. If the mean height of rulers is not equal to 100 cm, the process will stop immediately. The height for a sample of 10 rulers produces by the process shows below:

100.13100.11100.0299.99 99.98100.14100.03100.1099.97 100.21

Can we stop the process at significance level, α = 0.05?

Page 19: HYPOTHESIS TESTING

4.3 Hypothesis Testing for 4.3 Hypothesis Testing for Difference Means with known Difference Means with known

and unknown Population and unknown Population VarianceVariance

OBJECTIVESOBJECTIVES : After completing this chapter, you should be able to

1. Test the difference between two means when σ ’s are known.

2. Test the difference between two means when σ ’s are unknown and equal.

3. Test the difference between two means when σ ’s are unknown and not equal.

Page 20: HYPOTHESIS TESTING

20

Hypothesis Testing for Different Hypothesis Testing for Different Mean with known and unknown Mean with known and unknown

Variance Variance 1 2

2 21 2

1 2

otest

X Xz

n n

1 2

2 21 2

1 2

otest

X Xz

s s

n n

1 2

2 21 2

1 2

otest

X Xt

s sn n

11 2

2

2

22

1

2

1

21

2

2

22

1

21

n

n

s

n

n

s

n

s

n

s

v

1 2

1 2

1 1o

test

p

X Xz

sn n

1 2

1 2

1 1o

test

p

X Xt

sn n

Page 21: HYPOTHESIS TESTING

21

Example 4: Hypothesis testing for Example 4: Hypothesis testing for μμ11 – – μμ22 with known with known σσ11²² and and σσ22²²

• The mean lifetime for 30 battery type A is 5.3 hours while the mean lifetime for 35 battery type B is 4.8 hours. If the lifetime standard deviation for the battery type A is 1 and the lifetime standard deviation for the battery type B is 0.7 hours, can we conclude that the lifetime for both batteries type A and type B are same at significance level, α = 0.05?

Page 22: HYPOTHESIS TESTING

22

Example 5: Hypothesis testing forExample 5: Hypothesis testing for μμ11 – – μμ22 withwith unknownunknown σσ11²² && σσ22²², , σσ11²² ≠ ≠ σσ22²², , nn1 1 ≥ ≥ 3030 && nn2 2 ≥ ≥ 3030

• The mean price of 30 acre of land in Cerok before a highway is build is RM20,000 per acre with standard deviation RM 3000 per acre. The mean price of 36 acre of land in Cerok after the highway is build is RM50,000 per acre with standard deviation RM 4000 per acre. Test a hypothesis that the new highway will increases the land price in Cerok among RM35,000 at significance level, α = 0.05. Assume that the variances of land price in Cerok are not same before and after the highway is build.

Page 23: HYPOTHESIS TESTING

23

Example 6: Hypothesis testing forExample 6: Hypothesis testing for μμ11 – – μμ22 withwith unknownunknown σσ11²² && σσ22²², , σσ11²² ≠ ≠ σσ22²², , nn1 1 << 3030 & & nn2 2 < 30< 30

• The average size of a farm in Indiana is 191 acres. The average size of a farm in Greene is 199 acres. Assume the data were obtained from two samples with standard deviations of 38 and 12 acres, respectively, and sample sizes of 8 and 10, respectively. Can we conclude that the at α = 0.05, the average size of the farms in Indiana is less than Greene? Assume that the variance for both countries are different.

Page 24: HYPOTHESIS TESTING

24

Example 7: Hypothesis testing forExample 7: Hypothesis testing for μμ11 – – μμ22 withwith unknownunknown σσ11²² && σσ22²², , σσ11²² = = σσ22²² , , nn1 1 ≥ ≥ 30 30 & & nn2 2 ≥ ≥ 3030

• Many studies have been conducted to test the effects of marijuana use on mental abilities. In a study, groups of light and heavy users of marijuana were tested for memory recall, with the result below.– Item sort correctly by light marijuana users: – Item sort correctly by heavy marijuana users:

Use 0.01 significance level to test the claim that the population of heavy marijuana users has a lower mean than the light users if the variance population for both users are same.

1 1 1

2 2 2

64, 53.3, 3.6

65, 51.3, 4.5

n x s

n x s

Page 25: HYPOTHESIS TESTING

25

Example 8: Hypothesis testing forExample 8: Hypothesis testing for μμ11 – – μμ22 withwith unknownunknown σσ11²² && σσ22²², , σσ11²² = = σσ22²² , , nn1 1 << 30 30 & & nn2 2 << 3030

• Two catalyst are being analyzed to determine the mean yield of a chemical process. A test is run in the pilot plant and results are shown below.

catalyst 1: 91.50 94.18 92.18 95.39 91.79 89.07 94.72 89.21 catalyst 2: 89.19 90.95 90.46 93.21 97.19 97.04 91.07 92.75 Is there any different between the mean yield? Use α = 0.05 and assume the

variances population are equal.

Page 26: HYPOTHESIS TESTING

4.4 Hypothesis Testing for 4.4 Hypothesis Testing for ProportionProportion

OBJECTIVESOBJECTIVES : After completing this chapter, you should be able to

1. Test proportions using z-test.

Page 27: HYPOTHESIS TESTING

27

Hypothesis testing for proportion Hypothesis testing for proportion pp

ˆ

1o

test

o o

p pz

p p n

Where: ˆ , o

xp p population proportion

n

Page 28: HYPOTHESIS TESTING

28

Example 9: Hypothesis testing Example 9: Hypothesis testing for proportion for proportion pp

• An attorney claims that more than 25% of all lawyers advertise. A sample of 200 lawyers in a certain city showed that 63 had used some form of advertising. At α = 0.01, is there enough evidence to support the attorney’s claim?

Page 29: HYPOTHESIS TESTING

29

Example 10: Hypothesis testing Example 10: Hypothesis testing for proportion for proportion pp

• A group of scientist believes that their new medicine can heal 40% of patients. The current medicine in market can only heal 30% of patients. A research is done to test the hypothesis made by the scientists. The new medicine is given to the 100 patients and it shows that only 26 patients are recovered. Can we accept their hypothesis at significance level α = 0.05?

Page 30: HYPOTHESIS TESTING

4.5 Hypothesis Testing for 4.5 Hypothesis Testing for the Difference between the Difference between

two Proportionstwo Proportions

OBJECTIVESOBJECTIVES : After completing this chapter, you should be able to

1. Test the difference between two proportions.

Page 31: HYPOTHESIS TESTING

31

Hypothesis testing for the Hypothesis testing for the difference between two difference between two

proportions proportions pp11 – p – p22

ˆ , o

xp p population proportion

n Where:

2

22

1

11

21

ˆ1ˆˆ1ˆ

ˆˆ

n

pp

n

pp

pppz otest

Page 32: HYPOTHESIS TESTING

32

Example 11: Hypothesis testing for Example 11: Hypothesis testing for difference proportion difference proportion pp11 – p– p22

• In a sample of 200 surgeons, 15% thought the government should control health care. In a sample of 200 practitioners, 21% felt the same way. At α = 0.01, is there a difference in the proportions between surgeons and practitioners?

Page 33: HYPOTHESIS TESTING

33

Example 12: Hypothesis testing for Example 12: Hypothesis testing for difference proportion difference proportion pp11 – p – p22

• Random samples of 747 Malaysian men and 434 Malaysian women were taken. Of those sampled, 276 men and 195 women said that they sometimes ordered dish without meat or fish when they eat out. Do the data provide sufficient evidence to conclude that, in Malaysia, the percentage of men who sometimes order a dish without meat or fish is smaller than the percentage of women who sometimes order a dish without meat or fish at significance level α = 0.05?

Page 34: HYPOTHESIS TESTING

4.6 Hypothesis Testing for 4.6 Hypothesis Testing for Variances and Standard Variances and Standard Deviations Deviations

OBJECTIVESOBJECTIVES : After completing this chapter, you should be able to

1. Test single variance and standard deviation

Page 35: HYPOTHESIS TESTING

35

Hypothesis testing for variance Hypothesis testing for variance σσ²²

o population variance Where:

2

22 1

o

testsn

Page 36: HYPOTHESIS TESTING

36

Example 13: Hypothesis Testing Example 13: Hypothesis Testing for for σσ²²

• In a wood cutting process to produce rulers, the variance of ruler’s height is set to be equal 2 cm² at all times. If the variance of ruler’s height is not equal to 2 cm², the process will stop immediately. The height for a sample of 10 rulers produces by the process shows below:

100.23100.11100.4299.66 99.68100.14100.33100.1099.50 100.21

Can we stop the process at significance level α = 0.05?

Page 37: HYPOTHESIS TESTING

37

Example 14: Hypothesis Testing Example 14: Hypothesis Testing for for σσ²²

• A hospital administrator believes that the standard deviation of the number of people using outpatient surgery per day is greater than 8. A random sample of 15 days is selected and the standard deviation is 11.2. At α = 0.05, is there enough evidence to support the administrator’s claim?

Page 38: HYPOTHESIS TESTING

4.7 Hypothesis Testing for 4.7 Hypothesis Testing for Two Variances and Standard Two Variances and Standard

Deviations Deviations

OBJECTIVESOBJECTIVES : After completing this chapter, you should be able to

1. Test the difference between two variances.

Page 39: HYPOTHESIS TESTING

39

Hypothesis testing for variance Hypothesis testing for variance ratio ratio σσ11²/ ²/ σσ22²²

2122

test

sF

s

Page 40: HYPOTHESIS TESTING

40

Example 15: Hypothesis Testing Example 15: Hypothesis Testing for difference proportions for difference proportions σσ11²²/ σ/ σ22²²

• Before service, a machine can packed 10 packets of sugar with variance weight 64 g² while after service the variance weight for 5 packets of sugar are 25 g². Do the services improve the packaging process at significance level, α = 0.05?

Page 41: HYPOTHESIS TESTING

41

Example 16: Hypothesis Testing Example 16: Hypothesis Testing for difference proportions for difference proportions σσ11²²/ σ/ σ22²²

• A medical researcher whishes to see whether the variance of the heart rates (in beats per minute) of smokers is different from the variance of heart rates of people do not smoke. Two samples are selected, and the data are as shown below. Using α = 0.1, is there enough evidence to support the claim?

– Smokers: Nonsmokers:

2 21 1 2 226, 36 18, 10n s n s

Page 42: HYPOTHESIS TESTING

42

SummarySummary

• 0.01, 0.05 and 0.1 significance levels are usually used in testing a hypothesis.

• Hypothesis test are closely related to confidence interval. Whenever a confidence interval can be computed, a hypothesis test can also be performed, and vice versa.

The End