Télécharger la présentation
## Chapter 10

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -

**Chapter 10**Homework Assignment: 10.5, 10.21, 10.27, 10.31 10.49, 10.51, 10.55 Hypothesis Tests Using a Single Sample**BASICS**• In statistics, a hypothesis is a statement about a population characteristic.**FORMAL STRUCTURE**We make an assumption and then attempt to show that assumption leads to an absurdity or contradiction, hence the assumption is wrong.**FORMAL STRUCTURE**• The null hypothesis, denoted H0 is a statement or claim about a population characteristic that is initially assumed to be true. • The null hypothesis is so named because it is the “starting point” for the investigation. The phrase “there is no difference” is often used in its interpretation.**FORMAL STRUCTURE**• The alternate hypothesis, denoted by Ha (or sometimes H1) is the competing claim. • The alternate hypothesis is a statement about the same population characteristic that is used in the null hypothesis. • Generally, the alternate hypothesis is a statement that specifies that the population has a value different, in some way, from the value given in the null hypothesis.**FORMAL STRUCTURE**• Rejection of the null hypothesis will imply the acceptance of this alternative hypothesis. • Assume H0 is true and attempt to show this leads to an absurdity, hence H0 is false and Ha is true.**FORMAL STRUCTURE**• Typically one assumes the null hypothesis to be true and then one of the following conclusions are drawn. • Reject H0 Equivalent to saying that Ha is correct or true • Fail to reject H0 Equivalent to saying that we have failed to show a statistically significant deviation from the claim of the null hypothesis This is not the same as saying that the null hypothesis is true.**AN ANALOGY**• The Statistical Hypothesis Testing process can be compared very closely with a judicial trial. • Assume a defendant is innocent (H0) • Present evidence to show guilt • Try to prove guilt beyond a reasonable doubt (Ha)**You would like to determine if the diameters of the ball**bearings you produce have a mean of 6.5 cm. H0: µ=6.5 Ha: µ≠6.5 (Two-sided alternative) Examples of Hypotheses**The students entering into the math program used to have a**mean SAT quantitative score of 525. Are the current students poorer (as measured by the SAT quantitative score)? H0: µ =525 (Really: µ 525) Ha: µ < 525 (One-sided alternative) Examples of Hypotheses**Do the “16 ounce” cans of peaches canned and sold by**DelMonte meet the claim on the label (on the average)? H0: µ =16 (Really: ≥16) Ha: µ< 16 Examples of Hypotheses • Notice, the real concern would be selling the consumer less than 16 ounces of peaches.**Is the proportion of defective parts produced by a**manufacturing process more than 5%? H0: =0.05 (Really, 0.05) Ha: > 0.05 Examples of Hypotheses**Do two brands of light bulb have the same mean lifetime?**H0: µBrand A = µBrand B Ha: µBrand A µBrand B Examples of Hypotheses**Do parts produced by two different milling machines have the**same variability in diameters? Examples of Hypotheses or equivalently**Comments on Hypothesis Form**• The null hypothesis must contain the equal sign. This is absolutely necessary because the test requires the null hypothesis to be assumed to be true and the value attached to the equal sign is then the value assumed to be true and used in subsequent calculations. • The alternate hypothesis should be what you are really attempting to show to be true. This is not always possible.**Hypothesis Form**• The form of the null hypothesis is • H0: population characteristic = hypothesized value • where the hypothesized value is a specific number determined by the problem context. • The alternative (or alternate) hypothesis will have one of the following three forms: • Ha: population characteristic > hypothesized value • Ha: population characteristic < hypothesized value • Ha: population characteristic hypothesized value**Caution**• When you set up a hypothesis test, the result is either • Strong support for the alternate hypothesis (if the null hypothesis is rejected) • There is not sufficient evidence to refute the claim of the null hypothesis (you are stuck with it, because there is a lack of strong evidence against the null hypothesis.**Error(We typically do not “accept” the null hypothesis,**we “fail to reject” it.) Type II Error No Error b Type I Error No Error a**Error Analogy**• Consider a medical test where the hypotheses are equivalent to H0: the patient has a specific disease Ha: the patient doesn’t have the disease • Then, Type I error is equivalent to a false negative (i.e., Saying the patient does not have the disease when in fact, he does.) Type II error is equivalent to a false positive (i.e., Saying the patient has the disease when, in fact, he does not.)**More on Error**• The probability of a type I error is denoted by and is called the level of significance of the test. Thus, a test with = 0.01 is said to have a level of significance of 0.01 or to be a level 0.01 test. • The probability of a type II error is denoted by .**Relationships Between and **• Generally, with everything else held constant, decreasing one type of error causes the other to increase. • The only way to decrease both types of error simultaneously is to increase the sample size. • No matter what decision is reached, there is always the risk of one of these errors.**Comment of Process**• Look at the consequences of type I and type II errors and then identify the largest that is tolerable for the problem. • Employ a test procedure that uses this maximum acceptable value of (rather than anything smaller) as the level of significance (because using a smaller increases ).**Test Statistic**• A test statistic is the function of sample data on which a conclusion to reject or fail to reject H0 is based. • A critical value is determined by the level of significance.**P-value**• The P-value (also called the observed significance level) is a measure of inconsistency between the hypothesized value for a population characteristic and the observed sample. • The P-value is the probability, assuming that H0 is true, of obtaining a test statistic value at least as inconsistent with H0 as what actually resulted.**Decision Criteria**• A decision as to whether H0 should be rejected results from comparing the P-value to the chosen : H0 should be rejected if P-value . H0 should not be rejected if P-value > .**Large Sample Hypothesis Test for a Single Proportion**To test the hypothesis H0: = hypothesized proportion, compute the z statistic (test statistic)**Classical Method—Using TI-83/84(First, check for**normality: Be sure that np(1-p) > 10.) • State your claim, including null and alternative hypotheses. • Find critical values using InvNorm(…….be careful! [critical values depend only on α.] • Draw picture to represent critical region. • Compute test statistic: Stat->Tests->1-PropZTest • Compare test statistic to critical value • State conclusion.**P-Value Method—Using TI-83/84(check for normality, if**necessary) • State your claim, including null and alternative hypotheses. • Compute P-value: Stat->Tests->1-PropZ-Test • Compare p-value to α. • If p < α, reject the null. • State conclusion.**Hypothesis Test ExampleLarge-Sample Test for a Population**Proportion • An insurance company states that the proportion of its claims that are settled within 30 days is 0.9. A consumer group thinks that the company drags its feet and takes longer to settle claims. To check these hypotheses, a simple random sample of 200 of the company’s claims was obtained and it was found that 160 of the claims were settled within 30 days.**Example 2 Single Proportion continued**p = proportion of the company’s claims that are settled within 30 days H0: = 0.9 Choose the level of significance (usually .05) HA: < 0.9Draw a picture Critical value: InvNorm(.05) = -1.645(label critical value on picture.) Stat, Tests, 1-PropZTest: n = 200 x = 160 p0 = .9 Test Statistic: Z = -4.7 : Since the test statistic falls in the critical region (less than the critical value), we reject the null hypothesis. P-value = 1.2E-6 ~ 0 < .05 (so we reject the null hypothesis)**Hypothesis Test Example 2Single Proportion continued**The probability of getting a result as strongly or more strongly in favor of the consumer group's claim (the alternate hypothesis Ha) if the company’s claim (H0) was true is essentially 0. Clearly, this gives strong evidence in support of the alternate hypothesis (against the null hypothesis).**Hypothesis Test Example 2Single Proportion continued**We would say that we have strong support for the claim that the proportion of the insurance company’s claims that are settled within 30 days is less than 0.9. Some people would state that we have shown that the true proportion of the insurance company’s claims that are settled within 30 days is statistically significantly less than 0.9.**Hypothesis Test Example Single Proportion**• A county judge has agreed that he will give up his county judgeship and run for a state judgeship unless there is evidence at the 0.10 level that more then 25% of his party is in opposition. A SRS of 800 party members included 217 who opposed him. Please advise this judge.**Hypothesis Test ExampleSingle Proportion continued** = proportion of his party that is in opposition H0: = 0.25 HA: > 0.25 = 0.10 (level of significance) Critical value: InvNorm(.10) = 1.28(use the positive value since it’s right-tailed.) Draw a picture, shade the critical region. Stat, Tests, 1-PropZTest: n = 800; x = 217; p0 = .25 Test Statistic: Z = 1.388 P-value = .0826 Because the test statistic falls in the critical region (to the right of 1.28) and the p-value is less than alpha, reject the null hypothesis.**Hypothesis Test Example Single Proportion continued**• At a level of significance of 0.10, there is sufficient evidence to support the claim that the true percentage of the party members that oppose him is more than 25%. • Under these circumstances, would you advise him to run?**Here’s a nice place to take a break.We’ll continue if**there’s plenty of time. [If only a few minutes remain at this point, let’s look at the textbook for more examples.]**Hypothesis Test (Large samples)Single Sample Test of**Population Mean To test the hypothesis H0: µ= hypothesized mean, if population standard deviation is KNOWN: compute the z statistic: In terms of a standard normal random variable z, the approximate P-value for this test depends on the alternate hypothesis.**Hypothesis Test Single Sample Test of Population Mean**H0: µ = hypothesized mean HA: µ < hypothesized mean**It is not likely that one would know but not know m, so**calculating a z value using the formula would not be very realistic. Reality Check For large values of n (>30) it is generally acceptable to use s to estimate , however, it is much more common to apply the t-distribution.**Hypothesis Test (unknown)Single Sample Test of**Population Mean To test the null hypothesis µ = hypothesized mean, when we may assume that the underlying distribution is normal or approximately normal, compute the t statistic The critical value is found using the table with degrees of freedom, df = n-1.**Hypothesis testing about the mean, using TI-83/84: Z-Test or**T-Test • State your claim, including null and alternative hypotheses. • Find critical values using either InvNorm or t-table • Draw picture to represent critical region. • Compute test statistic: Stat->Tests->Z-Test or T-Test • Compare test statistic (z or t) to critical value • Compare p to alpha. If p-value < alpha, reject null. • State conclusion.**Z-Test or T-Test?**• Use Z-Test only when the population standard deviation is known • Use T-Test when only the sample standard deviation is available Z-Test: use InvNorm to find critical values T-Test: use table (df=n-1) to find critical values**Hypothesis Test ( unknown)Single Sample Test of**Population Mean The t statistic can be used for all sample sizes, however, the smaller the sample, the more important the assumption that the underlying distribution is normal. [recall, that we can obtain evidence of normality by looking at a normal probability plot.] Typically, when n >15 the underlying distribution need only be centrally weighted and may be somewhat skewed.**Example of Hypothesis TestSingle Sample Test of Population**Mean continued • An manufacturer of a special bolt requires that this type of bolt have a mean shearing strength in excess of 110 lb. To determine if the manufacturer’s bolts meet the required standards a sample of 25 bolts was obtained and tested. The sample mean was 112.7 lb and the sample standard deviation was 9.62 lb. Use this information to perform an appropriate hypothesis test with a significance level of 0.05.**The test statistic is**Example of Hypothesis TestSingle Sample Test of Population Mean continued = the meanshearing strength of this specific type of bolt The hypotheses to be tested are • H0: =110 lb • Ha: 110 lb The significance level to be used for the test is = 0.05. (use T-Test in calculator to find this test statistic)**Example of Hypothesis TestSingle Sample Test of Population**Mean continued Since we only have the sample standard deviation, we find the critical value using the t-table (alpha =.05,df = 24). Draw a picture and shade the critical region. Stat, Tests, T-Test: 0 = 110; xbar=112.7; sx = 9.62; n = 25 α = .05 Critical t = 1.71**Example of Hypothesis TestSingle Sample Test of Population**Mean conclusion Because the test statistic, t = 1.40, and does not fall in the critical region, we fail to reject the null hypothesis. Because P-value = 0.087 > 0.05 =,we fail to reject H0. At a level of significance of 0.05, there is insufficient evidence to conclude that the mean shearing strength of this brand of bolt exceeds 110 lbs.