---
title: "ADA1: Class 11, Correlation"
author: "Your Name Here"
date: "`r format(Sys.time(), '%B %d, %Y')`"
output:
html_document:
toc: true
---
Include your answers in this document in the sections below the rubric.
# Rubric
1. (1 p) Participate in two data collection and entering activities.
Describe any potential issues about the data collection process.
2. (2 p) Interpret correlation for Males, Females, and Everyone combined.
3. (1 p) How would the correlation change if both hand span and height were measured in inches?
4. (2 p) Why is there a difference in the strength of the correlation for everyone compared to either gender separately?
5. (2 p) Describe the relationships between the scores and the guessed score.
6. (2 p) Identify and explain the most surprising feature of these data.
---
# Height vs Hand Span
Procedure:
1. Record your height in inches. For example 5'0" is 60 inches.
2. Use a ruler to measure your hand span in centimeters: the distance from the tip of your thumb to pinky finger
with your hand splayed as wide as possible.
3. Have someone from your table enter your measurements at this link (as well as your gender):
https://docs.google.com/spreadsheets/d/1_lax2SqNMhfGBpw1MBDnKiB1w2J5oC6LWvG7Gf2acWY
4. Analysis.
## Data and Plots
```{R}
library(tidyverse)
# install.packages("gsheet")
# Height vs Hand Span
library(gsheet)
dat_hand_url <- "docs.google.com/spreadsheets/d/1_lax2SqNMhfGBpw1MBDnKiB1w2J5oC6LWvG7Gf2acWY"
dat_hand <-
gsheet2tbl(dat_hand_url) %>%
as.data.frame() %>%
na.omit() %>%
mutate(
Gender_M_F = factor(Gender_M_F, levels = c("F", "M"))
)
str(dat_hand)
```
```{R}
# Plot the data using ggplot and ggpairs
library(ggplot2)
library(GGally)
p1 <- ggpairs(dat_hand %>% select(Gender_M_F, Height_in, HandSpan_cm)
, mapping = ggplot2::aes(colour = Gender_M_F)
, lower = list(continuous = "smooth")
, diag = list(continuous = "density")
#, upper = list(params = list(corSize = 6))
)
print(p1)
```
## Questions to answer
* Describe any potential issues about the data collection process.
* Interpret correlation for Males, Females, and Everyone combined.
* How would the correlation change if both hand span and height were measured in inches?
* Why is there a difference in the strength of the correlation for everyone compared to either gender separately?
---
# Word memory scores
15 seconds to memorize 15 words: http://www.randomlists.com/random-words?qty=15
Procedure:
1. Round 1
1. Put up a list of words for 15 seconds and view.
2. Have 60 seconds to write/type as many words as you can remember.
3. Score yourself (anonymous, so honesty is best -- we're all going to be bad at this).
2. Given your first performance, make a guess at how many words you'll remember in round 2.
3. Round 2 (repeat of round 1)
4. Have someone from your table enter your scores at this link (as well as your gender and student status):
https://docs.google.com/spreadsheets/d/16EyOMIL0WGNbt7TTJqm7_aroFslUysOVYQTWiZa44KA
5. Analysis.
## Data and Plots
```{R}
# Memory Scores
library(gsheet)
dat_memory_url <- "docs.google.com/spreadsheets/d/16EyOMIL0WGNbt7TTJqm7_aroFslUysOVYQTWiZa44KA"
dat_memory <-
gsheet2tbl(dat_memory_url) %>%
as.data.frame() %>%
na.omit() %>%
mutate(
Gender_M_F = factor(Gender_M_F, levels = c("F", "M"))
, UGrad_Grad = factor(UGrad_Grad)
, EnglishNativeLanguage = factor(EnglishNativeLanguage)
)
str(dat_memory)
```
```{R, fig.width=10, fig.height=10, out.width=600, out.height=600}
# Plot the data using ggplot and ggpairs
library(ggplot2)
library(GGally)
p2 <- ggpairs(dat_memory %>% select(Gender_M_F, UGrad_Grad, EnglishNativeLanguage, Score_1, Guessed_2, Score_2)
, mapping = ggplot2::aes(colour = EnglishNativeLanguage) #, shape = UGrad_Grad)
, lower = list(continuous = "smooth")
, diag = list(continuous = "density")
#, upper = list(params = list(corSize = 6))
)
print(p2)
```
```{R}
library(ggplot2)
p <- ggplot(dat_memory, aes(x = Score_1, y = Guessed_2))
p <- p + geom_abline(intercept = 0, slope = 1, linetype = "dashed", alpha = 0.5)
p <- p + geom_jitter(aes(colour = EnglishNativeLanguage), position = position_jitter(width = 0.1), alpha = 1/2)
p <- p + geom_smooth(method = lm)
p <- p + scale_y_continuous(limits=c(0, 15))
p <- p + scale_x_continuous(limits=c(0, 15))
p <- p + coord_fixed(ratio = 1)
print(p)
library(ggplot2)
p <- ggplot(dat_memory, aes(x = Guessed_2, y = Score_2))
p <- p + geom_abline(intercept = 0, slope = 1, linetype = "dashed", alpha = 0.5)
p <- p + geom_jitter(aes(colour = EnglishNativeLanguage), position = position_jitter(width = 0.1), alpha = 1/2)
p <- p + geom_smooth(method = lm)
p <- p + scale_y_continuous(limits=c(0, 15))
p <- p + scale_x_continuous(limits=c(0, 15))
p <- p + coord_fixed(ratio = 1)
print(p)
library(ggplot2)
p <- ggplot(dat_memory, aes(x = Score_1, y = Score_2))
p <- p + geom_abline(intercept = 0, slope = 1, linetype = "dashed", alpha = 0.5)
p <- p + geom_jitter(aes(colour = EnglishNativeLanguage), position = position_jitter(width = 0.1), alpha = 1/2)
p <- p + geom_smooth(method = lm)
p <- p + scale_y_continuous(limits=c(0, 15))
p <- p + scale_x_continuous(limits=c(0, 15))
p <- p + coord_fixed(ratio = 1)
print(p)
```
## Questions to answer
* Describe the relationships between the scores and the guessed score.
* Explain the most surprising feature of these data.