R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

When you click the Knit button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:

library(readxl)
library(ggpubr)
## Loading required package: ggplot2
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(effectsize)
library(effsize)
Dataset6.2 <- read_excel("C:/Users/tanie/Downloads/Dataset6.2-2.xlsx")
Dataset6.2 %>%
  group_by(Work_Status) %>%
  summarise(
    Mean = mean(Study_Hours, na.rm = TRUE),
    Median = median(Study_Hours, na.rm = TRUE),
    SD = sd(Study_Hours, na.rm = TRUE),
    N = n()
  )
## # A tibble: 2 × 5
##   Work_Status    Mean Median    SD     N
##   <chr>         <dbl>  <dbl> <dbl> <int>
## 1 Does_Not_Work  9.62   8.54  7.45    30
## 2 Works          6.41   5.64  4.41    30
hist(Dataset6.2$Study_Hours[Dataset6.2$Work_Status == "Works"],
     main = "Histogram of Work_Status",
     xlab = "Value",
     ylab = "Frequency",
     col = "lightblue",
     border = "black",
     breaks = 10)

hist(Dataset6.2$Study_Hours[Dataset6.2$Work_Status == "Does_Not_Work"],
     main = "Histogram of Work_Status",
     xlab = "Value",
     ylab = "Frequency",
     col = "lightblue",
     border = "black",
     breaks = 10)

For the works histogram, the data appears positively skewed. It is difficult to state the exact kurtosis, but it appears abnormal. For the does not work histogram, the data also appears positively skewed.It is difficult to state the exact kurtosis, but it appears abnormal

print(ggboxplot(Dataset6.2, x = "Work_Status", y = "Study_Hours", 
                color = "Work_Status", palette = "jco", add = "jitter"))

The works boxplot appears normal. There are dots past the whiskers. The does not work boxplot appears abnormal. There are several dots past the whiskers. Although some are very close to the whiskers, some are arguably far away.

shapiro.test(Dataset6.2$Study_Hours[Dataset6.2$Work_Status == "Works"])
## 
##  Shapiro-Wilk normality test
## 
## data:  Dataset6.2$Study_Hours[Dataset6.2$Work_Status == "Works"]
## W = 0.94582, p-value = 0.1305
shapiro.test(Dataset6.2$Study_Hours[Dataset6.2$Work_Status == "Does_Not_Work"])
## 
##  Shapiro-Wilk normality test
## 
## data:  Dataset6.2$Study_Hours[Dataset6.2$Work_Status == "Does_Not_Work"]
## W = 0.83909, p-value = 0.0003695

The data for works was normal (p > .05). The data for does not work data was abnormal (p < .05).

wilcox.test(Study_Hours ~ Work_Status, data = Dataset6.2)
## 
##  Wilcoxon rank sum exact test
## 
## data:  Study_Hours by Work_Status
## W = 569, p-value = 0.07973
## alternative hypothesis: true location shift is not equal to 0

p > .05( greater than .05 this means the results were not significant)

cliff.delta(Study_Hours ~ Work_Status, data = Dataset6.2)
## 
## Cliff's Delta
## 
## delta estimate: 0.2644444 (small)
## 95 percent confidence interval:
##       lower       upper 
## -0.03422594  0.51975307

effect size magnitude is small Does_Not_Work (Mdn = 8.54) were significantly different from Working students (Mdn = 5.64) in exam scores, U = 0.83909, p = .0003. The effect size was small (r₍rb₎ = 0.26).