DOC PREVIEW
ISU STAT 401 - hw04_answers

This preview shows page 1 out of 4 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

STAT$401$–$Homework$4$–$Solutions$$!1. Weight!gain!under!dietary!supplements!!(a) We!begin!by!calculating!the!difference!in!weight!gain!for!each!pair:!Y!=!weight!gain!of!hog!on!treatment!diet!–!weight!gain!of!hog!on!placebo!We!are!interested!in!making!inferences!about:!µ!=!mean!difference!in!weight!gain!for!the!population!of!hogs.!!!Our!test!is!of!!!H0!:!µ!=!0!vs.!Ha!:!µ!>!0!!because!we!are!interested!in!increased!weight!gain!from!the!treatment!diet.!!!The!test!statistic!is!t!=!nsY/0−!=!49.02!,!with!n!–!1!=!5!df!The!pJvalue!<!0.0005!(if!you!used!SAS,!then!this!can!be!calculated!by!taking!half!of!the!2Jsided!pJvalue!in!the!output,!or!!<!0.0001!divided!by!2).!!!There!is!convincing!evidence!that!the!diet!supplement!causes!increases!in!weight!gain.!!Note!that!we!can!use!the!“causal”!statement!because!this!is!a!randomized!experiment.!!(b) Here,!we!treat!the!measurements!as!if!they!were!taken!from!two!unrelated!samples!of!hogs.!!!Outccome!Yij!=!weight!gain!of!hog!j!given!treatment!i!(diet!or!placebo),!with!population!means!μ1!=!mean!weight!gain!for!all!hogs!on!treatment!diet!(i!=!1)!μ2!=!mean!weight!gain!for!all!hogs!on!placebo!diet!(i!=!1)!We!are!interested!in!a!test!of!Ho!:!μ1!–!μ2!=!0!vs.!Ha:!μ1!–!μ2!>!0!!(i.e.,!μ1!>!μ2).!!!The!test!statistic!t!=!0.09!with!df!=!12!–!2!=!10!!The!pJvalue!from!the!table!is!>!0.25.!!!There!is!no!evidence!that!treatment!diet!causes!increases!in!weight!gain.!!(c) Analysis!(a)!is!correct.!!The!design!of!the!study!leads!to!paired!data.!!A!pair!of!siblings!is!used,!with!each!of!them!receiving!a!different!treatment.!!We!do!this!because!we!expect!sibling!hogs!to!experience!similar!weight!gains,!and!it!controls!for!the!variability!in!weight!gain!among!unrelated!hogs!(this!is!a!form!of!blocking,!and!later!in!the!class,!we’ll!see!that!this!is!a!randomized!block!design).!!!!(d) For!(a),!note!all!the!differences!from!pairs!are!nearly!equal!to!1.!!There!is!little!variability!among!the!sibling!in!the!amount!of!weight!gained!due!to!the!treatment.!!This!means!that!the!sample!standard!deviation!s!of!the!paired!differences!is!small,!and!thus!nsYt/0−=!is!large.!!!In!contrast,!for!(b),!a!treatment!group!consists!of!hogs!that!are!not!related,!and!there!is!much!more!variability!among!weights!for!the!unrelated!hogs!than!among!differences!from!the!pairs!in!(a).!!This!makes!the!pooled!sample!variance!large!and!SE)(12yy −!is!large.!!In!other!words,!12YY −is!not!a!precise!estimate!of!µ2!4!µ1!,!and!the!value!of!the!test!statistic!Y2!Y1! 0SE(Y2!Y1)!is!relatively!small.! !! !! !2 SAS!code!for!parts!(a)!and!(b)!for!problem!1.!title 'HW 4 Q1 Hog siblings and weight gain data' ; * Part (a) suggests a paired sample, so we need to calculate the difference and conduct a paired t-test i.e., 1-sample t-test on differences) ; data one; input sibling treatment placebo ; diff = treatment - placebo ; datalines; 1 70.4 69.3 2 38.2 37.2 3 59.7 58.7 4 40.3 39.3 5 93.5 92.5 6 50.7 49.6 ; run; * Method 1: proc ttest on the difference ; proc ttest data=one H0=0 ; var diff ; title2 'part a - paired t-test of difference in weight gain (treatment - placebo)' ; run; * Method 2: proc ttest using the paired statement ; proc ttest data=one H0=0 ; paired treatment*placebo ; title2 'part a - paired t-test of difference in weight gain (treatment - placebo)' ; run; * Part (b) suggests an independent sample, so we wil set up a group variable ; data two ; input sibling weightgain trt $ ; datalines; 1 70.4 treatment 2 38.2 treatment 3 59.7 treatment 4 40.3 treatment 5 93.5 treatment 6 50.7 treatment 1 69.3 placebo 2 37.2 placebo 3 58.7 placebo 4 39.3 placebo 5 92.5 placebo 6 49.6 placebo ; run; proc ttest data=two H0=0 ; class trt ; var weightgain ; title 'part b - independent sample t-test for change in weight gain due to treatment' ; run;3 2.!Marijuana!use!during!pregnancy!=1µ!mean!birth!weight!(in!grams)!for!babies!born!to!users!!!=2µ!mean!birth!weight!(in!grams)!for!babies!born!to!nonusers!!From!the!text,!we!have!10952and ,66.46)(,grams 280211212=−+==−=− nndfYYSEYY.!Note!that!we!would!round!the!standard!error!to!47!(to!the!nearest!unit)!and!thus!we!would!round!the!difference!between!the!means!to!the!nearest!unit,!or!280!g.!!(a) 95%!confidence!interval!for!12µµ−!t1000(.975)!=!1.962!CI!halfJwidth!is!1.962(46.66)!=!!91.55!≈!92!g!95%!confidence!interval!is!(188,!372)!g!!(b) When!we!use!the!(2Jsided)!confidence!interval!to!make!test!inferences,!it!is!a!test!of!!!H0!:!!μ2!!–!μ1!!=!0!!vs.!Ha!:!!μ2!!–!μ1!≠!0.!!(c) The!pJvalue!is!less!than!α!=!0.05,!or!p!<!0.05.!!(d) There!is!at!least!moderate!evidence!of!a!difference!in!the!mean!birth!weight!for!babies!born!to!marijuana!users!and!the!mean!birth!weight!for!babies!born!to!mothers!who!do!not!marijuana!users.!!For!mothers!in!this!sample,!babies!born!to!nonusers!are!an!average!of!280!g!larger!than!babies!born!to!marijuana!users,!with!an!approximate!95%!confidence!interval!of!(188,!372)!g.!!(e) H0!:!!μ2!!–!μ1!!=!0!!vs.!Ha!:!!μ2!!–!μ1!≠!0!!The!test!statistic!is!00.666.46280)(01212==−−−=YYSEYYt!The!pJvalue!is!p!<!0.001!!(Note!that!we!have!a!twoJsided!alternative,!so!our!pJvalue!is!2!times!the!fraction!of!tJratios!larger!than!6.00!using!a!t!distribution!with!1095!df.!!!It!turns!out!that!1095!df!is!not!in!Table!A2,!so!we!use!the!row!with!the!largest!df!!under!1095,!or!df!=!1000.!!!The!largest!value!in!this!row!is!9995.01000t=3.300,!and!the!area!to!the!right!of!3.330!is!1J0.9995!=!0.0005.!!Doubling!this!value!for!the!2Jsided!pJvalue,!we!get!2(0.0005)!=!0.001.)!There!is!convincing!evidence!of!a!difference!in!the!mean!birth!weight!for!babies!born!to!marijuana!users!and!the!mean!birth!weight!for!babies!born!to!mothers!who!do!not!marijuana!users.!!For!mothers!in!this!sample,!babies!born!to!nonusers!are!an!average!of!280!g!larger!than!babies!born!to!marijuana!users,!with!a!standard!error!of!47!g.!(f)


View Full Document

ISU STAT 401 - hw04_answers

Download hw04_answers
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view hw04_answers and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view hw04_answers 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?