title: “Correlations_ASSIGNMENT” author: “FUZAIL” date: “2026-02-07” output: html_document ———————

Load Datasets

Descriptive Statistics

DatasetA

## [1] 6.135609
## [1] 1.369224
## [1] 90.06906
## [1] 6.795224

DatasetB

## [1] 5.063296
## [1] 2.056833
## [1] 6.938459
## [1] 1.351332

Histograms

DatasetA DatasetB

Shapiro–Wilk Normality Tests

DatasetA

## 
##  Shapiro-Wilk normality test
## 
## data:  DatasetA$StudyHours
## W = 0.99388, p-value = 0.9349
## 
##  Shapiro-Wilk normality test
## 
## data:  DatasetA$ExamScore
## W = 0.96286, p-value = 0.006465

DatasetB

## 
##  Shapiro-Wilk normality test
## 
## data:  DatasetB$ScreenTime
## W = 0.90278, p-value = 1.914e-06
## 
##  Shapiro-Wilk normality test
## 
## data:  DatasetB$SleepingHours
## W = 0.98467, p-value = 0.3004

Correlation Tests

#DatasetA

## 
##  Pearson's product-moment correlation
## 
## data:  DatasetA$StudyHours and DatasetA$ExamScore
## t = 20.959, df = 98, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.8606509 0.9346369
## sample estimates:
##      cor 
## 0.904214
## Warning in cor.test.default(DatasetA$StudyHours, DatasetA$ExamScore, method =
## "spearman"): Cannot compute exact p-value with ties
## 
##  Spearman's rank correlation rho
## 
## data:  DatasetA$StudyHours and DatasetA$ExamScore
## S = 16518, p-value < 2.2e-16
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##       rho 
## 0.9008825

#DatasetB

## 
##  Pearson's product-moment correlation
## 
## data:  DatasetB$ScreenTime and DatasetB$SleepingHours
## t = -8.2538, df = 98, p-value = 7.27e-13
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.7433008 -0.5078341
## sample estimates:
##        cor 
## -0.6403761
## 
##  Spearman's rank correlation rho
## 
## data:  DatasetB$ScreenTime and DatasetB$SleepingHours
## S = 259052, p-value = 3.521e-09
## alternative hypothesis: true rho is not equal to 0
## sample estimates:
##        rho 
## -0.5544674

Scatterplots

DatasetA #DatasetB

Report

DatasetA Report

## # StudyHours (M = 6.14, SD = 1.37) was correlated with ExamScore (M = 78.60, SD = 6.80), ρ(98) = .90, p < .001.
## # The relationship was positive and strong. As StudyHours increased, ExamScore increased.

DatasetB Report

## # ScreenTime (M = 5.06, SD = 2.06) was correlated with SleepingHours (M = 6.94, SD = 1.35), ρ(89) = -.52, p = .004.
## # The relationship was negative and moderate. As ScreenTime increased, SleepingHours decreased.