Hypothesis testing

51
Hypothesis Testing The Basics Advanced Statistics SRSTHS Mrs. Ma. Cristina C. Pegollo

description

 

Transcript of Hypothesis testing

Page 1: Hypothesis testing

Hypothesis TestingThe Basics

Advanced StatisticsSRSTHS

Mrs. Ma. Cristina C. Pegollo

Page 2: Hypothesis testing

What is Hypothesis? in statistics, is a claim or statement

about a property of a population an educated guess about the population

parameter

Page 3: Hypothesis testing

What is hypothesis testing?

This is the process of making an inference or generalization on population parameters based on the results of the study on samples.

Page 4: Hypothesis testing

What is statistical hypothesis?

It is a guess or prediction made by the researcher regarding the possible outcome of the study.

Page 5: Hypothesis testing

Fundamentals of

Hypothesis Testing

Page 6: Hypothesis testing

Central Limit Theorem

If n (the sample size) is large, the theoretical sampling distribution of the mean can be approximated closely with a normal distribution.

If researchers increase the samples to a considerable number, the shape of the distribution approximates a

normal curve.

Page 7: Hypothesis testing

µx = 98.6

Central Limit TheoremThe Expected Distribution of Sample Means

Assuming that = 98.6

Likely sample means

Page 8: Hypothesis testing

z = - 1.96

x = 98.48

or

z = 1.96

x = 98.72

or

µx = 98.6

Figure 7-1 Central Limit TheoremThe Expected Distribution of Sample Means

Assuming that = 98.6

Likely sample means

Page 9: Hypothesis testing

Components of aFormal Hypothesis Test

Page 10: Hypothesis testing

Null Hypothesis: H0 This is the statement that is under investigation or

being tested.

It is always hoped to be rejected.

Usually the null hypothesis represents a statement

of “no effect”, “no difference”, or , put another way,

“things haven’t changed.”

Must contain condition of equality

=, , or

Reject H0 or fail to reject H0

Page 11: Hypothesis testing

Alternative Hypothesis: H1

This is the statement you will adopt in the situation in which the evidence (data) is so strong that you reject H0

‘opposite’ of H0

, <, >

generally represents the idea which the researcher wants to prove.

Page 12: Hypothesis testing

Example1: Null and Alternate Hypothesis

Null HypothesisHo: The average grade of this class is 88.

(Ho:

Alternative HypothesisH1: The average grade of this class is

a. Higher than 88 (Ho:

b. Lower than 88 (Ho:

c. Not equal to 88 (Ho:

Page 13: Hypothesis testing

Example 2The researcher wants to know if

online learning has increased the average grade of Einstein students from 80%

Ho : Online learning has not increased the average grade of Einstein studentsHo : ; Online learning has increased the average grade of Einstein students

Page 14: Hypothesis testing

Example 3The management of Starstruck canteen

wants to know if the services in the newly renovated canteen are different from the services before the renovation took place.Ho : The services in the newly renovated Starstruck canteen have not changed (meaning, the services now are just the same as before.)H1 : The services in the newly renovated Starstruck canteen have changed (meaning, the services now are different as before.)

Page 15: Hypothesis testing

Example 4The mathematics coordinator wants to

know if the number of failures in all math courses is lower than 25% of the total enrollment.

Ho : p The number of failures in all math courses is 25%

H1 : p< 25 The number of failures in all math courses is lower than 25%

Page 16: Hypothesis testing

Example 5

A car manufacturer advertises that its new subcompact models get 45 miles per gallon(mpg). Let be the mean of the mileage distribution for these cars. You assume that the manufacturer will not underrate the car, but you suspect that the mileage might be overrated.

Ho : µ (Car manufacturer’s claim)

H1 : µ

Page 17: Hypothesis testing

Example 6

A company manufactures ball bearings for precision machines. The average diameter of a certain type of ball bearing should be 6.0mm. To check that the average diameter is correct , the company formulates a statistical test.

Ho : µ (Car manufacturer’s claim)

H1 : µ

Page 18: Hypothesis testing

Note about Forming Your Own Claims (Hypotheses)

If you are conducting a study and want to use a hypothesis test to support your claim, the claim must be worded so that it becomes the alternative hypothesis.

Page 19: Hypothesis testing

Note about Testing the Validity of Someone Else’s Claim

Someone else’s claim may become the null hypothesis (because it contains equality), and it sometimes becomes the alternative hypothesis (because it does not contain equality).

Page 20: Hypothesis testing

Exercises:Formulate the null and alternative hypotheses of the following research problems1. A manager wants to know if the average length of

time for board meetings is 3 hours.2. The researchers want to know if the proportion of car

accidents in Balete Drive has increased from 5% of the total car accidents recorded in Quezon City in a day.

3. A teacher wants to know if there is a significant difference in the academic performance between Pasteur and Linnaeus students.

4. The registrar wants to know if the average encoding time is lower than 30 minutes.

5. The Discipline officer wants to know if the new policy on smoking has reduced the number of smokers this year than the previous year.

Page 21: Hypothesis testing

Test Statistic

a value computed from the sample data that is used in making the decision about the

rejection of the null hypothesis

Page 22: Hypothesis testing

Test Statistic

a value computed from the sample data that is used in making the decision about the rejection of the null hypothesis

For large samples, testing claims about population means

z = x - µxn

Page 23: Hypothesis testing

Critical Region

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

null hypothesis

Page 24: Hypothesis testing

Critical Region

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

null hypothesis

CriticalRegion

Page 25: Hypothesis testing

Critical Region

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

null hypothesis

CriticalRegion

Page 26: Hypothesis testing

Critical Region

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

CriticalRegions

Page 27: Hypothesis testing

Significance Level denoted by the probability that the test

  statistic will fall in the critical   region when the null hypothesis   is actually true.

common choices are 0.05, 0.01,   and 0.10

Page 28: Hypothesis testing

Critical ValueValue or values that separate the critical region

(where we reject the null hypothesis) from the values of the test statistics that do not lead

to a rejection of the null hypothesis

Page 29: Hypothesis testing

Critical ValueValue or values that separate the critical region

(where we reject the null hypothesis) from the values of the test statistics that do not lead

to a rejection of the null hypothesis

Critical Value( z score )

Page 30: Hypothesis testing

Critical ValueValue or values that separate the critical region

(where we reject the null hypothesis) from the values of the test statistics that do not lead

to a rejection of the null hypothesis

Critical Value( z score )

Fail to reject H0Reject H0

Page 31: Hypothesis testing

Two-tailed,Right-tailed,Left-tailed Tests

The tails in a distribution are the extreme regions bounded

by critical values.

Page 32: Hypothesis testing

Two-tailed TestH0: µ = 100

H1: µ 100

Page 33: Hypothesis testing

Two-tailed TestH0: µ = 100

H1: µ 100 is divided equally between the two tails of the critical

region

Page 34: Hypothesis testing

Two-tailed TestH0: µ = 100

H1: µ 100

Means less than or greater than

is divided equally between the two tails of the critical

region

Page 35: Hypothesis testing

Two-tailed TestH0: µ = 100

H1: µ 100

Means less than or greater than

100

Values that differ significantly from 100

is divided equally between the two tails of the critical

region

Fail to reject H0Reject H0 Reject H0

Page 36: Hypothesis testing

Right-tailed TestH0: µ 100

H1: µ > 100

Page 37: Hypothesis testing

Right-tailed TestH0: µ 100

H1: µ > 100

Points Right

Page 38: Hypothesis testing

Right-tailed TestH0: µ 100

H1: µ > 100

Values that differ significantly

from 100100

Points Right

Fail to reject H0 Reject H0

Page 39: Hypothesis testing

Left-tailed Test

H0: µ 100

H1: µ < 100

Page 40: Hypothesis testing

Left-tailed Test

H0: µ 100

H1: µ < 100

Points Left

Page 41: Hypothesis testing

Left-tailed Test

H0: µ 100

H1: µ < 100

100

Values that differ significantly

from 100

Points Left

Fail to reject H0Reject H0

Page 42: Hypothesis testing

Conclusions in Hypothesis Testing

always test the null hypothesis

1. Reject the H0

2. Fail to reject the H0

need to formulate correct wording of final conclusion

See Figure 7-4

Page 43: Hypothesis testing

FIGURE 7-4 Wording of Final Conclusion

Does theoriginal claim contain

the condition ofequality

Doyou rejectH0?.

Yes

(Original claim

contains equality

and becomes H0)

No(Original claimdoes not containequality and

becomes H1)

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 claimthat. . . (original claim).”

Doyou reject

H0?

Yes

(Reject H0)

No(Fail to

reject H0)

No(Fail to

reject H0)

(This is theonly case inwhich theoriginal claimis rejected).

(This is theonly case inwhich theoriginal claimis supported).

Start

Page 44: Hypothesis testing

Accept versus Fail to Reject some texts use “accept the null hypothesis

we are not proving the null hypothesis

sample evidence is not strong enough to warrant rejection (such as not enough evidence to convict a suspect)

If you reject Ho, iit means it is wrong!

If you fail to reject Ho , it doesn’t mean it is correct – you simply do not have enough evidence to reject it!

Page 45: Hypothesis testing

Type I ErrorThe mistake of rejecting the null hypothesis

when it is true.

(alpha) is used to represent the probability of a type I error

Example: Rejecting a claim that the mean body temperature is 98.6 degrees when the mean really does equal 98.6

Page 46: Hypothesis testing

Type II Errorthe mistake of failing to reject the null

hypothesis when it is false.

ß (beta) is used to represent the probability of a type II error

Example: Failing to reject the claim that the mean body temperature is 98.6 degrees when the mean is really different from 98.6

Page 47: Hypothesis testing

Table 7-2 Type I and Type II Errors

True State of Nature

We decide to

reject the

null hypothesis

We fail to

reject the

null hypothesis

The null

hypothesis is

true

The null

hypothesis is

false

Type I error

(rejecting a true

null hypothesis)

Type II error

(rejecting a false

null hypothesis)

Correct

decision

Correct

decision

Decision

Page 48: Hypothesis testing

Controlling Type I and Type II ErrorsFor any fixed , an increase in the sample

size n will cause a decrease in

For any fixed sample size n , a decrease in will cause an increase in . Conversely, an increase in will cause a decrease in .

To decrease both and , increase the sample size.

Page 49: Hypothesis testing

Approaches in Hypothesis Testing

1. Critical Value Approach

2. P-value Approach

Page 50: Hypothesis testing

5-step solution1. Ho: Ha:2. ; Critical Value=_____3. Decision rule: Reject Ho if 4. Decision:5. Conclusion:

Page 51: Hypothesis testing

Example:The average score in the final examination in College Algebra at ABC University is known to be 80 with a standard deviation of 10. A random sample of 39 students was taken from this year’s batch and it was found that they have a mean score of 84. Test at 0.05 level of significance.