Anda di halaman 1dari 61

What is a Hypothesis?

A hypothesis is a claim (assumption) about the population parameter

I claim the mean CGPA of this class is = 7.5!

Examples of parameters are population mean or proportion The parameter must be identified before analysis

9-3

What is a Hypothesis?

Hypothesis: A statement about the value of a population parameter developed for the purpose of testing. Examples of hypotheses made about a population parameter are:

The mean monthly income for systems analysts is Rs 15,000. Twenty percent of all juvenile offenders are caught and sentenced to prison.

9-4

What is Hypothesis Testing?

Hypothesis testing: A procedure, based on sample evidence and probability theory, used to determine whether the hypothesis is a reasonable statement and should not be rejected, or is unreasonable and should be rejected.

9-5

Hypothesis Testing
S t e p S S S S D o t e p t e p t e p 5 : 4 T 1 : 2 3 : S : : F t a t e S n u l l a a n d a lt e r n o f s i g a t e n i

e le c t I d e n o r m a

le v e l t h e a p ll

t if y u

t e s t d le , a n d

s t a t i

l a t e

e c i s io n a r r iv e

t e p n o t

a k e

s a m n u

r e j e c R t en j ue lc l t

a c c e p

9-6

Definitions

Null Hypothesis H0: A statement about the value of a population parameter. Alternative Hypothesis H1: A statement that is accepted if the sample data provide evidence that the null hypothesis is false. Level of Significance: The probability of rejecting the null hypothesis when it is actually true. Type I Error: Rejecting the null hypothesis when it is actually true.

9-7

Definitions

Type II Error: Accepting the null hypothesis when it is actually false. Test statistic: A value, determined from sample information, used to determine whether or not to reject the null hypothesis. Critical value: The dividing point between the region where the null hypothesis is rejected and the region where it is not rejected.

9-8

One-Tailed Tests of Significance

A test is one-tailed when the alternate hypothesis, H1 , states a direction, such as:

H0 : The mean income of females is less than or equal to the mean income of males. H1 : The mean income of females is greater than males.

Sampling Dis tribution for the Statis Z for a tic One -Taile Te .05 Le l of Significance d st, ve
r a l i t r b u i o n : = 0 , 2 = 1
0 . 4

. 3

. 2

.95 probability .05 region of rejection

. 1

Critical Value Z=1.65


- 5

f (

. 0

0 1 2 3 4

9-10

Two-Tailed Tests of Significance

A test is two-tailed when no direction is specified in the alternate hypothesis H1 , such as:

H0 : The mean income of females is equal to the mean income of males. H1 : The mean income of females is not equal to the mean
income of the males.

Sam pling Dis tribution for the Statistic Z for a Two-Taile Te t, .05 Le l of Sig d s ve nificance
r a l i t r b u i o n : = 0 , 2 = 1
0 . 4

. 3

.95 probability 2 .025 regions of rejection

. 2

f ( x

. 1

Critical Value Z=1.96


- 5

. 0

-4 -3 -2 -1

The Null Hypothesis, H0

States the assumption (numerical) to be tested

Is always about a population parameter ( H 0 : 3 ), not about a sample statistic ( H 0 : X 3 )

e.g.: The average number of TV sets in U.S. Homes is at least three ( H 0 : 3 )

The Null Hypothesis, H0

(continued)

Begins with the assumption that the null hypothesis is true

Similar to the notion of innocent until proven guilty

Refers to the status quo Always contains the = sign May or may not be rejected

The Alternative Hypothesis, H1

Is the opposite of the null hypothesis

e.g.: The average number of TV sets in U.S. homes is less than 3 ( H1 : < 3 )

Challenges the status quo Never contains the = sign May or may not be accepted Is generally the hypothesis that is believed (or needed to be proven) to be true by the researcher

Hypothesis Testing Process


Assume the population mean age is 50. ( H 0 : = 50 )

Identify the Population

Is X = 20 likely if = 50?
No, not likely! REJECT Null Hypothesis

Take a Sample

( X = 20 )

Reason for Rejecting H0


Sampling Distribution of X
It is unlikely that we would get a sample mean of this value ... ... Therefore, we reject the null hypothesis that m = 50.

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


20

= 50

If H0 is true

Level of Significance,

Defines unlikely values of sample statistic if null hypothesis is true

Called rejection region of the sampling distribution

Is designated by

, (level of significance)

Typical values are .01, .05, .10

Is selected by the researcher at the beginning Provides the critical value(s) of the test

Level of Significance and the Rejection Region


H0: 3 H1: < 3 H0: 3 H1: > 3 H0: = 3 H1: 3

Rejection Regions 0

Critical Value(s)

/2

Errors in Making Decisions

Type I Error

Rejects a true null hypothesis Has serious consequences


The probability of Type I Error is


Called level of significance Set by researcher

Type II Error

Fails to reject a false null hypothesis The probability of Type II Error is The power of the test is ( 1 )

Errors in Making Decisions

(continued)

Probability of not making Type I Error ( 1 )

Called the confidence coefficient

Result Probabilities
H0: Innocent Jury Trial The Truth Verdict Innocent Innocent Guilty Correct Error Error Do Not Reject H0 Reject H0 Hypothesis Test The Truth Decision H0 True H0 False 1- Type I Error ( ) Type II Error ( ) Power (1 - )

Guilty

Correct

Type I & II Errors Have an Inverse Relationship


If you reduce the probability of one error, the other one increases so that everything else is unchanged.

Factors Affecting Type II Error

True value of population parameter

Increases when the difference between hypothesized parameter and its true value decrease Increases when

Significance level

decreases

Population standard deviation

Increases when increases

Sample size

Increases when n decreases

How to Choose between Type I and Type II Errors


Choice depends on the cost of the errors Choose smaller Type I Error when the cost of rejecting the maintained hypothesis is high

A criminal trial: convicting an innocent person The Exxon Valdez: causing an oil tanker to sink

Choose larger Type I Error when you have an interest in changing the status quo

A decision in a startup company about a new piece of software A decision about unequal pay for a covered group

Critical Values Approach to Testing

Convert sample statistic (e.g.: X ) to test statistic (e.g.: Z, t or F statistic) Obtain critical value(s) for a specified from a table or computer

If the test statistic falls in the critical region, reject H0 Otherwise do not reject H0

p-Value Approach to Testing


Convert Sample Statistic (e.g. X ) to Test Statistic (e.g. Z, t or F statistic) Obtain the p-value from a table or computer

p-value: Probability of obtaining a test statistic more extreme ( or ) than the observed sample value given H0 is true Called observed level of significance Smallest value of that an H0 can be rejected If p-value If p-value

Compare the p-value with


, do not reject H0 , reject H0

General Steps in Hypothesis Testing


e.g.: Test the assumption that the true mean number of of TV sets in U.S. homes is at least three ( Known)

1. State the H0 2. State the H1 3. Choose

H0 : 3 H1 : < 3

4. Choose n 5. Choose Test

=.05 n = 100 Z test

General Steps in Hypothesis Testing


6. Set up critical value(s) Reject H0

(continued)

7. Collect data 8. Compute test statistic and p-value 10. Express conclusion

-1.645 100 households surveyed Computed test stat =-2, p-value = .0228

9. Make statistical decision Reject null hypothesis


The true mean number of TV sets is less than 3

One-tail Z Test for Mean ( Known)

Assumptions

Population is normally distributed If not normal, requires large samples Null hypothesis has or sign only

Z test statistic

Z=

X X

X = / n

Rejection Region
H0: 0 H1: Reject H < 0
0

H0: 0 H1: > 0

Reject H0

0
Z Must Be Significantly Below 0 to reject H0

Z 0
Small values of Z dont contradict H0 Dont Reject H0 !

Example: One Tail Test


Q. 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 to be 15 grams. Test at the = 0.05 level.

368 gm.

H0: H1: 368

368 >

Finding Critical Value: One Tail


What is Z given = 0.05? Standardized Cumulative Normal Distribution Table (Portion)

Z =1
.95

.04

.05

.06

=. 05

1.6 .9495 .9505 .9515 1.7 .9591 .9599 .9608 1.8 .9671 .9678 .9686
1.9 .9738 .9744 .9750

Critical Value = 1.645

0 1.645 Z

Example Solution: One Tail Test


H0: 368 H1: > 368 = 0.5
n = 25 Critical Value: 1.645
Reject .05

Test Statistic:
X Z= 1.50 = n

Do Not Reject at = .05

0 1.645 Z
1.50

Decision:

No evidence that true mean is more than 368

p -Value Solution
p-Value is P(Z 1.50) = 0.0668
Use the alternative hypothesis to find the direction of the rejection region. P-Value =.0668 1.0000 - .9332 .0668

0
From Z Table: Lookup 1.50 to Obtain .9332

1.50

Z
Z Value of Sample Statistic

p -Value Solution
(p-Value = 0.0668) ( = 0.05) Do Not Reject.

(continued)

p Value = 0.0668 Reject

= 0.05

1.50

1.645

Test Statistic 1.50 is in the Do Not Reject Region

Example: Two-Tail Test


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

368 gm.

H0: = 368 H1: 368

Example Solution: Two-Tail Test


H0: = 368 H1: 368= 0.05
n = 25 Critical Value: 1.96
Reject .025 -1.96 .025

Test Statistic:

X 372.5 368 Z= = 1.50 = 15 n 25


Decision: Do Not Reject at = .05 Conclusion: No Evidence that True Mean is Not 368

0 1.96 1.50

p-Value Solution
(p Value = 0.1336) ( = 0.05) Do Not Reject.
p Value = 2 x 0.0668 Reject Reject

= 0.05

1.50

1.96

Test Statistic 1.50 is in the Do Not Reject Region

Connection to Confidence Intervals


For X = 372.5, = 15 and n =25, the 95% confidence interval is: 372.5 ( 1.96) 15 / 25 372.5 ( + 1.96 15 / 25 ) or 366.62 378.38 If this interval contains the hypothesiz mean (368), ed we do not reject the null hypothesis. It does. Do not reject.

t Test: Unknown

Assumption

Population is normally distributed If not normal, requires a large sample

T test statistic with n-1 degrees of freedom

X t= S/ n

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 = 0.01 level.

368 gm.

is not given

H0: H1: 368

368 >

Example Solution: One-Tail


H0: 368 H1: = 0.01 > 36836, df = 35 n=
Critical Value: 2.4377
Reject .01

Test Statistic:

X 372.5 368 t= = 1.80 = S 15 n 36


Decision: Do Not Reject at = .01 Conclusion: No evidence that true mean is more than 368

0 2.4377 t35
1.80

p -Value Solution
(p Value is between .025 and .05) ( = 0.01). Do Not Reject.
p Value = [.025, .05] Reject

= 0.01
2.4377 Test Statistic 1.80 is in the Do Not Reject Region
1.80

t35

Proportion

Involves categorical values Two possible outcomes

Success (possesses a certain characteristic) and Failure (does not possesses a certain characteristic)

Fraction or proportion of population in the success category is denoted by p

Proportion

(continued)

Sample proportion in the success category is denoted by pS

X Number of Successes ps = = n Sample Size

When both np and n(1-p) are at least 5, pS can be approximated by a normal distribution with mean and standard deviation

ps = p

ps =

p(1 p) n

Example: Z Test for Proportion


Q. A marketing company claims that it receives 4% responses from its mailing. To test this claim, a random sample of 500 were surveyed with 25 responses. Test at the = .05 significance level.

Check: np = 500 ( .04) = 20 5 n ( 1 p) = 500( 1 .04) = 480 5

Z Test for Proportion: Solution


H0: p = .04 H1: p .04
= .05 n = 500
Critical Values: 1.96 Reject .025 -1.96 Reject .025

p ( 1 p) n

pS p

Test Statistic:
=

.05 .04

.04 ( 1 .04 ) 500

= 1.14

Decision:

Do not reject at = .05 We do not have sufficient evidence to reject the companys claim of 4% response rate.

Conclusion:

0 1.96 Z 1.14

p -Value Solution
(p Value = 0.2542) ( = 0.05). Do Not Reject.
p Value = 2 x .1271 Reject Reject

= 0.05

1.14

1.96

Test Statistic 1.14 is in the Do Not Reject Region

9-10

Two-Tailed Tests of Significance

A test is two-tailed when no direction is specified in the alternate hypothesis H1 , such as:

H0 : The mean income of females is equal to the mean income of males. H1 : The mean income of females is not equal to the mean
income of the males.

Sam pling Dis tribution for the Statistic Z for a Two-Taile Te t, .05 Le l of Sig d s ve nificance
r a l i t r b u i o n : = 0 , 2 = 1
0 . 4

. 3

.95 probability 2 .025 regions of rejection

. 2

f ( x

. 1

Critical Value Z=1.96


- 5

. 0

-4 -3 -2 -1

9-12

Testing for the Population Mean: Large Sample, Population Standard Deviation Known

When testing for the population mean from a large sample and the population standard deviation is known, the test statistic is given by:

X z= / n

9-13

EXAMPLE 1

The processors of Fries Catsup indicate on the label that the bottle contains 16 gms of catsup. A sample of 36 bottles is selected hourly and the contents weighed. Last hour a sample of 36 bottles had a mean weight of 16.12 gms with a standard deviation of .5 gms. At the .05 significance level is the process out of control?

9-14

EXAMPLE 1

continued

Step 1: State the null and the alternative hypotheses: Step 2: State the decision rule:
Step 3: Compute the value of the test statistic:

H0 : = 16

H1: 16

Step 4: Decide on H0 : H0 is not rejected because 1.44 is less than the critical value of 1.96 = [1612 16] / [.5 / 36] = 144 z . .

H0 is rejected if z < 1.96 or z > 196 .

9-15

p-Value in Hypothesis Testing

p-Value: the probability, assuming that the null hypothesis is true, of getting a value of the test statistic at least as extreme as the computed value for the test. If the p-value is smaller than the significance level, H0 is rejected. If the p-value is larger than the significance level, H0 is not rejected.

9-16

Computation of the p-Value

One-Tailed Test: p-Value = P{z absolute value of the computed test statistic value} Two-Tailed Test: p-Value = 2P{z absolute value of the computed test statistic value} From EXAMPLE 1, z= 1.44, and since it was a two-tailed test, then p-Value = 2P {z 1.44} = 2(.5-.4251) = .1498. Since .1498 > .05, do not reject H0.

9-17

Testing for the Population Mean: Large Sample, Population Standard Deviation Unknown

Here is unknown, so we estimate it with the sample standard deviation s. As long as the sample size n 30, z can be approximated with:

X z= s/ n

9-18

EXAMPLE 2

A retail chain store issues its own credit card. The credit manager (CM) , wants to find out if the mean monthly unpaid balance is more than 400. The level of significance is set at .05. A random check of 172 unpaid balances revealed the sample mean to be 407 and the sample standard deviation to be 38. Should CM conclude that the population mean is greater than 400, or is it reasonable to assume that the difference of 7 (407-400) is due to chance?

9-19

EXAMPLE 2

continued

Step 1:H : 400 H1: > 400 0 Step 2: H0 is rejected if z>1.645 Step 3: = [407 400] / [38 / 172] = 2.42 z Step 4: H0 is rejected. CM can conclude that the mean unpaid balance is greater than 400.

9-20

Hypothesis Testing: Two Population Means

Assume the parameters for the two populations are: , , , and 1 2 1 2 For large samples the test statistic is:

z=

X1 X 2 s1 s2 + n1 n2
2 2

9-21

Hypothesis Testing: Two Population Means

When 1 and 2 are unknown but the sample sizes are greater than or n1 and n2 equal to 30, the test statistic is

z=

X1 X 2 s1 s2 + n1 n2
2 2

9-24

Tests Concerning Proportion

Proportion: A fraction or percentage that indicates the part of the population or sample having a particular trait of interest. The sample proportion is denoted by p where

num ber of successes the samle in p p= num ber sam pled

9-25

Test Statistic for Testing a Single Population Proportion


p z= (1 ) n population proportion p sample proportion

Anda mungkin juga menyukai