Today: Chapter, cofidece iterval for mea Aoucemet Ueful ummary table: Samplig ditributio: p. 353 Cofidece iterval: p. 439 Hypothei tet: p. 534 Homework aiged today ad Wed, due Friday. Fial exam eat aigmet will be et oo. Homework: (Due Fri March 5) Chapter : #30bc, 48, 86*. *Ue R Commader for #86. Data file liked to webite. Both 48 ad 86 cout double, poit each. Chapter Copyright 0 Brook/Cole, Cegage Learig Etimatig Mea with Cofidece Recall: A parameter i a populatio characteritic value i uually ukow. We etimate the parameter uig ample iformatio. Chapter : C.I. for mea A tatitic, or etimate, i a characteritic of a ample. A tatitic etimate a parameter. A cofidece iterval i a iterval of value computed from ample data that i likely to iclude the true populatio value. The cofidece level for a iterval decribe our cofidece i the procedure we ued. We are cofidet that mot of the cofidece iterval we compute uig our procedure will iclude the true populatio value. 3 Copyright 0 Brook/Cole, Cegage Learig, updated by J. Utt, March 03 4 Recall from Chapter 0 A cofidece iterval or iterval etimate for ay of the five parameter ca be expreed a Sample etimate ± multiplier tadard error where the multiplier i a umber baed o the cofidece level deired ad determied from the tadard ormal (z) ditributio (for proportio) or Studet t-ditributio (for mea). Sample etimate = ample tatitic. 5 Three Etimatio Situatio Ivolvig Mea Situatio. Mea of a quatitative variable. Example: What i the mea umber of facebook fried UCI tudet have (for thoe o facebook)? What i the mea umber of word a -year old kow? Populatio parameter: (pelled mu ad proouced mew ) = populatio mea for the variable Sample etimate: x = ample mea for the variable, baed o a ample of ize. 6
Etimatig the Populatio Mea of Paired Differece Situatio. Data meaured i pair, take differece, etimate the mea of the populatio of differece: What i the mea differece i blood preure before ad after learig meditatio? (d i = differece for pero i) What i the mea differece i hour/day pet tudyig ad pet watchig televiio for college tudet? Populatio parameter: d (called mu d) Sample etimate: d = the ample mea for the differece, baed o a ample of pair, where the differece i computed for each pair. Differece i two mea Situatio 3. Etimatig the differece betwee two populatio mea for idepedet ample Example: How much differece i there i the mea of what male tudet ad female tudet expect to ear a a tartig alary after graduatio? (Quetio o 0 cla urvey.) How much differece i there i the mea IQ for childre whoe mom moked ad did t durig pregacy? Populatio parameter: = differece betwee the two populatio mea Sample etimate: x x = differece betwee the two ample mea Thi require idepedet ample 7 8 Recall from Chapter 0 A cofidece iterval or iterval etimate for ay of the five parameter ca be expreed a Sample etimate ± multiplier tadard error Stadard error (i geeral) Rough Defiitio: The tadard error of a ample tatitic meaure, roughly, the average differece betwee the tatitic ad the populatio parameter. Thi average differece i over all poible radom ample of a give ize that ca be take from the populatio. Techical Defiitio: The tadard error of a ample tatitic i the etimated tadard deviatio of the amplig ditributio for the tatitic. 9 0 Situatio : Stadard Error of the Mea d.( x ) = I practice: We do t kow o we etimate it uig Replacig with i the tadard deviatio expreio give u a etimate that i called the tadard error of x. x ) = Chapter 9 weight lo example: 5 = 5 weight loe, σ = 5; d..( x) = poud 5 Suppoe ample tadard deviatio i = 4.74 poud So the tadard error of the mea i 4.74/5 = 0.948 poud Icreaig the Size of the Sample Suppoe we take = 00 weight loe itead of jut 5. The tadard deviatio of the mea would be 5 d.( x ) = 0. 5 poud 00 For ample of = 5, ample mea are likely to rage betwee 8 ± 3 poud => 5 to poud For ample of = 00, ample mea are likely to rage oly betwee 8 ±.5 poud => 6.5 to 9.5 poud Larger ample ted to reult i more accurate etimate of populatio value tha maller ample
Stadard Error of a Sample Mea x), ample tadard deviatio Example: Mea umber of Facebook fried Cla Survey, Witer 0: Oly thoe o Facebook. About how may Facebook fried do you have? Miitab provide e., R Commader doe t, but provide Statitic Summarie Numerical ummarie, check Stadard Deviatio Miitab for the example: Variable N Mea Media StDev SE Mea Facebook 57 46.0 404.0 30. 8.8 30. e.. x 8.8 57 3 Situatio : Stadard Error of the mea of paired differece d d ) where d = ample tadard deviatio for the differece Example: How much taller (or horter) are daughter tha their mother thee day? d = 3.4 (for idividual) = 93 pair (daughter mother) d =.3 iche d 3.4 d. 33 e. 93 4 Situatio 3: Stadard Error of the Differece Betwee Two Sample Mea (upooled) x x) Example.3 Loe More Weight by Diet or Exercie? Study: = 4 me o diet, = 47 me o exercie routie Diet: Lot a average of 7. kg with td dev of 3.7 kg Exercie: Lot a average of 4.0 kg with td dev of 3.9 kg So, x x 7. 4.0 3. kg 3.7 3.9 ad x x) 4 47 0.8 Recall from Chapter 0 A cofidece iterval or iterval etimate for ay of the five parameter ca be expreed a Sample etimate ± multiplier tadard error The multiplier i a umber baed o the cofidece level deired ad determied from the tadard ormal ditributio (for proportio) or Studet t- ditributio (for mea). 5 6 Studet t-ditributio: Replacig with Dilemma: we geerally do t kow. Uig we have: x x ( x ) t x) / If the ample ize i mall, thi tadardized tatitic will ot have a N(0,) ditributio but rather a t-ditributio with degree of freedom (df). NOTE: Ue t* for all 3 ituatio ivolvig mea, but Fidig the t-multiplier Excel: See page 4. R Commader: Ditributio Cotiuou ditributio t ditributio t quatile Example: 95% CI for mea whe = 0 Probabilitie: α/ (for 95%, ue.05) Degree of freedom ( = 0, o df = 9) Lower tail Give egative of the t-multiplier Ex:.05, 9, lower tail.657, multiplier.6 Table A. (ee page 4 for itructio) Table A. i o page 670 or tur page iide back cover (eay to ue compared to z!) differet df formula for two idepedet ample 7 8 3
Example: df = 9 95% cofidece t* =.6 Cofidece Iterval for Oe Mea or Paired Data A Cofidece Iterval for a Populatio Mea * * x t e.. x x t where the multiplier t* i the value i a t-ditributio with degree of freedom = df = - uch that the area betwee -t* ad t* equal the deired cofidece level. (Foud from Excel, R Commader or Table A..) Coditio: Populatio of meauremet i bell-haped (o major kewe or outlier) ad r. of ay ize > ; OR Populatio of meauremet i ot bell-haped, but a large radom ample i meaured, 30. etc 9 0 95% C.I. for Mea Aticipated Startig Salary Data from 0 urvey, what do you expect your tartig alary to be after you graduate? (or after grad/prof chool?) = 44 (Some outlier at $00K, $50K, $500K) Sample mea = $63,075 Sample tadard deviatio = $46,607 46,607 Stadard error of the mea = 44,984 Multiplier = t* with df of 00 =.98 (cloet i Table A.) Sample etimate ± multiplier tadard error 63,075 ±.98 984 63,075 ± 5908 $57,67 to $68,983 C.I. for ome other urvey Q Variable N Mea StDev SE Mea 95% CI Facebook 57 46.0 30. 8.8 (45.0, 499.0) Icome00 60 353 797 446 ( 65, 440) StudetLoa 4 759 33973 84 (37, 83) HourStudy 64 5.36 4.03 0.59 (4.85, 5.87) Note the extremely large tadard deviatio for all of thee. Obviouly they are ot bell-haped variable! Example: Hitogram for tudy hour Frequecy Hitogram of HourStudy 00 80 60 40 0 0 6 8 4 30 36 HourStudy 3 Paired Data Cofidece Iterval Data: two variable for idividual or pair; ue the differece d = x x. Populatio parameter: d = mea of differece for the populatio (ame a ). Sample etimate: d = ample mea of the differece Stadard deviatio ad tadard error: d = tadard deviatio of the ample of differece; d e. d Cofidece iterval for d : d t * e. d, where df = for the multiplier t*. 4 4
Fid 90% C.I. for differece: (daughter mother) height differece How much taller (or horter) are daughter tha their mother thee day? = 93 pair (daughter mother), d =.3 iche d = 3.4 iche, o d 3.4 e. d. 33 93 Multiplier = t* with 9 df for 90% C.I. =.66 (ue df=90) Sample etimate ± multiplier tadard error.3 ±.66 0.33.3 ± 0.55 0.75 to.85 iche (doe ot cover 0) Cofidece iterval iterpretatio We are 95% cofidet that the mea tudy hour per week for Stat 7, for all tudet over all time (who would complete a urvey??) i betwee 4.85 ad 5.87 hour We are 90% cofidet that the mea height differece betwee female college tudet ad their mother i betwee 0.75 ad.85 iche, with tudet beig taller tha their mother 5 6 Example: Small ample, o check for outlier Data: Hour pet tudyig for thoe tudet who atted cla 0 or time a week; = 0 tudet Create a 95% CI for tudy hour for tudet who do t atted cla Small, o check for kewe ad outlier HourStudy 6 5 4 3 Boxplot of HourStudy Note: Boxplot how o obviou kewe ad o outlier 7 Example, cotiued (tudy hour) Reult:.89 x 3.7,.89, ad e.. x 0.60 0 Multiplier t* from Table A. with df = 9 i t* =.6 95% Cofidece Iterval: 3.7.6(0.6) => 3.7.36 =>.34 to 5.06 hour Iterpretatio: We are 95% cofidet that the mea of the tudy hour per week for Stat 7 for tudet who do t atted cla (ad are repreeted by thi ample) i covered by the iterval from.34 to 5.06 hour per week. (Compare to 95% C.I. for everyoe, 4.85 to 5.87 hour) 8.4 CI for Differece Betwee Two Mea (Idepedet ample) A CI for the Differece Betwee Two Mea (Idepedet Sample, upooled cae): * x x t where t* i the value i a t-ditributio with area betwee -t* ad t* equal to the deired cofidece level. Neceary Coditio Two ample mut be idepedet. Either Populatio of meauremet both bell-haped, ad radom ample of ay ize are meaured. or Large ( 30) radom ample are meaured. 9 30 5
Degree of Freedom The t-ditributio i oly approximately correct ad df formula i complicated (Welch approx): Statitical oftware ca ue the above approximatio, but if doe by had the ue a coervative df = maller of ( ) ad ( ). 3 Example: Aticipated Startig Salary for Me/Wome Two-ample T for StartSalary (Miitab output) Group N Mea StDev SE Mea Me 87 69356 44937 488 Wome 56 5677 3485 5 Differece = mu (Me) - mu (Wome) Etimate for differece: 585, df = 33 95% CI for differece: (830, 3340) (44937) (3485) x x t,585.98 87 56 * Iterpretatio: We are 95% certai that the mea aticipated tartig alary for me i betwee $830 ad $3,340 higher the the mea aticipated tartig alary for wome, for the populatio of tudet repreeted by thi 3 ample. Approximate 95% CI For ufficietly large ample, the iterval Sample etimate Stadard error i a approximate 95% cofidece iterval for a populatio parameter. Note: Except for very mall degree of freedom, the multiplier t* for 95% cofidece iterval i cloe to. So, i ofte ued to approximate, rather tha fidig degree of freedom. For itace, for 95% C.I.: t*(30) =.04, t*(60) =.00, t*(90) =.99, t*( ) = z* =.96 33 Example.3 Diet v Exercie Study: = 4 me o diet, = 47 me exercie Diet: Lot a average of 7. kg with td dev of 3.7 kg Exercie: Lot a average of 4.0 kg with td dev of 3.9 kg So, x x 7. 4.0 3. kg ad x x) Approximate 95% Cofidece Iterval: 3. (.8) => 3..6 =>.58 to 4.8 kg 0.8kg Note: We are 95% cofidet the iterval.58 to 4.8 kg cover the additioal mea weight lo for dieter compared to thoe who exercied. The iterval doe ot cover 0, o a real differece i likely to hold for the populatio a well. 34 Uig R Commader Doe tet ad C.I. i ame tep Read i or eter data et Statitic Mea Sigle ample t-tet Idepedet ample t-tet (require data i oe colum, ad group code i aother) Paired t-tet (require the origial data i two eparate colum) Example: Compare tudy hour for thoe who drik ad thoe who do t Data New data et give ame, eter data Oe colum for Drik or Do t drik, oe for Study hour Statitic Mea Idepedet ample t-tet Chooe the alterative (, >, <) ad cofidece level Welch Two Sample t-tet data: HourStudy by Drik t =.993, df = 70.556, p-value = 0.050 alterative hypothei: true differece i mea i ot equal to 0 95 percet cofidece iterval: -0.0065343 3.45080754 ample etimate: mea i group Do't drik mea i group Drik 6.500000 4.775735 35 36 6
Should check for outlier if mall ample() Graph Boxplot Plot by Group Thee are large ample, fortuately, becaue very kewed! But till look like thoe who drik have fewer tudy hour Cofidece iterval applet: Illutrate the ame cocept a the had-o team project lat Friday. http://www.romachace.com/applet/cofim/cofim.html http://www.romachace.com/applet/newcofim/cofim.html 37 7