4 Pages

RcodeTwoPopTtest

Course: STAT 5302, Fall 2008
School: Texas Tech
Rating:
 
 
 
 
 

Word Count: 373

Document Preview

R ############# code for variation on problem 6.38, Ott & Longnecker (5th ed.) ### Comparing two populations via two sample & paired t-tests ############################################################################### # load package "car" (needed by qq.plot) library(car) # Data: lung capacity of 12 mice (x1=no ozone) vs. 12 mice (x2=ozone)...

Register Now

Unformatted Document Excerpt

Coursehero >> Texas >> Texas Tech >> STAT 5302

Course Hero has millions of student submitted documents similar to the one
below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.

Course Hero has millions of student submitted documents similar to the one below including study guides, practice problems, reference materials, practice exams, textbook help and tutor support.
R ############# code for variation on problem 6.38, Ott & Longnecker (5th ed.) ### Comparing two populations via two sample & paired t-tests ############################################################################### # load package "car" (needed by qq.plot) library(car) # Data: lung capacity of 12 mice (x1=no ozone) vs. 12 mice (x2=ozone) x1<-c(8.7,7.9,8.3,8.4,9.2,9.1,8.2,8.1,8.9,8.2,8.9,7.5) x2<-c(9.4,9.8,9.9,10.3,8.9,8.8,9.8,8.2,9.4,9.9,12.2,9.3) # side-by-side boxplots boxplot(x1,x2,names=c("no-ozone","ozone"),main="Lung Capacity") # first test for equal variances (parametric & nonparametric) var.test(x1, x2, ratio = 1, alternative ="two.sided") # parametric fligner.test(x1, x2) # non-par # two-sample t-test for Ha: mu_1<mu_2, assuming unequal variances t.test(x1, x2, alternative = "less", mu = 0, paired = FALSE, var.equal = FALSE) # corresponding Wilcoxon rank sum test: wilcox.test(x1, x2, alternative = "less", mu = 0, paired = FALSE) # paired t-test for Ha: mu_1<mu_2: t.test(x1, x2, alternative = "less", mu = 0, paired = TRUE) # corresponding Wilcoxon signed rank test: wilcox.test(x1, x2, alternative = "less", mu = 0, paired = TRUE) # check normality via qq-plot qqnorm(x1-x2); qqline(x1-x2) # test x1 for normality shapiro.test(x1) ks.test(x1, mean(x1), "pnorm", var(x1)^.5) # power power.t.test(n=12, delta=1, sd=1, sig.level=0.05, power = NULL, type="paired", alternative="one.sided") ### Some quantile plots to check distribution assumptions # simulate 100 values from N(0,1) & do qq-plot, pts should fall close # to a straight line through origin of slope 1: y <- rnorm(100, mean=0, sd=1) qqnorm(y); abline(0,1,col=2) # do qq-plot for x1: par(mfrow=c(3,4)) qqnorm(x1); qqline(x1) # simulate 11 data sets of n=12 from N(mean(x1),var(x1)^.5), and # do qq-plot to see how much variation can be expected when n=12: for (i in 1:11){ y <- rnorm(12, mean=mean(x1), sd=var(x1)^.5) qqnorm(y); qqline(y) } # Beware, other distributions such as a t, can also look normal: par(mfrow=c(2,3)) for (i in 1:6){ y <- ...

Find millions of documents on Course Hero - Study Guides, Lecture Notes, Reference Materials, Practice Exams and more. Course Hero has millions of course specific materials providing students with the best way to expand their education.

Below is a small sample set of documents:

Texas Tech - MATH - 5365
Math 5365-002 Spring 2002 Time &amp; Place: 9:00 9:50 in Math 113 Instructor: Dr. James G. Surles Phone: 742-1462 (office). If I am not in, please leave a message for me at the mathematics office at 742-2566. Mailbox: 37 Math Email: surles@math.ttu.edu
Eckerd - AH - 321
Betsy VanderVoort Eric Eliseo AH 321 Dr. Gliem Study Guide Manipulating Forms, Materials, and Processes (Robertson McDaniel 205) -Use of certain physical materials can signal religious or spiritual content Example materials such as gold or jewels ca
Eckerd - AH - 321
Jonathan Bonner Heather WolfeStudy Guide David Salle &amp; Jeffrey Shaw &quot;Language Makes Meaning&quot; o Text is used in paintings as a way to &quot;communicate meanings that are difficult to express in images alone&quot; (Robertson &amp; McDaniel, 171) o Association with
Eckerd - MS - 257
TIMED WRITING EXAMEARTH MATERIALS PROF. LAURA WETZEL Your first exam will include a timed writing component, which you may consider using in your Writing Portfolio. I will provide some questions before the exam so that you may prepare in advance. Y
Eckerd - ES - 351
ES351EInfluential Environmental Writers Fall 2007Tuesday/Thursday 8:30 9:50 am Professor Kent &quot;Kip&quot; Curtis Office: SHB 109 (Mailbox in Letters Collegium) Office Hours: Mon/Wed 9-11am; Tues/Thurs 10-11am; Tues 7-10pm (Library); Thurs 1-2pm Phone:
Eckerd - MS - 189
MARINE INVERTEBRATE BIOLOGY FALL 2007 Professor Nancy F. Smith Required Readings Date Topic
Eckerd - WH - 181
Western Heritage in a Global Context (WH 181-020)Mondays, Wednesdays and Fridays, 9:30-10:35 pm, BR 103 Eckerd College, Fall, 2007 Professor: Greg Moore Office: Franklin Templeton 238 (on outside balcony) Tel: x8308; Email: mooregj@eckerd.edu Office
Eckerd - MN - 260
MN 260M STATISTICS FOR MANAGEMENT AND ECONOMICS FALL 2008 INSTRUCTOR: Dr. Edward T. Grasso grasso@eckerd.edu OFFICE: FO 121, EXT. 8433 TEXT: STATISTICS FOR BUSINESS AND ECONOMICS, by Anderson, Sweeney and Williams 10th Edition. OBJECTIVES: The object
Texas Tech - BA - 7342
Lecture 7: Principal component analysis (PCA)qqqRationale and use of PCA The underlying model (what is a principal component anyway?) Eigenvectors and eigenvalues of the sample covariance matrix revisited!qqqqPCA scores and loadings
Texas Tech - ISQS - 6337
Lecture 09 Applet and Advanced GUIJaeki SongApplet Applets run within the Web browser environment Applets bring dynamic interaction and live animation to an otherwise static HTML page Java is used not only as applets, but also as standalone ap
Texas Tech - ISQS - 6337
Jerry S. Rawls College of Business Administration Area of ISQSJaeki Song, Ph.D. Box 42101 Lubbock, TX, 79409-2101 PH: 806 784 0435 jsong@ba.ttu.eduTexas Tech University Jerry S. Rawls College of Business Administration1. Course Information: Titl
Texas Tech - BA - 6337
Spring 2004 ISQS 6337 Exam 11. Explain the difference between: BankAccount b; and BankAccount b = new BankAccount(5000); (5)2. Write a method that takes in an array of integers (as int's) and returns the smallest in the group. (15)3. What method
Texas Tech - BA - 6337
Name: _ SSN:_F2000 ISQS 6337 Exam 2Please remember that neatness counts, if I cannot easily read it I will not try! Do not do any more than I ask! If you try to create entire programs and user interfaces you WILL NOT FINISH! 1. Provide brief expl
Texas Tech - BA - 6337
ISQS 6337 F00 Exam 110/5/00 KEYPlease follow all class style guidelines. Hungarian notation, indention, neatness of code, simple comments, correct data type definitions and output formatting will all count. You do not need to worry about the prog
Texas Tech - BAM - 598
Chapter 8: IS Controls: Part 2SYSTEMS RELIABILITY PROCESSING INTEGRITYCONFIDENTIALITYSECURITYAVAILABILITYPRIVACYPROCESSING INTEGRITY Five categories of integrity controls are designed to meet the preceding objectives: Source data control
Eckerd - CM - 101
CM 101 Intro to Communication Theory Communication as Process Model Berlo (1960) was among the first to posit communication as a process consisting of mutually interdependent elements. Paralleling the developments in the physical sciences in the
Texas Tech - RHIM - 2210
[^#9F0C7FEA4D59097ECAEFA5937F12A250ED59DF5BA691144A13758E59C834542D#V# #2'SjjZNfB#| &amp;SWW/e#x#s\}#YO#@#xxH#s#}c#j0aW*g#I~# B#&gt;|#IV]&quot;y #z`#3g#j [&amp;T#F#P#z$I ];#P0k#D?##s?#$CK}4R!*J#C#' _#XLU#j Be.#aM)#S5NvDB]&quot;#axE#ZVE#Y\20%[nrd&lt;Lc_Kw#9#$#&quot;t#_&gt;U{ szy.
University of San Francisco - CS - 110
FunctionsFunctions A set of statements (lines of code) that can be run repeatedly Goals: Learning Python by Lutz and Ascher Code reuse Procedural decompositionTop-Down Design 1. 2. 3. 4. Break problem into subproblems Print HIHO in block l
University of San Francisco - CS - 110
ArraysExample Write a program to keep track of all students' scores on exam 1. Need a list of everyone's score Declare 14 double variables? What about next semester?Arrays Declare a list of variables all with the same type Size is determin
University of San Francisco - CS - 112
InterfacesInterfaces Generally, interface describes public members of a class Java interface allows programmer to specify method signatures for reusability An interface cannot be instantiated A class that implements and interface must implement
University of San Francisco - CS - 345
Programming Languages Lisp Implementation ProjectDue Wednesday, November 14th, 2001 5:00 p.m.Implementing LispFor this assignment you are going to implement a piece of a lisp interpreter - the memory management system. You will write code that ma
Texas Tech - HIST - 2300
History 2300: U.S. History, to 1877 Dr. Barbara Hahn Texas Tech UniversityLecture Outline 17: Westward ExpansionTHESIS: Westward expansion worsened the emerging divide between North and South. I. II. III. IV. Remember: The History of the Issue Man
Texas Tech - HIST - 2300
History 2300: U.S. History, to 1877 Dr. Barbara Hahn Texas Tech UniversityLecture Outline 27: C.S.A.: The Confederate States of AmericaTHESIS: The Confederacy never escaped its war for independence, but nonetheless its processes of nation-building
Texas Tech - MKT - 5361
Competi tor Ana l ysi s a nd Sour ces of Adva nta ge pter Si x ChaCompetitor Analysis and Sources of AdvantageChapter Six Knowledge as a Competitive Advantage Building Competitive Knowledge Profit Potential and Competitive Knowledge Industria
Texas Tech - MKT - 5361
MarketBased Pricing and Pricing StrategiesChapter EightMarketBased Pricing and Pricing StrategiesChapter Eight MarketBased Pricing Vs. CostBased Pricing Pricing Strategies and the Product Life Cycle Pricing Metrics Price Elasticity Cross P
University of San Francisco - CS - 336
CS 336/621 Computer Networks and Network ProgrammingSpring 2009 Professor Allan B. Cruse University of San FranciscoCourse synopsis Combines a survey of network principles with hands-on exercises and experiments Utilizes our classroom and CS lab
Texas Tech - BA - 3350
CHAPTER SIXTEENAdvertising and Sales PromotionFor use only with Perreault/Cannon/McCarthy or Perreault/McCarthy texts. 2008 McGraw-Hill Companies, Inc. McGraw-Hill/Irwinwww.mhhe.com/fourpsWhen we finish this lecture you should1. 2. 3. 4.
Texas Tech - BA - 4301
ACCT 4301 Fall 2008 Review Notes for Exam 3 These notes assume that you have carefully read each chapter, highlighted key concepts, and obtained a basic understanding of the material. For Exam #3, you will see the following for each chapter.1. At l
University of San Francisco - CS - 635
Fixes and EnhancementsWe correct an omission in our 8139 device-driver's `read()' function and supply `flush()' and `fsync()' methodsReceiver Buffer `wraparound' Our driver for the RealTek controller didn't correctly handle the buffer's wraparoun
University of San Francisco - MBA - 605
Macroeconomics Week 12Short Run Open Economy MacroeconomicsPrinciples of Macroeconomicsby N. Gregory MankiwChapter 12: Aggregate Demand in the Open EconomyInstructor: Prof. John M. VeitchInterest Rate Differentials3Assumed for small open
University of San Francisco - MBA - 605
MBA 605 MACROECONOMIC ANALYSIS SAMPLE FINAL - SPRING 1998 PROF. JOHN VEITCHTRUE, FALSE OR UNCERTAIN QUESTIONS - 10 POINTS EACHMarks are given only for the correct explanation not simply the correct choice. QUESTION 1. T, F, OR U? (ATTRIBUTED TO AND
University of San Francisco - MBA - 605
Answers to Problem Set # 7 (Chapter 8). Question 8.2.Define the nominal exchange rate and the real exchange rate. The nominal exchange rate is the relative price of the currency of two countries. The real exchange rate, sometimes called the terms of
Texas Tech - BA - 6339
ISQS 6339, Data Management &amp; Business IntelligenceData Warehousing and Dimensional ModelingZhangxi Lin Texas Tech University1ISQS 6339, Data Mgmt &amp; BI, Zhangxi LinAgendaData warehouse architecture Dimensional modeling Data warehouse develo
Texas Tech - PHYS - 1408
Chapter 10: Rotational Motion Topic of Chapter: Objects rotating First, rotating, without translating. Then, rotating AND translating together. Assumption: Rigid Body Definite shape. Does not deform or change shape. Rigid Body motion = Trans
DeVry Mesa - CCSI - 460
Guide to Computer Forensics and Investigations, Second EditionChapter 8 Macintosh and Linux Boot Processes and File SystemsObjectives Understand Macintosh file structures Explore Macintosh boot tasks Examine UNIX and Linux disk structuresGuid
New York Institute of Technology - MIST - 595
Chapter 7Telecommunications, the Internet, and Wireless Technology7.1 2007 by Prentice HallManagement Information SystemsChapter 7 Telecommunications, the Internet, and Wireless Technology LEARNING OBJECTIVES Describe the features of telec
New York Institute of Technology - QANT - 595
A Course in Business Statistics4th EditionChapter 2 Graphs, Charts, and Tables Describing Your DataA Course In Business Statistics, 4th 2006 PrenticeHall, Inc.Chap 21Chapter GoalsAfter completing this chapter, you should be able to:Co
New York Institute of Technology - QANT - 595
A Course In Business Statistics4th EditionChapter 9 Estimation and Hypothesis Testing for Two Population ParametersA Course In Business Statistics 4th 2006 PrenticeHall, Inc.Chap 91Chapter GoalsAfter completing this chapter, you should b
New York Institute of Technology - QANT - 595
A Course In Business Statistics4th EditionChapter 6 Introduction to Sampling DistributionsA Course In Business Statistics, 4th 2006 PrenticeHall, Inc.Chap 61Chapter GoalsAfter completing this chapter, you should be able to: Define the
New York Institute of Technology - QANT - 595
A Course In Business Statistics4th EditionChapter 12 Introduction to Linear Regression and Correlation AnalysisA Course In Business Statistics, 4th 2006 PrenticeHall, Inc.Chap 121Chapter GoalsAfter completing this chapter, you should be a
New York Institute of Technology - MIST - 705
IntroductionInstructor' s ManualCorporate Information Strategy &amp; Management IT is a source of opportunity and advantage but also uncertainty and risk Chasm between viewpoints Business executives: IT detached from real business problems Techni
New York Institute of Technology - MIST - 705
ChapterInstructor' s Manual8Managing IT Project DeliveryKeyLearning Objectives for Chapter 8: Understand possible sources of IT project risk and how these can be managed Recognize different approaches to project execution and understand thei
New York Institute of Technology - MIST - 705
Case Presentation / Discussion Leadership Grade (20 points total) CASE: _ PRESENTER: _CASE PRESENTATION (10 POINTS) Quality of preparation (3 points) Case Overview slide Brief Background slides Key issues side Answers to assigned questions sli
New York Institute of Technology - QANT - 601
Chapter 15Simulation ModelingTo accompany Quantitative Analysis for Management, Tenth Edition, by Render, Stair, and Hanna Power Point slides created by Jeff Heyl 2008 Prentice-Hall, Inc. 2009 Prentice-Hall, Inc.Learning ObjectivesAfter com
New York Institute of Technology - INTL - 710
CHAPTER 8 ECONOMIC INTEGRATION Chapter Objectives To review types of economic integration among countries To examine the costs and benefits of integrative arrangements To understand the structure of the European Union and its implications for fi
UPenn - PSYC - 170
What is Social Psychology? Definition: Social psychology is the scientific field that seeks to understand the nature and causes of individual behavior and thought in social situations. Important elements of the definition: * social psychology is scie
UPenn - COMM - 575
Sheet1Unofficial Summary of the Rush Limbaugh Show for Thursday, May 9, 1996 by John Switzer This unofficial summary is copyright (c) 1996 by John Switzer (jswitzer@limbaugh.com). All Rights Reserved. These summaries are distributed on CompuServe a
UPenn - COMM - 575
Sheet1Unofficial Summary of the Rush Limbaugh Show for Friday, July 19, 1996 by John Switzer This unofficial summary is copyright (c) 1996 by John Switzer (jswitzer@limbaugh.com). All Rights Reserved. These summaries are distributed on CompuServe a
UPenn - COMM - 575
Sheet1RUSH LIMBAUGH PROGRAM 10/02/96 WWDB 96.5 FMRush:Greetings to you conversationalist all across the fruited plains. Rush Limbaugh and the Excellence in Broadcasting Network. A new plague spreading all across the American schools. First, it wa
UPenn - COMM - 575
Sheet1Unofficial Summary of the Rush Limbaugh Show for Monday, July 8, 1996 by John Switzer This unofficial summary is copyright (c) 1996 by John Switzer (jswitzer@limbaugh.com). All Rights Reserved. These summaries are distributed on CompuServe an
UPenn - MATH - 350
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 4753, 59, 61, 67, 71, 73, 79, 83, 89, 97101, 103, 107, 109, 113, 127, 131, 137, 139, 149151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199211, 223, 227, 229, 233, 239, 241251, 257, 269
UPenn - OPIM - 910
MAX A + B + C + D SUBJECT TO 2) A + B = 0.3 3) C + D = 0.7 4) A + C = 0.4 5) B + D = 0.6 6) A + B + C + D = 1 END
UPenn - OPIM - 910
MAX A1_1 + a1_2 + a1_3 + a1_4 +a2_1+a2_2+a2_3+a2_4+a3_1+a3_2+a3_3+a3_4 SUBJECT TO 2) A1_1 + a1_2+a1_3+a1_4 &lt; 0.3 3) a2_1+a2_2+a2_3+a2_4 &lt; 0.1 4) A3_1+a3_2+a3_3+a3_4 &lt; 0.6 5) a1_1+a2_1
Skidmore - HI - 202
Rome, Ritual and Religion Roman ritual: Augustus as pontifex maximus Isis and Serapis Judaism Mithras Christianity
Skidmore - CC - 220
Williams Hail, Muses, sing to me the song of dreadful Melanomachos, bloodthirsty Cyclops, bent on destruction and blood and fair women. Sing to me, O Muses, of the sorrow of honorable, strong-armed, most noble Eurymenes and his slender-ankled wife, t
UPenn - COMM - 575
Sheet1Unofficial Summary of the Rush Limbaugh Show for Tuesday, July 23, 1996 by John Switzer This unofficial summary is copyright (c) 1996 by John Switzer (jswitzer@limbaugh.com). All Rights Reserved. These summaries are distributed on CompuServe
UPenn - COMM - 575
Sheet1Unofficial Summary of the Rush Limbaugh Show for Tuesday, June 11, 1996 by John Switzer This unofficial summary is copyright (c) 1996 by John Switzer (jswitzer@limbaugh.com). All Rights Reserved. These summaries are distributed on CompuServe
UPenn - HUM - 100
Catherine Lachance December 20, 1999 Humanities 100 Mark Liberman Wendy Steiner Question 5 Song and Narrative Some aspects of one particular human culture are, amazingly enough, present in every other human culture. Narrative and song are two of thes
UPenn - HUM - 100
Meredith Myers Question #2 Is Man Central in Nature and Creation?From Hans Arp to Shakespeare to Mary Shelley, from Milton to Darwin to Sir James Frazer, the myriad course readings present numerous authors arguing over man's role in creation and th
UPenn - HUM - 100
6) The lines that define and divide humans and animals are becoming increasingly blurred through the various tests and studies done on apes and chimpanzees both in captivity and in the wild. It seems apparent in a number of ways that there are many s
UPenn - COMM - 575
Sheet1Unofficial Summary of the Rush Limbaugh Show for Thursday, July 11, 1996 by John Switzer This unofficial summary is copyright (c) 1996 by John Switzer (jswitzer@limbaugh.com). All Rights Reserved. These summaries are distributed on CompuServe