Chapter 10 s Using a Single Sample 10.1: Hypotheses & Test Procedures Basics: In statistics, a hypothesis is a statement about a population characteristic. s are based on an reductio ad absurdum form of argument. Specifically, we make an assumption and then attempt to show that assumption leads to an absurdity or contradiction, hence the assumption is wrong. The null hypothesis, denoted H 0 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. The alternate hypothesis, denoted by H a 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. Rejection of the null hypothesis will imply the acceptance of this alternative hypothesis. Assume H 0 is true and attempt to show this leads to an absurdity, hence H 0 is false and H a is true. Typically one assumes the null hypothesis to be true and then one of the following conclusions are drawn. Reject H 0 Equivalent to saying that H a is correct or true Fail to reject H 0 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 ing process can be compared very closely with a judicial trial. Assume a defendant is innocent (H 0 ) Present evidence to show guilt Try to prove guilt beyond a reasonable doubt (H a ) AN ANALOGY Two Hypotheses are then created. H 0 : Innocent H a : Not Innocent (Guilt)
You would like to determine if the diameters of the ball bearings you produce have a mean of 6.5 cm. H 0 : µ = 6.5 H a : µ 6.5 (Two-sided alternative) 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)? H 0 : µ = 525 (Really: µ 525) H a : µ < 525 (One-sided alternative) Do the 16 ounce cans of peaches canned and sold by DelMonte meet the claim on the label (on the average)? H 0 : µ = 16 (Really: μ 16) H a : µ < 16 Is the proportion of defective parts produced by a manufacturing process more than 5%? H 0 : π = 0.05 (Really, π 0.05) H a : π > 0.05 Do two brands of light bulb have the same mean lifetime? H 0 : µ Brand A = µ Brand B H a : µ Brand A µ Brand B Do parts produced by two different milling machines have the same variability in diameters? 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 H 0 : population characteristic = hypothesized value H 0 : population characteristic hypothesized value H 0 : 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: H a : population characteristic > hypothesized value
H a : population characteristic < hypothesized value H a : 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. 10.2: Errors in ing Definitions: Type I error: The error of rejecting Ho when Ho is actually true. Type II error: The error of failing to reject Ho when Ho is actually false. Error Error Analogy Consider a medical test where the hypotheses are equivalent to H 0 : the patient has a specific disease H a : 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 So why not just set α=.01 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 β). 10.3: Test Statistic A test statistic is the function of sample data on which a conclusion to reject or fail to reject H 0 is based. 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 H 0 is true, of obtaining a test statistic value at least as inconsistent with H 0 as what actually resulted. Decision Criteria A decision as to whether H 0 should be rejected results from comparing the P-value to the chosen α: H 0 should be rejected if P-value α. H 0 should not be rejected if P-value > α. Large Sample for a Single Proportion Large Sample Test of Population Proportion Large Sample Test of Population Proportion Large Sample Test of Population Proportion Example Large-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 Example Example 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 than 25% of his party is in opposition. A SRS of 800 party members included 217 who opposed him. Please advise this judge. Example Example 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, I would advise him not to run. Steps in a Hypothesis-Testing Analysis Describe (determine) the population characteristic about which hypotheses are to be tested. State the null hypothesis H 0. State the alternate hypothesis H a.
Select the significance level α for the test. Display the test statistic to be used, with substitution of the hypothesized value identified in step 2 but without any computation at this point. Steps in a Hypothesis-Testing Analysis Check to make sure that any assumptions required for the test are reasonable. Compute all quantities appearing in the test statistic and then the value of the test statistic itself. Determine the P-value associated with the observed value of the test statistic State the conclusion in the context of the problem, including the level of significance. 10.4: (Large samples) Reality Check (σ unknown) (σ unknown) Tail areas for t curves Tail areas for t curves Example of 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. Example of continued
Example of continued Example of conclusion Using the t table Revisit the problem with α=0.10 What would happen if the significance level of the test was 0.10 instead of 0.05? Comments continued Many people are bothered by the fact that different choices of α lead to different conclusions. This is nature of a process where you control the probability of being wrong when you select the level of significance. This reflects your willingness to accept a certain level of type I error. Another Example A jeweler is planning on manufacturing gold charms. His design calls for a particular piece to contain 0.08 ounces of gold. The jeweler would like to know if the pieces that he makes contain (on the average) 0.08 ounces of gold. To test to see if the pieces contain 0.08 ounces of gold, he made a sample of 16 of these particular pieces and obtained the following data. 0.0773 0.0779 0.0756 0.0792 0.0777 0.0713 0.0818 0.0802 0.0802 0.0785 0.0764 0.0806 0.0786 0.0776 0.0793 0.0755 Use a level of significance of 0.01 to perform an appropriate hypothesis test. Another Example Conclusion: Since P-value = 0.006 0.01 = α, (or Crit t with 15 df & an α of.01 = 2.95) we reject H 0 at the 0.01 level of significance. At the 0.01 level of significance there is convincing evidence that the true mean gold content of this type of charm is not 0.08 ounces. Actually when rejecting a null hypothesis for the alternative, a one tailed claim is supported. In this case, at the 0.01 level of significance, there is convincing evidence that the true mean gold content of this type of charm is less than 0.08 ounces. 10.5: Power and Probability of Type II Error The power of a test is the probability of rejecting the null hypothesis. When H 0 is false, the power is the probability that the null hypothesis is rejected. Specifically, power = 1 β. Effects of Various Factors on Power The larger the size of the discrepancy between the hypothesized value and the true value of the population characteristic, the higher the power. The larger the significance level, α, the higher the power of the test. The larger the sample size, the higher the power of the test. Some Comments Calculating β (hence power) depends on knowing the true value of the population characteristic being tested. Since the true value is not known, generally, one calculates β for a number of possible true values of the characteristic under study and then sketches a power curve. Example (based on z-curve) Consider the earlier example where we tested H 0 : µ = 110 vs. H a : µ > 110 and furthermore, suppose the true standard deviation of the bolts was actually 10 lbs. Example (based on z-curve) Example (based on z-curve)
Proportion Example The city council is concerned about a trend where apartment owners won t rent to people with children. They selected a random sample of 125 apartments buildings & determined if children were allowed. Let π be the true proportion of apartment buildings that prohibit children. If π exceeds.75, city council will consider legislation. A. If 102 of the 125 sampled exclude kids, would a level.05 test lead to legislation? B. What is the power of the test when π =.8 and α =.05? Proportion Example Let π be the true proportion of apartments which prohibit children. H o : π = 0.75 H a : π > 0.75 α = 0.05 p = 102/125 = 0.816 Since nπ = 125(0.75) = 93.75 10, and n(1 π) = 125(0.25) = 31.25 10, the large sample z test for π may be used. z =.816-.75/ (.75)(.25)/125) = 1.71 P-value = area under the z curve to the right of 1.71 = 1 0.9564 = 0.0436. Since the P-value is less than α, H o is rejected. This 0.05 level test does lead to the conclusion that more than 75% of the apartments exclude children. Proportion Example The test with = 0.05 rejects H o if which is equivalent to p > 0.75 + 0.0387(1.645) = 0.8137. H o will then not be rejected if p 0.8137. When π = 0.80 and n = 125, β = P(not rejecting H o when π = 0.8) = P(p 0.8137) = area under the z curve to the left of = area under the z curve to the left of 0.38 = 0.6480. 10.6: Communicating & Interpreting Results of Analysis Hypotheses Important to state them whether in symbolic or sentence form. Test Procedure Be clear about what test you use & verify any assumptions you made (normal, etc.) Test Statistic- Include the value of the statistic & the p value. Conclusions in context Don t just say that you rejected, put it in the context of the problem. α value whether you state it at the beginning or in conclusions, you must state your α level. Look For's in Published Data What hypotheses were being tested & what characteristic(s) was(were) being looked at. Was the appropriate test used? What were the assumptions & were they met? What was the p value associated with the test & what was the α? Was α reasonable? Were conclusions drawn consistent with the results of the hypothesis test? Cautions Remember, a hypothesis test can NEVER show support of any hypothesis, only support against. That s why we use a null hypothesis If you can collect data on the entire population, don t do a sample, use the population data. There is a difference in statistical & practical/clinical significance. Your test might show stat sig differ, but lowering systolic BP by 2 pts is not clinically significant