Hypothesis Testing

Preview:

DESCRIPTION

Hypothesis Testing. Hypothesis Testing. Hypothesis is a claim or statement about a property of a population. Hypothesis Testing is to test the claim or statement Example : A conjecture is made that “the average starting salary for computer science gradate is Rs 45,000 per month”. - PowerPoint PPT Presentation

Citation preview

Hypothesis Testing

Hypothesis is a claim or statement about a property of a population.

Hypothesis Testing is to test the claim or statement

Example: A conjecture is made that “the average starting salary for computer science gradate is Rs 45,000 per month”.

Hypothesis Testing

Hypothesis Testing Null Hypothesis (H 0): is the

statement being tested in a test of hypothesis.

Alternative Hypothesis (H 1): is

what is believe to be true if the null hypothesis is false.

Null Hypothesis

Must contain condition of equality

=, ³, or £ Test the Null Hypothesis directly

Reject H 0 or fail to reject H 0

Alternative Hypothesis Must be true if H0 is false ¹, <, > ‘opposite’ of Null HypothesisExample H0 : µ = 30 versus H1 : µ > 30 or H1 : µ < 30

State the Null Hypothesis (H0: m ³ 3)

State its opposite, the Alternative

Hypothesis (H1: m < 3)

Hypotheses are mutually exclusive

Identify the Problem

Population

Assume thepopulationmean age is 50.(Null Hypothesis)

REJECT

The SampleMean Is 20

SampleNull Hypothesis

50?20 mXIs

Hypothesis Testing Process

No, not likely!

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

• 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

Level of Significance and the Rejection Region

H0: m ³ 3 H1: m < 3

0

0

0

H0: m £ 3 H1: m > 3

H0: m 3 H1: m ¹ 3

a

a

a/2

Critical Value(s)

Rejection Regions

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

H0: InnocentJury 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 ) (1 - b)

Result Possibilities

Type I Error The mistake of rejecting the null hypothesis

when it is true.

The probability of doing this is called the significance level, denoted by a (alpha).

Common choices for a: 0.05 and 0.01

Example: rejecting a perfectly good parachute and refusing to jump

Type II Error

The mistake of failing to reject the null hypothesis when it is false.

Denoted by ß (beta)

Example: Failing to reject a defectiveparachute and jumping out of a

plane with it.

Critical Region

Set of all values of the test statistic that would cause a rejection of the null hypothesis.

CriticalRegion

Critical Region

Set of all values of the test statistic that would cause a rejection of the null hypothesis.

CriticalRegion

Critical Region

Set of all values of the test statistic that would cause a rejection of the null hypothesis.

CriticalRegions

Critical ValueValue (s) that separates the critical region from the values that would not lead to a rejection of H 0.

Critical Value( z score )

Fail to reject H0Reject H0

Original claim is H0

Conclusions in Hypothesis Tests

Doyou reject

H0?.

Yes

(Reject H0)

“There is sufficientevidence to warrantrejection of the claimthat. . . (original claim).”

“There is not sufficientevidence to warrantrejection of the claimthat. . . (original claim).”

“The sample datasupports the claim that . . . (original claim).”

“There is not sufficientevidence to support the claim that. . . (original claim).”

Doyou reject

H0?

Yes

(Reject H0)

No(Fail toreject H0)

No(Fail toreject H0)

(This is theonly case inwhich theoriginal claimis rejected).

(This is theonly case inwhich theoriginal claimis supported).

Original claim is H1

Left-tailed TestH0: µ ³ 200

H1: µ < 200

200

Values that differ significantly

from 200

Fail to reject H0Reject H0

Points Left

Right-tailed TestH0: µ £ 200

H1: µ > 200

Values that differ significantly

from 200200

Fail to reject H0 Reject H0

Points Right

Two-tailed TestH0: µ = 200H1: µ ¹ 200

Means less than or greater than

Fail to reject H0Reject H0 Reject H0

200

Values that differ significantly from 200

a is divided equally between the two tails of the critical

region

DefinitionTest Statistic: is a sample statistic or value based on sample data Example:

z = x – µxs / n

Question: How can we justify/test this conjecture?

A. What do we need to know to justify this conjecture?

B. Based on what we know, how should we justify this conjecture?

Answer to A: Randomly select, say 100, computer

science graduates and find out their annual salaries

---- We need to have some sample observations, i.e., a sample set!

Answer to B: That is what we will learn in this chapter ---- Make conclusions based on the sample

observations

Statistical Reasoning Analyze the sample set in an attempt to

distinguish between results that can easily occur and results that are highly unlikely.

Figure 7-1 Central Limit Theorem:

Figure 7-1 Central Limit Theorem:Distribution of Sample Means

µx = 30k

Likely sample means

Assume the conjecture is true!

Figure 7-1 Central Limit Theorem:Distribution of Sample Means

z = –1.96

x = 20.2kor

z = 1.96

x = 39.8kor

µx = 30k

Likely sample means

Assume the conjecture is true!

Figure 7-1 Central Limit Theorem:Distribution of Sample Means

z = –1.96

x = 20.2kor

z = 1.96

x = 39.8kor

Sample data: z = 2.62

x = 43.1k or

µx = 30k

Likely sample meansAssume the conjecture is true!

COMPONENTS OF AFORMAL HYPOTHESIS TEST

TWO-TAILED,LEFT-TAILED,RIGHT-TAILEDTESTS

Problem 1Test µ = 0 against µ > 0, assuming

normally and using the sample [multiples of 0.01 radians in some revolution of a satellite]

1, -1, 1, 3, -8, 6, 0 (deviations of azimuth)

Choose α = 5%.

Problem 2

In one of his classical experiments Buffon

obtained 2048 heads in tossing a coin 4000

times. Was the coin fair?

Problem 3

In one of his classical experiments K

Pearson obtained 6019 heads in 12000

trials. Was the coin fair?

Problem 5

Assuming normality and known variance

б2 = 4, test the hypotheses µ = 30 using a

sample of size 4 with mean X = 28.5 and

choosing α = 5%.

Problem 7

Assuming normality and known variance

б2 = 4, test the hypotheses µ = 30 using a

sample of size 10 with mean X = 28.5. What

is the rejection region in case of a two sided

test with α = 5%.

Problem 9A firm sells oil in cans containing 1000 g oil per can

and is interested to know whether the mean weight

differs significantly from 1000 g at the 5% level, in

which case the filling machine has to be adjusted. Set

up a hypotheses and an alternative and perform the

test, assuming normality and using a sample of 20

fillings with mean 996 g and Standard Deviation 5g.

Problem 11

If simultaneous measurements of electric voltage

by two different types of voltmeter yield the

differences (in volts)

0.8, 0.2, -0.3, 0.1, 0.0, 0.5, 0.7 and 0.2

Can we assert at the 5% level that there is no

significant difference in the calibration of the two

types of instruments? Assume normality.