Variables

Let’s collect some data

Answer this anonymous survey (1-2 minutes)

Types of Variables

types of variables

Types of Variables

  • What are the variables collected by the survey you just took?
  • What are their types?

Types of Variables

  • personality: categorical
  • eye_color: categorical
  • siblings: numeric, discrete
  • sleep_hours: numeric, continuous
  • sleep_time: categorical, ordinal
  • rating: categorical, ordinal or numeric, discrete

Checking understanding

Sign up for gradescope (it’s free) and enter our course page (Entry Code: 6JBP27)

Use your @montclair.edu email to sign up for gradescope, so I can match it to your email on canvas

Take the Types of Variables quiz

Relationships among variables

GPA study hours data

What question is this plot trying to answer?

Relationships among variables

GPA study hours data

Anything weird?

Relationships among variables

GPA study hours data

[1] 0.1330138

Disney Movies vs. Vehicle Thefts

Disney Movies vs. Vehicle Thefts

Association vs. causation

  • Association: when two variables show some connection (like correlation) with one another
  • Association does not imply causation
  • Causation can only be inferred from a randomized experiment

Explanatory and response variables

  • Response variables are also known as dependent variables
  • Explanatory variables are also known as independent variables
  • A response variable is the variable that is measured and is expected to change based on the manipulation of other variables (the explanatory variables)
  • The explanatory variables are expected to affect the response variable