Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Exam (elaborations)

Using R for Introductory Statistics 2nd Edition Verzani Solutions Manual

Rating
-
Sold
-
Pages
205
Grade
A+
Uploaded on
12-03-2025
Written in
2024/2025

Using R for Introductory Statistics 2nd Edition Verzani Solutions Manual

Institution
Course

Content preview

simpleRg –g Usingg Rg forg Introductoryg Statistics

Johng Verzani
8e+05
6e+05
y

4e+05
2e+05




20000g g 40000g g 60000g g 80000 120000 160000

, pagegi


Preface
ThesegnotesgaregangintroductiongtogusinggthegstatisticalgsoftwaregpackagegRgforgangintroductorygstatisticsgcourse
.gTheyg areg meantg tog accompanyg ang introductoryg statisticsg bookg suchg asg Kitchensg “Exploringg Statistics”.g Theg
goalsgaregnotgtogshowgallgthegfeaturesgofg R,gorgtogreplacegagstandardgtextbook,gbutgrathergtogbegusedgwithgagtextbo
okgtogillustrateg theg featuresg ofg Rgthatg cang beg learnedgingagone-semester,g introductorygstatisticsg course.
Theseg notesg wereg writteng tog takeg advantageg ofg Rg versiong 1.5.0g org later.g Forg pedagogicalgreasonsg theg equalsg sign,
=,g isg usedg asg ang assignmentg operatorg andg notg theg traditionalg arrowg combinationg <-
.g Thisg wasg addedg tog Rg ing version
1.4.0.g Ifg onlyg ang olderg versiong isg availableg theg readerg willg haveg tog makeg theg minorg adjustment.
Theregaregseveralgreferencesgtogdatagandgfunctionsgingthisgtextgthatgneedgtogbeginstalledgpriorgtogtheirguse.
g Toginstallgthegdatagisgeasy,gbutg theginstructionsgvarygdependinggongyourgsystem.g ForgWindows gusers,gyougne
edgtogdownloadgtheg“zip”gfileg,gandgthenginstallgfromgtheg“packages”gmenu.g IngUNIX,gonegusesgthegcommandgR
gCMDgINSTALLgpackagename.tar.gz.gSomegofgthegdatasetsgaregborrowedgfromgothergauthorsgnotably gKitchens.g C
reditgisggivengingtheghelpgfilesgforgtheg datasets.g ThisgmaterialgisgavailablegasgangRgpackagegfrom:
http://www.math.csi.cuny.edu/Statistics/R/simpleR/Simple g 0.4.zipg forg Windowsg users.
http://www.math.csi.cuny.edu/Statistics/R/simpleR/Simple g 0.4.tar.gz g forg UNIXg users.


Ifg necessary,g theg fileg cang sentg ing ang email.g Asg well,g theg individualgdatag setsg cang beg foundg onlineg ing theg directory

http://www.math.csi.cuny.edu/Statistics/R/simpleR/Simple.
Thisgisgversiong0.4gofgthesegnotesgandgwereglastggeneratedgongAugustg22,g2002.gBeforegprintinggthesegnotes,gyo
ugshouldgcheckg forgtheg mostgrecentg versiong availablegfrom
theg g CSIg g Mathg g departmentg g g (http://www.math.csi.cuny.edu/Statistics/R/simpleR).
Copyrightg ◯
c Johng Verzanig (),g 2001-2.g Allg rightsg reserved.


Contents

Introduction 1
Whatg isg R .............................................................................................................................................................................. 1
Ag noteg ong notation .............................................................................................................................................................. 1

Data 1
Startingg R .............................................................................................................................................................................. 1
Enteringg datag withg c ........................................................................................................................................................... 2
Datag isg ag vector ................................................................................................................................................................... 3
Problems ................................................................................................................................................................................ 7

Univariateg Data 8
Categoricalg data.................................................................................................................................................................... 8
Numericalg data ................................................................................................................................................................... 10
Problems .............................................................................................................................................................................. 18

Bivariateg Data 19
Handlingg bivariateg categoricalg data................................................................................................................................. 20
Handlingg bivariateg data:g categoricalg vs.g numerical ..................................................................................................... 21
Bivariateg data:g numericalg vs.g numerical ....................................................................................................................... 22
Linearg regression................................................................................................................................................................ 24
Problems .............................................................................................................................................................................. 31

Multivariateg Data 32
Storingg multivariateg datag ing datag frames ...................................................................................................................... 32
Accessingg datag ing datag frames ........................................................................................................................................ 33
Manipulatingg datag frames:g stackg andg unstack ............................................................................................................. 34
Usingg R’sg modelg formulag notation ................................................................................................................................... 35
Waysg tog viewg multivariateg data ...................................................................................................................................... 35
Theg latticeg package ..................................................................................................................................................... 40

, pagegii

Problems .............................................................................................................................................................................. 40

Randomg Data 41
Randomg numberg generatorsg ing R–g theg “r”g functions................................................................................................... 41
Problems .............................................................................................................................................................................. 46

Simulations 47
Theg centralg limitg theorem ................................................................................................................................................ 47
Usingg simple.simg andg functions .................................................................................................................................... 49
Problems .............................................................................................................................................................................. 51

Exploratoryg Datag Analysis 54
Ourg toolbox ......................................................................................................................................................................... 54
Examples .............................................................................................................................................................................. 54
Problems .............................................................................................................................................................................. 58

Confidenceg Intervalg Estimation 59
Populationg proportiong theory .......................................................................................................................................... 59
Proportiong test ................................................................................................................................................................... 61
Theg z-test ............................................................................................................................................................................ 62
Theg t-test............................................................................................................................................................................. 62
Confidenceg intervalg forg theg median................................................................................................................................. 64
Problems .............................................................................................................................................................................. 65

Hypothesisg Testing 66
Testingg ag populationg parameter ...................................................................................................................................... 66
Testingg ag mean................................................................................................................................................................... 67
Testsg forg theg median ......................................................................................................................................................... 67
Problems .............................................................................................................................................................................. 68

Two-sampleg tests 68
Two-samplegtestsg ofg proportion....................................................................................................................................... 68
Two-samplegt-tests ............................................................................................................................................................. 69
Resistantgtwo-samplegtests ............................................................................................................................................... 71
Problems .............................................................................................................................................................................. 71

Chig Squareg Tests 72
Theg chi-squaredg distribution ............................................................................................................................................ 72
Chi-squaredg goodnessg ofg fitg tests .................................................................................................................................... 72
Chi-squaredg testsg ofg independence ................................................................................................................................. 74
Chi-squaredg testsg forg homogeneity.................................................................................................................................. 75
Problems .............................................................................................................................................................................. 76

Regressiong Analysis 77
Simpleglinearg regressiong model ........................................................................................................................................ 77
Testingg theg assumptionsg ofg theg model ........................................................................................................................... 78
Statisticalg inference ........................................................................................................................................................... 79
Problems .............................................................................................................................................................................. 83

Multipleg Linearg Regression 84
Theg model ........................................................................................................................................................................... 84
Problems .............................................................................................................................................................................. 89

Analysisg ofg Variance 89
one-wayg analysisgofgvariance ............................................................................................................................................ 89
Problems .............................................................................................................................................................................. 92

Appendix:g Installingg R 94

Appendix:g Externalg Packages 94

Appendix:g Ag sampleg Rg session 94
Ag sampleg sessiong involvinggregression ........................................................................................................................... 94

, pagegiii

t-tests ................................................................................................................................................................................... 97
Ag simulationg example........................................................................................................................................................ 99

Appendix:g Whatg happensg wheng Rg starts? 100

Appendix:g Usingg Functions 100
Theg basicg template .......................................................................................................................................................... 100
Forg loops ........................................................................................................................................................................... 102
Conditionalg expressions .................................................................................................................................................. 103

Appendix:g g Enteringg Datag intog R 103
Usingg c............................................................................................................................................................................... 104
usingg scan .......................................................................................................................................................................... 104
Usingg scang withg ag file .................................................................................................................................................... 104
Editingg yourg data ............................................................................................................................................................. 104
Readingg ing tablesg ofg data ............................................................................................................................................... 105
Fixed-widthg fields ............................................................................................................................................................ 105
Spreadsheetg data............................................................................................................................................................... 105
XML, g urls ......................................................................................................................................................................... 106
“Foreign”g formats............................................................................................................................................................. 106

Appendix:g Teachingg Tricks 106

Appendix:g Sourcesg ofg help,g documentation 107

Connected book

Written for

Course

Document information

Uploaded on
March 12, 2025
Number of pages
205
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

$21.49
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
FINETUTORS Teachme2-tutor
Follow You need to be logged in order to follow users or courses
Sold
17
Member since
1 year
Number of followers
2
Documents
425
Last sold
17 hours ago

4.8

783 reviews

5
646
4
113
3
15
2
3
1
6

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions