munotes®

Statistics with R Programming Notes | B.Sc. (Computer Science) Semester 1 | Mumbai University | munotes

Get access to whole semester resourcesSemester Pass

Official Notes munotes.in

Statistics with R Programming

B.SC. (COMPUTER SCIENCE) · SEMESTER 1

Strictly as per the University of Mumbai NEP syllabus in force for B.Sc. (Computer Science)

For B.Sc. (Computer Science) students of the University of Mumbai and all its affiliated colleges

Open the book ↓

munotes.in First Year

Contents

Module I The R language and its environment: expressions, decisions, loops, data structures and strings

  1. What R Is, and Why Statistics Is Done in It 1
  2. A Short History of R, and What Open Source Means Here 4
  3. The Words R Uses: Object, Mode, Class and Attribute 7
  4. Installing R on Windows, macOS and Linux 10
  5. The R Environment: Console, Workspace and Working Directory 12
  6. Getting Help, and Installing Packages 15
  7. The R Graphical User Interface (R GUI) 18
  8. RStudio: Installing It and Reading Its Four Panes 21
  9. Customising RStudio 24
  10. R Commander: Statistics From a Menu 27
  11. Working With R Scripts 30
  12. Data Management in RStudio 33
  13. Reading Data In and Writing It Out 36
  14. Expressions: Arithmetic, Relational and Logical Operators 39
  15. Operator Precedence, and How R Reads an Expression 42
  16. Assignment, and the Rules for a Name 44
  17. Numbers, Logicals and the Values NA, NULL, NaN and Inf 47
  18. Decision Making: if, else and else if 50
  19. switch(), and the Vectorised ifelse() 52
  20. Loops: The for Loop 54
  21. Loops: while, repeat, break and next 57
  22. Why R Prefers Vectorisation to a Loop 60
  23. Dates in R 63
  24. Times, Time Zones and Date Arithmetic 66
  25. Vectors: The Thing R Is Actually Made Of 69
  26. Indexing a Vector: Five Ways to Pick Elements 72
  27. Recycling, Coercion and Vectorised Arithmetic 75
  28. Matrices: Creating, Naming and Indexing 78
  29. Matrix Arithmetic and Matrix Algebra 81
  30. Row and Column Work: apply, rowSums, cbind and rbind 84
  31. Arrays: Three Dimensions and More 88
  32. Lists: The Container That Holds Anything 91
  33. Data Frames: The Table Statistics Works On 94
  34. Subsetting a Data Frame, and Adding or Dropping a Column 98
  35. Factors: How R Stores a Category 102
  36. Sorting, Ordering, Merging and Reshaping a Data Frame 105
  37. Writing Your Own Function 109
  38. Arguments, Defaults, and What a Function Returns 112
  39. Scope: Where R Looks a Name Up 115
  40. The apply Family: apply, lapply, sapply, tapply and mapply 118
  41. Character Strings in R 121
  42. Strings and R Objects 124
  43. Printing Characters: print, cat and format 127
  44. sprintf(), and Building a Line of Output 130
  45. Basic String Manipulations 133
  46. Changing Case, Trimming and Padding 136
  47. String Operations: Searching and Replacing 139
  48. Regular Expressions, From Scratch 142
  49. Practical Session 1: Setting Up and Your First Script 145
  50. Practical Session 2: Expressions, Decisions and Loops 148
  51. Practical Session 3: Vectors, Matrices, Lists and Data Frames 152
  52. Practical Session 4: Functions, Strings and Dates 156
  53. Module 1: Viva Questions and Their Answers 160

Module II Statistics in R: summaries, regression, distributions, time series, tables and graphics

  1. What a Statistic Is: Population, Sample and Summary 164
  2. The mean() Function 167
  3. The Median 170
  4. Standard Deviation and Variance 173
  5. Other Built-in Statistical Functions 176
  6. Quantiles, summary() and the Five-Number Summary 179
  7. Correlation, Covariance and scale() 182
  8. The Mode, and Why R Has No Function For It 186
  9. What Regression Analysis Is 189
  10. The Least Squares Line, Worked by Hand 192
  11. Linear Regression in R: lm(), Coefficients and Residuals 195
  12. Reading an lm() Summary 199
  13. Predicting From a Fitted Model 203
  14. Multiple Regression 207
  15. Checking a Regression: Residual Plots and What They Say 211
  16. The Normal Distribution 215
  17. dnorm(): The Normal Density 218
  18. pnorm(): The Normal Cumulative Probability 221
  19. qnorm(): The Normal Quantile 224
  20. rnorm(): Random Normal Samples, and set.seed() 227
  21. The Binomial Distribution 230
  22. dbinom(): The Exact Binomial Probability 233
  23. pbinom(): The Cumulative Binomial Probability 236
  24. qbinom(): The Binomial Quantile 239
  25. rbinom(): Simulating Binomial Trials 242
  26. Choosing Which Distribution Function to Call 245
  27. Time Series Analysis: The ts Object 248
  28. Trend, Seasonality and Decomposition 252
  29. Moving Averages and a Simple Forecast 255
  30. Tabulation: Counting With table() 259
  31. Contingency Tables: What They Show 262
  32. Making R Contingency Tables 266
  33. Making Custom Contingency Tables 270
  34. Selecting Parts of a Table Object 274
  35. Converting an Object Into a Table 277
  36. Testing Table Objects, and the Chi-Squared Test 280
  37. Complex Tables: Margins, Proportions and ftable 283
  38. Representing Data Through Cross Tabulation 287
  39. How an R Plot Is Built: Devices, High-Level and Low-Level 291
  40. Plots of a Single Variable: Histogram and Density 295
  41. Plots of a Single Variable: Bar, Pie and Dot Chart 299
  42. Plots of a Single Variable: Box Plot and Stem-and-Leaf 302
  43. Plots of Two Variables: The Scatter Plot and Its Line 305
  44. Plots of Multiple Variables 308
  45. Special Plots: QQ, Mosaic, Coplot and curve 311
  46. Labels, Legends, Colours and Layout 315
  47. Storing Graphics 319
  48. Practical Session 5: Summary Statistics on a Data Frame 322
  49. Practical Session 6: Regression, End to End 326
  50. Practical Session 7: The Distribution Functions 330
  51. Practical Session 8: Tables and Cross Tabulation 334
  52. Practical Session 9: Plots and Saving Them 338
  53. Module 2: Viva Questions and Their Answers 342
munotes.in

The chapters

Every chapter of this book comes with the B.Sc. (Computer Science) Semester 1 notes.

The cover and the contents are free to look through. Buy the notes once to read every chapter of every subject in this semester.

Notes: ₹499 Already bought it? Sign in

Free either way: question papers, the syllabus, and the cover and contents of every book.

The rest of this subject

These notes are cut from the University's printed syllabus. Open the syllabus itself for the same subject.

Issue
Done!