Today’s Agenda

  • Exploring the RStudio Interface
  • RMarkdown

During this worksheet we will explore R and RStudio. We’ll be using these throughout the course both to learn the statistical concepts discussed and to analyze real data and come to informed conclusions. ___

Reading Key Points

1.1 Important Terms

  • Population: collection of things that we want to know about
  • Parameter: A characteristic of the population that we want to know about
  • Sample: subset of the population. It’s the group that we have access to.
  • Statistic: characteristic of the sample

Main Goal

Statistics is all about using the sample statistic to estimate the population parameter.

1.2

  • qualitative data: nominal (favorite color) or ordinal (favorite classes top 5, or somewhat agree, strongly agree etc.)

  • quantitative data: discrete (number of students in a particular major) or continuous (time dependent)

  • bar graphs, pie charts, and pareto charts are good for qualitative data.

  • basically all other graphs are for quantitative data

  • care mostly about display data effectively and accurately

  • Each time you take a sample, the statstic you measure is likely to vary

1.3

  • ratio/interval scale, really not important

1.4

  • the only way to determine causality is with a randomized controlled experiment
  • looking at data without an experiment can only reveal an association
  • correlation is not causation
  • a placebo is what you give the control group.
  • the placebo effect is a REAL phenomenon

Using R

  • R is a programming language where you can tell the computer exactly what you want it to do.
  • A big con of R is: the computer will do exactly what you tell it to

exploring the interface

  • the top left pane is called the Workspace. It can be used to write code!

  • bottom left pane is where the coding happens

  • bottom right pane is file manager, plots, package manager

  • top right pane is your environment

# this is an R code chunk
students <- 8
groupA <- 3/4*students
groupB <- 1/4*students