Chapter 10 Hypothesis Tests Using a Single Sample

  • Slides: 71
Download presentation
Chapter 10 Hypothesis Tests Using a Single Sample

Chapter 10 Hypothesis Tests Using a Single Sample

BASICS In statistics, a hypothesis is a statement about a population characteristic. 2

BASICS In statistics, a hypothesis is a statement about a population characteristic. 2

FORMAL STRUCTURE Hypothesis Tests are based on an reductio ad absurdum form of argument.

FORMAL STRUCTURE Hypothesis Tests 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. 3

FORMAL STRUCTURE The null hypothesis, denoted H 0 is a statement or claim about

FORMAL STRUCTURE 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. 4

FORMAL STRUCTURE The alternate hypothesis, denoted by Ha is the competing claim. The is

FORMAL STRUCTURE The alternate hypothesis, denoted by Ha is the competing claim. The is a statement about the same population characteristic that is used in the null hypothesis. Generally, 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. 5

FORMAL STRUCTURE Rejection of the null hypothesis will imply the acceptance of this alternative

FORMAL STRUCTURE 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 Ha is true. 6

FORMAL STRUCTURE Typically one assumes the null hypothesis to be true and then one

FORMAL STRUCTURE Typically one assumes the null hypothesis to be true and then one of the following conclusions are drawn. 1. Reject H 0 Equivalent to saying that Ha is correct or true 2. 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 7

AN ANALOGY The Statistical Hypothesis Testing process can be compared very closely with a

AN ANALOGY The Statistical Hypothesis Testing 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(Ha) 8

AN ANALOGY Two Hypotheses are then created. ØH 0: Innocent ØHa: Not Innocent (Guilt)

AN ANALOGY Two Hypotheses are then created. ØH 0: Innocent ØHa: Not Innocent (Guilt) 9

Examples of Hypotheses You would like to determine if the diameters of the ball

Examples of Hypotheses You would like to determine if the diameters of the ball bearings you produce have a mean of 6. 5 cm. 10 H 0: = 6. 5 Ha: 6. 5 (Two-sided alternative)

Examples of Hypotheses The students entering into the math program used to have a

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)? 11 H 0: = 525 (Really: 525) Ha: < 525 (One-sided alternative)

Examples of Hypotheses Do the “ 16 ounce” cans of peaches canned and sold

Examples of Hypotheses Do the “ 16 ounce” cans of peaches canned and sold by Del. Monte meet the claim on the label (on the average)? Notice, the real concern would be selling the consumer less than 16 ounces of peaches. 12 H 0: = 16 (Really: 16) Ha: < 16

Examples of Hypotheses Is the proportion of defective parts produced by a manufacturing process

Examples of Hypotheses Is the proportion of defective parts produced by a manufacturing process more than 5%? 13 H 0: p = 0. 05 (Really, p 0. 05) Ha: p > 0. 05

Examples of Hypotheses Do two brands of light bulb have the same mean lifetime?

Examples of Hypotheses Do two brands of light bulb have the same mean lifetime? 14 H 0: Brand A = Brand B Ha: Brand A Brand B

Examples of Hypotheses Do parts produced by two different milling machines have the same

Examples of Hypotheses Do parts produced by two different milling machines have the same variability in diameters. 15 or equivalently

Comments on Hypothesis Form The null hypothesis must contain the equal sign. This is

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. The alternate hypothesis should be what you are really attempting to show to be true. This is not always possible. 16

Hypothesis Form The form of the null hypothesis is H 0: population characteristic =

Hypothesis Form The form of the null hypothesis is 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: Ha: population characteristic > hypothesized value Ha: population characteristic < hypothesized value Ha: population characteristic hypothesized value 17

Caution When you set up a hypothesis test, the result is either ØStrong support

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, but there is only a lack of strong evidence against the null hypothesis. 18

Error 19

Error 19

Error Analogy Consider a medical test where the hypotheses are equivalent to H 0:

Error Analogy Consider a medical test where the hypotheses are equivalent to H 0: 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. ) 20

More on Error The probability of a type I error is denoted by and

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 b. 21

Relationships Between and Generally, with everything else held constant, decreasing one type of error

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. 22

Comment of Process Look at the consequences of type I and type II 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 ). 23

Test Statistic A test statistic is the function of sample data on which a

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. 24

P-value The P-value (also called the observed significance level) is a measure of inconsistency

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. 25

Decision Criteria A decision as to whether H 0 should be rejected results from

Decision Criteria A decision as to whether H 0 should be rejected results from comparing the Pvalue to the chosen a: ØH 0 should be rejected if P-value . ØH 0 should not be rejected if P-value > . 26

Large Sample Hypothesis Test for a Single Proportion In terms of a standard normal

Large Sample Hypothesis Test for a Single Proportion In terms of a standard normal random variable z, the approximate P-value for this test is 27

Hypothesis Test Large Sample Test of Population Proportion 28 p 0 stands for the

Hypothesis Test Large Sample Test of Population Proportion 28 p 0 stands for the hypothesized value of the population proportion from the null hypothesis.

Hypothesis Test Large Sample Test of Population Proportion 29 p 0 stands for the

Hypothesis Test Large Sample Test of Population Proportion 29 p 0 stands for the hypothesized value of the population proportion from the null hypothesis.

Hypothesis Test Large Sample Test of Population Proportion 30 p 0 stands for the

Hypothesis Test Large Sample Test of Population Proportion 30 p 0 stands for the hypothesized value of the population proportion from the null hypothesis.

Hypothesis Test Example ( Large-Sample Test for a Population Proportion) An insurance company states

Hypothesis Test 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. 31

Hypothesis Test Example 2 ( Single Proportion) continued p = proportion of the company’s

Hypothesis Test Example 2 ( Single Proportion) continued p = proportion of the company’s claims that are settled within 30 days H 0: p = 0. 9 Ha: p < 0. 9 32

Hypothesis Test Example 2 ( Single Proportion) continued The probability of getting a result

Hypothesis Test Example 2 ( Single 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 (H 0) was true is essentially 0. Clearly, this gives strong evidence in support of the alternate hypothesis (against the null hypothesis). 33

Hypothesis Test Example 2 ( Single Proportion) continued We would say that we have

Hypothesis Test Example 2 ( Single 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. 34

Hypothesis Test Example( Single Proportion) A county judge has agreed that he will give

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. 35

Hypothesis Test Example( Single Proportion) continued p = proportion of his party that is

Hypothesis Test Example( Single Proportion) continued p = proportion of his party that is in opposition H 0: p = 0. 25 Ha: p > 0. 25 = 0. 10 Note: hypothesized value = p 0 = 0. 25 36

Hypothesis Test Example( Single Proportion) continued At a level of significance of 0. 10,

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, I would advise him not to run. 37

Steps in a Hypothesis-Testing Analysis 1. 2. 3. 4. 5. 38 Describe (determine) the

Steps in a Hypothesis-Testing Analysis 1. 2. 3. 4. 5. 38 Describe (determine) the population characteristic about which hypotheses are to be tested. State the null hypothesis H 0. State the alternate hypothesis Ha. 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 6. 7. 8. 9. 39 Check to make sure

Steps in a Hypothesis-Testing Analysis 6. 7. 8. 9. 39 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.

Hypothesis Test (Large samples) Single Sample Test of Population Mean In terms of a

Hypothesis Test (Large samples) Single Sample Test of Population Mean In terms of a standard normal random variable z, the approximate P-value for this test is 40

Hypothesis Test Single Sample Test of Population Mean 41 0 stands for the hypothesized

Hypothesis Test Single Sample Test of Population Mean 41 0 stands for the hypothesized value of the population mean from the null hypothesis.

Hypothesis Test Single Sample Test of Population Mean 42 0 stands for the hypothesized

Hypothesis Test Single Sample Test of Population Mean 42 0 stands for the hypothesized value of the population mean from the null hypothesis.

Hypothesis Test Single Sample Test of Population Mean 43 0 stands for the hypothesized

Hypothesis Test Single Sample Test of Population Mean 43 0 stands for the hypothesized value of the population mean from the null hypothesis.

Reality Check 44

Reality Check 44

Hypothesis Test (s unknown) Single Sample Test of Population Mean 45 In terms of

Hypothesis Test (s unknown) Single Sample Test of Population Mean 45 In terms of the t random variable with degrees of freedom df = n-1, the approximate P-value for this test is

Hypothesis Test (s unknown) Single Sample Test of Population Mean The t statistic can

Hypothesis Test (s 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. Typically, when n >15 the underlying distribution need only be centrally weighted and may be somewhat skewed. 46

Tail areas for t curves 47

Tail areas for t curves 47

Tail areas for t curves 48

Tail areas for t curves 48

Hypothesis Test Single Sample Test of Population Mean 49 0 stands for the hypothesized

Hypothesis Test Single Sample Test of Population Mean 49 0 stands for the hypothesized value of the population mean from the null hypothesis.

Hypothesis Test Single Sample Test of Population Mean 50 0 stands for the hypothesized

Hypothesis Test Single Sample Test of Population Mean 50 0 stands for the hypothesized value of the population mean from the null hypothesis.

Hypothesis Test Single Sample Test of Population Mean 51 0 stands for the hypothesized

Hypothesis Test Single Sample Test of Population Mean 51 0 stands for the hypothesized value of the population mean from the null hypothesis.

Example of Hypothesis Test Single Sample Test of Population Mean continued An manufacturer of

Example of Hypothesis Test Single 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. 52

Example of Hypothesis Test Single Sample Test of Population Mean continued = the mean

Example of Hypothesis Test Single Sample Test of Population Mean continued = the mean shearing strength of this specific type of bolt The hypotheses to be tested are H 0: = 110 lb HA: 110 lb The significance level to be used for the test is = 0. 05. 53

Example of Hypothesis Test Single Sample Test of Population Mean continued 54

Example of Hypothesis Test Single Sample Test of Population Mean continued 54

Example of Hypothesis Test Single Sample Test of Population Mean conclusion Because P-value =

Example of Hypothesis Test Single Sample Test of Population Mean conclusion Because P-value = 0. 087 > 0. 05 = , we fail to reject H 0. 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. 55

Tail areas for t curves t=1. 4 n=25 df=24 Tail area = 0. 087

Tail areas for t curves t=1. 4 n=25 df=24 Tail area = 0. 087 56

Revisit the problem with = 0. 10 What would happen if the significance level

Revisit the problem with = 0. 10 What would happen if the significance level of the test was 0. 10 instead of 0. 05? 57

Revisit the problem with = 0. 10 Now P-value= 0. 087 < 0. 10=

Revisit the problem with = 0. 10 Now P-value= 0. 087 < 0. 10= , and we reject H 0 at the 0. 10 level of significance and conclude At the 0. 10 level of significance there is sufficient evidence to conclude that the mean shearing strength of this brand of bolt exceeds 120 lbs. 58

Comments continued Many people are bothered by the fact that different choices of lead

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. 59

Another Example A jeweler is planning on manufacturing gold charms. His design calls for

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. 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. 60

Another Example The population characteristic being studied is = true mean gold content for

Another Example The population characteristic being studied is = true mean gold content for this particular type of charm. 2. Null hypothesis: H 0: = 0. 08 oz 3. Alternate hypothesis: Ha: 0. 08 oz 4. Significance level: = 0. 01 1. 61

Another Example 6. 62 Minitab was used to create a normal plot along with

Another Example 6. 62 Minitab was used to create a normal plot along with a graphical display of the descriptive statistics for the sample data.

Another Example We can see that with the exception of one outlier, the data

Another Example We can see that with the exception of one outlier, the data is reasonably symmetric and mound shaped in shape, indicating that the assumption that the population of amounts of gold for this particular charm can reasonably be expected to be normally distributed. 63

Another Example 8. P-value: This is a two tailed test. Looking up in the

Another Example 8. P-value: This is a two tailed test. Looking up in the table of tail areas for t curves, t = 3. 2 with df = 15 we see the table entry is 0. 003 so 64 9. P-Value = 2(0. 003) = 0. 006

Another Example 9. 65 Conclusion: Since P-value = 0. 006 0. 01 = ,

Another Example 9. 65 Conclusion: Since P-value = 0. 006 0. 01 = , 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 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.

Power and Probability of Type II Error The power of a test is the

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 – . 66

Effects of Various Factors on Power The larger the size of the discrepancy between

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. 2. The larger the significance level, , the higher the power of the test. 3. The larger the sample size, the higher the power of the test. 1. 67

Some Comments Calculating (hence power) depends on knowing the true value of the population

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. 68

Example (based on z-curve) Consider the earlier example where we tested H 0: =

Example (based on z-curve) Consider the earlier example where we tested H 0: = 110 vs. Ha: u > 110 and furthermore, suppose the true standard deviation of the bolts was actually 10 lbs. 69

Example (based on z-curve) 70

Example (based on z-curve) 70

Example (based on z-curve) 71

Example (based on z-curve) 71