```{r}library(readxl) library(ggpubr) ggscatter( A5Q2, x = “phone”, y
= “sleep”, add = “reg.line”, xlab = “phone”, ylab = “sleep” ) # The
relationship is linear. # The relationship is negative. # There are
outliers.
mean(A5Q2\(phone)
sd(A5Q2\)phone) median(A5Q2$phone)
mean(A5Q2\(sleep)
sd(A5Q2\)sleep) median(A5Q2$sleep)
hist(A5Q2$phone, main = “phone”, breaks = 20, col = “lightblue”,
border = “white”, cex.main = 1, cex.axis = 1, cex.lab = 1)
hist(A5Q2$sleep, main = “sleep”, breaks = 20, col = “lightcoral”,
border = “white”, cex.main = 1, cex.axis = 1, cex.lab = 1)
Variable 1: phone
The variable looks normally distributed.
The data is positively skewed..
The data does not have a proper bell curve.
Variable 2: sleep
The variable looks normally distributed.
The data is negatively skewed.
The data has a proper bell curve.
shapiro.test(A5Q2\(phone)
shapiro.test(A5Q2\)sleep)
Variable 1: phone
The variable is normally distributed (p = .96).
Variable 2: sleep
The variable is normally distributed (p = .89).
cor.test( A5Q2\(phone,
A5Q2\)sleep, method = “pearson” )
A Pearson correlation was conducted to test the relationship between
phone (M = 3.80, SD = 2.66) and sleep (M = 7.56, SD = 1.21).
There was a statistically significant relationship between the two
variables, r(148) = -.70, p < .001.
The relationship was negative and strong.
As phone increased, sleep decreased.
```