Skip to Content
Data Analysis with R, Second Edition - Second Edition
book

Data Analysis with R, Second Edition - Second Edition

by Tony Fischetti
March 2018
Beginner to intermediate content levelBeginner to intermediate
570 pages
13h 42m
English
Packt Publishing
Content preview from Data Analysis with R, Second Edition - Second Edition

The relationship between two continuous variables

Do you think that there is a relationship between women's heights and their weights? If you said yes, congratulations, you're right!

We can verify this assertion using the data in R's built-in dataset, women, which holds the height and weight of 15 American women from ages 30 to 39:

 head(women) 
    height weight 
  1     58    115 
  2     59    117 
  3     60    120 
  4     61    123 
  5     62    126 
  6     63    129 
 nrow(women) 
  [1] 15 

Specifically, this relationship is referred to as a positive relationship, because as one of the variable increases, we expect an increase in the other variable.

The most typical visual representation of the relationship between two continuous variables is a scatterplot.

A scatterplot is displayed as a group of ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Exploratory Data Analysis with R

Hands-On Exploratory Data Analysis with R

Radhika Datar, Harish Garg
Bayesian Data Analysis, Third Edition, 3rd Edition

Bayesian Data Analysis, Third Edition, 3rd Edition

Andrew Gelman, John B. Carlin, Hal S. Stern, David B. Dunson, Aki Vehtari, Donald B. Rubin
R: Data Analysis and Visualization

R: Data Analysis and Visualization

Tony Fischetti, Brett Lantz, Jaynal Abedin, Hrishi V. Mittal, Bater Makhabel, Edina Berlinger, Ferenc Illés, Milán Badics, Ádám Banai, Gergely Daróczi, Barbara Dömötör, Gergely Gabler, Dániel Havran, Péter Juhász, István Margitai, Balázs Márkus, Péter Medvegyev, Julia Molnár, Balázs Árpád Szucs, Ágnes Tuza, Tamás Vadász, Kata Váradi, Ágnes Vidovics-Dancs

Publisher Resources

ISBN: 9781788393720Supplemental Content