Introduction Loading Libraries into memory

library(readxl)
library(ggpubr)
## Loading required package: ggplot2

Loading Dataset from public directory

Replace Full Path with required path

D2 <- read_excel("A4Q2.xlsx")

Loading Dataset from public directory

Plot the graph

ggscatter(
  D2,
  x = "phone",
  y = "sleep",
  color = "#00A",
  shape = "triangle",
  add = "reg.line",
  add.params = list(color = "red"), # Change ONLY the line color here
  xlab = "Independent Variable (phone) /hours",
  ylab = "Dependent Variable (sleep) /hours"
)

The relationship is [linear].

The relationship is [negative].

The relationship is [strong).

There [are] outliers.