Art, Design, and Vocation are all diff-different

Art, Design, and Vocation are all diff-different

Author

Sara S

Introduction

The case study named “Art, Design, and Vocation are all diff-different” is an exploration of difference in grades of the previous class among the students of B.Des, B.Voc and BFA.

Importing Packages

library(tidyverse)
── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
✔ dplyr     1.1.4     ✔ readr     2.1.5
✔ forcats   1.0.0     ✔ stringr   1.5.1
✔ ggplot2   3.5.1     ✔ tibble    3.2.1
✔ lubridate 1.9.3     ✔ tidyr     1.3.1
✔ purrr     1.0.2     
── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
✖ dplyr::filter() masks stats::filter()
✖ dplyr::lag()    masks stats::lag()
ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(ggformula)
Loading required package: scales

Attaching package: 'scales'

The following object is masked from 'package:purrr':

    discard

The following object is masked from 'package:readr':

    col_factor

Loading required package: ggridges

New to ggformula?  Try the tutorials: 
    learnr::run_tutorial("introduction", package = "ggformula")
    learnr::run_tutorial("refining", package = "ggformula")
library(mosaic)
Registered S3 method overwritten by 'mosaic':
  method                           from   
  fortify.SpatialPolygonsDataFrame ggplot2

The 'mosaic' package masks several functions from core packages in order to add 
additional features.  The original behavior of these functions should not be affected by this.

Attaching package: 'mosaic'

The following object is masked from 'package:Matrix':

    mean

The following object is masked from 'package:scales':

    rescale

The following objects are masked from 'package:dplyr':

    count, do, tally

The following object is masked from 'package:purrr':

    cross

The following object is masked from 'package:ggplot2':

    stat

The following objects are masked from 'package:stats':

    binom.test, cor, cor.test, cov, fivenum, IQR, median, prop.test,
    quantile, sd, t.test, var

The following objects are masked from 'package:base':

    max, mean, min, prod, range, sample, sum
library(broom)
library(infer)

Attaching package: 'infer'

The following objects are masked from 'package:mosaic':

    prop_test, t_test
library(patchwork) 
library(ggprism) 
library(supernova) 

Attaching package: 'supernova'

The following object is masked from 'package:scales':

    number
library(crosstable)

Attaching package: 'crosstable'

The following object is masked from 'package:purrr':

    compact

Dataset: Grades

grades<- read_csv("../../data/grades.csv")
Rows: 90 Columns: 7
── Column specification ────────────────────────────────────────────────────────
Delimiter: ","
chr (4): Degree, Course, Letter_Grade, Gender
dbl (3): SN, Year, Score

ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
grades
# A tibble: 90 × 7
      SN Degree Course  Year Letter_Grade Score Gender
   <dbl> <chr>  <chr>  <dbl> <chr>        <dbl> <chr> 
 1     1 B.Des  CAC        2 A              8   F     
 2     2 B.Des  CAC        2 O              9.6 F     
 3     3 B.Des  IADP       2 A+             9.2 F     
 4     4 B.Des  CE         2 O              9.8 F     
 5     5 B.Des  BSSD       2 P              3   M     
 6     6 B.Des  CAC        2 O              9.5 F     
 7     7 B.Des  PSD        2 A+             9   F     
 8     8 B.Des  PSD        2 A+             9   F     
 9     9 B.Des  PSD        2 A+             9   F     
10    10 B.Des  BSSD       3 A+             9   F     
# ℹ 80 more rows
glimpse(grades)
Rows: 90
Columns: 7
$ SN           <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17…
$ Degree       <chr> "B.Des", "B.Des", "B.Des", "B.Des", "B.Des", "B.Des", "B.…
$ Course       <chr> "CAC", "CAC", "IADP", "CE", "BSSD", "CAC", "PSD", "PSD", …
$ Year         <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 3, 3, 2, 2, …
$ Letter_Grade <chr> "A", "O", "A+", "O", "P", "O", "A+", "A+", "A+", "A+", "A…
$ Score        <dbl> 8.0, 9.6, 9.2, 9.8, 3.0, 9.5, 9.0, 9.0, 9.0, 9.0, 8.0, 8.…
$ Gender       <chr> "F", "F", "F", "F", "M", "F", "F", "F", "F", "F", "F", "F…
inspect(grades)

categorical variables:  
          name     class levels  n missing
1       Degree character      3 90       0
2       Course character     15 90       0
3 Letter_Grade character      7 90       0
4       Gender character      2 90       0
                                   distribution
1 B.Des (33.3%), B.FA (33.3%) ...              
2 DMA (22.2%), UIID (14.4%), DMP (12.2%) ...   
3 A (33.3%), A+ (27.8%), B+ (18.9%) ...        
4 F (63.3%), M (36.7%)                         

quantitative variables:  
   name   class min    Q1 median    Q3 max      mean         sd  n missing
1    SN numeric   1 23.25   45.5 67.75  90 45.500000 26.1247010 90       0
2  Year numeric   1  2.00    2.0  3.00   3  2.333333  0.6180797 90       0
3 Score numeric   3  7.00    8.0  9.00  10  8.063333  1.1346880 90       0
skimr::skim(grades)
Data summary
Name grades
Number of rows 90
Number of columns 7
_______________________
Column type frequency:
character 4
numeric 3
________________________
Group variables None

Variable type: character

skim_variable n_missing complete_rate min max empty n_unique whitespace
Degree 0 1 4 5 0 3 0
Course 0 1 2 5 0 15 0
Letter_Grade 0 1 1 2 0 7 0
Gender 0 1 1 1 0 2 0

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
SN 0 1 45.50 26.12 1 23.25 45.5 67.75 90 ▇▇▇▇▇
Year 0 1 2.33 0.62 1 2.00 2.0 3.00 3 ▁▁▇▁▆
Score 0 1 8.06 1.13 3 7.00 8.0 9.00 10 ▁▁▆▇▇

Factorizing

grades2<- grades %>% 
  mutate(
    Course = as_factor(Course),
    Degree = as_factor(Degree),
    Gender = as_factor(Gender),
    Letter_Grade= as_factor(Letter_Grade)
  )
grades2
# A tibble: 90 × 7
      SN Degree Course  Year Letter_Grade Score Gender
   <dbl> <fct>  <fct>  <dbl> <fct>        <dbl> <fct> 
 1     1 B.Des  CAC        2 A              8   F     
 2     2 B.Des  CAC        2 O              9.6 F     
 3     3 B.Des  IADP       2 A+             9.2 F     
 4     4 B.Des  CE         2 O              9.8 F     
 5     5 B.Des  BSSD       2 P              3   M     
 6     6 B.Des  CAC        2 O              9.5 F     
 7     7 B.Des  PSD        2 A+             9   F     
 8     8 B.Des  PSD        2 A+             9   F     
 9     9 B.Des  PSD        2 A+             9   F     
10    10 B.Des  BSSD       3 A+             9   F     
# ℹ 80 more rows
glimpse(grades2)
Rows: 90
Columns: 7
$ SN           <dbl> 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17…
$ Degree       <fct> B.Des, B.Des, B.Des, B.Des, B.Des, B.Des, B.Des, B.Des, B…
$ Course       <fct> CAC, CAC, IADP, CE, BSSD, CAC, PSD, PSD, PSD, BSSD, VCSB,…
$ Year         <dbl> 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 3, 2, 3, 3, 2, 2, …
$ Letter_Grade <fct> A, O, A+, O, P, O, A+, A+, A+, A+, A, A, A, B+, B+, A+, A…
$ Score        <dbl> 8.0, 9.6, 9.2, 9.8, 3.0, 9.5, 9.0, 9.0, 9.0, 9.0, 8.0, 8.…
$ Gender       <fct> F, F, F, F, M, F, F, F, F, F, F, F, M, M, F, M, F, M, F, …
inspect(grades2)

categorical variables:  
          name  class levels  n missing
1       Degree factor      3 90       0
2       Course factor     15 90       0
3 Letter_Grade factor      7 90       0
4       Gender factor      2 90       0
                                   distribution
1 B.Des (33.3%), B.Voc (33.3%) ...             
2 DMA (22.2%), UIID (14.4%), DMP (12.2%) ...   
3 A (33.3%), A+ (27.8%), B+ (18.9%) ...        
4 F (63.3%), M (36.7%)                         

quantitative variables:  
   name   class min    Q1 median    Q3 max      mean         sd  n missing
1    SN numeric   1 23.25   45.5 67.75  90 45.500000 26.1247010 90       0
2  Year numeric   1  2.00    2.0  3.00   3  2.333333  0.6180797 90       0
3 Score numeric   3  7.00    8.0  9.00  10  8.063333  1.1346880 90       0
skimr::skim(grades2)
Data summary
Name grades2
Number of rows 90
Number of columns 7
_______________________
Column type frequency:
factor 4
numeric 3
________________________
Group variables None

Variable type: factor

skim_variable n_missing complete_rate ordered n_unique top_counts
Degree 0 1 FALSE 3 B.D: 30, B.V: 30, B.F: 30
Course 0 1 FALSE 15 DMA: 20, UII: 13, DMP: 11, CAC: 8
Letter_Grade 0 1 FALSE 7 A: 30, A+: 25, B+: 17, O: 10
Gender 0 1 FALSE 2 F: 57, M: 33

Variable type: numeric

skim_variable n_missing complete_rate mean sd p0 p25 p50 p75 p100 hist
SN 0 1 45.50 26.12 1 23.25 45.5 67.75 90 ▇▇▇▇▇
Year 0 1 2.33 0.62 1 2.00 2.0 3.00 3 ▁▁▇▁▆
Score 0 1 8.06 1.13 3 7.00 8.0 9.00 10 ▁▁▆▇▇

Crosstable

grades2%>% crosstable(Score~Degree) %>% as_flextable()

label

variable

Degree

B.Des

B.Voc

B.FA

Score

Min / Max

3.0 / 10.0

5.0 / 9.5

6.0 / 9.0

Med [IQR]

9.0 [8.0;9.0]

8.0 [8.0;9.0]

8.0 [7.0;8.0]

Mean (std)

8.4 (1.3)

8.2 (1.1)

7.6 (0.8)

N (NA)

30 (0)

30 (0)

30 (0)

Visualization

gf_boxplot(Score ~ Degree, data = grades2, fill = ~Degree,alpha = 0.5) %>%
  gf_vline(xintercept = ~ mean(Score)) %>%
  gf_labs(title = "Boxplots of Grades",
          x = "Degree",
          y = "Score") %>%
  gf_refine(scale_x_discrete(guide = "prism_bracket"), guides(fill = guide_legend(title = "Degree")))
Warning: The S3 guide system was deprecated in ggplot2 3.5.0.
ℹ It has been replaced by a ggproto system that can be extended.

The analysis of the crosstable and boxplot provides insights into score variations across the three degree programs: B.Des, B.Voc, and B.FA. For B.Des, scores range from 3.0 to 10.0, with a mean score of 8.4 and a standard deviation of 1.3. The typical score falls around 9.0, indicating high and consistent grades among B.Des students, with a single outlier on the lower end around 3.0.

In comparison, B.Voc scores range from 5.0 to 9.5, with a slightly lower average of 8.2 and a standard deviation of 1.1. Most scores cluster between 8.0 and 9.0, but the lower whisker is longer, showing greater variability in the lower range, with one outlier around 5.0. For B.FA, scores fall between 6.0 and 9.0, with an average of 7.6 and a standard deviation of 0.8, indicating that these students typically score lower than B.Des and B.Voc students.

Data Dictionary

Quantitative Variables

Score: The numerical score obtained by students.

Qualitative Variables

  • Gender: Indicates the gender of individuals.

  • Degree: The type of degree program.

  • Course: Represents the specific course within the degree program.

  • Letter_Grade: Letter grade assigned to students based on the mark like A or B+.

  • Year: Represents the year of study for each student.

Degree

Histogram

gf_histogram(~Score, fill = ~Gender,data = grades2, alpha = 0.5) %>% 
  gf_facet_wrap(vars(Degree)) %>% 
  gf_labs(title="Which Degree gets more Grades?")

In the B.Des program, both girls and guys generally achieve high scores, with a noticeable concentration around 8 to 10, indicating that most students perform well. The girls appear to have a higher score distribution compared to the guys in this program.

For B.Voc, the score distribution is more varied, with both genders showing a range from about 5 to 9. However, girls tend to cluster more around 8 to 9, while guys have a wider spread, including some lower scores.

In the B.FA program, scores are lower overall, with both genders mostly scoring between 6 and 8, with very few reaching 9, the highest. In this program, girls achieve scores ranging from 7 to 9, indicating that many perform well.

Overall, the score distribution in B.FA remains lower than in B.Des and B.Voc, suggesting that B.FA students face greater challenges in reaching higher scores compared to their peers in other programs.

gf_histogram(~Score, fill = ~Course,data = grades2, alpha = 0.5) %>% 
    gf_facet_wrap(vars(Degree)) %>% 
  gf_labs(title="Which Course in each Degree gets more Grades?")

In the B.Des program, several courses, particularly CAC and PSD, show a significant concentration of high scores, mostly between 8 and 10, indicating strong performance. The scores for these courses suggest that they are well-received and likely provide students with the knowledge and skills needed for success.

For the B.Voc program, courses like UIID and DMP exhibit varied score distributions, with a broader range from 5 to 9.5. UIID seems to have a concentration of scores around 8 to 9, indicating that students perform well, while DMP shows a more spread-out distribution, including lower scores.

In the B.FA program, scores across courses tend to be lower, primarily falling between 6 and 9. The course DMA shows a notable distribution with many scores around 7 to 8, suggesting it might be more challenging for students.

Overall, the plot illustrates that while B.Des students generally achieve higher scores across courses

gf_histogram(~Score, fill = ~Letter_Grade,data = grades2, alpha = 0.5) %>% 
    gf_facet_wrap(vars(Degree)) %>% 
  gf_labs(title="Overall Letter Grades for each Degree")

In the B.Des program, there are many high grades, especially A and A+, with scores mostly between 8 and 10, showing that most students do well. The B.Voc program has a mix of grades, including some high ones along with lower grades like B and C, showing a wider range of student performance. In the B.FA program, most scores are on the lower side, with many students getting B and C, and fewer achieving A or A+, suggesting that getting higher letter grades is harder.

Error-Bar plot

grades3 <- aov(Score~Degree, data = grades2)
supernova::pairwise(grades3,
  correction = "Bonferroni", 
  alpha = 0.05, 
  var_equal = TRUE, 
  plot = TRUE
)

── Pairwise t-tests with Bonferroni correction ─────────────────────────────────
Model: Score ~ Degree
Degree
Levels: 3
Family-wise error-rate: 0.049

  group_1 group_2   diff pooled_se      t    df  lower  upper  p_adj
  <chr>   <chr>    <dbl>     <dbl>  <dbl> <int>  <dbl>  <dbl>  <dbl>
1 B.Voc   B.Des   -0.173     0.201 -0.864    87 -0.607  0.261 1.0000
2 B.FA    B.Des   -0.757     0.201 -3.770    87 -1.191 -0.323  .0009
3 B.FA    B.Voc   -0.583     0.201 -2.906    87 -1.017 -0.149  .0139

The results of the pairwise t-tests using Bonferroni correction show significant differences in scores between the degree programs. When comparing B.Des and B.FA, there is a significant difference in scores, with a p-value of 0.0009, indicating that students in B.Des perform significantly better than those in B.FA, with an average score difference of about 3.77. Additionally, the comparison between B.Voc and B.FA also shows a significant difference, with a p-value of 0.0139, suggesting that B.Voc students score higher than B.FA students. However, there is no significant difference between B.Des and B.Voc, as indicated by the p-value of 1.0000, suggesting that both groups perform similarly overall.

The confidence intervals for the difference in means between B.Des and B.FA and B.Voc and B.FA fall entirely in the negative range, indicating a statistically significant difference, as B.Des and B.Voc students outperform B.FA students. This reconfirms the conclusion that B.FA students face greater challenges in achieving higher scores compared to their B.Des and B.Voc peers. In contrast, the confidence intervals for B.Des and B.Voc cross the 0.0 line, suggesting that there is no significant difference in performance between these two programs.

Effect Size

grades3
Call:
   aov(formula = Score ~ Degree, data = grades2)

Terms:
                   Degree Residuals
Sum of Squares    9.42867 105.16033
Deg. of Freedom         2        87

Residual standard error: 1.099427
Estimated effects may be unbalanced

The sum of squares for the degree program, 9.43, indicates the variance in scores due to differences between B.Des, B.Voc, and B.FA, with a higher value suggesting meaningful differences in average scores among them. While there isn’t a specific threshold for significance, a large value compared to the residual sum of squares, 105.16, suggests that degree programs have an impact on scores. The residual sum of squares shows the variation in scores that isn’t explained by the degree programs, and a higher value suggests that other factors are influencing student performance. This suggests that there is a significant difference in grades among students from various degree programs. Therefore, the data indicates that at least one group’s mean score is significantly different from the others, confirming that degree program influences student grades.

Null Hypothesis

There is no difference in grades for students part various degrees.

Checking ANOVA Assumptions

  1. Data and errors are normally distributed.

  2. Variances are equal.

  3. Observations are independent.

Shapiro Test

shapiro.test(x = grades2$Score)

    Shapiro-Wilk normality test

data:  grades2$Score
W = 0.88503, p-value = 9.198e-07

The Shapiro test for the scores has a p-value of 9.198 x 10 to the power of negative 7. Since this p-value is significantly lower than 0.05, it indicates that the scores do not follow a normal distribution.

Shapiro Test for each factor grouped by Degree

grades2 %>%
  group_by(Degree) %>%
  group_modify(~ .x %>%
    select(Score) %>%
    as_vector() %>%
    shapiro.test() %>%
    broom::tidy())
# A tibble: 3 × 4
# Groups:   Degree [3]
  Degree statistic   p.value method                     
  <fct>      <dbl>     <dbl> <chr>                      
1 B.Des      0.753 0.0000101 Shapiro-Wilk normality test
2 B.Voc      0.887 0.00418   Shapiro-Wilk normality test
3 B.FA       0.875 0.00211   Shapiro-Wilk normality test

The Shapiro tests for each degree program revealed that the scores do not follow a normal distribution. For the B.Des program, the test statistic is 0.753 with a p-value of 1.005 x 10 to the power of negative 5, indicating a significant difference from normality. In the B.Voc program, the test statistic is around 0.887 and the p-value is 4.175 x 10 to the power of negative 3, again distribution which is not normal. Similarly, the B.FA program shows a test statistic of about 0.875 and a p-value of 2.115 x 10 to the power of negative 3, reinforcing the finding of aa distribution that is not normal. Overall, the low p-values across all three degree programs imply that the score distributions are not normal.

Residual-Post Model

 grades2 %>%
  as_tibble() %>%
  gf_dhistogram(~Score, data = .) %>%
  gf_fitdistr(dist = "dnorm")

##
grades2 %>%
  as_tibble() %>%
  gf_qq(~Score, data = .) %>%
  gf_qqstep() %>%
  gf_qqline()

##
shapiro.test(grades3$residuals)

    Shapiro-Wilk normality test

data:  grades3$residuals
W = 0.87869, p-value = 5.076e-07

The density histogram of scores, fitted with a normal distribution curve, illustrates that the actual distribution deviates significantly from normality. The histogram shows a left-skewed distribution, with the majority of students scoring between 8 and 10 and fewer students achieving scores above 10. The fitted normal curve does not align well with the histogram, particularly in the higher score range, further suggesting that the scores do not represent a normal distribution.

The Q-Q plot for scores also reveals significant departures from normality. The points deviate from the diagonal line, especially in the lower tail and around the higher scores, indicating that the actual scores lie significantly away from the expected values for a normal distribution. The Q-Q steps demonstrate where the actual scores diverge from a theoretical normal distribution.

The Shapiro test on the residuals from the ANOVA model yielded a test statistic of approximately 0.879 and a p-value of 5.076 x 10 to the power of negative 7. This extremely low p-value indicates a distribution that is not normal for the residuals, suggesting that the assumptions required for ANOVA may not hold.

Checking for Similar Variance

grades2 %>%
  group_by(Gender) %>%
  summarise(variance = var(Score))
# A tibble: 2 × 2
  Gender variance
  <fct>     <dbl>
1 F         0.886
2 M         1.89 
DescTools::LeveneTest(Score ~ Degree, data = grades2)
Levene's Test for Homogeneity of Variance (center = median)
      Df F value Pr(>F)
group  2  0.7294 0.4851
      87               
fligner.test(Score ~ Degree, data = grades2)

    Fligner-Killeen test of homogeneity of variances

data:  Score by Degree
Fligner-Killeen:med chi-squared = 2.2707, df = 2, p-value = 0.3213

Levene’s test showed an F value of approximately 0.7294 with a p-value of 0.4851, indicating that there is no significant difference in variance across the degree groups of B.Des, B.Voc, and B.FA. Similarly, the Fligner-Killeen test resulted in a p-value of 0.3213, further supporting the conclusion that the variances are similar among the groups.

Permutation

observed_infer <-grades2 %>%
  specify(Score~Degree) %>%
  hypothesise(null = "independence") %>%
  calculate(stat = "F")
observed_infer
Response: Score (numeric)
Explanatory: Degree (factor)
Null Hypothesis: independence
# A tibble: 1 × 1
   stat
  <dbl>
1  3.90
null_dist_infer <- grades2 %>%
  specify(Score~Degree) %>%
  hypothesise(null = "independence") %>%
  generate(reps = 4999, type = "permute") %>%
  calculate(stat = "F")
##
null_dist_infer
Response: Score (numeric)
Explanatory: Degree (factor)
Null Hypothesis: independence
# A tibble: 4,999 × 2
   replicate    stat
       <int>   <dbl>
 1         1 0.672  
 2         2 0.00785
 3         3 1.87   
 4         4 0.305  
 5         5 0.399  
 6         6 1.15   
 7         7 0.781  
 8         8 3.76   
 9         9 0.327  
10        10 0.0504 
# ℹ 4,989 more rows
null_dist_infer %>%
  visualise(method = "simulation") +
  shade_p_value(obs_stat = observed_infer$stat, direction = "right") +
  scale_x_continuous(trans = "log10", expand = c(0, 0)) +
  coord_cartesian(xlim = c(0.2, 500), clip = "off") +
  annotation_logticks(outside = FALSE)
Warning in transformation$transform(x): NaNs produced
Warning in scale_x_continuous(trans = "log10", expand = c(0, 0)): log-10
transformation introduced infinite values.

The x-axis shows the F-statistic values on a logarithmic scale, making it easier to see how the values are spread out. Most of the permuted F-statistics are clustered to the left, with only a few extending to the right. The shaded area represents the p-value, showing how extreme the observed F-statistic of about 3.90 is compared to the null distribution. This means the observed F-statistic is towards the end of the null distribution, indicating that such a high value is rare under the null hypothesis of independence. This suggests there is a significant difference in mean scores among the degree programs. Therefore, the null hypothesis that there is no difference in grades for students across various degrees is rejected.

B.Voc Courses

Histogram

gf_histogram(~Score, fill = ~Gender, data = grades2 %>% filter(Degree == "B.Voc"), alpha = 0.5) %>% 
  gf_facet_wrap(vars(Course)) %>% 
  gf_labs(title = "Score Distribution by Course in B.Voc")

In the B.Voc program, UIID, scores are generally high, mostly falling between 8 and 9, which suggests students are performing well in this course. ID also has a relatively strong score range, but there is a bit more spread in the scores, indicating that while many students perform well, a few score lower.

In DMP, the scores are more diverse, with students spread out across a wider range, from lower to higher scores. GADP and Film also show a mix, but in these courses, scores tend to concentrate in the middle range around 7 to 8, indicating some challenges in reaching top scores.

Error-Bar plot

grades4 <- aov(Score ~ Course, data = grades2 %>% 
                 filter(Degree == "B.Voc"))
supernova::pairwise(grades4,
  correction = "Bonferroni", 
  alpha = 0.05, 
  var_equal = TRUE, 
  plot = TRUE
)

── Pairwise t-tests with Bonferroni correction ─────────────────────────────────
Model: Score ~ Course
Course
Levels: 5
Family-wise error-rate: 0.049

   group_1 group_2   diff pooled_se      t    df  lower upper  p_adj
   <chr>   <chr>    <dbl>     <dbl>  <dbl> <int>  <dbl> <dbl>  <dbl>
 1 ID      UIID    -1.192     0.868 -1.374    25 -3.611 1.226 1.0000
 2 DMP     UIID     0.035     0.343  0.102    25 -0.920 0.990 1.0000
 3 GADP    UIID     0.308     0.478  0.644    25 -1.025 1.640 1.0000
 4 Film    UIID    -0.192     0.868 -0.222    25 -2.611 2.226 1.0000
 5 DMP     ID       1.227     0.873  1.405    25 -1.207 3.661 1.0000
 6 GADP    ID       1.500     0.935  1.605    25 -1.106 4.106 1.0000
 7 Film    ID       1.000     1.182  0.846    25 -2.296 4.296 1.0000
 8 GADP    DMP      0.273     0.488  0.559    25 -1.088 1.633 1.0000
 9 Film    DMP     -0.227     0.873 -0.260    25 -2.661 2.207 1.0000
10 Film    GADP    -0.500     0.935 -0.535    25 -3.106 2.106 1.0000

The CI for the mean score differences between B.Voc courses all cross the dotted line at zero, which indicates that the mean differences are not statistically significant across these courses. When confidence intervals intersect this line, it implies that the observed differences could be due to random variation rather than true differences in average performance. This alignment suggests that, while there may be slight performance variations across UIID, ID, DMP, GADP, and Film, they do not differ enough to confirm significant distinctions statistically. Thus, despite some variations in score spread and concentration, these results imply that student performance is fairly consistent across all courses in the B.Voc program.

Effect Size

grades4
Call:
   aov(formula = Score ~ Course, data = grades2 %>% filter(Degree == 
    "B.Voc"))

Terms:
                  Course Residuals
Sum of Squares   1.84895  34.95105
Deg. of Freedom        4        25

Residual standard error: 1.182388
Estimated effects may be unbalanced

The results indicate that the variability in scores between the B.Voc courses, with a sum of squares of 1.84 and 4 degrees of freedom, is relatively small compared to the variability within the courses, which has a sum of squares of 34.95 and 25 degrees of freedom. The residual standard error of 1.18 suggests that individual scores tend to deviate from their course mean by about this amount on average. Since the sum of squares between courses is small relative to the residuals, it implies that there is limited evidence of significant differences in average scores across the B.Voc courses.

Null Hypothesis

There is no difference in scores among courses in the B.Voc program.

Checking ANOVA Assumptions

  1. Data and errors are normally distributed.

  2. Variances are equal.

  3. Observations are independent.

Shapiro Test

Notes:

pull(something): Extracts the column called from the filtered dataset.

shapiro.test(grades2 %>% 
               filter(Degree == "B.Voc") %>% 
               pull(Score))

    Shapiro-Wilk normality test

data:  grades2 %>% filter(Degree == "B.Voc") %>% pull(Score)
W = 0.88734, p-value = 0.004176

The Shapiro test has a p-value of 0.004, indicating that the distribution of scores for B.Voc courses is not normal. Additionally, it was necessary to specify the pull(Score) function to select only the scores column, as attempting to run the test without this specification led to an error indicating that the column did not exist in the filtered data which did not previously happen when doing the same for cartoon.

Checking for Similar Variance

grades2 %>%
  filter(Degree == "B.Voc") %>%
  group_by(Course) %>%
  summarise(variance = var(Score))
# A tibble: 5 × 2
  Course variance
  <fct>     <dbl>
1 UIID      0.731
2 ID       NA    
3 DMP       2.52 
4 GADP      0.333
5 Film     NA    
DescTools::LeveneTest(Score ~ Course, data = grades2 %>% 
                        filter(Degree == "B.Voc"))
Levene's Test for Homogeneity of Variance (center = median)
      Df F value Pr(>F)
group  4     1.3  0.297
      25               
fligner.test(Score ~ Course, data = grades2 %>% 
               filter(Degree == "B.Voc"))

    Fligner-Killeen test of homogeneity of variances

data:  Score by Course
Fligner-Killeen:med chi-squared = 4.6647, df = 4, p-value = 0.3235

The Levene’s Test shows an F value of 1.3 with a p-value of 0.297, suggesting that there is no significant difference in variances across the courses in the B.Voc program. Similarly, the Fligner-Killeen test shows a p-value of 0.323. This further indicates that the variances in scores across the courses do not differ significantly, supporting the assumption of similar variances.

Permutation

observed_infer1 <-grades2 %>%
  filter(Degree == "B.Voc") %>%
  specify(Score ~ Course) %>%
  hypothesise(null = "independence") %>%
  calculate(stat = "F")
Dropping unused factor levels c("CAC", "IADP", "CE", "BSSD", "PSD", "VCSB",
"IAIDP", "HCD", "CAP", "DMA") from the supplied explanatory variable 'Course'.
observed_infer
Response: Score (numeric)
Explanatory: Degree (factor)
Null Hypothesis: independence
# A tibble: 1 × 1
   stat
  <dbl>
1  3.90
null_dist_infer1 <- grades2 %>%
  filter(Degree == "B.Voc") %>%
  specify(Score ~ Course) %>%
  hypothesise(null = "independence") %>%
  generate(reps = 4999, type = "permute") %>%
  calculate(stat = "F")
Dropping unused factor levels c("CAC", "IADP", "CE", "BSSD", "PSD", "VCSB",
"IAIDP", "HCD", "CAP", "DMA") from the supplied explanatory variable 'Course'.
##
null_dist_infer1
Response: Score (numeric)
Explanatory: Course (factor)
Null Hypothesis: independence
# A tibble: 4,999 × 2
   replicate  stat
       <int> <dbl>
 1         1 0.289
 2         2 0.539
 3         3 0.339
 4         4 1.28 
 5         5 0.915
 6         6 0.547
 7         7 0.687
 8         8 2.22 
 9         9 0.938
10        10 0.516
# ℹ 4,989 more rows
null_dist_infer1 %>%
  visualise(method = "simulation") +
  shade_p_value(obs_stat = observed_infer$stat, direction = "right") +
  scale_x_continuous(trans = "log10", expand = c(0, 0)) +
  coord_cartesian(xlim = c(0.2, 500), clip = "off") +
  annotation_logticks(outside = FALSE)
Warning in transformation$transform(x): NaNs produced
Warning in scale_x_continuous(trans = "log10", expand = c(0, 0)): log-10
transformation introduced infinite values.

The visualizations and statistical results are similar to cartoons, but they have been specifically created for the various courses within the B.Voc program. The use of simulations and log-transformed scales effectively highlights the differences in scores across different courses, focusing on the performance of B.Voc students.

Conclusion

In the case study “Art, Design, and Vocation are all diff-different,” the grades of students from three programs—B.Des, B.Voc, and B.FA—were examined. The initial analysis using crosstables and boxplots revealed that B.Des students had the highest average score of 8.4, while B.FA students had a lower average of 7.6. Histograms showed that B.Des students scored higher overall, and the letter grades indicated that they earned more A’s and A+’s compared to B.FA students, who tended to receive lower grades.

Several statistical tests were conducted to check assumptions. The Shapiro test indicated that the scores were not normally distributed, and the Q-Q plots confirmed this deviation. However, Levene’s test showed that the variances across the degree programs were similar. A permutation test calculated an F-statistic of about 3.90, suggesting a significant difference in mean scores among the programs. This led to the rejection of the null hypothesis that there is no difference in grades between the degree programs.

When looking at the B.Voc program specifically, the histogram showed that UIID scores were generally high, between 8 and 9, while ID scores varied more, indicating some challenges. DMP displayed a wide range of scores, and GADP and Film tended to cluster around 7 to 8. The statistical tests showed that there was no significant mean score differences among the B.Voc courses, and the Shapiro test confirmed that the score distribution was not normal. Levene’s test indicated similar variances across courses.

The findings indicate that the degree program impacts student performance, with B.Des students generally achieving better scores than B.FA students. The results also highlight the varying educational experiences and outcomes across different programs. Although similar variances were found among the groups, the idea that the scores were normally distributed was rejected, emphasizing the need to explore further factors affecting student success in different degrees.