Top Banner
One- and Two-Sample Tests of Hypotheses Chapter 10
29

One- and Two-Sample Tests of Hypotheses

Jan 06, 2016

Download

Documents

soyala

One- and Two-Sample Tests of Hypotheses. Chapter 10. 10.1 Statistical Hypotheses. Real life problems are usually different than just estimation of population statistics. We try on the basis of experimental evidence Whether coffee drinking increses the risk of cancer - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

One- and Two-Sample Tests of Hypotheses

One- and Two-Sample Tests of HypothesesChapter 1010.1 Statistical HypothesesReal life problems are usually different than just estimation of population statistics.We try on the basis of experimental evidenceWhether coffee drinking increses the risk of cancerWhether there is difference between the accuracy of two kinds of gaugesWhether a persons eye color and blood type are independent variables.Statistical hypothesesWe postulate or conjecture something about the systemIn each case, the conjecture can be put in the form of a statistical hypothesisDefn:A statistical hypothesis is an assertion or conjectureTruth is never known unless we examine the entire population.Accepting hypothesesAs always, we take a random sample from the population.Evidence from the sample that is inconsistent with the stated hypothesis leads to a rejection of the hypothesis.The Role of Probability in Hypothesis TestingHypothesis: A fraction p = 0.1 of a production is defectiveSample of 100 units, 12 defectiveWe cannot refute the claim p=0.1But we also cannot refute p=0.12 or p=0.15The rejection of a hypothesis means that the evidence from the sample refutes it.

Rejection of a HypothesisRejection means that there is a small probability of of obtaining the sample information observed when, in fact, the hypothesis is true.Hypothesis that p=0.1 is unlikely if there are 20 defective units in a sample of 100 units.Why?If p=0.1, probability of observing 20 defective units is 0.002Rejection rules out the hypothesis, failing to reject, does not. But it does not rule out other hypotheses as well.Establishing a ConclusionRejecting a hypothesis is stronger than failing to reject it.If you want to show thatCoffee drinking increases the risk of cancerOne gauge is more accurate than anotherYour hypothesis should beThere is no increased cancer riskThere is no difference between gaugesThe Null and Alternative HypothesesNull hypothesis:The hypothesis we wish to test, which is denoted by H0Alternative hypothesis:The rejection of H0 leads to acceptance of this hypothesis, denoted by H1H1 is the question to be answered, or the theory to be tested, whereas H0 nullifies H1Arriving conclusionsReject H0: in favor of H1 because of sufficient evidence in the dataFail to reject H0: because of insufficient evidence in the data.We never accept H0 For our example:H0 : p = 0.1H1 : p > 0.110.2 Testing a Statistical HypothesisA certain type of cold vaccine is known to be only 25% effective after a period of 2 years.We want to determine if a new kind of vaccine is effective for a longer period of time.Experiment:Choose 20 people at random and inoculate them with the new vaccineIf more than 8 remain healthy after 2 years, we conclude that the new vaccine is better.Example (cont.)In actual situations we need thousands of peopleThe number 8 seems arbitrary, but reasonableWe are testing the null hypothesis that The new vaccine is equally effective after 2 years as the former one.The alternative hypothesis is thatThe new vaccine is effective for a longer period of time.Example (cont.)This is equal to testing the hypothesis that the binomial parameter for the probability of a success on a given trial is p = 0.25, against the alternative that p > 0.25.H0 : p = 0.25H1 : p > 0.25

The Test StatisticThe test statistic is the observed statistic on which we base our decision.In this case, it is X, the number of healthy people after two yearsThe values of X that makes us reject the null hypothesis constitute the critical regionThe last number we observe before passing into the critical region is the critical valueIn this case, it is 8.Types of ErrorThis decision procedure could lead to either of two wrong conlusionsType I error:Rejecting H0 in favor of H1 when, in fact, H0 is true.The probability of a type I error, also called level of significance, is denoted by .Type II error:Failing to reject H0 when, in fact, H0 is false.The probability of type II error, denoted by , is impossible to compute unless we have a specific H1 Possible SituationsH0 is trueH0 is falseDo not reject H0 Correct decisionType II errorReject H0 Type I errorCorrect decision

Type II error cannot be computed without a specific alternative hypothesis.Computing Type II ErrorNull hypothesis is p = 0.25As alternative hypothesis, use a specific value for p, such as 0.5Then, we get

How to Choose and Ideally, both types of error should be smallFor some applications, onw type of error might be more important than the otherHow to change and ?Either change the critical valueUsually decreases one type of error while increasing the otherOr change the sample sizeIncreasing the sample size reduces both types of errorThe role of , and the Sample SizeIn our exampleChange critical value from 8 to 7 increases to 0.1018 decreases to 0.1316Change sample size from 20 to 100 (c.v. 36) decreases to 0.0039 decreases to 0.0035Read text book pages 326-327 for detailsThese concepts can be equally well applied to continuous random variables.Important Properties of a Test of Hypothesis1- The type I error and type II error are related. A decrease in the probability of one generally results in an increase in the probability of the other2- The size of the critical region, and therefore the probability of committing a type I error, can always be reduced by adjusting the critical valuesImportant Properties of a Test of Hypothesis3- An increase in the sample size will reduce both types of error simultaneously4- If the null hypothesis is false, is a maximum when the true value of a parameter approaches the hypothesized value. The greater the distance between the true value and the hypothesized value, the smaller will be.The Power of a TestDefinition:The power of a test is the probability of rejecting H0 given that a specific alternative is trueWhich is 1 Different kinds of tests are compared by contrasting power properties.To increase the power of a test, either increase , or increase sample sizeOne- and Two-Tailed TestsOne-tailed testA test of any hypothesis where the alternative is one sided, such asH0 : = 0H1 : > 0 or H1 : < 0 where critical region is not splitTwo-tailed testA test of any hypothesis where the alternative is two sided, such asH0 : = 0H1 : 0 where critical region is split into two

Choosing Null and Alternative HypothesesExample 10.1A manufacturer of a certain brand of rice cereal claims that the average saturated fat content does not exceed 1.5 mg. State the null and alternative hypotheses to be used in testing this claim and determine where the critical region is located.Choosing Null and Alternative HypothesesSolutionThe claim should be rejected only if the average is greater than 1.5 mg and should not be rejected if average is less than or equal to 1.5 mg.H0 : = 1.5mgH1 : > 1.5mg - one-tailedNote that the nonrejection of H0 does not rule out values less than 1.5mg. The critical region lies entirely in the right tail of the distribution.

Choosing Null and Alternative HypothesesExample 10.2A real estate agent claims that 60% of all private residences being built today are 3-bedroom homes. To test this claim, a large sample of new residences is inspected; the proportion of these homes with 3 bedrooms is recorded and used as our test statistic. State the null and alternative hypotheses to be used in testing this claim and determine where the critical region is located.

Choosing Null and Alternative HypothesesSolutionWe reject if the test statistic is significantly higher or lower than p=0.6. H0 : p = 0.6H1 : p 0.6The alternative hypothesis implies a two-tailed test, where the critical region is symetrically split into two.10.4 The Use of P values for Decision MakingClassical Hypothesis TestingWe usually use a prefixed probability of type I error1 State the null and alternative hypotheses2 Choose a fixed significance level 3 Choose a test statistic and establish a critical region4 Frome the computed test statistic, reject H0 if the test statistic is in the critical region. Otherwise do not reject.5 Draw conclusionsThe Problem with Classical ApproachClassical approach either rejects or fails to reject. Even if we fail to reject, the risk of rejecting can be very low, if the observed statistic is very close to the critical value.If we only reject using the critical value and the test statistic, we lose important information, namely, how likely it is to observe the data if the null hypothesis is true. This probability is called the P-value.P-ValueA P-Value is the lowest level (of significance) at which the observed value of the test statistic is significant.Significance Testing1 State null and alternative hypotheses2 Choose an appropriate test statistic3 Compute P-value based on computed value of test statistic4 Use judgment based on P-value and knowledge of scientific system.