8. hypothesis testing 2

29
1 Hypothesis Testing Two Samples Elementary Statistics Larson Farber Chapter 8

Upload: noor-hafizah

Post on 05-Oct-2015

215 views

Category:

Documents


0 download

DESCRIPTION

hypothesis

TRANSCRIPT

Hypothesis Testing Two Samples

1Hypothesis Testing Two Samples

Elementary StatisticsLarson Farber

Chapter 8 1Larson/Farber Ch 82Control GroupExperimental GroupOverviewSample1Sample2To test the effect of an herbal treatment on improvement of memory you randomly select two samples, one to receive the treatment and one to receive a placebo. Results of a memory test taken one month later are given.

The resulting test statistic is 77 - 73 = 4. Is this difference significant or is it due to chance (sampling error)? TreatmentPlacebo 2Many experiments are conducted where one group gets a treatment and another receives a placebo. These are often double-blind meaning that neither the experimenter of the subject knows which group a person belongs to,Larson/Farber Ch 83Independent SamplesINDEPENDENT SAMPLESWhen members of one sample are not related to members of the other sample.Persons receiving herbal treatment were not related or paired with those in the control group who took a placebo.

Experimental GroupControl Group 3Larson/Farber Ch 84Dependent SamplesDEPENDENT SAMPLESEach member of one sample is paired with a member of the other sample.

Score BeforeScore AfterThe test score for each person in the sample could be recorded before and after taking the herbal treatment.

The difference can be calculated for each pair.

4This type of test is often used in before and after trials. It is also used when each subject from one group can be matched with a subject from another (identical twins are often used.)Larson/Farber Ch 85Application To test the effect of an herbal treatment on improvement of memory, you randomly select sample of 95 to receive the treatment and a sample of 105 to receive a placebo. Both groups take a test after one month. The mean score for the experimental group is 77 with a standard deviation of 15. For the control group, the mean is 73 with a standard deviation of 12. Test the claim that the herbal treatment improves memory at = 0.01. 5Larson/Farber Ch 86Null Hypothesis H0 usually states there is no difference between the parameters of two populationsAlternative Hypothesis Ha is true when H0 is false.2. State the level of significanceHa: 1 > 2 ClaimH0: 1 2 = 0.01. This is the probability that H0 is true but you reject it.. 1. Write the null and alternative hypothesis 6The steps are similar to those used in one sample tests.Larson/Farber Ch 87The distribution for the sample statisticis normal since both samples are large.

z5. Find the rejection regionRejection Regionz004. Find the critical value Critical Value z02.333. Identify the sampling distribution 7The variance is the sum of the variances of the two samples.Larson/Farber Ch 886. Find the test statistic

z=2.07 does not fall in the rejection region. Do not reject the null hypothesis.There is not enough evidence to support the claim that the herbal treatment improves memory.02.33zWhen both samples are large, you can use s1 and s2 in place of 1 and 2.

7. Make your decision8. Interpret your decision 8The form of the standardized score is the difference between the sample value and the value in the null hypothesis divided by the standard deviation of the distribution. Have students calculate the P-value for this test. P= 0.019. At the 0.01 level of significance, do not reject the null hypothesis.Larson/Farber Ch 89Testing Difference Between Means (Small Samples)When you cannot collect samples of 30 or more, you can use a t-test, provided both populations are normal. The sampling distribution depends on whether the population variances are equal.If the variances of the two populations are equal, you can combine or pool information from both samples to form a pooled estimate of the standard deviation .

d.f. = n1 + n2 -2The standard error is

If the variances are not equal, the standard error is: And d.f. is the smaller of n1-1 or n2-1.

9The test for equal variances is in Chapter 10. You may wish to cover this before this section. If there is not time to do so, each problem informs students whether or not the variances are equal.Larson/Farber Ch 810 Crash tests at 5 miles per hour were performed on 5 small pickups and 8 SUVs. For the small pickups the mean bumper repair cost was $1520 and the standard deviation was $403. For the SUVs, the mean bumper repair cost was $937 and the standard deviation was $382. At =0.05 test the claim that the bumper repair cost is greater for small pickups than for SUVs. Assume equal variances.

PickupSUVn 5 8x1520937s 403382Application 10Have students write the given information on paper. This way they will better be able to follow the computations on the following slides. If you choose to present the test for equal variances first, have students perform this test. F = 1.113.Larson/Farber Ch 8112. State the level of significance1. Write the null and alternative hypothesisHa: 1 > 2 ClaimH0: 1 23. Identify the sampling distributionSince the variances are equal, the distribution for the sample statistic is a t-distribution with d.f. = 5 + 8 - 2 = 11.

= 0.05. 11Larson/Farber Ch 812tt004. Find the critical value 1.7966. Find the test statistic5. Find the rejection regionWhen variances are equal find the pooled value

12Answers may vary slightly due to round offs.Larson/Farber Ch 8137. Make your decision8. Interpret your decision

t=2.624 falls in the rejection region. Reject the null hypothesis.There is enough evidence to support the claim that bumper repair costs are greater for pickups than for SUVs.1.7960t 13Using technology, the P-value is P= 0.0118. Conclusion is to reject the null hypothesis.Larson/Farber Ch 814Application A real estate agent claims there is no difference between the mean household incomes of two neighborhoods. The mean income of 12 households from the first neighborhood was $48,250 with a standard deviation of $1200. In the second neighborhood, 10 households has a mean income of $50,375 with a standard deviation of $3400. Assume the incomes are normally distributed and the variances are not equal. Test the claim at = 0.01.

14Larson/Farber Ch 8152. State the level of significance1. Write the null and alternative hypothesisHa: 1 2H0: 1 = 2 Claim

3. Identify the sampling distributionSince the variances are not equal, the distribution for the sample statistic is a t-distribution with d.f. = 9

= 0.01.(The smaller sample size is 10 and 10 - 1 =9.) 15Larson/Farber Ch 8166. Find the test statistic4. Find the critical values 3.250-3.2505. Find the rejection regions-t0tt00

= 1129..6017

16Larson/Farber Ch 8177. Make your decision8. Interpret your decisiont =- 1.881 does not fall in the rejection region. Do not eject the null hypothesis.There is not enough evidence to reject the claim that there is no difference in mean household incomes in the two neighborhoods. -3.250t3.2500 17Larson/Farber Ch 818The sampling distribution for the mean of the differences is a t-distribution with n-1 degrees of freedom. (Where n is the number of pairs.)

The Difference Between Means-Dependent SamplesWhen each value from one sample is paired with a data value in the second sample, the samples are dependent.

The difference d = x1 - x2 is calculated for each data pair. 18Larson/Farber Ch 819ApplicationThe table shows the heart rates (beats per minute) of five people before exercising and after. At = 0.05, is there enough evidence to conclude that heart rate increases with exercise? Person Before After

1 65 127 2 72 135 3 85 140 4 78 136 5 93 150d

6263555857 the standard deviation of d is 3.39

the mean of d is 59 19The test is a t-test for one sample where the one sample is the sample of differences. Larson/Farber Ch 8202. State the level of significance1. Write the null and alternative hypothesisHa: d > 0 claimH0: d 03. Identify the sampling distributionThe distribution for the sample statistic is a t-distribution with d.f. = 4

= 0.05.(since there are 5 data pairs, d.f.= 5 - 1 =4) 20Students will want to use technology tools to calculate the sample means and standard deviations. Larson/Farber Ch 8216. Find the test statistic4. Find the critical value2.1325. Find the rejection regiontt00

21Students should recognize such an extreme standard score as being highly unlikely under the assumption that the null hypothesis is true.Larson/Farber Ch 8227. Make your decision8. Interpret your decisiont=38.92 falls in the rejection region. Reject the null hypothesis.There is enough evidence to support the claim that heart rate increases with exercise.t2.132t00 22Larson/Farber Ch 823Using MinitabTest of mu = 0.00 vs mu > 0.00

Variable N Mean StDev SE Mean T Pdiff 5 59.00 3.39 1.52 38.90 0.0000The Minitab printoutThe P-value is 0.0000. Since 0.0000 < 0.05, rejectthe null hypothesis.

23The first line tells you that you have selected a right tail test. Larson/Farber Ch 824The Difference Between ProportionsIf independent samples are taken from each of two populations and the samples are large enough to use a normal sampling distribution, then you can test for the difference between sample proportions p1 - p2.x1and x2. represent the number of successes in each sample.n1and n2. represent the total number in each sample.

Sample proportions of successes.

Since the proportions will be assumed equal, an estimate for the common value is:

and 24The common proportion is the sum of the successes over the total number of trials.Larson/Farber Ch 825Two Sample z-testIf

are each at least 5the sampling distribution for

is normal.The standardized test statistic is:

The mean is p1 - p2 and the standard error 25Larson/Farber Ch 826ApplicationIn a survey of 3420 college students attending private schools 917 said they smoked in the last 30 days. In a survey of 5131 college students attending public schools, 1503 said they had smoked in the last 30 days. At = 0.01, can you support the claim that the proportion of college students who said they had smoked in the last 30 days in the private schools is less than the proportion in public schools?n1 = 3420x1 = 917n2 = 5131x2 = 1503

privatepublic 26Larson/Farber Ch 8272. State the level of significanceHa: p1 < p2 ClaimH0: p1 p2 = 0.01. 1. Write the null and alternative hypothesis3. Identify the sampling distribution

The distribution for the sample statistic is normal since

are each at least 5

27Larson/Farber Ch 828z5. Find the rejection regionRejection Region4. Find the critical value Critical Value z0-2.3306. Find the test statistic

28Using technology tools results may differ slightly. This is due to rounding off differences. (TI-83 gives z = -2.494)Larson/Farber Ch 8297. Make your decision8. Interpret your decisionz=-2.514 falls in the rejection region. Reject the null hypothesis.-2.330There is enough evidence to support the claim thatthere is a lower proportion of students who smoke in private colleges than in public colleges. 29