attendance_data <- data.frame(
  Student_ID = c(101, 102, 103, 104, 105,
                 106, 107, 108, 109, 110),

  Student_Name = c("Arun", "Esalo", "Chavan", "Divya",
                   "Eland", "Karthan", "Aniket", "Harps",
                   "Ishu", "Jaya"),

  Department = c("CSE", "ECE", "CSE", "EEE", "CSE",
                 "ECE", "EEE", "CSE", "ECE", "EEE"),

  Attendance_Percentage = c(65, 72, 78, 80, 82,
                            85, 90, 92, 95, 98)
)

write.csv(
  attendance_data,
  "attendance_skewness.csv",
  row.names = FALSE
)

attendance <- read.csv("attendance_skewness.csv")

print(attendance)

mean_attendance <- mean(attendance$Attendance_Percentage)

median_attendance <- median(
  attendance$Attendance_Percentage
)

cat("Mean Attendance:", mean_attendance, "%\n")
cat("Median Attendance:", median_attendance, "%\n")

plot(
  density(attendance$Attendance_Percentage),
  main = "Density Curve of Student Attendance",
  xlab = "Attendance Percentage",
  ylab = "Density",
  lwd = 2
)

if (mean_attendance > median_attendance) {
  cat("Attendance Distribution: Positive Skew\n")
} else if (mean_attendance < median_attendance) {
  cat("Attendance Distribution: Negative Skew\n")
} else {
  cat("Attendance Distribution: Zero Skew\n")
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: