Hypothesis test about the mean and proportion

DEPARTMENT OF QUANTITATIVE METHODS & INFORMATION SYSTEMS Introduction to Business Statistics QM 220 Chapter 9 Hypothesis test about the mean and pro...
10 downloads 1 Views 1MB Size
DEPARTMENT OF QUANTITATIVE METHODS & INFORMATION SYSTEMS

Introduction to Business Statistics QM 220 Chapter 9

Hypothesis test about the mean and proportion

Spring 2008

Dr. Mohammad Zainal

Hypothesis tests: An introduction 2

¾

Why do we need to perform a test of hypothesis?

IIn a test t t off hypothesis, h th i we test t t a certain t i given i th theory or belief b li f about a population parameter. ¾

We may want to find out, using some sample information, whether or not a given claim about a population parameter is true. ¾

A soft‐drink company may claim that on average its can contain 12 ounces of soda. A government agency may want to test whether or not this claim is true or not. ¾

¾

How do we perform that test?

QM-220, M. Zainal

Hypothesis tests: An introduction 3

Suppose we take a sample of 100 cans of the soft drink under investigation. We find out that the mean amount of soda in these 100 cans is 11.89 ounces ¾

Based on this result, result can we state that on average all such cans contain less than 12 ounces of soda and the company is lying to the public? ¾

¾

Not until we perform a test of hypothesis can we say that.

The reason is that the mean = 11.89 ounces, is obtained from a sample ?

¾

The difference may have occurred because of some sampling error.

¾

QM-220, M. Zainal

Hypothesis tests: An introduction 4

¾

Another sample of 100 cans may give us a mean of 12.04.

Therefore, Th f we perform f a test t t off hypothesis h th i to t find fi d outt how h large the difference between 12 ounces and 11.89 ounces is and to investigate whether or not this difference has occurred as a result of chance alone. ¾

Now, if 11.89 N 11 89 ounces is i the h mean for f all ll cans and d not for f 100 cans, then we do not need to make a test of hypothesis. Instead, wee can a immediately i ediately state tate that the mean ea amount a ou t of soda oda in i all such cans is less than 12 ounces. ¾

We perform of hypothesis only when we are making a decision about a population parameter based the value of a sample statistic t ti ti . ¾

QM-220, M. Zainal

Hypothesis tests: An introduction 5

Two hypothesis Consider o i e aan eexample a pe o of a pe person o who o has a been ee iindicted i e for o committing a crime and is being tried in a court. Based on the g will make one of the following g available evidence, the jjudge decisions: ¾

¾

The person is not guilty (null hypothesis, Ho).

¾

The person is guilty (alternative hypothesis, H1).

A null hypothesis is a claim (or statement) about a population parameter that is assumed to be true until it is declared false.

¾

An alternative hypothesis is a claim about a population parameter that will be true if the null hypothesis is false.

¾

QM-220, M. Zainal

Hypothesis tests: An introduction 6

The alternative hypothesis is often what the test is attempting to establish. ¾

The research hypothesis should be expressed as the alternative hypothesis. hypothesis ¾

The conclusion that the research hypothesis is true f from sample l data d that h contradict di the h null ll hypothesis. h h i ¾

comes

Manufacturers’ claims are usually given the benefit of the doubt and stated as the null hypothesis. ¾

The conclusion that the claim is false comes from sample p data that contradict the null hypothesis. ¾

QM-220, M. Zainal

Hypothesis tests: An introduction 7

In the court example, we start the prosecution by assuming the person is not guilty. ¾

The prosecutors collect all possible evidences to prove the null hypothesis is false (guilty). (guilty) ¾

j and nonrejection j regions g Rejection Not enough evidence to declare the person guilty and, and hence, hence the null hypothesis is not rejected in this region 0

Enough evidence to declare the person guilty and, and hence, hence the null hypothesis is rejected in this region Level of evidence Rejection region

Nonrejection region C

Critical point QM-220, M. Zainal

Hypothesis tests: An introduction 8

¾

The null hypothesis: ¾

Often represents the existing belief. belief

¾

Is maintained, or held to be true, until a test leads to its rejection in favor of the alternative hypothesis.

¾

Is accepted as true or rejected as false on the basis of a consideration of a test statistic.

A hypothesis is either true or false, and you may fail to reject it you may y reject j it on the basis of information. or y

¾

A test statistic is a sample statistic computed from sample data. The value of the test statistic is used in determining whether or not we may reject the null hypothesis. ¾

QM-220, M. Zainal

Hypothesis tests: An introduction 9

Rejection and nonrejection regions

Actual Situation The person is  The person is  not guilty guilty

Court s  Court’s decision

The person is  not guilty

Correct   decision

Type II or  β error

The person is  guilty

Type I or α error

Correct   decision

QM-220, M. Zainal

Hypothesis tests: An introduction 10

¾

A decision may be incorrect in two ways: ¾

Ty e I Error: Type E o Reject Reje t a true t ue Ho ¾ The Probability of a Type I error is denoted by α. ¾ α is called the level of significance of the test

¾

Type II Error: Accept a false Ho ¾ The Probability of a Type II error is denoted by β. ¾ 1 ‐ β is called the power of the test.

¾

α and β are conditional probabilities:

α = P(Reject H 0 H 0 is true) β = P(Accept H 0 H 0 is false) QM-220, M. Zainal

Hypothesis tests: An introduction 11

¾

¾

¾

¾

In the soft‐drinks example, a Type I error will occur when Ho is actually true (that is, is the cans do contain, contain on average, average 12 ounces of soda), but it just happens that we draw a sample with a mean that is much less than 12 ounces and we wrongfully reject the null hypothesis. In other words, words α is the probability of rejecting the null hypothesis, Ho when in fact it is true. The h size off the h rejection region in a statistics problem bl off a test of hypothesis depends on the value assigned to α. In one approach to a test of hypothesis, we assign a value to α before making the test. QM-220, M. Zainal

Hypothesis tests: An introduction 12

¾

Any value can be assigned to α, the commonly used values are .01, 01 .025, 025 .05, 05 and .10. 10 Usually does not exceed .10. 10

¾

In the court trial case, if the person is declared not guilty at the e d of the trial. end t ial It does doe not ot indicate i di ate that the person e o has ha indeed i deed not committed the crime.

¾

It is possible that the person is guilty but there is no enough evidence to prove the guilt. In this situation there are again two possibilities. bl ¾

The person has not committed the crime and is declared not guilty (correct). (correct)

¾

The person has committed the crime but, because of the lack of enough g evidence, is declared not g guilty y ((type yp II error)) QM-220, M. Zainal

Hypothesis tests: An introduction 13

¾

¾

¾

A Type II error will occur when the null hypothesis Ho is actually false (that is, the soda contained in all cans, on average, is less than 12 ounces), but it happens by chance that p with a mean that is close to or g greater than we draw a sample 12 ounces. If we wrongfully conclude do not reject Ho. Ho The value of β represents the probability of making a Type II error. It represents the probability that Ho is not rejected when actually Ho false. The value 1‐ 1 β is called the power of the test and it represents the probability of not making a type II error. QM-220, M. Zainal

Hypothesis tests: An introduction 14

¾

A contingency table illustrates the possible outcomes of a statistical hypothesis test. Actual Situation

H0 True

H0 False

Accept p H0

Correct D ii Decision

Type II Error or β error

Reject H0

Type I Error or α error

Correct Decision

Conclusion

QM-220, M. Zainal

Hypothesis tests: An introduction 15

¾

¾

¾

Always remember that there are two possible states of nature: ¾

H is Ho i true t

¾

Ho is false

There are two possible decisions: ¾

Fail to reject j Ho as true

¾

Reject Ho as false

α and  and β depend on each other, lowering anyone one of them  depend on each other lowering anyone one of them will raise the other one.

¾

Decreasing the two types of error can be achieved by  D h f b h db increasing the sample size.  QM-220, M. Zainal

Hypothesis tests: An introduction 16

Tails of a test The tails of a statistical test are determined by the need for an action. If action is to be taken if a parameter is greater than yp is that the some value a,, then the alternative hypothesis parameter is greater than a, and the test is a right‐tailed test. ¾

Ho: μ ≤ (or =) 50 H1: μ > 50

QM-220, M. Zainal

Hypothesis tests: An introduction 17

If action is to be taken if a parameter is less than some value a, then the alternative hypothesis is that the parameter is less than a, and the test is a left‐tailed test ¾

Ho: μ ≥ (or =)) 12 H1: μ < 12

QM-220, M. Zainal

Hypothesis tests: An introduction 18

If action is to be taken if a parameter is either greater than or less than some value a, then the alternative hypothesis is that the parameter is not equal to a, and the test is a two‐tailed test. ¾

Ho: μ =50 50 H1: μ ≠ 50

QM-220, M. Zainal

Hypothesis tests: An introduction 19

Left-Tailed Left Tailed Test

Right-Tailed Right Tailed Test

Two-Tailed Two Tailed Test

g in the null Sign hypothesis Ho

= or ≥

= or ≤

=

Sign in the alternative h hypothesis h i H1






Critical region

In the left tail

In the right tail

In both tails

The null hypothesis always has an equal sign (=) or greater than or equal (≥) or less than or equal sign (≤) ¾

QM-220, M. Zainal

Hypothesis tests: An introduction 20

¾

How to make test of hypothesis?

We will W ill use the h following f ll i two procedures d to make k the h test off hypothesis. ¾

¾

The p‐value approach: We calculate the p‐value for the observed value of sample statistic then we compare it to the predetermined d t i d significance i ifi l level. l

¾

Using the predetermined significance level α

QM-220, M. Zainal

Hypothesis tests: An introduction 21

Example: Explain which of the following is a two‐tailed, a left‐tailed, left tailed, and a right tailed test. ¾

a.

Ho : μ = 45, H1: μ > 45

b.

Ho : μ = 23, H1: μ ≠ 23

c.

Ho : μ = 75, H1: μ < 75

d.

Ho : μ ≤ 45, H1: μ > 45

e.

Ho : μ ≥ 10, H1: μ < 10

QM-220, M. Zainal

Hypothesis tests: An introduction 22

¾

Example: Consider Ho : μ = 23, H1: μ ≠ 23 ¾

What type of error would you make if the null hypothesis is actually false and you fail to reject it?

¾

What type of error would you make if the null hypothesis is actually true and you reject it?

QM-220, M. Zainal

Hypothesis tests: An introduction 23

Example: Write the null and alternative hypotheses for each of the following examples. Determine if each is a case of a two two‐ tailed, a left‐tailed, or a right‐tailed test. ¾

a To test if the mean number of hours spent working per week by a. college students who hold jobs is different from 20 hours. b To test whether or not a bank b. bankʹss ATM is out of service for an average of more than 10 hours per month. c To test if the mean length of experience of airport security c. guards is different from three years d To test if the mean credit card debt of college seniors is less than d. $1000.

QM-220, M. Zainal

Hypothesis tests about µ for using the p-value approach 24

The rejection region of a statistical hypothesis test is the range of numbers that will lead us to reject the null hypothesis in case the test statistic falls within this range. ¾

The rejection region, region also called the critical region, region is defined by the critical points. ¾

The rejection region is defined so that, before the sampling takes place, our test statistic will have a probability α of falling within ithi the th rejection j ti region i if the th null ll hypothesis h th i is i true. t ¾

In this procedure, we find a value such that a given null hypothesis is rejected for any α greater than this value and it is not rejected for any α less than this value. ¾

QM-220, M. Zainal

Hypothesis tests about µ for using the p-value approach 25

The p‐value is the smallest level of significance at which the given null hypothesis is rejected. ¾

Using this p‐value, we state the decision. If we have a predetermined value of α, then we compare the value of p with α and make a decision. ¾

QM-220, M. Zainal

Hypothesis tests about µ for using the p-value approach 26

¾

In the p‐value approach, we reject the null hypothesis Ho if p value < α p-value

and we do not reject the null hypothesis if p-value l ≥α

QM-220, M. Zainal

Hypothesis tests about µ for using the p-value approach 27

To find the area under the standard normal curve beyond the sample mean, first we calculating the z value for x ¾

z =

x −μ

σx

if σ is known

x −μ z = if σ is unknown sx The value of z calculated for the sample mean using the formula is also called observed value of z

¾

QM-220, M. Zainal

Hypothesis tests about µ for using the p-value approach 28

Then, we find the area under the tail of the normal distribution curve beyond this of z. ¾

This area gives the p‐value or one‐half of the p‐value depending on whether it is one‐tailed one tailed test or a two‐tailed two tailed test. test ¾

A test of hypothesis procedure that uses the p‐value approach involves the following four steps. ¾

¾

State the null and alternative hypothesis.

¾

Select the distribution to use.

¾

Calculate the p‐value. p

¾

Make a decision

QM-220, M. Zainal

Hypothesis tests about µ for using the p-value approach 29

Example: The management of Priority Health Club claims that its members lose an average of 10 pounds or more within the first month after joining the club. A consumer agency that wants p of 36 members of this to check this claim took a random sample health club and found that they lost an average of 9.2 pounds within the first month of membership with a standard deviation of 2.4 pounds. ¾

Find the p p‐value for this test.

¾

What will your decision be if α = .01? What if α = .05?

QM-220, M. Zainal

Hypothesis tests about µ for using the p-value approach 30

Example: At Canon Food Corporation, it took an average of 50 minutes for new workers to learn a food processing job. The supervisor at the company wants to find if the mean time taken by y new workers to learn the food p processing gp procedure on this new machine is different from 50 minutes. A sample of 40 workers showed that it took, on average, 47 minutes for them to learn the food processing procedure on a new machine with a standard deviation of 7 minutes. ¾

Find the p‐value for the test that the mean learning time for the food processing procedure on the new machine is different from 50 minutes.

¾

What will your conclusion be if α = .01 ? QM-220, M. Zainal

Hypothesis tests about µ for using the p-value approach 31

Example: Consider Ho: μ = 72 versus HI: μ > 72. A random sample of 36 observations taken from this population produced a sample mean of 74.07 and a standard deviation of 6. a Calculate the p value a. Calculate the p‐value. b. Considering the p‐value of part a, would you reject the null  hypothesis if the test were made at the significance level of 01? hypothesis if the test were made at the significance level of .01? c. Considering the p‐value of part a, would you reject the null  hypothesis if the test were made at the significance level of 025? hypothesis if the test were made at the significance level of .025?

QM-220, M. Zainal

Hypothesis tests about µ for large samples 32

Instead of using the p‐value approach, we will use what is  called the test statistic. ¾

¾

We calculate the test statistic in the following way:

x −μ σx sx ¾To Perform a test of hypothesis with predetermined  o e o a e o ypo e i i p e e e i e α z =

x −μ

or

=

¾

State the null and alternative hypotheses.

¾

Select the distribution to use.

¾

Determine the rejection and nonrejection regions.

¾

Calculate the value of the test statistic.

¾

Make a decision (reject Ho if |z| > z α).

QM-220, M. Zainal

Hypothesis tests about µ for large samples 33

Example: The TIV Telephone Company provides long‐distance telephone service in an area. According to the companyʹs records, the average length of all long‐distance calls placed through this company in 1999 was 12.44 minutes. The companyʹss management wanted to check if the mean length of company the current long‐distance calls is different from 12.44 minutes. A sample of 150 such calls placed through this company produced a mean length of 13.71 minutes with a standard deviation of 2.65 minutes. Using the 5% significance level, can you conclude that the mean length of all current long long‐distance distance calls is different from 12.44 minutes?

QM-220, M. Zainal

Hypothesis tests about µ for large samples 34

Example: The mayor of a large city claims that the average net worth of families living in this city is at least $300,00. A random sample of 100 families is selected from this city produced a mean net worth of $288,000 with a standard deviation of $80 000 Using the 2.5% $80,000. 2 5% significance level, level can you conclude that the mayor’s claim is false?

QM-220, M. Zainal

Hypothesis tests about µ for small samples 35

As in the confidence intervals, we may face the very same  situations in which the sample is small (n < 30) situations in which the sample is small (n 

Suggest Documents