Mth 17/171 Chpter 7- ypothesis Testing with One Smple This chpter is s simple s the previous one, except it is more interesting In this chpter we will test clims concerning the sme prmeters tht we worked with in the previous chpter We will test clims such s: The verge monthly rin in Dectur is 35 inches ( μ =3 5), more thn 3% of students t RCC re full time students ( p f 3), or the stndrd devition of the ges of students t RCC is less thn or equl to 5 yers ( σ 5) 71-Introduction to ypothesis Testing ypothesis testing is done when someone mkes clim Our gol, in this course, is to try to reject the clim or to support it (bsed on the wording of the problem) In order to ccomplish tht gol we hve to be systemtic (follow n order) The steps re s follows: 1 Determine wht (prmeter) you re testing nd then write the clim symboliclly For exmple, for the verge monthly rin in Dectur the symbols would be: : μ = 35 ( clim) : μ 35 Is clled the null hypothesis nd is clled the lterntive hypothesis For the percentge of full time students t RCC the symbols would be: : p 3 : p f3 ( clim) With these two exmples you note tht the clim could be for either the null or lterntive hypothesis; it depends on how it is stted in the text of the problem Step one is very crucil The other steps re dependent on step one Determine the test sttistics- I will explin this in section 7 Before I cn tlk bout step 3, I must explin Type I & Type II errors Wht you hve to remember is tht when you mke judgment bout something you might be wrong This is clled n error We hve two types of errors (Let s concentrte on the clim tht the verge monthly rin in Dectur is 35 inches) There re two cses: Either this clim is true or flse Suppose tht the clim is true nd you erroneously cme to conclusion tht it is flse This is clled Type I Error Sttisticlly, Type I Error is rejecting when is true The probbility of committing Type I Error is nmed α So, α = p(re jecting is true) α is clled the level of significnce Note: If you put n innocent mn in jil, then you hve committed Type I Error On the other hnd, suppose the verge monthly rin in Dectur is not 35 inches, but you ccept it You re ccepting something, tht is flse This is clled Type II Error By definition, Type II Error is ccepting when is flse The probbility of committing Type II Error is nmed β So, β = p ( ccepting is flse) Note: If you set guilty person free, then you hve committed Type II Error Now tht you know wht α is, you cn find the criticl vlue(s) A test is either two-sided (twotiled) or one-tiled test In the cse of monthly rin in Dectur, we hve two-tiled test If we let α = 5, then the criticl vlues will be ± z = 1 96 (I m sure you remember this from the previous sections) The intervl between 5 ± ± is clled noncriticl (nonrejection) region The z α tils beyond the criticl vlues re clled criticl (rejection) regions If it is one-tiled test,
Pge 1/7/6 Chpter 7 Lecture then the criticl vlue will be z α if : μ p # This is clled left-tiled test The intervl to the left of this criticl vlue is clled the criticl (rejection) region The intervl to the right of this number is clled noncriticl (nonrejection) region On the other hnd, if : μ f #, then the criticl vlue will be z α This is clled right-tiled test The intervl to the right of the criticl vlue is clled the rejection (criticl) region The intervl to the left of this criticl vlue is clled noncriticl (nonrejection) region The percentge of full time students is right-tiled test (look t the direction of the inequlity for the lterntive hypothesis) Suppose α = 5, then the criticl vlue is: z 5 = 1645 Exmples: Pges 344-345 Question 7- : p= 84 ( Clim) : p 84 Question 5- : σ 1 ( clim) : σ f 1 Question 3- : μ 75 : μ f 75 ( clim) Note: The equlity sign lwys stys with But, the clim could be with or Question 41- : μ : μ f ( Clim) If you reject, then you re in fvor of Your conclusion should be something like this: We reject the clim tht the men number of pictures developed for stndrd roll of 4 exposures is t lest Note: You must lwys ply the role of prosecutor; your gol is to reject the null hypothesis b If you cn t reject the null hypothesis, then you should write your conclusion something like this: Bsed on this test, we don t hve enough evidence to reject the clim tht the men number of pictures developed for stndrd roll of 4 exposures is t lest Note: We did not use the word ccept Do not use the word ccept for your conclusion Suppose you re testing the below hypothesis : p 4 : p f4 ( clim) If you reject the null hypothesis, then your conclusion should be something like this: We support the clim tht the proportion of hourly workers erning over $1 per hour is greter thn 4% b If you cn t reject, then your conclusion should be something like this: Bsed on this test, we do not hve enough evidence to support the clim tht the proportion of hourly workers erning over $1 per hour is greter thn 4%
Pge 3 1/7/6 Chpter 7 Lecture 7-ypothesis Testing for μ ( n 3 OR σ is known) The sequence in this chpter is like the previous chpter In this section we like to test clims regrding the men of popultion when the smple size is lrge or the stndrd devition of the popultion is known For this sitution, we used the z-tble; we will do the sme thing here too As I explined in the previous section, for the hypothesis testing we must follow steps These steps must be pplied throughout ll the hypothesis testing sections Exmple: Suppose Mr X clims tht the men ge of students t RCC is less thn 3 yers You think he is wrong To prove your point, you rndomly sk the ges of 36 students t RCC You find: x = 9 5 nd s = 3 3 yers Before you perform the test, you determine the level of significnce (you like α =5 ) Perform complete test for this sitution Solution: I like to summrize the text of the problem: n = 36, x = 95, s = 33, α = 5 Step 1 Write the null nd the lterntive hypothesis: : μ 3 : μ p3 ( clim) Step Find the criticl vlue(s): This is left-tiled test (look t the direction of the inequlity sign for ) You hve to find z 5 You hve seen this mny times so fr, z 5 = 1 645 The criticl vlue here is 1645 (since we hve left-tiled test) Step 3 Find the test sttistics (vlue of the test): In this cse the vlue of the test is obtined by x μ 95 3 using the following formul: z, z = = 91 σ 33 n 36 Step 4 Compre z with - zα If z is less thn or equl - zα, then reject In our cse -91 is not less thn 1 645 At this point you mke decision Your decision must be: We cnnot reject Step 5 Write conclusion bout your test It should be something like this: Bsed on this test, I cnnot support the clim tht the men ge of students t RCC is less thn 3 yers NOTE: Never use the word ccept The method tht we used to do this test is clled the clssicl pproch (method) There is nother method (probbility vlue pproch) tht you cn implement for hypothesis testing I will show you the steps for the sme question bove Step 1 is the sme Step Find: p ( x p 95), which you re fmilir with (section 54) From step 3 bove we got the vlue of z So, find p( z < 91) = 1814 This is the P = 1814 Step 3 Compre the p-vlue with α If the Note: For two-sided test compre the p-vlue with vl P pα, then reject nd write conclusion vl α 73 ypothesis Testing for the μ ( n p 3 nd σ is unknown)
Pge 4 1/7/6 Chpter 7 Lecture In this section we will do exctly wht we did in the previous section When the smple size is smll nd the popultion stndrd devition is not known you must use the t-distribution to test μ The steps re exctly the sme too The only things, which re different, re: 1 You will use this formul (note the similrity of this formul with the one you used in the x μ previous section): t = s n You will use the t-tble to find the criticl vlue(s) Exmple: Suppose Ali Moshgi clims tht the men height of students t RCC is 18 cm Jmes, who hs been here for some time, thinks tht I m wrong Jmes took rndom smple of 16 from RCC students nd found the men nd stndrd devition of his smple to be 175cm nd 7 cm respectively Test Mr Moshgi s clim Let α = 5 Solution: n = 16, x = 175, s = 7 : μ = 18 ( clim) Step 1: : μ 18 x μ 175 18 Step : find the vlue of the test: t = = = = 857 s 7 7 n 16 Step 3: Find the criticl vlues: t = ± c 131 int: df = n-1 = 16 1 = 15 (like the previous chpter) Look t the row, which sys (Two tils,α ) nd select 5 Step 4: Mke decision: Since the vlue of the test is less thn the criticl vlue ( 857 p 131) reject Note tht if the vlue of the test were greter thn the criticl vlue +131, you would reject the null hypothesis too Step 5: Write conclusion for this test: Bsed on this test, we must reject MR Moshgi s clim tht the men height of RCC students is 18 cm Note: You see the close similrities of this section with section 74 ypothesis Testing for Proportions In this section we like to test clims such s: Less thn 1% of RCC students smoke, $4% of RCC students re fulltime, or t lest % of RCC students tke sttistics course As you see, ll of these sttements del with proportions Exmple: The clening crew t RCC believes tht t lest 15% of RCC students smoke cigrettes A security gurd who hs been t Richlnd for some time thinks tht the clening crew is wrong e rndomly took smple of size 6 nd found out tht 6 of these students smoke Test the clim of the clening crew Suppose tht the level of significnce is 5 Solution: : p 15 ( clim) : p p15 p p x 6 1 15 The formul is: z =, p = = = 1, z = = 1 8 pq n 6 (15)(85) n 6 The criticl vlue is 1645 (this is left-tiled test with α = 5 ) Decision: We cnnot reject
Pge 5 1/7/6 Chpter 7 Lecture Conclusion: Bsed on this test, the security gurd cnnot reject the clim of the clening crew Note gin tht we never ccept the null hypothesis Note: You could lso use the p-vl pproch 75 ypothesis Testing for the Vrince nd Stndrd Devition In this section we lern how to test clims regrding the stndrd devition of popultion The ( n 1) s formul for finding the test sttistic is χ = You lerned this distribution in the σ previous chpter when we creted confidence intervls for σ The procedure for testing the stndrd devition ( σ ) nd vrince ( σ ) is the sme Exmple 1: Ms X clims tht the stndrd devition of the height of students t RCC is more thn 1 cm Mr Y believes tht she is wrong e took rndom smple of 5 RCC students nd found out tht the stndrd devition of his smple is 8 cm Test this clim Suppose the level of significnce is 1 Solution: : σ 1 Step 1: : σ f1 ( clim) ( n 1) s ( 5 ) 1 (8 ) Step : Find the test sttistic: χ = = = 1536 σ 1 Step 3: Find the criticl vlue: Look t the λ tble for df = 4, α = 1 You will find χ c =33196 Step 4: Mke decision: Fil to reject (since χ p χ c ) Step 5: Wright conclusion: Bsed on this test, we cn not support the clim tht the stndrd devition of the height of RCC students is more thn 1 cm ow do we find the criticl vlues for two-sided test? The criticl vlues re found exctly the sme s section 64 Exmple : Suppose we hve two-tiled test with n = 9, α = 1 Find the criticl vlues df = 9 1 = 8 α 1 First divide α by : = = 5 To find the right criticl vlue look under 5 for α with df = 8, χ (8,5) = 5993 This is nice nottion for this criticl vlue For the left criticl vlue look under 995 for α with the sme df, χ (8,995) = 1461 Note tht the first number inside the prenthesis is the degrees of freedom nd the second number is the re to the right of the criticl vlue Now, for two-sided test the intervl between these two numbers is clled the noncriticl region If the test vlue flls between these numbers, then you cnnot reject the null hypothesis