Practice: Bivariate Data

Quantitative Response and Quantitative Explanatory Variables

Introduction

In this assignment, you will practice regression analysis including:

  • Plotting bivariate data
  • Calculating and interpreting the correlation coefficient, r
library(tidyverse)
library(mosaic)
library(rio)
library(car)

Car Prices and Mileage

You are interested in purchasing an all wheel drive Acura MDX for those slick Rexburg winters. You found what you think is a good deal for on a low-mileage 2020 model but you’d like to be sure. You go on Autotrader.com and randomly select 23 Acura MDX’s and collect Price and Mileage information.

Load the data and use R to answer the questions below.

cars <- read_csv('https://github.com/byuistats/Math221D_Cannon/raw/master/Data/acuraMDX_price_vs_mileage.csv')

glimpse(cars)
Rows: 23
Columns: 2
$ Mileage     <dbl> 110298, 92950, 165165, 162115, 120198, 193000, 145949, 155…
$ `MDX Price` <dbl> 11991, 13995, 8750, 10995, 10500, 8495, 10000, 9499, 9995,…

QUESTION: What is the response/dependent variable?
ANSWER:

QUESTION: What is the explanatory variable?
ANSWER:

QUESTION: What do you think is the nature of the relationship between the two? (strength and direction) ANSWER:

QUESTION: What is your best guess at the correlation coefficient, \(r\)?
ANSWER:

Plot the Data and calculate r

plot()
Error in plot.default(): argument "x" is missing, with no default
cor()
Error in cor(): argument "x" is missing, with no default

QUESTION: Does the relationship look linear?
ANSWER:

QUESTION: What does this r measure?
ANSWER:

Manatee Deaths and Motorboat Registrations in Florida

Florida is a fabulous place for experiencing wildlife and recreation. Unfortunately, sometimes those two activities conflict.

Researchers collected over 30 years of data about water craft registrations (motor and non-motor boats) and manatee deaths. The goal of the research is to evaluate the relationship between boat registrations and manatee deaths.

Load the data:

manatees <- read_csv('https://github.com/byuistats/Math221D_Cannon/raw/master/Data/manatees.csv')

glimpse(manatees)
Rows: 35
Columns: 4
$ `Fiscal Year`             <dbl> 1977, 1978, 1979, 1980, 1981, 1982, 1983, 19…
$ `Power Boats (in 1000's)` <dbl> 436, 449, 470, 487, 502, 501, 515, 548, 575,…
$ Manatees                  <dbl> 14, 21, 18, 19, 24, 18, 20, 27, 30, 34, 31, …
$ Comments                  <chr> "Source for the Powerboat Data:", "Data for …

QUESTION: What is the response/dependent variable?
ANSWER:

QUESTION: What is the explanatory variable?
ANSWER:

QUESTION: What do you think is the nature of the relationship between the two?
ANSWER:

QUESTION: What is your best guess at the correlation coefficient, \(r\)?
ANSWER:

Plot the Data and calculate r

QUESTION: Does the relationship look linear?
ANSWER:

MCAT Score and GPA

The MCAT is an entrance exam for medical schools. It seems likely that there is a relationship between your undergraduate GPA and how well you do on the MCAT.

GPA and MCAT score data were collected on 55 prospective medical students.

Load the data:

mcat <- import('https://github.com/byuistats/Math221D_Cannon/raw/master/Data/mcat_gpa.csv')

glimpse(mcat)
Rows: 55
Columns: 2
$ GPA  <dbl> 3.62, 3.84, 3.23, 3.69, 3.38, 3.72, 3.89, 3.34, 3.71, 3.89, 3.97,…
$ MCAT <int> 38, 45, 33, 40, 35, 36, 40, 39, 35, 34, 39, 31, 35, 32, 32, 38, 3…

QUESTION: What is the response/dependent variable?
ANSWER:

QUESTION: What is the explanatory variable?
ANSWER:

QUESTION: What do you think is the nature of the relationship between the two?
ANSWER:

QUESTION: What is your best guess at the correlation coefficient, \(r\)?
ANSWER:

Plot the Data and calculate r

QUESTION: Does the relationship look linear?
ANSWER: