36
Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Embed Size (px)

Citation preview

Page 1: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Introduction to Hypothesis Testing:

One Population Value

Chapter 8 Handout

Page 2: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Chapter 8 Summary

Hypothesis Testing for One Population Value:1. Population Mean ( )m

.a (population standard deviation) is given (known): Use z/standard normal/bell shaped distribution

.b (pop std dev) is not given but s (sample std dev) is given Use student’s t distribution

2. Population proportion () Use z/standard normal/bell shaped distribution

3. Population variance (s2) Use 2 (Chi-Square) distributionPS: population standard deviation = s

Page 3: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

A hypothesis is an assumption about the population parameter.

A parameter is a Population mean or proportion

The parameter must be identified before analysis.

I assume the mean GPA of this class is 3.5!

© 1984-1994 T/Maker Co.

What is a Hypothesis?

Page 4: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

• States the Assumption (numerical) to be tested

e.g. The average # TV sets in US homes is at least 3 (H0: m ³ 3)

• Begin with the assumption that the null hypothesis is TRUE.

(Similar to the notion of innocent until proven guilty)

The Null Hypothesis, H0

•Refers to the Status Quo•Always contains the ‘ = ‘ sign

•The Null Hypothesis may or may not be rejected.

Page 5: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

• Is the opposite of the null hypothesise.g. The average # TV sets in US homes is

less than 3 (H1: m < 3)

• Challenges the Status Quo• Never contains the ‘=‘ sign• The Alternative Hypothesis may or may

not be accepted

The Alternative Hypothesis, H1

or HA

Page 6: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Steps:State the Null Hypothesis (H0: m ³ 3)State its opposite, the Alternative

Hypothesis (H1: m < 3)Hypotheses are mutually exclusive &

exhaustiveSometimes it is easier to form the

alternative hypothesis first.

Identify the Problem

Page 7: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Population

Assume thepopulationmean age is 50.(Null Hypothesis)

REJECT

The SampleMean Is 20

SampleNull Hypothesis

50?20 XIs

Hypothesis Testing Process

No, not likely!

Page 8: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Sample Meanm = 50

Sampling DistributionIt is unlikely that we would get a sample mean of this value ...

... if in fact this were the population mean.

... Therefore, we reject the null

hypothesis that m = 50.

20H0

Reason for Rejecting H0

Page 9: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

• Defines Unlikely Values of Sample Statistic if Null Hypothesis Is True Called Rejection Region of Sampling

Distribution

• Designated a (alpha) Typical values are 0.01, 0.05, 0.10

• Selected by the Researcher at the Start• Provides the Critical Value(s) of the Test

Level of Significance, a

Page 10: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Level of Significance, a and the Rejection Region

H0: m ³ 3

H1: m < 30

0

0

H0: m £ 3

H1: m > 3

H0: m = 3

H1: m ¹ 3

a

a

a/2

Critical Value(s)

Rejection Regions

Page 11: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

• Type I Error Reject True Null Hypothesis Has Serious Consequences Probability of Type I Error Is a

Called Level of Significance

• Type II Error Do Not Reject False Null Hypothesis Probability of Type II Error Is b (Beta)

Errors in Making Decisions

Page 12: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

H0: Innocent

Jury Trial Hypothesis Test

Actual Situation Actual Situation

Verdict Innocent Guilty Decision H0 True H0 False

Innocent Correct ErrorDo NotReject

H0

1 - a Type IIError (b )

Guilty Error Correct RejectH0

Type IError(a )

Power(1 - b)

Result Possibilities

Page 13: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

a

b

Reduce probability of one error and the other one goes up.

a & b Have an Inverse Relationship

Page 14: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

• True Value of Population Parameter Increases When Difference Between Hypothesized

Parameter & True Value Decreases

• Significance Level a Increases When a Decreases

• Population Standard Deviation s Increases When s Increases

• Sample Size n Increases When n Decreases

Factors Affecting Type II Error, b

a

b

b s

b

n

Page 15: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

3 Methods for Hypotheses Tests

Refer to Figure 8-6 (page 299) for a hypothesis test for means ( ) m with (pop. std. dev.) is given:

Method 1: Comparing Xa (X critical) with XMethod 2: Z test, i.e., comparing Za (Z critical) with Z (or

Z statistics or Z calculated)Method 3: Comparing (a significance level) with p-value You can modify those three methods for other cases. For

example, if s is unknown, you must use student’s t distribution. If you would like to use Method 2, please compare t a (t critical) with t (or t statistics or t calculated). Refer to Figure 8-8 (page 303).

Page 16: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

You always get: • Za (Z critical) from Z distribution• ta (t critical) from student’s t distribution• .2a (2critical) from 2distributionYou always get:• Z or Z calculated or Z statistics from sample

(page 299 and Figure 8-6)• t or t calculated or t statistics from sample

(Figure 8-8, page 299)• .2 or 2 calculated or 2 statistics from

sample (Figure 8-19, page 322)

Page 17: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

• Convert Sample Statistic (e.g., ) to Standardized Z Variable

• Compare to Critical Z Value(s) If Z test Statistic falls in Critical Region,

Reject H0; Otherwise Do Not Reject H0

Z-Test Statistics ( s Known)

Test Statistic

X

n

XXZ

X

X

Page 18: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

• Probability of Obtaining a Test Statistic More Extreme (£ or ³) than Actual Sample Value Given H0 Is True

• Called Observed Level of Significance Smallest Value of a H0 Can Be Rejected

• Used to Make Rejection Decision If p value ,³ a Do Not Reject H0

If p value < a, Reject H0

p Value Test

Page 19: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

1. State H0 H0 : m ³ 3

2. State H1 H1 : < 3m

3. Choose a a = .05

4. Choose n n = 100

5. Choose Method: Z Test (Method 2)

Hypothesis Testing: Steps

Test the Assumption that the true mean # of TV sets in US homes is at least 3.

Page 20: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

6. Set Up Critical Value(s) Z = -1.645

7. Collect Data 100 households surveyed

8. Compute Test Statistic Computed Test Stat.= -2

9. Make Statistical Decision Reject Null Hypothesis

10. Express Decision The true mean # of TV set is less than 3 in the

US households.

Hypothesis Testing: Steps

Test the Assumption that the average # of TV sets in US homes is at least 3.

(continued)

Page 21: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

• Assumptions Population Is Normally Distributed If Not Normal, use large samples Null Hypothesis Has =, £, or ³ Sign Only

• Z Test Statistic:

One-Tail Z Test for Mean ( s Known)

n

xxz

x

x

Page 22: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Z0

a

Reject H0

Z0

Reject H0

a

H0: 0m ³ H1: m < 0

H0: m £0 H1: m > 0

Must Be Significantly Below m = 0

Small values don’t contradict H0

Don’t Reject H0!

Rejection Region

Page 23: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Does an average box of cereal contain more than 368 grams of cereal? A random sample of 25 boxes showed X = 372.5. The company has specified s to be 15 grams. Test at the =a 0.05 level.

368 gm.

Example: One Tail Test

H0: m £368 H1: m> 368

_

Page 24: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Z .04 .06

1.6 .4495 .4505 .4515

1.7 .4591 .4599 .4608

1.8 .4671 .4678 .4686

.4738 .4750

Z0

sZ = 1

1.645

.50 -.05

.45

.05

1.9 .4744

Standardized Normal Probability Table (Portion)

What Is Z Given a = 0.05?

a = .05

Finding Critical Values: One Tail

Critical Value = 1.645

Page 25: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

a = 0.025

n = 25

Critical Value: 1.645

Test Statistic:

Decision:

Conclusion:Do Not Reject Ho at a = .05

No Evidence True Mean Is More than 368Z0 1.645

.05

Reject

Example Solution: One Tail

H0: m £368 H1: m > 368 50.1

n

XZ

Page 26: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Z0 1.50

p Value.0668

Z Value of Sample Statistic

From Z Table: Lookup 1.50

.9332

Use the alternative hypothesis to find the direction of the test.

1.0000 - .9332 .0668

p Value is P(Z ³ 1.50) = 0.0668

p Value Solution

Page 27: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

0 1.50 Z

Reject

(p Value = 0.0668) ³ (a = 0.05). Do Not Reject.

p Value = 0.0668

a = 0.05

Test Statistic Is In the Do Not Reject Region

p Value Solution

Page 28: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Does an average box of cereal contains 368 grams of cereal? A random sample of 25 boxes showed X = 372.5. The company has specified s to be 15 grams. Test at the =a 0.05 level.

368 gm.

Example: Two Tail Test

H0: = m 368

H1: m ¹ 368

Page 29: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

a = 0.05

n = 25

Critical Value: ±1.96

Test Statistic:

Decision:

Conclusion:Do Not Reject Ho at a = .05

No Evidence that True Mean Is Not 368Z0 1.96

.025

Reject

Example Solution: Two Tail

-1.96

.025

H0: = m 386

H1: m ¹

386 50.1

2515

3685.372

n

XZ

Page 30: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Two tail hypotheses tests = Confidence Intervals

For X = 372.5oz, s = 15 and n = 25,

The 95% Confidence Interval is:

372.5 - (1.96) 15/ 25 to 372.5 + (1.96) 15/ 25

or

366.62 £ m £ 378.38

If this interval contains the Hypothesized mean (368), we do not reject the null hypothesis. It does. Do not reject Ho.

_

Page 31: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Assumptions Population is normally distributed If not normal, only slightly skewed & a large

sample taken

Parametric test procedure

t test statistic

t-Test: s Unknown

nSX

t

Page 32: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Example: One Tail t-Test

Does an average box of cereal contain more than 368 grams of cereal? A random sample of 36 boxes showed X = 372.5, and s= 15. Test at the =a 0.01 level.

368 gm.

H0: m £ 368 H1: m> 368

s is not given,

Page 33: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

a = 0.01

n = 36, df = 35

Critical Value: 2.4377

Test Statistic:

Decision:

Conclusion:Do Not Reject Ho at a = .01

No Evidence that True Mean Is More than 368Z0 2.4377

.01

Reject

Example Solution: One Tail

H0: m £368 H1: m> 368 80.1

3615

3685.372

nSX

t

Page 34: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

• Involves categorical variables• Fraction or % of population in a category• If two categorical outcomes, binomial

distribution Either possesses or doesn’t possess the characteristic

• Sample proportion (p)

Proportions

sizesamplesuccessesofnumber

nXp

Page 35: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

Example:Z Test for Proportion

•Problem: A marketing company claims that it receives = 4% responses from its Mailing.

•Approach: To test this claim, a random sample of n = 500 were surveyed with x = 25 responses.

• Solution: Test at the a = .05 significance level.

Page 36: Introduction to Hypothesis Testing: One Population Value Chapter 8 Handout

a = .05n = 500, x = 25 p = x/n = 25/500 = 0.05

Do not reject Ho at a = .05

Z Test for Proportion: Solution

H0: = .04

H1: ¹ .04

Critical Values: ± 1.96

Test Statistic:

Decision:

Conclusion:We do not have sufficient

evidence to reject the company’s claim of 4% response rate.

Z @ p-

(1 - )n

=.05-.04

.04 (1 - .04)500

= 1.14

Z0

Reject Reject

.025.025