library(readxl)
AI_02 <- read_excel("AI_02.xlsx")
attach(AI_02)
summary(AI_02)
##      Ednl             AI_tool            HoursOnAI        Perceiv     
##  Length:1000        Length:1000        Min.   :1.000   Min.   :1.000  
##  Class :character   Class :character   1st Qu.:2.000   1st Qu.:3.000  
##  Mode  :character   Mode  :character   Median :4.000   Median :5.000  
##                                        Mean   :4.041   Mean   :5.041  
##                                        3rd Qu.:6.000   3rd Qu.:7.000  
##                                        Max.   :7.000   Max.   :9.000  
##    Purpose            Satisfied      Discipline         Preference       
##  Length:1000        Min.   :1.000   Length:1000        Length:1000       
##  Class :character   1st Qu.:2.000   Class :character   Class :character  
##  Mode  :character   Median :3.000   Mode  :character   Mode  :character  
##                     Mean   :3.067                                        
##                     3rd Qu.:4.000                                        
##                     Max.   :5.000                                        
##  AnyChallenge       HoursSavedByAI        age         Effectivenes  
##  Length:1000        Min.   : 1.000   Min.   :18.00   Min.   :1.000  
##  Class :character   1st Qu.: 3.000   1st Qu.:21.00   1st Qu.:3.000  
##  Mode  :character   Median : 5.000   Median :24.00   Median :5.000  
##                     Mean   : 5.386   Mean   :23.71   Mean   :5.032  
##                     3rd Qu.: 8.000   3rd Qu.:27.00   3rd Qu.:7.000  
##                     Max.   :10.000   Max.   :29.00   Max.   :9.000  
##       GPA       
##  Min.   :2.010  
##  1st Qu.:2.498  
##  Median :2.985  
##  Mean   :3.000  
##  3rd Qu.:3.510  
##  Max.   :4.000
table(Ednl)
## Ednl
##   Postgrad Researcher  Undergrad 
##        298        199        503
knitr::kable(table(Ednl))
Ednl Freq
Postgrad 298
Researcher 199
Undergrad 503
knitr::kable(table(AI_tool))
AI_tool Freq
Chatbot 241
ChatGPT 261
Copilot 258
Gemini 240
knitr::kable(table(HoursOnAI))
HoursOnAI Freq
1 132
2 151
3 119
4 161
5 154
6 145
7 138
knitr::kable(table(Purpose))
Purpose Freq
Coding 211
General Queries 194
Problem Solving 188
Research 215
Writing 192
knitr::kable(table(Discipline))
Discipline Freq
Arts 239
Commerce 244
Humanities 272
STEM 245
knitr::kable(table(Preference))
Preference Freq
Interactive 345
Multimedia 341
Text-Based 314
knitr::kable(table(AnyChallenge))
AnyChallenge Freq
Coding 264
Data Analysis 238
Time Management 243
Writing Clarity 255
knitr::kable(table(HoursSavedByAI))
HoursSavedByAI Freq
1 125
2 94
3 107
4 96
5 86
6 98
7 102
8 89
9 106
10 97
hist((age))

knitr::kable(table(Effectivenes))
Effectivenes Freq
1 117
2 101
3 96
4 104
5 124
6 131
7 109
8 122
9 96
hist(GPA)

Calculate quantiles.

agec<-quantile(age,c(0.25,0.5,0.75))
barplot(agec)

Age categories:

#sort(AI_02$age)
AI_02<-within(AI_02,{
    age.cat<- NA
    age.cat[age < 21] <- "Young"
    age.cat[age >= 21 & age<24]<-"Middle"
    age.cat[age >= 24 & age<27]<-"Senior"
    age.cat[age >= 27]<-"Older"
})
table(AI_02$age.cat)
## 
## Middle  Older Senior  Young 
##    249    280    240    231
str(AI_02)
## tibble [1,000 × 14] (S3: tbl_df/tbl/data.frame)
##  $ Ednl          : chr [1:1000] "Undergrad" "Researcher" "Postgrad" "Postgrad" ...
##  $ AI_tool       : chr [1:1000] "Gemini" "Chatbot" "Copilot" "Chatbot" ...
##  $ HoursOnAI     : num [1:1000] 2 6 4 5 5 2 1 4 5 2 ...
##  $ Perceiv       : num [1:1000] 6 8 8 5 6 4 9 8 1 2 ...
##  $ Purpose       : chr [1:1000] "Research" "Writing" "Coding" "Coding" ...
##  $ Satisfied     : num [1:1000] 4 5 5 1 4 5 2 2 4 1 ...
##  $ Discipline    : chr [1:1000] "Commerce" "STEM" "Arts" "Commerce" ...
##  $ Preference    : chr [1:1000] "Text-Based" "Text-Based" "Interactive" "Text-Based" ...
##  $ AnyChallenge  : chr [1:1000] "Writing Clarity" "Time Management" "Data Analysis" "Data Analysis" ...
##  $ HoursSavedByAI: num [1:1000] 2 1 7 10 9 9 3 6 7 10 ...
##  $ age           : num [1:1000] 20 27 26 26 22 20 19 25 23 27 ...
##  $ Effectivenes  : num [1:1000] 8 4 3 1 9 6 6 9 1 6 ...
##  $ GPA           : num [1:1000] 3.85 3 2.66 3.47 2.07 2.95 2.67 3.84 2.02 3.11 ...
##  $ age.cat       : chr [1:1000] "Young" "Older" "Senior" "Senior" ...
summary(AI_02$age.cat)
##    Length     Class      Mode 
##      1000 character character
boxplot(GPA~Ednl)

boxplot(GPA~AI_tool)

boxplot(GPA~HoursOnAI)

boxplot(GPA~Purpose)

boxplot(GPA~Perceiv)

boxplot(GPA~Satisfied)

boxplot(GPA~Discipline)

boxplot(GPA~Preference)

boxplot(GPA~AnyChallenge)

boxplot(GPA~HoursSavedByAI)

boxplot(GPA~Effectivenes)

boxplot(GPA~AI_02$age.cat)

Re-coding GPA into two categories - Low and High wrt mean.

AI_02<-within(AI_02,{
    gpac<- "NA"
    gpac[GPA< 3]<-"Low"
    gpac[GPA>= 3]<-"High"
})

Tabulate gpac

summary(AI_02$gpac)
##    Length     Class      Mode 
##      1000 character character
table(AI_02$gpac)
## 
## High  Low 
##  497  503