z test

39
HYPOTHESIS TESTING

Upload: anmolgarg129

Post on 30-Sep-2015

238 views

Category:

Documents


6 download

DESCRIPTION

vtyu

TRANSCRIPT

HYPOTHESIS TESTING

HYPOTHESIS TESTINGZ TESTHYPOTHESIS TESTING FOR POPULATION PARMETERS WITH LARGE SAMPLES (>30) HYPOTHESIS TESTING FOR POPULATION PARMETERS WITH LARGE SAMPLESHypothesis testing involving large samples (n > 30)is based on the assumption that the population from which the sample is drawn has a normal distributionConsequently the sampling distribution of mean x is also normalHYPOTHESIS TESTING FOR POPULATION PARMETERS WITH LARGE SAMPLES HYPOTHESIS TESTING FOR LARGE SAMPLELet o be the hypothesized value of the population mean to be tested. For the null hypothesis the null and alternative hypothesis for two tailed test are defined asHo: = oH1 : = oIf std deviation of population is known Test statistic z = (x )/x = (x )/( /n) If population std deviation is not known Then z = (x- )/(s/n)

HYPOTHESIS TESTING FOR POPULATION PARMETERS WITH LARGE SAMPLESDecision Rule based on sample means for the two tailed test takes the formReject Ho if z(cal) -z(/2) or z(cal) z(/2) Accept Ho if z(/2) < z < z(/2) where z(/2) is the table value of z at a chosen level of significance HYPOTHESIS TESTING FOR POPULATION PARMETERS WITH LARGE SAMPLES LEFT TAILED TESTLarge sample hypothesis testing about a population mean for a left tailed test is of the formHo : o and H1 : < oTest Statistic z = (x )/x = (x )/( /n)Decision RuleReject Ho if z(cal) -z()Accept Ho if z(cal) > -z() HYPOTHESIS TESTING FOR POPULATION PARMETERS WITH LARGE SAMPLES RIGHT TAILED TESTLarge sample hypothesis testing about a population mean for a right tailed test is of the formHo : o and H1 : > oTest Statistic z = (x )/x = (x )/( /n)Decision RuleReject Ho if z(cal) z()Accept Ho if z(cal) < z() EXAMPLE 1An ambulance service claims that it takes on average 8.9 minutes to reach its destination in emergency calls. To check the claim the agency which licenses ambulance services has then timed on 50 emergency calls, getting a mean of 9.3 minutes with a std deviation of 1.8 minutes. Does this constitute evidence that the figure claimed is too low at the 1% significant level?EXAMPLE 1-SolutionLet us consider the null hypothesis Ho that the claim is same as observedHo:=8.9 , H1: = 8.9 Given n=50,x=9.3 ,s=1.8Z=(x-) /sx = x-/(s/n) = (9.3-8.9)/(1.8/ 50)=1.574Since z(cal) is less than critical value z(/2)= 2.58 the null hypothesis is acceptedExample 2A hospital uses large quantities of packaged doses of a particular drug. The individual dose of this drug is 100 cc. The action of this drug is such that body will harmlessly pass off excessive doses. On other hand insufficient doses do not produce desired medical effect. The hospital has purchase the drug from the same manufacturer for years and population standard deviation is 2 cc. Example 2The hospital inspects 50 doses of this drug at random and finds a mean of 99.75 ccIf a hospital sets a significance level of 0.10 and asks whether the dosage is too low how can we find this.

Example 2 - SolutionTo begin we can state this problem as Ho:o = 100: H1 : 1 = 100 The hospital wishes to know whether actual dosage are 100cc or whether in fact the dosage are too small A better way would be Ho: o 100 , H1 : 1 < 100Z=(x-) /x = 99.75 100 / 2 50 = - 0.88

Example 2 - SolutionThe critical value of z is -1.28 and therefore we accept null hypothesisEXAMPLE 3A packaging device is set to fill detergent powder packets with a mean weight of 5 kg, with a standard deviation of 0.21 kg. The weight of packets can be assumed to be normally distributed. The weight of packets is known to drift upwards over a period of time due to machine fault which is not tolerable. A sample of 100 packets is taken and weighed. This sample has a mean weight of 5.03 kg. can we conclude that the mean weight produced by the machine has increased? Use a 5 % level of significanceEXAMPLE 3-SolutionLet null hypothesis Ho that mean weight has increased Ho : 5 and H1 : < 5Given n=100, x=5.03 kg, =0.21, = 5%Z= (x- ) / (/n) = 5.03-5 /(0.21/100) = 1.428Since calculated value z(cal) = 1.428 is less than its critical value z() =1.645 at = 0.05, the null hypothesis Ho is accepted Hence we conclude that mean weight is likely to be more than 5 kgHYPOTHESIS TESTING FOR POPULATION PARMETERS WITH LARGE SAMPLES HYPOTHESIS TESTING FOR DIFFERENCE BETWEEN TWO POPULATION MEANSIdea is to test whether there is significant difference between the means of these populationsLet 1 and 2 be mean of two population1 and 2 be std deviation of two population

HYPOTHESIS TESTING FOR POPULATION PARMETERS WITH LARGE SAMPLESZ statistic = [(x1-x2) (1-2)]/ x1 x2 = [(x1-x2) (1-2)]/ (/n1 + /n2)The null and alternate hypothesis are stated as Null hypothesis Null Hypothesis Ho : 1 2 = do ( do is specified difference)

Alternate hypothesis Two tailed test One tailed testHo: (1 2) = do where do is the specified difference that is desired to be testedHo : 1-2 0 H1 : (1 2) > doH0 : 1 -2 0 H1 : (1 2) < doHYPOTHESIS TESTING FOR POPULATION PARMETERS WITH LARGE SAMPLES Decision RuleReject Ho at a specified level of significance when

[note : if standard deviation 1 and 2 are not known then we estimate standard error by substituting the sample deviations s1 and s2 as estimates of standard deviations Sx1-x2 = s1/n1 + s2/n2 ]Two tailed testOne Tailed TestZ(cal)>z(/2) or z(cal) z() When H1=(1-2) > do [or when zpo (right tailed testHYPOTHESIS TESTING FOR SINGLE POPULATION PROPORTIONTest statistic z = p-po/p = p-po /po(1-po)/nDecision Rule: Reject Ho when One tailed testTwo tailed testZ(cal) > z() (when H1: p > po) or Z(cal) < - z() (When H1 :p< po)Z (cal) > z(/2) orZ (cal) < - z(/2) EXAMPLE 5An auditor claims that 10% of customers ledger accounts are carrying mistakes of posting and balancing. A random sample of 600 was taken to test the accuracy of posting and balancing and 45 mistakes were found .Are these samples results consistent with the claim of the auditor? Use 5% level of significance EXAMPLE 5 -SolutionLet us take the claim of auditor is validHo: p=0.10 H1 : p= 0.10 (two tailed test)Given p=45/600 =0.075, n=600 ,=5%Z=p-po/p = 0.075 -0.10 / (0.10x0.90/600) = - 2.049Since z(cal) is less than critical value z() =-1.96, Ho is rejectedExample 6A manufacturer claims that at least 95% of the equipments which he supplied to a factory conformed to specifications. An examination of sample of 200 pieces of equipment revealed that 18 were faulty. Test the claim of the manufacturerGiven critical value z()= -1.645 at 5% level of significanceExample 6 - SolutionLet us take null hypothesis that at least 95 % of equipment supplied conformed to specificationHo: po 0.95 H1 :po< 0.95(left tailed test)Given p = 1-(18/200) = 0.91, n= 200, = 0.05Z=p-po/p = 0.91-0.95/(0.95x0.05)/200 = -2.67Since z(cal) is less than critical value z()= -1.645, Ho is rejectedHYPOTHESIS TESTING FOR DIFFERENCE BETWEEN TWO POPULATION PROPORTIONSHYPOTHESIS TESTING FOR DIFFERENCE BETWEEN TWO POPULATION PROPORTIONSLet two independent populations each having proportion and standard deviation of an attribute be as follows

The hypothesis testing concepts developed can be extended to test whether there is any difference between the proportions of these populations. The null hypothesis that there is no difference between two proportions is stated as

PopulationProportionStandard Deviation1p1p12p2p2HYPOTHESIS TESTING FOR DIFFERENCE BETWEEN TWO POPULATION PROPORTIONSHo : p1=p2 or p1-p2 =0 H1 : p1 = p2 H1 : p1 > p2 H1 : p1 < p2 The sampling distribution of difference in sample proportions p1-p2 is based on the assumption that the difference between two population proportions p1-p2 is normally distributed.The standard error of p1-p2 is given by p1-p2=p1(1-p1)/n1 + p2(1-p2)/n2[q1=1-p1, q2=1-p2]

HYPOTHESIS TESTING FOR DIFFERENCE BETWEEN TWO POPULATION PROPORTIONSThe z statistic is Z=(p1-p2) (p1-p2) / p1-p2 = (p1-p2/p1-p2)Invariably the standard error p1-p2 is not known. Thus when a null hypothesis states there is no difference between the population proportion we combine proportions p1 and p2 to get one unbiased estimate of population proportion p = n1p1 +n2p2/ (n1 + n2)Z= p1-p2/sp1-p2 [ sp1-p2 = p(1-p) {1/n1+1/n2}Example 8A company is considering two different TV advertisement for promotion of new product. Management believes that advertisement A is more effective than advertisement B. Two test market areas with virtually identical consumer characteristics are selected. Ad A is used in one area and Ad B is used in other area. In a random sample of 60 customers who saw advertisement A , 18 had tried the product. In random sample of 100 customers who saw ad B ,22 tried the product. Does this indicate ad A is more effective than Ad B if a 5% level of significance is usedGiven critical value z()= 1.645 at 5% significanceExample 8-SolutionLet us take null hypothesis both Ad are equalHo: p1=p2 H1 : p1 > p2 (right tailed test)Given n1=60, p1=18/60=0.30, n2= 100, p2=22/100= 0.22, =0.05Z= p1-p2/sp1-p2Sp1-p2=p(1-p)[1/n1+1/n2] = 0.25x0.75(1/60+1/100) = 0.707 [ As p=n1p1+n2p2/n1+n2 p = 60(18/60)+100(22/100) / (60+100)=0.25]Example 8-SolutionSubstituting value in z test statistic z= 0.30- 0.22/0.0707 = 0.08/0.0707 =1.131Since z(cal) is less than critical value z()= 1.645 , Ho is acceptedExample 9In a simple random sample of 600 men taken from a big city 400 are found to be smokers. In another random sample of 900 men taken from another city are 450 smokers. Do the data indicate that there is a significant difference in habit of smoking in the two cities?Example 9 - SolutionLet us take the null hypothesis that there is no significant difference in the habit of smoking in two citiesHo: p1=p2 H1 : p1 = p2 (two tailed test)Given n1=600, p1=400/600=0.667, n2= 900, p2=450/900=0.50, =0.05Z= p1-p2/sp1-p2Sp1-p2=p(1-p)[1/n1+1/n2]

Example 9-Solution[p=n1p1+n2p2/n1+n2 =600(400/600) + 900(450+900)/ (600+900) =450 +450 /1500 = 850/1500=0.567 ]Z= 0.667-0.500/0.026 = 0.167/0.026 =6.423Since z(cal) =6.423 is greater than z (/2) =2.58 at /2=0.025 Ho is rejected. Hence we conclude there oi no significant difference in habit of smoking in two cities