Hypothesis Testing of Population Mean

51
“Hypothesis Testing for Population Mean” Arun Kumar, Ravindra Gokhale, and Nagarajan Krishnamurthy Quantitative Techniques-I, Term I, 2012 Indian Institute of Management Indore

description

HYpothesis Testing

Transcript of Hypothesis Testing of Population Mean

Page 1: Hypothesis Testing of Population Mean

“Hypothesis Testing for Population Mean”

Arun Kumar, Ravindra Gokhale, and NagarajanKrishnamurthy

Quantitative Techniques-I, Term I, 2012Indian Institute of Management Indore

Page 2: Hypothesis Testing of Population Mean

Case: Quality Wireless B

Daily hold time at the service call center has mean 79.50seconds and standard deviation 16.86 seconds.

Performance over ten day in Ray Jackson’s absence:Average hold time is 86.6 seconds.

Performance over ten day in Ray Jackson’s presence:Average hold time is 74.4 seconds.

Page 3: Hypothesis Testing of Population Mean

Jackson’s Management Approach?

Not accounting for process variation.

Page 4: Hypothesis Testing of Population Mean

Jackson’s Management Approach?

Not accounting for process variation.

Page 5: Hypothesis Testing of Population Mean

How to make more informed decision?

To ascertain whether 74.4 and 86.6 seconds wait time, whichis different than known average wait time of 79.5, can beattributed to the natural process variation.

Page 6: Hypothesis Testing of Population Mean

Statistical problem?

To ascertain whether wait time of 74.4 seconds (or 86.6seconds) is an outlier even when process variation is taken intoaccount.

Page 7: Hypothesis Testing of Population Mean

Statistical problem?

To ascertain whether wait time of 74.4 seconds (or 86.6seconds) is an outlier even when process variation is taken intoaccount.

Page 8: Hypothesis Testing of Population Mean

Framing a Hypothesis

Null Hypothesis

Stating what would be considered normal if no changehappened.H0 : µ = 79.5

Alternative Hypothesis

Stating what would happen when a change happens.HA : µ 6= 79.5

Page 9: Hypothesis Testing of Population Mean

Framing a Hypothesis

Null Hypothesis

Stating what would be considered normal if no changehappened.H0 : µ = 79.5

Alternative Hypothesis

Stating what would happen when a change happens.HA : µ 6= 79.5

Page 10: Hypothesis Testing of Population Mean

What conclusions we make?

We fail to reject the null hypothesis.

We reject the null hypothesis.

Page 11: Hypothesis Testing of Population Mean

What conclusions we make?

We fail to reject the null hypothesis.

We reject the null hypothesis.

Page 12: Hypothesis Testing of Population Mean

Two types of error

ConclusionNot Reject Reject

Truth Not Reject OK Type I Error (α)Reject Type II error (β) OK

Page 13: Hypothesis Testing of Population Mean

Type I and Type II error

You can not control both simulatenously.

Type I and Type II error have inverse relationship for a fixedsample size.

Page 14: Hypothesis Testing of Population Mean

Type I and Type II error

You can not control both simulatenously.

Type I and Type II error have inverse relationship for a fixedsample size.

Page 15: Hypothesis Testing of Population Mean

Controlling Type II error

Effect of sample size on Type II error

Increasing the sample size reduces Type II error keeping Type Ierror constant. Of course, you can reduce both type I and typeII error to a desirable level by having a sufficiently large samplesize but cost will be a factor.

Power of a test

Reduction in β implies that 1− β increases. 1− β is alsoknown as the power of the test.

Be aware of tests that do not have much power.

Page 16: Hypothesis Testing of Population Mean

Controlling Type II error

Effect of sample size on Type II error

Increasing the sample size reduces Type II error keeping Type Ierror constant. Of course, you can reduce both type I and typeII error to a desirable level by having a sufficiently large samplesize but cost will be a factor.

Power of a test

Reduction in β implies that 1− β increases. 1− β is alsoknown as the power of the test.

Be aware of tests that do not have much power.

Page 17: Hypothesis Testing of Population Mean

Controlling Type II error

Effect of sample size on Type II error

Increasing the sample size reduces Type II error keeping Type Ierror constant. Of course, you can reduce both type I and typeII error to a desirable level by having a sufficiently large samplesize but cost will be a factor.

Power of a test

Reduction in β implies that 1− β increases. 1− β is alsoknown as the power of the test.

Be aware of tests that do not have much power.

Page 18: Hypothesis Testing of Population Mean

Significance Level

Acceptable value of Type I error is also known as significancelevel.

The best practice is to set the significance level before data iscollected.

Page 19: Hypothesis Testing of Population Mean

Significance Level

Acceptable value of Type I error is also known as significancelevel.The best practice is to set the significance level before data iscollected.

Page 20: Hypothesis Testing of Population Mean

What significance level you want to set for Quality

Wireless Example?

5% and 1% are the commonly used levels of significance.

Page 21: Hypothesis Testing of Population Mean

What significance level you want to set for Quality

Wireless Example?

5% and 1% are the commonly used levels of significance.

Page 22: Hypothesis Testing of Population Mean

How to conduct the test?

Find out the test statistic.

Find out the critical value.

If the absolute value of the test statistic is greater thanthe absolute value of the critical value then we reject thehypothesis. Otherwise we conclude that the data doesnot provide sufficient evidence to reject the hypothesis.

Page 23: Hypothesis Testing of Population Mean

How to conduct the test?

Find out the test statistic.

Find out the critical value.

If the absolute value of the test statistic is greater thanthe absolute value of the critical value then we reject thehypothesis. Otherwise we conclude that the data doesnot provide sufficient evidence to reject the hypothesis.

Page 24: Hypothesis Testing of Population Mean

How to conduct the test?

Find out the test statistic.

Find out the critical value.

If the absolute value of the test statistic is greater thanthe absolute value of the critical value then we reject thehypothesis. Otherwise we conclude that the data doesnot provide sufficient evidence to reject the hypothesis.

Page 25: Hypothesis Testing of Population Mean

How to conduct the test?

Find out the test statistic.

Find out the critical value.

If the absolute value of the test statistic is greater thanthe absolute value of the critical value then we reject thehypothesis. Otherwise we conclude that the data doesnot provide sufficient evidence to reject the hypothesis.

Page 26: Hypothesis Testing of Population Mean

Test Statistic for µ

z =x̄ − µ0

σ/√n

µ0 is the hypothesized value for µ.

Page 27: Hypothesis Testing of Population Mean

Test statistic in Quality Wireless case

z = (74.4−79.5)

(16.86/√

10)= −0.95

Page 28: Hypothesis Testing of Population Mean

Critical value

Critical value is Zα/2, where α is the significance level.

Page 29: Hypothesis Testing of Population Mean

Quality wireless case

For α = 0.05, critical value is 1.96. We fail to reject the nullhypothesis because | − 0.95| < 1.96.

Page 30: Hypothesis Testing of Population Mean

Conclusion from the statistical analysis

At significance level of 5%, we fail to reject the null hypothesisthat the performace of the call center was significantlydifferent than 79.5 seconds.

Page 31: Hypothesis Testing of Population Mean

Conclusions

System was not out of control.

What if significance level is changed?

Page 32: Hypothesis Testing of Population Mean

Conclusions

System was not out of control.

What if significance level is changed?

Page 33: Hypothesis Testing of Population Mean

Conclusions

System was not out of control.

What if significance level is changed?

Page 34: Hypothesis Testing of Population Mean

Conclusions

System was not out of control.

What if significance level is changed?

Page 35: Hypothesis Testing of Population Mean

Exercise 1

A Vice President in charge of sales for a large corporationclaims that salesperson are averaging no more than 15 salesper week. Ideally the number should be higher. In order tocheck the claim, 36 salespersons are selected at random, andthe number of contacts made by each is recorded for a week.The mean and the variance of the 36 measurements were 17and 9, respectively. Does the evidence contradict the vicepresidents’ claim? Use a test with level α = 0.05.

Page 36: Hypothesis Testing of Population Mean

p-value

Probability of observing a data that is more extreme than theobserved data is known as p-value.We reject the null hypothesis if p-value < significance level.

Page 37: Hypothesis Testing of Population Mean

Calculating the p-value

p-value is 2 ∗ P(Z ≥ |z |) when alternative is 6=. Z is thestandard normal random variable and z is the test statistic.

Page 38: Hypothesis Testing of Population Mean

Quality Wireless Example

p-value=2*P(Z ≥ | − 0.95|)=0.34.You will fail to reject the Null Hypothesis at both 1% and 5%significance level because p-value is much bigger than 0.01and 0.05.

Page 39: Hypothesis Testing of Population Mean

Exercise 1...

A Vice President in charge of sales for a large corporationclaims that salesperson are averaging no more than 15 salesper week. Ideally the number should be higher. In order tocheck the claim, 36 salespersons are selected at random, andthe number of contacts made by each is recorded for a week.The mean and the variance of the 36 measurements were 17and 9, respectively. Does the evidence contradict the vicepresidents’ claim? Answer the question using p-value.

Page 40: Hypothesis Testing of Population Mean

Understanding the z-test

Under null hypothesis, X̄n−µ0

σ/√n∼ N(0, 1) as long as n is

large.

Now if significance level is α then any x̄ (sample mean)that is more than zα/2 or less than −zα/2 providesevidence against µ = µ0.

What if σ is unknown?Ans. Old friend t-distribution will help.

Page 41: Hypothesis Testing of Population Mean

Understanding the z-test

Under null hypothesis, X̄n−µ0

σ/√n∼ N(0, 1) as long as n is

large.

Now if significance level is α then any x̄ (sample mean)that is more than zα/2 or less than −zα/2 providesevidence against µ = µ0.

What if σ is unknown?Ans. Old friend t-distribution will help.

Page 42: Hypothesis Testing of Population Mean

Understanding the z-test

Under null hypothesis, X̄n−µ0

σ/√n∼ N(0, 1) as long as n is

large.

Now if significance level is α then any x̄ (sample mean)that is more than zα/2 or less than −zα/2 providesevidence against µ = µ0.

What if σ is unknown?Ans. Old friend t-distribution will help.

Page 43: Hypothesis Testing of Population Mean

Understanding the z-test

Under null hypothesis, X̄n−µ0

σ/√n∼ N(0, 1) as long as n is

large.

Now if significance level is α then any x̄ (sample mean)that is more than zα/2 or less than −zα/2 providesevidence against µ = µ0.

What if σ is unknown?

Ans. Old friend t-distribution will help.

Page 44: Hypothesis Testing of Population Mean

Understanding the z-test

Under null hypothesis, X̄n−µ0

σ/√n∼ N(0, 1) as long as n is

large.

Now if significance level is α then any x̄ (sample mean)that is more than zα/2 or less than −zα/2 providesevidence against µ = µ0.

What if σ is unknown?Ans. Old friend t-distribution will help.

Page 45: Hypothesis Testing of Population Mean

t-test

Under null hypothesis, X̄n−µ0

s/√n∼ tn−1 for any n.

Now if significance level is α then any x̄ (sample mean)that is more than t(α/2,n−1) or less than −t(α/2,n−1)

provides evidence against µ = µ0.

Page 46: Hypothesis Testing of Population Mean

t-test

Under null hypothesis, X̄n−µ0

s/√n∼ tn−1 for any n.

Now if significance level is α then any x̄ (sample mean)that is more than t(α/2,n−1) or less than −t(α/2,n−1)

provides evidence against µ = µ0.

Page 47: Hypothesis Testing of Population Mean

Remembering Quality Wireless example

Test statistic in Quality Wireless case

Assuming s = 16.86, z = (74.4−79.5)

(16.86/√

10)= −0.95

Page 48: Hypothesis Testing of Population Mean

Quality wireless case: critical value using normal

distribution

For α = 0.05, critical value is 1.96. We fail to reject the nullhypothesis because | − 0.95| < 1.96.

Page 49: Hypothesis Testing of Population Mean

Quality wireless case: critical value using

t-distribution

For α = 0.05, critical value is t(α/2,9) = 2.262. We fail toreject the null hypothesis because | − 0.95| < 2.262.

Page 50: Hypothesis Testing of Population Mean

Quality wireless case: What is the p-value using

t-distribution?

p-value>0.2

Page 51: Hypothesis Testing of Population Mean

Exercise 1...

A Vice President in charge of sales for a large corporationclaims that salesperson are averaging no more than 15 salesper week. Ideally the number should be higher. In order tocheck the claim, 36 salespersons are selected at random, andthe number of contacts made by each is recorded for a week.The mean and the variance of the 36 measurements were 17and 9, respectively. Does the evidence contradict the vicepresidents’ claim? Calculate p-value using t-distribution.