Example: air traffic controller

10 Hypothesis Testing with Two Independent Samples

MATH1015 BiostatisticsWeek 1010 Hypothesis Testing with TwoIndependent SamplesPreviously we have studied: the one-samplet-test for population mean , using theinformation provided by a single sample; the one-samplez-test for population proportionp, basedon one sample; the matched pairst-test based on two observations on each(or identical) subject (which reduces to the one-samplet-test for differenced data).This week we consider an extension of the above work and studymethods to comparetwo population meansandtwo populationproportions, both based on two Independent Samples from Two-samplet-test comparing two popu-lation means ( ) IntroductionIn every area of human activity, new procedures are invented andexisting techniques are revised .

• the one-sample z-test for population proportion p, based on one sample; ... existing techniques are revised. Advances occur whenever a new technique is proved to be better than the old. Hence we need ... One-sided t-test-2.262 0 1.94 t9 P-value=0.084 a=0.05 (RR) 0.042 0.042

Tags:

  Tests, Revised, Proportions

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Advertisement

Transcription of 10 Hypothesis Testing with Two Independent Samples

1 MATH1015 BiostatisticsWeek 1010 Hypothesis Testing with TwoIndependent SamplesPreviously we have studied: the one-samplet-test for population mean , using theinformation provided by a single sample; the one-samplez-test for population proportionp, basedon one sample; the matched pairst-test based on two observations on each(or identical) subject (which reduces to the one-samplet-test for differenced data).This week we consider an extension of the above work and studymethods to comparetwo population meansandtwo populationproportions, both based on two Independent Samples from Two-samplet-test comparing two popu-lation means ( ) IntroductionIn every area of human activity, new procedures are invented andexisting techniques are revised .

2 Advances occur whenever a newtechnique is proved to be better than the old. Hence we needto test whether the new method is better than the old one butbased on a new experimental design other than matched MATH1015 (2013) First semester1 MATH1015 BiostatisticsWeek 10 This section develops a popular statistical test that comparesthe means of motivational example:Suppose that there are two typesof food available for milking cows. A farmer wishes to test whichtype of food helps cows to produce more yield of experiment:The farmer can select two Independent groupsof cows who produce similar milk yields.

3 One group is given thefood A and the other group is given the food B. After one week,the farmer calculates the means and standard deviations of milkyields for each group and then use his knowledge to decide thetype of food which gives better examples:1. Compare the average age at first marriage of females in twoethnic Compare the average efficiency of two brands of Compare the average marks of statistics students at USYDand UNSWNote:This type of design do comparison using two indepen-dent Samples rather than matched pairs.

4 This type of design isnecessary in some situations when matched pairs from similaror same subjects are more difficult to form, for example, in thecomparison of two ethnic groups where human characteristicsare difficult to statistical test, thetwo-samplet-test, for such comparisonscan be developed under the following assumptions:SydU MATH1015 (2013) First semester2 MATH1015 BiostatisticsWeek Test assumptions1. Two populations are Independent andnormally distributedpopulations withequal Two Independent Samples are drawn (one from each popula-tion).

5 NotationPopulations:Two Independent populations with means 1and 2and thesame variances MeanPopulation Variance1X1 1 22X2 2 2 Samples :Take two Independent Samples of sizesn1andn2fromeach population and calculate the following statistics:SampleVariableSample MeanSample Variance1x1 x1s212x2 The hypothesisIn this ( Independent ) two-sample problem, the null Hypothesis of in-terest is:H0: 1= 2orH0: 1 2= 0:The alternative Hypothesis ,H1will be set up according to the specificproblem of interest and select one from:H1: 1> 2orH1: 1 2>0 (one-sided);SydU MATH1015 (2013) First semester3 MATH1015 BiostatisticsWeek 10H1: 1< 2orH1: 1 2<0 (one-sided);H1: 1 = 2orH1: 1 2 = 0 (two-sided):Note:As we have two sample variancess21ands21, we need to com-bine them to form a single variance in order to develop attest.

6 Thiscan be done by combining or poolings21ands21as given Combined or Pooled VarianceIt can be shown that the best combination ofs21ands21to producethe common variance is given bys2p=(n1 1)s21+ (n2 1)s22n1+n2 2:Remarks: This combined variances2pis called thepooled variance. The pooled variance is simply a weighted average of the twoindividual sample variances, weighted by their The Test StatisticIt can be proved that under the null hypothesisH0: 1 2= 0, thetest statistict=X1 X2sp 1n1+1n2 tn1+n2 2ist-distributed withn1+n2 2 degrees of MATH1015 (2013) First semester4 MATH1015 BiostatisticsWeek 10 Note:The corresponding df for this two sample problem is 2 lessthan the total sample size ofn1+n2:Compare this with the onesamplet-testt=X 0s= n tn 1ist-distributed withn 1 degrees of.

7 Two Independent Samples have been taken from two in-dependent normal populations. The observations are:Sample 1: 8, 5, 7, 6, 9, 7 Sample 2: 2, 6, 4, 7, an estimate of the combined variance (or pooled variance).Solution:Sample 1:n1= 6. x1= 7;s21= 2:Sample 2:n2= 5. x2= 5;s22= 4:Therefore, the combined or pooled variance (estimate) is:s2p=(6 1)2 + (5 1)46 + 5 2= 2:89 Example (cont):State the distribution oft= X1 X2sp 1n1+ :Since thedf= 6 + 5 2 = 9t=X1 X2sp 1n1+1n2 t9 Example:Using the sample information, calculate the value of MATH1015 (2013) First semester5 MATH1015 BiostatisticsWeek 10 Solution:t0= x1 x2sp 1n1+1n2=7 5 2:89(16+15)= 1:943 Example:Test the null Hypothesis againstH1: 1 2> :P-value =P(T9 1:94)<0:05 (or in (0:025.))

8 0:05))and thereforewe have evidence :Test the null hypothesisH1: 1 2= 0 against thealternativeH1: 1 2 = 0:Solution:Sincve the alternative Hypothesis is two sided, the corre-spondingP-value is calculated (as before) as:2P(T9 1:943)>0:05 (or in 2(0:025;0:05) = (0:05;0:10))Thereforethe data are consistent t9P value= = (RR) sided t test t9P value= = (RR) sided t testNote:The exactP-value of (2-sided) can be obtained fromRusing2*(1-pt( ,9))and the critical values of and :Example (p. 147)SydU MATH1015 (2013) First semester6 MATH1015 BiostatisticsWeek 10 Example:A feeding test is conducted on a herd of 25 dairy cowsto compare two diets,AandB.

9 A sample of 13 cows randomlyselected from the herd are fed dietAand the remaining cows are fedwith dietB. From observations made over a three-week period, theaverage daily milk production (in L) is recorded for each cow:Milk Yield (in L)Diet A (x1)44 44 56 46 47 38 58 53 49 35 46 30 41 Diet B (x2)35 47 55 29 40 39 32 41 42 57 51 39 Assume these two Samples come from Independent normally dis-tributed populations with equal variances 2.(i)Find the mean and the sd for each sample.(ii)Find an estimate of the pooled variance s2p, which estimatesthe common variance 2(iii)Perform the two-samplet-test to investigate the evidence of adifferencein true mean milk yields for the two :(i) x1= 45:15;s1= 7:998;n1= 13 forA x2= 42:25;s2= 8:740;n2= 12 forB(ii)The pooled sample variance iss2p=(n1 1)s21+ (n2 1)s22(n1+n2 2)=(13 1)7:9982+ (12 1)8:7402(13 + 12 2)=8:362 SydU MATH1015 (2013) First semester7 MATH1015 BiostatisticsWeek 10(iii)The two-samplet-test:1.

10 Hypotheses:As we want to test whether there is a differ-ence in milk yields, we have atwo-sidedalternatives:H0: 1= 2againstH1: 1 = 2:2. Test Statistic:UnderH0,t0= x1 x2sp 1n1+1n2=45:15 42:258:36 113+112= 0 :2P(T23 0:867)>0:054. Conclusion:SinceP-value is>0:05, the data are consistentwithH0. There is no significant difference between the two di-ets. t23P value= = (RR) sided t Con dence interval (CI) for 1 2 The (1 )100% CI for 1 2is x1 x2 tn1+n2 2; =2sp 1n1+1n2 SydU MATH1015 (2013) First semester8 MATH1015 BiostatisticsWeek 10To testH0: 1= : 1 = 2at significant level:If 0 CI, then the data are consistent 0= CI, then there is evidence :For the previous example, the 95% CI for 1 2is x1 x2 tn1+n2 2; =2sp 1n1+1n2=45:15 42:25 2:069 8:36 113+112= ( 4:0242.)


Related search queries