×

### Let's log you in.

or

Don't have a StudySoup account? Create one here!

×

or

by: Orpha Swift

19

0

0

# EnvironmentalStatistics STA671

Marketplace > Miami University > Statistics > STA671 > EnvironmentalStatistics
Orpha Swift
MU
GPA 3.82

Staff

These notes were just uploaded, and will be ready to view shortly.

Either way, we'll remind you when they're ready :)

Get a free preview of these Notes, just enter your email below.

×
Unlock Preview

COURSE
PROF.
Staff
TYPE
Class Notes
PAGES
0
WORDS
KARMA
25 ?

## Popular in Statistics

This 0 page Class Notes was uploaded by Orpha Swift on Sunday November 1, 2015. The Class Notes belongs to STA671 at Miami University taught by Staff in Fall. Since its upload, it has received 19 views. For similar materials see /class/233369/sta671-miami-university in Statistics at Miami University.

×

## Reviews for EnvironmentalStatistics

×

×

### What is Karma?

#### You can buy or earn more Karma at anytime and redeem it for class notes, study guides, flashcards, and more!

Date Created: 11/01/15
sta 671 ch6 notes R 14novO6doc Example 63 effectiveness of treatments for tapeworm drug lt scan 18 43 28 5O 16 32 13 35 38 33 6 7 untrt lt scan 40 54 26 63 21 37 39 23 48 58 28 39 groups lt repcquotDquotquotUquot clengthdrug lengthuntrt numbertapeworms lt cdrug untrt storing vectors with group labels and number of tapeworms x6p3df lt dataframeGroupsgroups Ntapewormsnumbertapeworms Ntapeworms see what happens before and after attaching the datafram ex6p3df print out of data frame Groups Ntapeworms 1 D 18 2 D 43 3 D 28 4 D 50 5 D 16 6 D 32 7 D 13 8 D 35 9 D 38 10 D 33 11 D 6 12 D 7 13 U 40 14 U 54 15 U 26 16 U 63 17 U 21 18 U 37 19 U 39 20 U 23 21 U 48 22 U 58 23 U 28 24 U 39 Ntapeworms attaohex6p3df byNtapeworms Groups mean INDICES 1 2658333 INDICES U 1 3966667 byNtapeworms Groups summary INDICES D Min lst Qu Median Mean 3rd Qu Max 600 1525 3000 2658 3575 5000 INDICES U Min lst Qu Median Mean 3rd Qu Max 2100 2750 3900 3967 4950 6300 byNtapeworms Groups sd INDICES D l 1436193 INDICES U 1 1385859 plots NORMAL QUANTILE PLOTS parmfrowo2l qqnormdrug qqnormuntrt parmfrowo22 BARPLOTS attachlex plni lt 2221mm c11212n Ntapewom mp X11mDLD5 251 xm m 21 1119 m L Drum nueated w w egment l75 u 75 memmmgn egment l75 gummy 125 memmmgn 29 1125 meanldxung 125 m 175 n 175 Newman 175 meahluntx r 225 Newman 22 m mum 225 m gment gment gment egment1meanldxugr 1 memmugw ammgn x dxvxde 1211 by mm 12 to get 5 egment2 gammy 2 meanlunbrt mmuw 4 5 NumhzralTapEwarms 3 2a Dmg Unneamd 1 50x17st boxplotLplxtl tapewoxm GrouPEH wwwcapmm EactOxLGxuuPEH 4 2 D u mama m212n pew mp X11mDLD5 251 xaxt Ylab spewom nut We 515mm mm mm plotted n treatment 357 m med hazxzontany w pummnmmmpw leaps my axx ly a 121 1352 Drug nueated w w egmem75 Emmy 125 meandeug 1mm egment75 mesmmcm 225 Newman MM 351 5 Tapeworm mum planed vs quoteminent 4 Numnmnapewms an Drug Unnamed memnnerea hanzomaHy x msmem paner Wmwa mnmmgaenmfmm LBJDH h1tuntxtyden1 y4 x1mr1Dy7 Y Hmngvam at drug Elt D f V V Y Y V V a m an 30 40 so so 70 mug Hlsmgvamnfunm lt E x Eumlms a the m am ec plotted q lotldmgy mm x1mcw7m ylxmzcl ablxnelazumz E 7 a M a m 20 ea 40 so 60 70 1mg twogxuup x x Titet in mean equaGCy m x mm m nun x nu mu mu an an mu mu dxiiexence a 1nexet x x TEST smusmc x 3um1ng Equal names um I Yb 7 ybaxz Bu 1 kw qutLJn Jnzyl x 3um1ng hem nance x um I Yb 7 ybaxz an 1 mnzn x qxtL2n ttetldxugr mm altematxv M sample been data drug and mm t 22709 df 22 p value 001665 alternative hypothesis true difference in means is less than 0 95 percent confidence interval Inf 3l90165 sample estimates mean of x mean of y 2658333 3966667 ttestdrug untrt alternativequotlessquotvarequalFALSE Welch Two Sample t test data drug and untrt t 22709 df 21972 p value 001665 alternative hypothesis true difference in means is less than 0 95 percent confidence interval Inf 31896l3 sample estimates mean of x mean of y 2658333 3966667 to get a confidence interval for quotmul mu2quot ttestdrug untrtvarequalFALSE Welch Two Sample t test data drug and untrt t 22709 df 21972 p value 003331 alternative hypothesis true difference in means is not equal to 0 95 percent confidence interval 25032642 ll34025 sample estimates mean of x mean of y 2658333 3966667 ttestdrug untrtvarequalTRUE Two Sample t test data drug and untrt t 22709 df 22 p value 003329 alternative hypothesis true difference in means is not equal to 0 95 percent confidence interval 25031761 1134906 sample estimates mean of x mean of 2658333 3966667 the equal variance t test can also be conducted using the quotlmquot procedure which generalizes to more than two groups summarylmNtapeworms Groups dataex6p3df Call lmformula Ntapeworms Groups data ex6p3df Residuals Min 1Q Median 3Q Max 205833 121458 O1667 91667 234167 Coefficients Estimate Std Error t value Prgtt Intercept 26583 4074 6525 146e O6 GroupsU 13083 5761 2271 00333 Signif codes 0 0001 001 005 01 1 Residual standard error 1411 on 22 degrees of freedom Multiple R Squared 01899 Adjusted R squared 01531 F statistic 5157 on 1 and 22 DF p value 003329 what if you wanted to do a transformation before calculating the t test ttestsqrtdrug sqrtuntrt alternativequotlessquotvarequalFALSE Welch Two Sample t test data sqrtdrug and sqrtuntrt t 23216 df 20106 p value 001544 alternative hypothesis true difference in means is less than 0 95 percent confidence interval Inf 03248222 sample estimates mean of x mean of 4945446 6207995 Nonparametric tests of median equality can be calculated using wilcoxontest wilcoxtestdrug untrt alternativequotlessquot Wilcoxon rank sum test with continuity correction data drug and untrt W 375 p value 002477 alternative hypothesis true mu is less than 0 Warning message cannot compute exact p value with ties in wilcoxtestdefaultdrug untrt alternative quotlessquot wilcoxtestsqrtdrug sqrtuntrt alternativequotlessquot Wilcoxon rank sum test with continuity correction data sqrtdrug and sqrtuntrt W 375 p value 002477 alternative hypothesis true mu is less than 0 Warning message cannot compute exact p value with ties in wilcoxtestdefaultsqrtdrug sqrtuntrt alternative quotlessquot sta 671 ch8 10 11 notes R 18nov06doc Ex 81 phosphorous in leaves from 3 varieties of trees p 389 2 2 ANOVA TEST HO mu1 mu2 mu3 Ha at least two means differ Ts Fobs MSBetweenMSWithin Pvalue PrFg 1 n g gt Fobs entering the data quotn phosphor lt scan 35 40 58 50 47 65 7 9 84 79 6 8 75 73 66 variety lt repc123 c555 ex8p1df lt dataframePphosphorVarietyfactorvariety attachex8p1df generating numeric summary statistics for the three varieties byPVarietyfunctionx cmeanxvarxsdx lNDlCES 1 1 046000000 000795000 008916277 lNDlCES 2 1 07760000 00103300 01016366 lNDlCES 3 1 070800000 000617000 007854935 fitting an anova model m aov8p1lt lmPVariety anovaaov8p1 Analysis of Variance Table Respanse p n Sum Sr Mean Sr r Value mm Vanety 2 n27554 mam 15972 uuuu3175 m Reslduals 12 uu97au mums Slgmf nudes u ww uou ww mu m ms u r 1 w 5 plans 5 plum Vanecyynmcmn xabquotTxee Vanecyquoty1ab quotPhasphaxaus cancenm M m Phusphamuscunlznl n4 1 a n2 Tvee Vanely may asnumexCLVaxeEYYthm mum xlab quotnee Vanecyquoty1ab Phasphaxaus Eanrenrquotxlm cm41xaxcquotnquotw 1231abelscquot1quotquot2quotquot3quotYY r cl467767u81 segmencsmms xbaxSUL 125 xbaxSU de21 segmentsUJS xbaxs2r 225 m segmentslz s xbaxs3r 325 m 2quot121 L E o 8 a g a a i 2 WWW Zines in testing anpaxclans w w w w w an p p173 5 5 TEST 57mm 5 253 plhac 7 rain 1 sum Pliu lrpLUIn w w w 5 Example m4 Lp 4751 r nJSEI spa 5 ca 5 EU n 15D Spaxcs cm sued nspecman w Reseaxch hypaches maze than an all 5 Ha p gt au proptestx60nl50p30alternativequotgreaterquot l sample proportions test with continuity correction data 60 out of l50 null probability 03 X squared 66746 df l p value 000489 alternative hypothesis true p is greater than 03 95 percent confidence interval 03333552 l0000000 sample estimates p 04 CI for pi proptestx60 nl50 l sample proportions test with continuity correction data 60 out of l50 null probability 05 X squared 56067 df l p value 00l789 alternative hypothesis true p is not equal to 05 95 percent confidence interval 032l8997 04833039 sample estimates p 04 H0 pil pi2 TEST STATISTIC zstat pilhat 7 pi2hat sqrtpilhat l pilhatnl pi2hat l pi2hatn2 Example l06 7 p 485 1 number pass out of number in study npass lt c94 ll3 ntotal lt cl25 l75 proptestxnpass nntotal alternativequotgreaterquot 2 sample test for equality of proportions with continuity correction data npass out of ntotal X squared 3370l df l p value 003320 alternative hypothesis greater 95 percent confidence interval 00l240338 l00000000 sample estimates prop l prop 2 07520000 06457l43 CI for pil pi2 proptestxnpass nntotal 2 sample test for equality of proportions with continuity correction data npass out of ntotal X squared 3370l df l p value 006639 alternative hypothesis twosided 95 percent confidence interval 0004268342 02l683977l sample estimates prop l prop 2 07520000 06457l43 0L text presents the NON continuity corrected version of the proportion and confidence interval proptestxnpass nntotal correctFALSE 2 sample test for equality of proportions Without continuity correction data npass out of ntotal X squared 38509 df l p value 004972 alternative hypothesis twosided 95 percent confidence interval 000258880l 0209982628 sample estimates prop l prop 2 07520000 06457l43 Testing for independence between two c1assification factors H0 two factors are independent Ha two factors are dependent X2 sum O EA2 E ex10p14 lt scanwhat1istpolicy0states count0 1 oilgas 50 1 coal 59 1 other 161 2 oilgas 88 2 coal 20 2 other 40 3 oilgas 56 3 coal 52 3 other 188 4 oilgas 4 4 coal 3 4 other 5 5 oilgas 2 5 coal 66 5 other 6 ex10p14 attachex10p14 matrixcountnrow5byrowT 1 2 3 1 50 59 161 2 88 20 40 3 56 52 188 4 4 3 5 5 1 2 66 6 chisqtestmatrixcountnrow5byrowT Pearson39s Chi squared test data matrixcount nrow 5 byrow T X squared 2892229 df 8 p Va1ue lt 22e 16 Warning message Chi squared approximation may be incorrect in chisqtestmatrixcount nrow 5 byrow T as an alternative to X2 chisqtestmatrixcountnrow5byrowT simulatepva1ue T Pearson39s Chi squared test with simulated p Va1ue based on 2000 rep1icates data matrixcount nrow 5 byrow T X squared 2892229 df NA p Va1ue 00004998 Example 1015 p 513 0514741352byrowTnrow4 l 9 5 4 2 ex10p15mat lt matrixc589810514741352byrowTnrow4 ex10p15mat 1 2 3 5 l 1 9 2 8 10 5 3 14 7 4 4 13 5 2 cnisgtestex10p15mat Pearson39s Chi squared test data ex10p15mat X sguared 121104 df 6 p Value 005955 Warning message Chi squared approximation may be incorrect in cnisgtestex10p15mat Linear Regression Example 114 yabsencesper100workers lt scan 315 331 274 245 27 278 233 247 169 181 xexperiencemos lt scan 181 20 208 215 22 224 229 24 254 273 fit least squares regression line lmfit lt lmyabsencesper100workers N xexperiencemos common hypothesis test of interest here m Model Y beta0 beta1x epsilon H0 beta1 0 Ha beta1 NE 0 TS tstat b1SEb1 compare to t distribution with appropriate DF summary1mfit compare to p 548 Ca11 1mformu1a yabsencesper100workers N xexperiencemos Residuals Min 1Q Median 3Q Max 335372 147105 004869 179075 340307 Coefficients Estimate Std Error t va1ue Prgtt Intercept 646718 67621 9564 118e 05 xexperiencemos 17487 02995 5840 0000387 Signif codes 0 0001 001 005 01 1 Residua1 standard error 2388 on 8 degrees of freedom Mu1tip1e R Squared 081 Adjusted R squared 07862 F statistic 341 on 1 and 8 DP p Va1ue 00003873 scatterplot of the data a1ong with the fitted regression 1ine superimposed p1otxexperiencemos yabsencesper100workers x1 ab quot Experience monthsquot y1 ab quotAbsences per 100 workersquot ab1ine1mfit mm mm a 925 331324 24 22 Expenence manm

×

×

### BOOM! Enjoy Your Free Notes!

×

Looks like you've already subscribed to StudySoup, you won't need to purchase another subscription to get this material. To access this material simply click 'View Full Document'

## Why people love StudySoup

Jim McGreen Ohio University

#### "Knowing I can count on the Elite Notetaker in my class allows me to focus on what the professor is saying instead of just scribbling notes the whole time and falling behind."

Amaris Trozzo George Washington University

#### "I made \$350 in just two days after posting my first study guide."

Jim McGreen Ohio University

Forbes

#### "Their 'Elite Notetakers' are making over \$1,200/month in sales by creating high quality content that helps their classmates in a time of need."

Become an Elite Notetaker and start selling your notes online!
×

### Refund Policy

#### STUDYSOUP CANCELLATION POLICY

All subscriptions to StudySoup are paid in full at the time of subscribing. To change your credit card information or to cancel your subscription, go to "Edit Settings". All credit card information will be available there. If you should decide to cancel your subscription, it will continue to be valid until the next payment period, as all payments for the current period were made in advance. For special circumstances, please email support@studysoup.com

#### STUDYSOUP REFUND POLICY

StudySoup has more than 1 million course-specific study resources to help students study smarter. If you’re having trouble finding what you’re looking for, our customer support team can help you find what you need! Feel free to contact them here: support@studysoup.com

Recurring Subscriptions: If you have canceled your recurring subscription on the day of renewal and have not downloaded any documents, you may request a refund by submitting an email to support@studysoup.com